From 276270fef57e6cbc423ae9bbf4748036bdb061c7 Mon Sep 17 00:00:00 2001 From: Kalfar Date: Mon, 20 Jan 2020 21:32:20 +0000 Subject: [PATCH] Remove /dev/random TODO comment and add explanation from https://www.2uo.de/myths-about-urandom/ --- src/main.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index 1a40e6bc38..edf438ef72 100644 --- a/src/main.rs +++ b/src/main.rs @@ -35,8 +35,10 @@ use sha2::{Digest, Sha256}; use std::collections::BTreeMap; use std::num::Wrapping; -// TODO consider adding blocking read based on available entropy as per linux /dev/random -// (compared to /dev/urandom which we are equivalent to) +// This Daemon implements a Cryptographically Secure Random Number Generator +// that does not block on read - i.e. it is equivalent to linux /dev/urandom +// We do not implement blocking reads as per linux /dev/random for the reasons outlined +// here: https://www.2uo.de/myths-about-urandom/ // Default file access mode for PRNG const DEFAULT_PRNG_MODE: u16 = 0o644;