Rasmus Villemoes wrote in <20240415125628.780178-6-rasmus.villem...@prevas.dk>: |Instead of limiting the possible generated salts to 2^32 different |ones, try to get some actual random bits and mix those in. Keep the |old pseudo-random generation in place, so that even if |open_read_close() fails or only returns a partial result, we're not |doing any worse than previously. | |In fact, even with /dev/urandom being unavailable, this might still |improve things a bit since whatever sort-of random content might be in |the p buffer on entry is then mixed in.
By that time i thought (completely unrelated with your work) that the code from miscutils/seedrng.c which has a more broad view of where to get random data from should possibly be generalized. There are more than just one match for /dev/urandom, and they all want some random bits. --steffen | |Der Kragenbaer, The moon bear, |der holt sich munter he cheerfully and one by one |einen nach dem anderen runter wa.ks himself off |(By Robert Gernhardt) _______________________________________________ busybox mailing list busybox@busybox.net http://lists.busybox.net/mailman/listinfo/busybox