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
4
votes
1answer
204 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 ...
4
votes
3answers
203 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...
0
votes
0answers
17 views

How to pass the output of a function to itself a number of times in RNG? [migrated]

I'm trying to pass the output of a function in C to itself a number of times but I'm still getting the same answer each time (I tried to pass it by value and by reference I do not know which is the ...
-1
votes
1answer
48 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 ...
2
votes
0answers
44 views

What kind of random algorithm is used in this game? [migrated]

I am playing a game for iOS that uses a deck of 48 cards and I would like to reverse engineer the kind of algorithm that is used to generate the random deck of cards such that I can predict which card ...
1
vote
1answer
185 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 ...
0
votes
1answer
64 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 ...
2
votes
1answer
85 views

How to get ramdom number between 1 and 2048 from /dev/hwrng?

I am (perhaps naively) evaluating the security considerations of using the following code to create BIP39 seed phrases (on a read-only and offline Raspberry Pi). Apparently, using ...
1
vote
0answers
34 views

Why VDFs need to be “quickly” verifiable?

I am very new to the topic, I found it out only today afternoon, so forgive the dumbness of the question should that be the case. I have tried to grasp the rationale of Verifiable Delayed Functions (...
0
votes
2answers
151 views

Is it guaranteed that all possible random numbers can be produced?

As far as I know PRGs get an input (seed) and generate a larger output value than the input. Therefore is it possible that some outputs will never be generated? based on the fact that input is smaller ...
3
votes
2answers
70 views

How big does M need to be in Blum Blum Shub?

I've read that Blum Blum Shub is a CSPRNG, defined by x_n+1 = x_n^2 mod M. I didn't understand that, and couldn't find any sources on how big should M be. Are 32 ...
32
votes
8answers
10k views

Why do some people believe that humans are “bad at” generating random numbers/characters like this?

I'm not even sure if they are serious, but I've heard many times that some people refuse to not only trust their computer to generate a random string (which is understandable) but also don't trust ...
0
votes
1answer
80 views

Could a good PRNG have a long period?

I'm thinking about the evaluation of a cipher or separate cipher round as a PRNG. In general, we can encrypt consecutive natural numbers and check them with some randomness test. But PRNGs don't work ...
2
votes
1answer
91 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
2answers
118 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 ...
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
50 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)...
1
vote
0answers
54 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 ...
2
votes
1answer
40 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 ...
1
vote
1answer
169 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 ...
4
votes
1answer
73 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. ...
1
vote
1answer
79 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: ...
7
votes
1answer
440 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 ...
2
votes
0answers
40 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
48 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 ...
3
votes
1answer
158 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
40 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%...
1
vote
2answers
263 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 ...
0
votes
1answer
63 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 ...
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
54 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
100 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 ...
3
votes
2answers
184 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 ...
1
vote
1answer
63 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 ...
0
votes
1answer
47 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
68 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. ...
0
votes
0answers
17 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
2answers
88 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 ...
2
votes
1answer
94 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
84 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 ...
1
vote
3answers
352 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?
1
vote
1answer
270 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
140 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 ...
0
votes
0answers
82 views

RNG to hide some bits

Suppose I have a sequence of bits of length M. I need to hide N out of M bits (hiding means forcing them to be 0) using RNG with a key. How I can relate the output of RNG to the number and positions ...
2
votes
1answer
285 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
0answers
66 views

CSPRNG for Contract Bridge (RAND_MAX = 0xAD55E315634DDA658BF49200)

Some background information: In contract bridge, there are 0xAD55E315634DDA658BF49200 (just under 2^96) possible bridge deals. Since the 1990s, bridge deals for major tournaments were generated on ...
0
votes
0answers
44 views

Understanding a claim made by NIST SP 800-22 on the possibility of calculating $\beta$, the probability of error type 2 in a hypothesis test

NIST SP 800-22 on page 1-4 (that's page 16 of the PDF) states the following. Pay attention to the bold passages. (Emphasis are mine.) Are they true?! Can you advise? One of the primary goals of ...
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
2 3 4 5
14