0f95ec4fd5
particular problem on hosts with only wireless interfaces that are definitely not safe to use as entropy sources. Add arc4randbytes() which hands out bytes from the same source used by arc4random(). This is intended to be a _temporary_ interface until we can design and implement a better general PRNG interface that is decoupled from the entropy-pool implementation. Modify key_randomfill() (used only for initialization vectors on SA creation and via key_sa_stir_iv(), which does not "stir", despite its name) to use arc4randbytes() instead of pulling bits directly from the entropy pool. It is my hope that this change will pose minimal integration problems for the KAME folks as the random-pool interface is *already* different between each BSD variant; this just simplifies the NetBSD case and solves a fairly serious problem. Note that it is generally considered acceptable cryptographic practice to use a fast stream cipher to generate IVs for encryption with stronger block ciphers. For example, the use of "non-Approved" PRNGs to generate IVs for "Approved" block ciphers is explicitly sanctioned by FIPS 140-2. |
||
---|---|---|
.. | ||
key_debug.c | ||
key_debug.h | ||
key_var.h | ||
key.c | ||
key.h | ||
keydb.c | ||
keydb.h | ||
keysock.c | ||
keysock.h | ||
Makefile |