summaryrefslogtreecommitdiffhomepage
path: root/src/uapi.h
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2016-07-05 17:14:59 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2016-07-22 16:48:51 +0200
commitd23fe2901d9877a60cd219d0d49df01aa07f5940 (patch)
treee68aaa32ed988ac13b504878ef55898aafcab519 /src/uapi.h
parent82831962b88b03ac4ced09e62e2822dfe482bb5b (diff)
index hashtable: run random indices through siphash
If /dev/urandom is a NOBUS RNG backdoor, like the infamous Dual_EC_DRBG, then sending 4 bytes of raw RNG output over the wire directly might not be such a great idea. This mitigates that vulnerability by, at some point before the indices are generated, creating a random secret. Then, for each session index, we simply run SipHash24 on an incrementing counter. This is probably overkill because /dev/urandom is probably not a backdoored RNG, and itself already uses several rounds of SHA-1 for mixing. If the kernel RNG is backdoored, there may very well be bigger problems at play. Four bytes is also not so many bytes. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'src/uapi.h')
0 files changed, 0 insertions, 0 deletions