4 ms·
The problem with true random is that you might screw up your avalanche diode circuit (or whatever) in a way that makes it random, but not uniformly distributed.
by Vecr 4y ago
The problem with true random is that you might screw up your avalanche diode circuit (or whatever) in a way that makes it random, but not uniformly distributed. It might also pick up EM from somewhere and not "really" be random all the way. By the time you add all the whitening and that sort of thing to make those problems go away I'm not sure how the information theory proofs hold up. Probably what you would want to do is keep the physical random number generator in a fine-mesh Faraday cage in a controlled environment, and run statistical tests for a while before generating your pads. The rng-tools package on Linux has a test tool. Make sure you disconnect the test wires before generating the pads though!
- tptacek 4y agoI don't think you can verify the safety of a one-time pad with statistical tests.
- josephg 4y ago> By the time you add all the whitening and that sort of thing to make those problems go away I'm not sure how the information theory proofs hold up. Why wouldn't the information theory proofs hold up? Fun puzzle: Suppose I give you coin you can flip with some bias (weight). Maybe 75% of coin flips are heads. Maybe its 65%. You don't know. You want to generate a sequence of bits with uniform randomness (exactly 50%). Without first sampling the coin & calculating the bias, how do you generate the uniform sequence of bits? The answer to that puzzle would probably work fine for your theoretical one time pad. Also, in practice I suspect most of the obvious ways your random noise circuit could be broken could be detected using statistical methods. You can't use math to prove a random number generator is truly random. But you can certainly detect a lot of common failure modes of "random" number sources.
- fdupress 4y agoRejection sampling works when your bias is constant, not when it varies depending on the environment.
- ilyt 4y agoI'd imagine just XORin CSPRNG and HWRNG would solve most of those issues. Even if HWRNG would have problems (say some interference would make it generate much less entropy), attacker can't devise CSPRNG state (even if it was vulnerable) because there is no way to "un-XOR" the output. Also for OTP nonuniform distribution would "only" cause numbers on average to have less entropy and that could be corrected by just having them be a bit longer.