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
0 votes
0 answers
24 views

Creating a Password Generator using CSPRNG in React JS [closed]

I am building a password generator website using ReactJS (link). I have read a lot about various ways of generating cryptographically secure passwords and I have decided to go with using CSPRNG. I don'...
user avatar
2 votes
1 answer
60 views

Observations about ENT's Chi Squared test on my own RNG—and HotBits's score

Basic question: ENT seems to trip up generators that pass NIST 800-22 and maybe even dieharder. How do the latter two test suites miss such an obvious failure? There are two things I want to mention ...
user avatar
  • 21
0 votes
0 answers
70 views

Synchronized random number generation

Let me try to reformulate the problem, as it might help a bit. The requirements are the following: At the beginning of their connection, the two end-points perform a Diffie-Hellman to derive with a ...
user avatar
  • 303
2 votes
1 answer
69 views

Why does the von Neumann corrector only work when the input bits are independent of each other and same bias?

I read some papers that mention the von Neumann corrector. They always assume that for the von Neumann corrector, the input bits are independent of each other and same bias Why does the von Neumann ...
user avatar
1 vote
0 answers
91 views

Show that block cipher with CTR is a good PRNG

Assume that block cipher scheme $(KeyGen, Enc, Dec)$ is CPA-secure. Show that $CTR_{Enc_k(0^n)}$ is a good PRNG. Counter mode works as follows: $Y_i = Enc_k(IV + f(i))$ $C_i = Y_i \bigoplus P_i = Y_i \...
user avatar
  • 123
2 votes
1 answer
92 views

How less secure were those random bytes?

In our Python codebase, some random bytes were generated that we wanted to be cryptographically secure. Previously, the code was: ...
user avatar
0 votes
0 answers
37 views

recover private keys (RSA)generated with weak LCG

How is it possible to recover RSA private keys considering that weak LCG (random number generator) is used? I have some other keys (Public and private created with the same generator) and also some ...
user avatar
2 votes
1 answer
41 views

What is the methodology for selecting symbol bit length and window size when performing Shannon Entropy Analysis?

When performing Shannon Entropy analysis on something like an RNG or a file, you must: Select a symbol bit length and number of samples would will perform analysis on at a time (IE: windows size) ...
user avatar
1 vote
1 answer
55 views

Input size recomendation of sequence for each test in NIST SP 800-22

I am using the NIST SP 800-22 to evaluate the performance of the Random Numer Generator. NIST SP 800-22 has a total of 15 tests. In each test, it has a recommendation for the size of the tested ...
user avatar
0 votes
0 answers
27 views

Enumerating values from a linear congruential generator java Random()

During my research on a java application, I discovered that the nextInt(64) function of the java.Random() class is used to ...
user avatar
0 votes
0 answers
27 views

Only DRBG is used for PGP or could use other PRNG?

-RFC4880 refer to DRBG at https://www.rfc-editor.org/rfc/rfc4880#section-16.2 -Could we apply other PRNG such as enocoro/photon for pgp?
user avatar
  • 51
2 votes
1 answer
85 views

Probability of getting same result from /dev/{u}random

What is the likelihood of getting the same result from /dev/random?
user avatar
1 vote
1 answer
67 views

Why the DRBG can mask the small deviations in the behavior of the entropy source?

In NIST SP 800-90C, it said:"Small deviations in the behavior of the entropy source in an NRBG will be masked by the DRBG output" Why the DRBG can mask the small deviations in the behavior ...
user avatar
1 vote
1 answer
65 views

Can we apply the Pseudo Random Number (PRNG) as post processing method for True Random Number (TRNG)?

From the NIST SP 800-90B, we can use these cryptographic algorithms (HMAC, AES, Hash function) as a post-processing technique for TRNG. Besides that, can we apply the Pseudo Random Number (PRNG) as a ...
user avatar
2 votes
1 answer
107 views

Post processing method for True Random Number Generator

