aboutsummaryrefslogtreecommitdiff
path: root/win32/isaac.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* win32: improve seeding of PRNGsRon Yorston2023-01-111-36/+6
| | | | | | | | | | | | | | | | | busybox-w32 provides two PRNG implementations which are used in the emulation of /dev/urandom. The ad hoc method of seeding them has been replaced by calls to RtlGenRandom. The documentation for RtlGenRandom indicates it has been deprecated in favour of CryptGenRandom. The documentation for the latter indicates it has been deprecated in favour of the 'Cryptography Next Generation APIs'. Nonetheless, RtlGenRandom remains available in every version of Windows since XP. In the unlikely event that RtlGenRandom fails simply use the current time as the seed. Saves 192 bytes in the default configuration.
* win32: fix entropy collection for isaacRon Yorston2021-09-021-20/+10
| | | | | | | | | The condition to detect the end of the environment string was wrong. Don't bother calculating the MD5SUM of the environment, just XOR the bytes into the data. This reduces bloat by 320 bytes but only in the non-default case.
* win32: code shrinkRon Yorston2021-08-081-3/+3
| | | | | | | | | Save a few bytes: - When collecting entropy prefer functions we call elsewhere. - In uname(2) set 32-bit processor type to i686 and tweak it for i386.
* win32: tighten up code slightly in isaac.cRon Yorston2018-03-221-13/+5
|
* win32: reduce amount of static dataRon Yorston2018-03-041-48/+48
| | | | | | | It appears that uninitialised static variables are placed in the data section rather than bss, increasing the size of the binary. Rewrite some code to reduce the amount of static data.
* win32: make /dev/urandom more randomRon Yorston2018-02-231-0/+240