Page MenuHomeFreeBSD

arc4random(3): Reduce diff with OpenBSD.
ClosedPublic

Authored by delphij on Aug 9 2022, 6:48 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Apr 22, 8:32 AM
Unknown Object (File)
Mon, Apr 22, 8:30 AM
Unknown Object (File)
Sun, Mar 31, 1:19 AM
Unknown Object (File)
Sun, Mar 31, 1:04 AM
Unknown Object (File)
Jan 17 2024, 2:58 AM
Unknown Object (File)
Dec 23 2023, 7:00 PM
Unknown Object (File)
Dec 23 2023, 11:33 AM
Unknown Object (File)
Dec 10 2023, 8:12 PM
Subscribers

Details

Summary

The main change was v1.57 by djm@:

Randomise the rekey interval a little. Previously, the chacha20
instance would be rekeyed every 1.6MB. This makes it happen at a
random point somewhere in the 1-2MB range.

MFC after: 2 weeks

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

r1.56 -- Not revalent to us
r1.57 -- the main change
r1.58 -- indent fix (follow up of r1.57)

This is mostly for diff reduction; the rs_count value of 1600000 was an arbitrary value.

With the change, we would use the entropy obtained from kernel to create a "fuzz" value for the initial rs_count when doing stir, the new rs_count would now be in range of [1048576,2097151]. This makes the stir interval less predicable for a very small cost for each stir.

This revision is now accepted and ready to land.Aug 9 2022, 8:12 AM
cem added a subscriber: cem.

As mentioned in email, we might also consider publishing a seed generation to the VDSO page from Fortuna.

This revision was automatically updated to reflect the committed changes.