summaryrefslogtreecommitdiff
path: root/lib/crypto
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2016-12-02 17:15:11 -0800
committerOri Bernstein <ori@eigenstate.org>2016-12-02 17:15:11 -0800
commitb56e495ba86c5fdded2486b15c1ac04fed79608f (patch)
tree38ba7393f27ead960bb4260d546d76bc441d7fb2 /lib/crypto
parent2f3123a05d6bf7cb556dfb0d6aa93b2008049868 (diff)
downloadmc-b56e495ba86c5fdded2486b15c1ac04fed79608f.tar.gz
We never actually got entropy.
Face. Meet palm. You two are going to be good friends.
Diffstat (limited to 'lib/crypto')
-rw-r--r--lib/crypto/rand.myr2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/crypto/rand.myr b/lib/crypto/rand.myr
index 07acaf9..21c3844 100644
--- a/lib/crypto/rand.myr
+++ b/lib/crypto/rand.myr
@@ -75,6 +75,8 @@ const randbytes = {dst
const stir = {
var entropy : byte[40]
+
+ getentropy(entropy[:])
rekey(entropy[:])
std.slfill(entropy[:], 0)
std.slfill(buf[:], 0)