Am Samstag, 18. April 2015, 18:55:23 schrieb Herbert Xu: Hi Herbert, > > Incidentally the whole reset concept seems redundant as you could > always free and allocate a new RNG instead. So I'm planning on > replacing it with a seed/reseed function instead. IOW it will > keep the existing state and just add in new data if it's already > seeded. Very good. When you do that, may I ask you to also update the crypto_alloc_rng. This function has one major drawback at the moment: we are wasting precious entropy. The testmgr must allocate the RNG for performing its testing using crypto_alloc_rng. As the RNG implementation has no knowledge at allocation time that it will be used for testing, it will seed itself for the real work. Then comes testing: the seeded RNG is now reset with the test "entropy" and thereby wasting the initial seed. IMHO such change in the allocation function must happen when you remove the reset function, because the reset function currently is the way to perform testing of the RNGs. -- Ciao Stephan -- To unsubscribe from this list: send the line "unsubscribe linux-crypto" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html