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
2 votes
3 answers
234 views

Two untrusting people want to come up with a random number

Two people want to come up with a random number. They don't trust each other nor any third party. What are the known solutions to this problem? I am a quantum cryptography student and am currently ...
Dotman's user avatar
  • 121
2 votes
1 answer
400 views

Benefits of hashing a particular seed in a PRNG

This question is linked with this question (stackoverflow) where I asked about a specific implementation detail of Python's random number generator (Mersenne Twister). Here, I have a slightly ...
N3buchadnezzar's user avatar
1 vote
3 answers
348 views

Truly Random Numbers at Scale - Overloaded memory chips generate truly random numbers for encryption

For years, truly random numbers at scale has been elusive. Thus I read this recent research https://www.newscientist.com/article/2303984-overloaded-memory-chips-generate-truly-random-numbers-for-...
Nathan Aw's user avatar
  • 2,267
2 votes
2 answers
235 views

Is it possible that PracRand did not detect looping of the generator?

I'm testing my own PRNG generator which should has period $2^{38}$ bytes. So after exactly $2^{38}$ bytes it should start repeat. But PractRand find no anomalies after $2^{39}$ bytes. Could it be that ...
Tom's user avatar
  • 1,221
2 votes
1 answer
121 views

Exponentiation of Linear Congruential Generators

Linear Congruential Generators, that class of pseudo random generators with recursive rule $x_{n+1}\equiv a\cdot x_n +b\ \ (\mod m)$, $a,b,x_n\in Z/mZ$, $m,n\in N$ are considered inapt for use in ...
Sam Ginrich's user avatar
0 votes
1 answer
2k views

Where is the specification for SHA1PRNG?

I searched for the algorithm of the SHA1PRNG, which is implemented in Java's SecureRandom Class. Does anyone know how this algorithm works exactly? I have not found a source where the algorithm is ...
Cryptomathician's user avatar
2 votes
1 answer
148 views

Average spectral score of multiplier in LCG

LCGs have a property that when plotted in 2 or more dimensions, lines or hyperplanes will form, on which all possible outputs can be found.[2] The spectral test compares the distance between these ...
Tom's user avatar
  • 1,221
3 votes
1 answer
172 views

Do there exists PRNGs that provably pass the next bit test?

I am wondering if there are any results in literature which construct a PRNG that is proved to pass the next bit test? If so, can you state what the PRNG is and where I can find more details on it? ...
user918212's user avatar
3 votes
2 answers
289 views

Household sources of secure randomness?

In my home, I have a coin. I can use that coin to generate random bits. These bits are mostly secure unless someone is watching me flip it. They're also only random-ish... maybe I'm a "bad ...
Him's user avatar
  • 165
0 votes
0 answers
117 views

Questions about Blake2x: Its state size (internal state) and its security when generating keys with size more than 256/512bits

I read the Blake2x paper: https://www.blake2.net/blake2x.pdf It says Blake2x can be used to build a "DRBG" (CSPRNG): https://csrc.nist.gov/glossary/term/deterministic_random_bit_generator &...
phantomcraft's user avatar
2 votes
0 answers
77 views

How to connect an external noise source file to openssl-fips-2.0.16

[ECDSA][ECDH] Due to Insufficient Entropy in Operating system of MCU => Could not generate random number by using BN_rand() function (security strength fail, and RAND_bytes fail) Below is my ...
Andy's user avatar
  • 71
2 votes
1 answer
185 views

Existence of algorithm predicting next bit in output sequence

Let $X = [0, 1]\cap \mathbb{Q}$, and let $f:X \rightarrow X$ be a chaotic map (i.e. the logistic map with rational parameter). My question is as follows, and is purely theoretical in nature. Pick ...
user918212's user avatar
0 votes
1 answer
893 views

Is it possible to crack a Linear Congruential Generator if I only know the modulus of the output?

Edit suggested by fgrieu: I have one hundred integers in $\{0,1,2,3,4,5\}$ which I suspect are consecutive values of $\lfloor x_n/2^{16}\rfloor\bmod6$ computed as $x_{n+1}:=a\cdot x_n+b\bmod m$, with $...
fairytale's user avatar
3 votes
2 answers
517 views

Are PRNGs Key Derivation Functions?

PRNG is a mechanism to produce randomness from an initial random seed, so basically a way to derive more secrets from one secret. Looking at the Wikipedia entry for KDF you find In cryptography, a ...
Finlay Weber's user avatar
1 vote
1 answer
199 views

How to check security strength of random k if k is an input parameter of ECDSA signature generation function using openssl-fips

As I understand, 1.The security strength is specified in bits according to https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-90Ar1.pdf 2.Security strength is depend on the length of ...
Andy's user avatar
  • 71
1 vote
2 answers
574 views

When are PRNG used and when are CSPRNG used

I understand that PRNG are Random Number Generators that uses a deterministic algorithm based off of a seed. I also understand that CSRNG are PRNG that are cryptographic-ally safe to use for ...
Finlay Weber's user avatar
2 votes
2 answers
1k views

