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
29
votes
7answers
9k views

Can you use memory errors as a source of randomness for cryptography?

Obviously, if you need a random number for cryptography, your code should use an api that gets it from hardware. However, not all hardware has a SRNG available. If you are working on a security ...
3
votes
1answer
220 views

How is the DUHK attack specific to the ANSI X9.31 RNG?

Recently, the DUHK attack on bad RNG implementations of hardware devices has been published. The attack is based on a (known or reverse engineerable) hardcoded key, which is used for a ANSI X9.31 ...
0
votes
1answer
600 views

How does GRC password generator get 512 bit of secret data?

I'm trying to understand how GRC password generator can get 512 bit of secret data while encrypting 128-bit of data. The generator address is located here: https://www.grc.com/passwords.htm See the "...
0
votes
1answer
387 views

Using NIST SP 800 - 90Ar1 Test Vectors for HMAC_DRBG with Reseeding and AdditionalInput

I'm trying to test my HMAC-DRBG implementation, but I do not understand how the AdditionalInput paramter should be used. From one test case (pr-false): ...
1
vote
1answer
135 views

RNG Source Combining

I'm planning on combining RNGs from several sources (Windows, Linux, OpenBSD, etc.) for generating one time pads but I have some questions that I don't know how to answer regarding xoring the outputs ...
1
vote
2answers
2k views

Is it possible to compress random sequence with high entropy

I have an algorithm that generates pseudo random sequence with length of 100k and high entropy. I would like to check the quality of randomness. So, I used a popular software to compress the generated ...
11
votes
2answers
1k views

Dice vs quantum random number generator

I recently championed quantum key distribution networks. This has led me to also question quantum random number generators. It appears that randomness is randomness, even if made by custom quantum ...
2
votes
1answer
314 views

Enumerating the bias of NIST and Pearson randomness extractors

The following is an extract from a paper about using your mobile phone as a true random number generator (TRNG). The mobile phone bit is incidental to this question though. I'm interested in the ...
6
votes
1answer
7k views

How to determine the next number from java's Random method [closed]

I understand a little how Java's Random class works. I have two random numbers output from calls to nextInt() from a ...
-2
votes
1answer
4k views

How to calculate entropy of a random number?

I am having a set of random numbers and I want to calculate entropy of them. I searched many entropy calculation formula, but I didn't get it. Can you elaborate a little bit?
7
votes
2answers
346 views

Diode vs quantum computer

Consider everyone's favourite pseudo random number generator, RANDU where V is the output of any successive iteration. $$ V_{j+1} = 65539 \cdot V_j \; mod \; 2^{31} $$ I've purposefully chosen ...
1
vote
0answers
254 views

What is the purpose of ISAAC's randinit() function?

I am a relative crypto noob; please aim your answers accordingly. :) I'm planning to port the ISAAC CSPRNG algorithm to modern C++. I'm looking at Bob Jenkins' reference implementations: http://...
1
vote
2answers
696 views

Practical way to generate random numbers from PRNG which are indistinguishable from true random

