Questions tagged [random-number-generator]

A random number generator is a software or hardware solution which functions as a generator of (real or pseudo) random numbers (or bits).

Filter by
Sorted by
Tagged with
5
votes
3answers
7k views

TRNG vs PRNG - Entropy?

How much more entropy gives a Hardware Random Number Generator or True Random Number Generator compared to a Pseudo Random Number Generator? I know it depends on which TRNG is used, but I'm thinking ...
2
votes
1answer
61 views

Cryptography Engineering - Design Principles and Practical Applications - Chapter 9 Generating Randomness - Section 9.4 The Generator

I'm currently reading "Cryptography Engineering - Design Principles and Practical Applications" written by "Niels Ferguson, Bruce Schneier, Tadayoshi Kohno" published by Wiley in ...
1
vote
4answers
237 views

Why does mt19937 fail the universal test in NIST SP 800-22?

Update: with the help of @SqueamishOssifrage and @PaulUzdak, we discovered that my NIST SP 800-22 has a broken universal test. So this becomes a moot question. Check this report. It seems to sail ...
0
votes
1answer
63 views

Using raw encrypted network data for randomness

I've read that encrypted data should be, theoretically, indistinguishable from random data. Using this principle of encryption, could I combine encrypted network traffic streams to generate either a ...
50
votes
6answers
17k views

Who uses Dual_EC_DRBG?

Recent news articles have suggested that the NSA may be involved in trying to influence the cryptography in public standards or commercially deployed software, to enable the NSA to decrypt the ...
1
vote
3answers
95 views

Extracting Randomness from a Poisson Distribution

I'm working on a quantum random number generator based on the shot noise of CMOS camera sensor. Shot noise in an image is caused by the variance of the number of photons hitting the sensor per unit of ...
2
votes
2answers
2k views

HMAC-SHA-512 output randomness?

This is regarding an online roulette game that claims to be fair. Here is the explanation: Two strings are created: STRING1 = "[NONCE]:[SERVER SEED]:[NONCE]" STRING2 = "[NONCE]:[CLIENT ...
7
votes
4answers
2k views

Radioactive Decay, Gaussian or Uniform?

I'm trying to understand the nature of true randomness. I'm building an RNG using a radioactive source. Basically, I'm measuring the time between consecutive decays which in theory should be ...
1
vote
1answer
37 views

Can you explain to me how permuted congruential generator XSL-RR-RR works?

I found note about XSL-RR-RR on wikipedia: https://en.wikipedia.org/wiki/Permuted_congruential_generator But I don't understand what this means: count = (int)(x >> 122) low64 = rotr64((uint64_t)...
4
votes
4answers
1k views

Why isn't the alternating step generator used more often?

According to the Wikipedia entry for the Alternating Step pseudorandom number generator, there is no public cryptanalysis for this device since it was invented back in 1987 by C.G. Gunther. I have ...
8
votes
1answer
509 views

How did SHA-1 'feed' Blum Blum Shub

One of the most (in)famous hardware derived random number generators was Lavarand (patent). It did it with funky lava lamps. An image of the lamps was hashed and fed into Blum Blum Shub (BBS) to ...
2
votes
2answers
541 views

Could there be a floating point CSPRNG?

I recently answered no to Is there a floating point CSPRNG? Unpredictable rounding errors, especially across dissimilar hardware were my reasoning. In it's most basic form, a CSPRNG can be ...
1
vote
0answers
44 views

Min Entropy per Bit for Trevisan's Extractor/or An Extractor

We know that: trevisan's extractor based on min entropy of the relative system. For trevisan extractor, we need source, seed, min entropy value per bit and error rate for per bit I have the code for ...
4
votes
1answer
298 views

How to generate a non periodical, theoretically infinite, sequence of numbers from a secret alphanumeric key

Are there algorithms that enable the creation of a non periodical, theoretically unlimited, sequence of numbers based on an alphanumeric secret key? The idea is to produce always the same unique ...
1
vote
1answer
110 views

Dieharder How can I make my input file suitable for Dieharder?

I created my random numbers and I saved them into a txt file. My input file includes just 0 and 1. Here is the link of my file And I of course read some answer before asking that question but I could ...
2
votes
1answer
32 views

Differences between Extractors and Privacy Amplification for Quantum Random Generators

We know that for the last step of QRNG: we need to separate quantum and classical noises from each other so we use extractors, after extractor we need privacy amplification step. At this point: if ...
9
votes
1answer
3k views

What should be used as a source for entropy?