Is it insecure to make nonce using random number generator and hashing algorythm with secret key like HMAC?

I'm building a project on Arduino Mega microcontroller and I need some nonce generator for challenge-response exchange. But I failed to find some alphanumerical string generators. Then I came up with ...
krystof18's user avatar
  • 143
5 votes
0 answers
5k views

Node.js uuid.v4 vs crypto.randomUUID. Which implementation is more cryptographically secure? [closed]

For a long time I've used the uuid npm package for my v4 uuid needs. It seems in recent versions of node they have introduced a built-in crypto module with the method randomUUID. Some benchmarks have ...
Llama D'Attore's user avatar
0 votes
1 answer
198 views

Is hashing random numbers generated from a TRNG enough to create a key? [duplicate]

Is hashing random numbers generated from a TRNG enough to create a key? Basically taking the output of something like a Lavarand and pass that through a hash function like sha-2. I guess at the end of ...
Finlay Weber's user avatar
2 votes
3 answers
986 views

How are the keys used in cryptography generated?

It seems there are keys everywhere in cryptography. From things like HMAC to encryption (both asymmetric and symmetric). The bit I do not totally understand now is how are cryptographic keys generated?...
Finlay Weber's user avatar
3 votes
1 answer
167 views

DIY TRNG on an embedded system for Ethereum private key generation

I'm trying to build this Ethereum hardware wallet on a custom designed embedded system and I'm no expert. Googling around I found this Robust, low-cost, auditable random number generation for embedded ...
Diego Hernandez Herrera's user avatar
3 votes
2 answers
788 views

Difference between Non-uniformly random and Uniformly random

I am reading up on Key Deriving Functions (KDF) and in a section of the Real-World Cryptographic book by David Wong, a comparison is being made with Pseudorandom number generator (PRNG). And one of ...
dade's user avatar
  • 133
1 vote
0 answers
345 views

Program to predict a 5-bit output from mersenne Twister random module from python

Is there a program to predict the mersenne twister random module in python for a 5-bit integer output, provided the consecutive 3994 outputs are available? The random module is not seeded so i guess, ...
Mohammed Siddique's user avatar
1 vote
0 answers
193 views

How to reproduce seeds in Random Number Generator like WELL, KISS etc

I am curious about Padding the seeds of Random Number Generator. (I am sure that terminology, padding the seeds, is not correct. If someone knows the proper word, please let me know :) ) What is ...
TyeolRik's user avatar
  • 123
1 vote
1 answer
234 views

Can AES fail PractRand?

Mellisa O'Neil tested Xoroshiro128+ with 512 terabytes (2^49 bytes) of data. And finally it failed. Would AES fail PractRand with enough data? When we can expect that AES will fail? Maybe with $2^{64}$...
Tom's user avatar
  • 1,221
6 votes
4 answers
606 views

A source of randomness that anyone can independently, conveniently and robustly access?

Does there exist a source of randomness that anyone in the world can independently, conveniently and robustly access? For example, the 10th decimal place of the temperature in Mexico City is ...
chausies's user avatar
  • 335
0 votes
2 answers
507 views

What are the fastest algorithms that sample from the uniform distribution?

Lots of cryptography algorithms rely on pseudorandom number generators. Sometimes, given a plaintext, you need to generate a pseudorandom number from it. What are some fast algorithms that do so? I've ...
Guerlando OCs's user avatar
1 vote
1 answer
138 views

When not to reject a random number generator?

I have constructed a true random number generator, and I applied the NIST randomness Test Suite to its results. I have generated around 200 files with my TRNG, each being $10^6$ bits in length. The ...
PAMG's user avatar
  • 149
1 vote
1 answer
108 views

Randomness extraction on correlated data in TRNG

True random number generator (TRNG) designs I read about mostly consist of two digital stages: Low-frequency sampling (of a physical noise source) Randomness extractor The noise signal is sampled at ...
DurandA's user avatar
  • 453
2 votes
1 answer
291 views

Randomness extraction from a Santha-Vazirani (semi-random) source

In a quest to better understand randomness extractors (in the context of TRNG post-processing), I read some papers about the von Neumann Extractor and Santha-Vazirani (SV-) sources. The von Neumann ...
DurandA's user avatar
  • 453
0 votes
1 answer
891 views

How can I recover mersenne twister when only the part of the bits?

https://github.com/tna0y/Python-random-module-cracker Here, when we get 32*624 bits of outputs from Mersenne-twister we can recover Mersenne twister. My question is when we get the parts of the bits, ...
zelda191919's user avatar
2 votes
3 answers
539 views

Can we combine two true random generators to obtain a new one?

It is well known that a true random generator exploits the randomness occurs in some physical phenomena. Also, the output of a true random generators can be either biased or correlated. Therefore, de-...
PAMG's user avatar
  • 149
1 vote
0 answers
56 views

Security proof for PRNG

Could you help to find an example of where the next kind of proof is performed, please? "if we can distinguish the randomly generated bits of a PRNG from a random sequence, then we can ...
juaninf's user avatar
  • 2,701
