aboutgitcodebugslistschat
path: root/tcp_vu.c
diff options
context:
space:
mode:
authorDavid Gibson <david@gibson.dropbear.id.au>2024-11-14 14:33:09 +1100
committerStefano Brivio <sbrivio@redhat.com>2024-11-14 19:00:38 +0100
commitb39760cc7d89e69c7fb12eccc3df3bd15e2d5665 (patch)
tree108160846ba6cd58147468b642654d4d15c44a2f /tcp_vu.c
parent71d5deed5eed3949ee09c5f0a53b4de0b09b4afc (diff)
downloadpasst-b39760cc7d89e69c7fb12eccc3df3bd15e2d5665.tar
passt-b39760cc7d89e69c7fb12eccc3df3bd15e2d5665.tar.gz
passt-b39760cc7d89e69c7fb12eccc3df3bd15e2d5665.tar.bz2
passt-b39760cc7d89e69c7fb12eccc3df3bd15e2d5665.tar.lz
passt-b39760cc7d89e69c7fb12eccc3df3bd15e2d5665.tar.xz
passt-b39760cc7d89e69c7fb12eccc3df3bd15e2d5665.tar.zst
passt-b39760cc7d89e69c7fb12eccc3df3bd15e2d5665.zip
passt: Seed libc's pseudo random number generator
We have an upcoming case where we need pseudo-random numbers to scatter timings, but we don't need cryptographically strong random numbers. libc's built in random() is fine for this purpose, but we should seed it. Extend secret_init() - the only current user of random numbers - to do this as well as generating the SipHash secret. Using /dev/random for a PRNG seed is probably overkill, but it's simple and we only do it once, so we might as well. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Diffstat (limited to 'tcp_vu.c')
0 files changed, 0 insertions, 0 deletions