I have hardware-based RNG which consists of TRNG and PRNG. TRNG is giving out a 512-bit number which is being used as a seed for PRNG. RNG is generating a 160-bit random number using PRNG and ...
4
votes
1answer
68 views

Does piping MT19937 random stream into SHA512 make the state of MT unrecoverable in practice?

It's well known that state of a Mersenne twister is quite easy to recover after you observe enough samples. But what happens if we pipe blocks comming out of MT into SHA512 and give this as output. ...
7
votes
1answer
348 views

Introduction to LLL algorithm applied to linear modular inequalities

What is the Lenstra–Lenstra–Lovász lattice basis reduction algorithm about? How is it applied to solve for $x\pmod m$ a system of modular inequalities $(u_i\,x+v_i\bmod m)<w$ for $0\le i<n$? I'm ...
1
vote
1answer
70 views

Is a stream cipher and a (cryptographically secure) PRNG nearly the same thing?

If I let the authentification tag aside (which is important), encrypting with AES-GCM and a fixed key and nonce: ...
2
votes
0answers
34 views

How are ChaCha-based ARC4Random CSPRNGs initialized and reseeded?

I'm doing a spare-time project to collect cryptographic algorithms, implement them, and lastly benchmark them. For the CSPRNG part, I'm evaluating NIST-SP-800-90Ar1 HMAC-DRBG and CTR-DRBG (Hash-DRBG ...
0
votes
1answer
37 views

Understanding the Inner State of a RNG

Based on the BSI evaluation criteria for quality of deterministic random number generators: K4 – It should be impossible, for all practical purposes, for an attacker to calculate, or guess from an ...
2
votes
1answer
145 views

Reverse Java seed using outputs generated from nextInt(6)+1

Given a set of numbers within the range of 1-6: [3,4,3,4,5,6,2,3,1,5,2,3,6,2,2,3,3,6,6,4,5,2,5,3,5,2,4,4,2,6,3,6,1,5,1,3,6,1,1,2,2,4,5,3,1,2,3,4,4,6] generated using Java's nextInt(6)+1, is it ...
2
votes
0answers
38 views

Fisher Yates on “faulted” random number generator cryptanalysis

For the sake of curiosity and fun, i have implemented a C# program that operate as deck dealer on 40 cards deck (following the Fisher Yates shuffeling algorithm https://en.wikipedia.org/wiki/Fisher%E2%...
2
votes
1answer
195 views

Breaking a Mersenne-twister RNG with unsequential outputs

Pardon me for this newbie-ish question. I'm still a novice in cryptography . I have an application that outputs random numbers from 0 - 12 (endpoints inclusive) unsequentially (some outputs are thrown ...
1
vote
1answer
275 views

Dieharder input file with a sequence of only binary numbers

I have a RNG producing sequences of binary numbers, ad I would like to run Dieharder test using them as an ascii txt input file. However I haven't been able to do it properly. Should I use a header ...
1
vote
2answers
208 views

Why is breaking the Blum Blum Shub PRNG not an undecidable problem?

The Blum Blum Schub (BBS) pseudo random number generator (PRNG) is defined inductively by $$ x_{i+1} = x_i^2 \mod N $$ to generate the bit sequence $b_0b_1b_2...$ where the bits are taken to be the ...
2
votes
2answers
736 views

Interpretation of (NIST) Non Overlapping Template Matching Test

Regarding the Non-Overlapping Template test, this test normally gives us a bunch of p-values (148 values). I would like to ask that how do we interpret those values into a single p-value for ...
0
votes
1answer
59 views

Is it secure to repeatedly rehash a digest to extend the digest length?

Upon reading through the source code of Rainbow, a post-quantum signature algorithm, I found a hashing function that, using SHA-512, produced a variable length digest. This was achieved was by ...
13
votes
7answers
6k views

Can I encrypt a message by swapping bits in the text?

I have tried out an encryption method, in which I swap bits in the text. The text length is N bit, then I generate several random number pairs in the range 0..N-1, as [n,k] pairs. After that, I swap ...
1
vote
1answer
61 views

Getting a random number on an STM32L0x1 device for SRP6a

I'm trying to get a random number for a STM32L0x1 MCU to use it in protocol SRP6a. (I know that there are MCUs with an embedded hardware random number generator. But it would cost twice as much as the ...
14
votes
1answer
1k views

What issues are there while using Linux's /dev/urandom for generating cryptographic keys?

As of Linux 5.1 the /dev/random no longer uses the blocking pool. There is a talk about the change on the page Removing the Linux /dev/random blocking pool I ...
1
vote
1answer
50 views

Lehmer random number generator cipher - looking for differentials

I'm looking for differentials in my kind of toy encryption scheme. I can't find any. Let's consider linear congruential generator: $X_{k+1} = a \cdot X_{k} \mod 2^{128}$ Such that $a$ is some number ...
5
votes
1answer
76 views

The Rationale behind NIST's counter/LFSR recommendation on deterministic IV constructions on SP 800-38D

The NIST has a "SP 800-38D: Recommendation for Block Cipher Modes of Operation: Galois/Counter Mode (GCM) and GMAC". This guideline is a base for AES-GCM from definition to security ...
6
votes
2answers
1k views

Random Number Generation with a Entropy pool versus Seed

To give a little background I'm currently implementing a crypto library in JavaScript. I have started porting across Linux's random number generator because its both publicly scrutinized, it is open-...
3
votes
2answers
175 views

What is the advantage of adversary if the random number repeats?

In proof of CPA-security of encryption scheme $(r, F_k(r)\oplus m )$ where: $F_k$ is a keyed function $r\in_R\{0,1\}^n$ is a random number, on page 85 of Introduction to modern cryptography we have ...
2
votes
1answer
320 views

How can I generate cryptographic-quality 1/f noise, aka “pink noise”?

Can anyone suggest how I'd generate cryptographic quality 1/f noise: aka 'pink noise', where the PSD follows 1/f. I'd be happy to derive the pink noise from white noise (e.g. /dev/urandom), but I ...
0
votes
1answer
44 views

Why does l'Ecuyer reject p-values close to 1?

When applying several tests to a given generator, p-values smaller than 0.01 or larger than 0.99 are often obtained by chance even if the RNG behaves correctly with respect to these tests (such values ...
0
votes
1answer
60 views

On the Acceptability of a Naive Pseudo Random Number Generator

My question is probably both philosophical and technical. Background I was developing a CSPRNG, and I needed to shuffle the bits in one step in the middle of the algorithm - any naive shuffle would ...
5
votes
3answers
3k views

Why is the output of a True Random Number Generator (TRNG) insecure after it has been compressed?

I came across the following statement regarding true random number generators (TRNG): A “P1 medium” [AIS31] true random number generator (TRNG) may not be directly used due to cryptographic reasons. ...
1
vote
2answers
85 views

On The Next Bit Test

I would like to know what $O(v(n))$ really means in detailed and simple words please. I found it everywhere in the literature I am reviewing but I cannot find what the intuition of it (especially if ...
0
votes
0answers
16 views

(RNG) For the Middle Square Method, is there a table of periods for various seeds?

I'm interested in the properties of the original middle square method as articulated by John von Neumann and in particular in the relation between seed value and its period length (in cases where the ...
1
vote
3answers
214 views

Is random.org truly reliable?

Can someone help me in gaining an understanding of the reliability of random.org being used by a University to select student applicants to extend invitations to?
4
votes
4answers
2k views

Which is more secure using a CSPRNG for a One-time pad, or AES?

In reading about the One-time pad it appears to need truly random key for the pad. Since true random values are not practical to generate this presents a problem (thus making One-time pad less ...
2
votes
1answer
83 views

Using AES-CTR as a PRNG

AES-CTR is not considered as a CSPRNG, why ? Is it unsecure to use it when a password is hashed with Argon2id to produce the seed to generate all random data needed for an end-to-end encyption system ...
2
votes
0answers
33 views

RNG and Mersenne twister learning resources for the amateur

I am a complete amateur in the area of random number generators. I would appreciate resources to begin learning. Also I would also like to learn about Mersenne twister. Resources that are easy on the ...
7
votes
1answer
83 views

What quality of randomness is needed for randomized side channel countermeasures?

Using per-operation randomness is a popular and effective way to protect cryptographic implementations against side-channel attacks, e.g. using Shuffling (randomizing the processing order eg for AES ...
34
votes
5answers
10k views

The GCD strikes back to RSA in 2019 - Good randomness is the only solution?

When someone collects lots of RSA public modulus, the first thing that comes to mind is; $$\text{GCD them all}$$ If you calculate the GCD of two different RSA modulus and if the result is not 1 then ...
1
vote
1answer
195 views

Is it possible to create a 128-bit UUID from a weak entropy source?

I am looking at a seemingly popular piece of JavaScript code to generate a UUID which is supposed to be a 128-bit number: ...
4
votes
2answers
139 views

What's the name of this random number generation algorithm?

I'm looking for the name of an RNG method or algorithm, described below. Combining multiple results of a non-uniform random number generator can produce a more uniform result. It seems like this would ...

1
2 3 4 5
14