Module Name: src Committed By: riastradh Date: Tue Mar 11 13:35:54 UTC 2025
Modified Files: src/lib/libc/gen: arc4random.c Log Message: arc4random(3): Isolate endian-dependence of crypto_onetimestream. Make it all happen in crypto_le32enc/dec (which in this file is actually just memcpy). This way you can swap out crypto_le32enc/dec to test either byte order on any machine, e.g. for generating the test vectors. And if we ever decide that it's not worthwhile to take advantage of the purely nondeterministic nature of the API to make this have potentially less performance penalty on big-endian systems (which I'm not sure has ever been measured anyway), it'll all continue to work under #define crypto_le32enc le32enc #define crypto_le32dec le32dec with all the _BYTE_ORDER == _BIG_ENDIAN conditionals removed from the self-tests. No change to the code of crypto_onetimstream on hppa under tools gcc. To generate a diff of this commit: cvs rdiff -u -r1.48 -r1.49 src/lib/libc/gen/arc4random.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.