I am finding the post-processing method to improve the randomness of the True Random Number Generator. Especially, TRNG can pass the NIST SP 800-22 after applying the post-processing. I tried to apply ...
user avatar
1 vote
0 answers
34 views

What is the security of XORing SHAKE256_XOF with itself?

After reading "Can the xor of two RNG outputs ever be less secure than one of them?" I wondered if you can increase security of SHAKE256_XOF by using ...
user avatar
  • 165
1 vote
1 answer
39 views

About some tests in NIST SP 800-22 rev 1a and erfc function

I'm learning the randomness test of the NIST SP 800-22 rev 1a documentation. https://csrc.nist.gov/publications/detail/sp/800-22/rev-1a/final As I was reading, a few questions came up and I put them ...
user avatar
  • 89
0 votes
1 answer
91 views

What would be the benefits of a fast PRNG that produces an 8-bit output and could pass 1 Peta Byte of the PractRand test?

Assuming that all other elements like the internal state of the algorithm are considered secured and very hard to discover from a cryptanalytic standpoint. How significant would be for the algorithm ...
user avatar
1 vote
1 answer
74 views

How to draw words randomly from a physical dictionary?

Suppose I have a real physical dictionary, and I want to draw words from it randomly, using dices. How should I do it? Maybe it's easier to work with a coin since it's easier to convert binary to a ...
user avatar
  • 111
0 votes
0 answers
75 views

Does xoshiro/xoroshiro PRNGs provide uniform distribution?

It's not clear from the documentation if the sequence of integers produced by these PRNGs belongs to the uniform distribution. Also it's look like there is a whole family of RNG algorithms called in a ...
user avatar
1 vote
1 answer
53 views

Trimming uniformly random input for elliptic curve private keys

Imagine there is 256-bit uniform input from CSPRNG. Suppose there is a curve like secp256r1 whose curve order is slightly less than 256 bits. We cannot just ...
user avatar
2 votes
3 answers
192 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 ...
user avatar
  • 121
2 votes
1 answer
82 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 ...
user avatar
1 vote
3 answers
205 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-...
user avatar
  • 2,089
1 vote
1 answer
66 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 ...
user avatar
  • 805
2 votes
1 answer
91 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 ...
user avatar
0 votes
1 answer
189 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 ...
user avatar
2 votes
1 answer
74 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 ...
user avatar
  • 805
3 votes
1 answer
137 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? ...
user avatar
  • 454
3 votes
2 answers
143 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 ...
user avatar
  • 165
0 votes
0 answers
40 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 &...
user avatar
1 vote
0 answers
33 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 ...
user avatar
  • 51
2 votes
1 answer
94 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 ...
user avatar
  • 454
0 votes
1 answer
186 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 $...
user avatar
3 votes
2 answers
218 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 ...
user avatar
1 vote
1 answer
72 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 ...
user avatar
  • 51
1 vote
2 answers
174 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 ...
user avatar
2 votes
2 answers
148 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 ...
user avatar
  • 143
2 votes
0 answers
854 views

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

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 ...
user avatar
0 votes
1 answer
84 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 ...
user avatar
1 vote
3 answers
146 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?...
user avatar
3 votes
1 answer
101 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 ...
user avatar
3 votes
2 answers
453 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 ...
user avatar
  • 133
0 votes
0 answers
40 views

Mersenne twister word size and degree of recurrence combination

For a 32-Bit variant of Mersenne twister, if the outputs Should be a 5-Bit integer(word size) then what is the value of recurrence according to the k-distribution?
user avatar
1 vote
0 answers
69 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, ...
user avatar
1 vote
0 answers
41 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 ...
user avatar
  • 123
1 vote
1 answer
144 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}$...
user avatar
  • 805
6 votes
4 answers
472 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 ...
user avatar
  • 335
0 votes
2 answers
208 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 ...
user avatar
1 vote
1 answer
84 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 ...
user avatar
  • 149

1
2 3 4 5
16