3 ms·
Genuine question: How are those random sources actually used? I would think that for crypto it’s very important to not just have random numbers, but to have a
by setopt 2y ago
Genuine question: How are those random sources actually used?
I would think that for crypto it’s very important to not just have random numbers, but to have a uniform random distribution. Many natural sources would be either Poisson or Gaussian; if you make an assumption for the distribution you could of course make it uniform, but that assumption would be a weakness if inaccurate or changing over time.
So how is a true random source usually used to ensure uniform random outputs?
- nullc 2y agoA truly random source will yield independent and identically distributed values. You can take a collection of those values and convert them to an index in the set of all possible permutations of those values. That index will be uniformly distributed in the range of the number of permutations, regardless of the input distribution so long as it's IID. Once you have a uniform value on a range you can extract uniform bits from it. See also: Von Neumann's debiasing algorithm. In practice RNGs use some kind of debiaser, though often they use ones that leave a lot of entropy on the floor. OTOH, stronger debiasers are more harmed by failures to be completely IID (e.g. some inter-output correlation, or the distribution changing over time with temperature).
- cscheid 2y agoIt’s a well known exercise in prob textbooks (edit: it’s the algo referenced in the other reply) to convert one distribution to another. If you can generate gaussians (or any other distribution) you can generate uniform variates. It’s a very simple application of rejection sampling that involves some efficiency loss, but that’s irrelevant at the time you’re getting your OTPs.