0 votes
2 answers
923 views

CSPRNG in Javascript?

I'm trying to obtain a random, unpredictable quite long number (± 20-25 digits) using Javascript (created by user's client) as fast and light as possible. Is this solution reliable, robust and secure ...
Wolden's user avatar
  • 111
0 votes
1 answer
195 views

Is using /dev/hwrng for raw key material secure?

Is using /dev/hwrng for raw key material secure (as long as you trust the hardware)? I tested it using the rngtest tool and it has good output.
john doe's user avatar
  • 119
5 votes
4 answers
1k views

How to compute the dataset size required by dieharder tests?

I am trying to use the dieharder random number test suite. However, this suite requires massive amount of data (this paper claims 228GB for no rewinding for every test) for most of the tests. I'd like ...
DurandA's user avatar
  • 453
1 vote
2 answers
146 views

Rigorous practical pseudorandom generators

It is known that existence of pseudorandom generators (PRGs) is equivalent to the existence of one-way functions. In turn, the latter is an open problem. I am curious if someone developed kind of &...
Rubi Shnol's user avatar
0 votes
2 answers
141 views

Does watching Youtube generate entrophy

Does watching videos (either online videos such as off youtube or saved locally) generate enough (if any) entropy to create secure encryption keys? I understand that some activities such as memory ...
Minecraftchest1's user avatar
2 votes
3 answers
444 views

Benchmark for CSPRNG as stream ciphers?

My limitation in my security protocol is that I want my RNG as CSPRNG and I also want it to be super fast. If I use Salsa20 or ChaCha or AES counter mode, I don't get the desired speed. I want my PRNG ...
Masab Iqbal's user avatar
4 votes
2 answers
824 views

Is a LFSR sufficient for post-processing a biased TRNG?

I am building a TRNG on a FPGA based on ring oscillators. I found out that Linear Feedback Shift Registers (LFSRs) are commonly used for the post-processing of TRNGs. Here is my initial design: Let's ...
DurandA's user avatar
  • 453
1 vote
1 answer
269 views

Which test suit is better to say if PRNG is CSPRNG:TestU01 or NIST?

Actually my concern is that I am planning to apply xoshiro256+ for implementation of stream cipher https://prng.di.unimi.it/ for my cryptographic application. It passes the BigCrush tests. Will it ...
Masab Iqbal's user avatar
1 vote
0 answers
89 views

Distributed Random Oracle with Verifiable Shares

$Setup$: Let's assume a quorum of $n$ nodes where each have a secret share $y_i$ from a know and safe leaderless DKG protocol. Define $\mathcal{L}^i(y_i) = y$ as the lagrange interpolation for $x=0$, ...
shumy's user avatar
  • 418
0 votes
0 answers
114 views

Is multiple encryption with stream ciphers vulnerable to meet-in-the-middle attacks?

Let's suppose I encrypt something with a stream cipher (CSPRNG) two times using two 256-bit keys and different IVs. Will I get 512-bit encryption strength?
phantomcraft's user avatar
4 votes
2 answers
216 views

What is novel about Seedless RNGs?

Seedless Fruit is the Sweetest: Random Number Generation, Revisited introduces a theoretical framework for "seedless" RNGs. AFAICT, this framework injects entropy directly into the ...
Indolering's user avatar
8 votes
4 answers
272 views

Why are $\lceil 1/\operatorname{entropy-per-bit} \rceil$ number of bits not sufficient to generate an unbiased bit?

Consider a biased RNG badrand() generating 1 with probability $0.9$ and 0 with probability $...
Ritesh Singh's user avatar
4 votes
1 answer
276 views

What is the NIST recommended maximum bias for random number generators?

What is the maximum bias recommended by NIST for random number generators? This answer says that it is $2^{-64}$. Is it same for all applications? Does NIST have a publication with more information? I ...
Ritesh Singh's user avatar
5 votes
3 answers
376 views

How to combine $n$ 'less random' bits to generate one 'more random' bit?

Suppose we have a random number generator badrand() generating 1 with probability $0.9$ and 0...
Ritesh Singh's user avatar
-1 votes
1 answer
145 views

Random number generator in C++ [closed]

I've wrote a simple random number generater in C++. Simply, I thought, the random things in software. I wrote it based on below: When an object is created on the stack, its address is random. The ...
jay k's user avatar
  • 1
2 votes
1 answer
526 views

On the initializaton of the "xorwow" PRNG

In the original paper, Marsaglia defines the xorwow() function and gives some example values for the initial state of $x$, $y$, $z$, $v$, $w$ and $d$. But it is not ...
user87878's user avatar
0 votes
1 answer
117 views

Soundness of Trevisan’s Extractor Against Quantum Side Information

I wonder how sound Trevisan's extractor can be against quantum side information. I checked many papers. And all of these papers were aiming to explain how sound Trevisan's Extractor is against quantum ...
quest's user avatar
  • 151

1 2
3
4 5
17