I am working on a project where I want the user to be able to create random data. For that I use a cryptographically random generator (Java's SecureRandom, which uses OS entropy source if available). ...
2
votes
3answers
1k views

Why it is not recommended to create your own random generator number?

I read in a book: mastering bitcoin that one should not create his own random number generator and instead use a cryptographic secure pseudorandom number generator (CSPRNG) Why is it so? Say I'm ...
1
vote
2answers
582 views

How to express a coin flip based random generator mathematically?

I would like to know how to express a coin flip based random generator mathematically. I have recently started Dan Boneh's Cryptography 1 and in the slides a pseudo random generator G, which outputs ...
0
votes
1answer
129 views

Issues with Seeding Random Number Generator Using Password

I am looking into zero-knowledge proof-based security. I noticed that a server never needs to be sent the user's password to authenticate them - the password can be used to generate another value that ...
0
votes
1answer
142 views

Explanation of the EPC Gen2 randomness standard's first rule

When we read PRNG requirements of the EPC standard, first rule (page 57 in this link) in the documentation; Probability of a single RN16: The probability that any RN16 drawn from the RNG has ...
0
votes
1answer
155 views

How to compute $a$ in the complex discard method of NIST SP 800-90

I've got a question about the complex discard method that has been specified in NIST SP 800-90, appendix A.5.2, steps: Use the random bit generator to generate a sequence of $m$ random bits, $(b_0, ...
7
votes
4answers
379 views

Are there flaws in (cryptographic) science/engineering/software/research due to pseudo random generators?

I am trying to see if there were any incidents in the past where using PRNG or not actual random scheme leaded to wrong conclusion in research. For example, a lot of fields today use simulations to ...
1
vote
1answer
293 views

Effective period of Mersenne Twister generator output

Mersenne Twister generator has a period of (2^19937)-1, but it is period of internal states. Any idea what is the effective period of MT 32 bit output - period over which 32 bit output does not ...
5
votes
2answers
1k views

Impact of the hash algorithm on a PRNG

Pseudorandom number generators often use hash functions for the generation. Some applications allow the users to choose this hash function, for example OpenVPN. From the OpenVPN manual: --prng alg ...
1
vote
2answers
341 views

How to select “good” bits which pass NIST statistical tests x% of the time?

I am trying to implement an algorithm where the first step is to select "good" bits using the NIST test suite. In particular, I have $k$ streams with $n$ bits each. The original paper Toward Sensor-...
7
votes
4answers
2k views

When is an RNG a CSPRNG, a CSRNG, or a TRNG?

In a recent answer to a question about CSPRNGs, it was stated that… Nondeterministic algorithms where there is no such requirement, and ideally could be replaced by a true random generator. Example: ...
2
votes
2answers
469 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 ...
8
votes
2answers
3k views

Extracting randomness from highly-biased RNG

I have a source with a very low entropy (like 3 entropy bits per 1024 source bits). But I need to construct a 128 bit seed from the source. Will it be helpful to XOR 350 bits with jump 128 bits, e.g....
1
vote
1answer
218 views

Fortuna: With a Single Entropy Source

I have worked on a random number generator that has turned out to give results pretty close to those of Fortuna with a single source. I was wondering how it affects the performance and claims of ...
3
votes
1answer
268 views

Fortuna: Reseeding

It is recommended that a new seed file be generated approximately every ten minutes by seed file manager in FORTUNA,though it depends on the application and on the rate of the accumulation of entropy. ...
3
votes
2answers
1k views

How long to wait to feed hashing using SHA 256?

I have a source which generates secrets at $8-10 bits $ per second. I need to use this secret to feed another generator every second. I am wondering how long should I wait while I am concatenating 8 ...
2
votes
1answer
273 views

Can I truncate a CSPRNG psuedorandom number?

This might be too broad to apply for all CSPRNG, but it might apply for the general case, I'm not sure. I need this specifically for python os.urandom() and ...
2
votes
2answers
287 views

Creating a k bit random string

My goal is to create a random $k$ bit string. My question can be divided in two parts. If a $n$ bit string $s$ is computationally indistinguishable from a random $n$ bit string, can we say that the ...
2
votes
1answer
287 views

Security of Diffie-Hellman when one party has a flawed RNG (compared to TOFU)

Use case: We need to establish a long-lived key. In this phase, it is unlikely attacker will either sniff or the modify communication, but we want to cover even this case. So we use Diffie-Hellman or ...
1
vote
1answer
413 views

Thermal noise random

I'm working with a Cortex M0 SoC that integrate an "RNG" (not specifically claimed as TRNG), that is however claimed to be "suitable for encryption". It works using thermal noise measurements. Knowing ...
2
votes
2answers
101 views

Isaac nth number from run

Is there a way of getting the nth random number from a particular seed run in ISAAC? i.e. one day run a selection of 256 numbers and the next day run from the 256th number to get the next 256 random ...
1
vote
2answers
227 views

PRNGs which are not CSPRNG

From Definition of CSPRNG, it has two characteristics It satisfies the next-bit test. It withstands 'state compromise extensions' - part of all of the state being compromised does not allow for ...
1
vote
3answers
434 views

CSPRNG made out of Block Cipher running in CTR Mode?

From Definition of CSPRNG, it has two characteristics It satisfies the next-bit test. It withstands 'state compromise extensions' - part of all of the state being compromised does not allow for ...
2
votes
1answer
885 views

Hardware random number generator for lottery?

To be able to generate random numbers for lottery games, we have the following requirement: The random number generator, which uses the deterministic algorithm to determine the game result, has to ...
0
votes
2answers
71 views

Does the size of a file influence the randomness if used as random input?

(I am a cypto amatuer ) So in Openssl there is the "-rand" option for taking a file containing randomness for the RNG . So I thought taking a pretty big file would make it more secure . So if you ...
2
votes
1answer
85 views

Provably Secure Post-Processing of a True Noise RNG?

My customer wants an RNG that uses a true noise RNG and a post-processor that will provide provable security against recovery of the true noise RNG output. Is there a provably and post quantum ...
3
votes
1answer
785 views

Pseudo-random permutation of a range

I have this set: {0,1,2,3,...,15}. I would like to create a pseudo-random permutation from elements of this set, for example ...
2
votes
3answers
2k views

Using a PRNG for a stream cipher instead of a dedicated algorithm

I am aware, that it is possible to build a stream cipher using some deterministic PRNG (like HASH_DRBG or CTR_DRBG) with good key material as the seed. What are the advantages of using a purpose ...
3
votes
3answers
964 views

Is there a floating point CSPRNG?

Is there a floating-point CSPRNG that operates, natively, using floating point operations? Looking for a CSPRNG that's very fast on GPUs, and would be hard for a CPU to beat. EDIT: Floating point ...
5
votes
2answers
2k views

Where do key generation algorithms take the randomness from?

I was just wondering, because in many encryption tools like Veracrypt or GnuPG you have to generate pseudo randomness with your mouse movement. So, where do automatically generated keys take that ...
3
votes
1answer
560 views

Is quantum randomness different to conventional randomness?

I've been reading a question regarding the uses of quantum computing. There is a broad theme throughout the answers that seems to suggest that randomness generated via quantum means is somehow better ...
6
votes
1answer
458 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 ...
6
votes
2answers
924 views

Why aren't stream ciphers extremely secure?

The way I understand it, stream ciphers are pretty much one time pads off-sourced to a PRNG (the seed is the key that generates the fake one time pad). So why not just use one or more CSPRNGs (...
13
votes
2answers
945 views

Can any block cipher in CTR mode be used as a CSPRNG?

I have been learning about block ciphers, modes of operations, and csprngs by myself for a few days and there are some things I'm unsure about. Assuming we only talk about cryptographically secure ...
0
votes
2answers
448 views

How to mix external entropy to a random number generator?

For security personalization of a device within the production environment our customer requires the following: The private / public key pair should be placed within the device and within the ...
0
votes
3answers
257 views

How to combine pepper in random string generation

I am writing a key generator program. Indeed it generates a key in the form of a random text string (not binary), with its characters chosen randomly from a set of defined characters, with a ...
2
votes
0answers
181 views

Block Cipher vs Hash Function to build a CSPRNG

It's widely accepted that both block ciphers and hash functions are great cryptographic primitives to build a CSPRNG. I'm thinking of creating a protocol where, provided that there is a source of ...
2
votes
1answer
353 views

Embedded device needs PRNG, has AES & EEPROM

TL;DR - the device is just a microcontroller and essentially does whole-disk encryption. At initialization time, I need a PRNG to create the key material. I have a software AES ECB encrypt operation (...

1
3 4
5
6 7
14