Skip to main content

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).

91 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
11 votes
0 answers
690 views

What level of security is provided when a Feistel Cipher is used as a round function of another Feistel Cipher?

Recently, I was reading: Are there any specific requirements for the function F in a Feistel cipher?, and the answer posted mentions a Feistel Cipher named Turtle, which uses a four-round Feistel ...
user avatar
8 votes
1 answer
241 views

Is the complexity of NIST's CTR_DRBG needed for security?

I'm trying to find an efficient deterministic PRF construction that can quickly output a large amount of pseudo-random data from a seed of collected entropy. I ran tests with a contruction based on ...
n-l-i's user avatar
  • 705
5 votes
0 answers
198 views

Reusing same source for single-source randomness extractor

Let $ext$ be a single-source randomness extractor which takes a $d$-bit seed and a $n$-bit source as input and produces a $m$-bit output. Suppose we have a source $X$ with min-entropy $k$. Is it ...
Memphis's user avatar
  • 51
5 votes
0 answers
588 views

Odds of false error detection in a randomness test using the chi-squared test?

Common Criteria classifies the requirements for true Random Number Generators, and specifies how these should be tested against failures (these can occur accidentally, or following deliberate attack, ...
fgrieu's user avatar
  • 142k
4 votes
0 answers
90 views

Maximum-period rotate-add RNG

I've experimentally verified that the following (incredibly simple) PRNG can have period $2^w - 1$ for $w = 8$ and $w = 16$, for appropriate choices of $r, c$, where $0 < r < w$: $$x \leftarrow ...
orlp's user avatar
  • 4,290
4 votes
0 answers
155 views

ChaCha-based Sponge PRNG fails PractRand suite

TL;DR: My simple ChaCha-based sponge PRNG is getting "unusual" evaluation from PractRand test battery pretty reliably, sometimes even within the first GB; I'm trying understand why. I was in ...
Marandil's user avatar
  • 149
3 votes
0 answers
73 views

Deriving a cryptographic PRNG from a publicly random sequence

Consider a model of computation where we have a public oracle that provides access to a random sequence $R$. Given an index $i$ the oracle returns either 0 or 1, with the responses being deterministic,...
1110101001's user avatar
3 votes
0 answers
767 views

Algorithm used to generate a BitLocker recovery key

I know exactly how a generated BitLocker recovery key works and I can write a code to brute-force it. How is the recovery key generated though? I could think of some answers: it is generated using an ...
abbas's user avatar
  • 175
3 votes
1 answer
912 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 ...
Ozichukwu's user avatar
  • 153
3 votes
0 answers
66 views

Can you rely on the permutation of a ciphertext for secrecy?

Say you have a message and you run it through an all-or-nothing transform. A transform that requires every single block in the correct order in order to recover any data. Each block is ...
Daffy's user avatar
  • 2,409
3 votes
0 answers
91 views

Combining multiple hash functions for HKDF

I'm trying to apply the hash function combination method described in https://eprint.iacr.org/2013/210.pdf to a HKDF PRNG construction. Thing is it needs 4 uniformly random parameters/keys chosen by ...
user avatar
3 votes
0 answers
46 views

Why does the update algorithm of HMAC_DRBG use two rounds?

I read this paper, which said that $\operatorname{update}(K, V, adin)$ should do two rounds as follows: $\operatorname{update}(K, V , adin)$: $K = H(K, V || 0x00 || adin)$ $V = H(K, V )$ If $adin ...
user40447's user avatar
3 votes
0 answers
408 views

Fortuna PRNG: What is the effect of the block cipher key size?

The Fortuna PRNG uses AES-256 for generating output blocks by encrypting a counter value $C$ in CTR mode using a 256-bit key $K$. For the analysis, it seems the block size of 128 is the limiting ...
quantifier's user avatar
3 votes
0 answers
807 views

Implementation specific differences between RDRAND and RDSEED

I've read Intel's The Difference Between RDRAND and RDSEED and Intel Digital Random Number Generator (DRNG) Software Implementation Guide, but I have some open questions that are specific to usage in ...
user avatar
3 votes
0 answers
2k views

How to map a handful of numbers in a large range to a much smaller range deterministically without collissions

I want to map a set of long integers (say around 100 different values) that can span the entire 64 bit integer range to a much smaller range such as from 0 to 25000 deterministically with almost zero ...
user3612009's user avatar
3 votes
1 answer
84 views

Proof-of-Randomness with an EC Public Key

I will be using a tRNG to generate EC keypairs on a Secure Integrated Controller. I need to demonstrate I, the issuer, can not know the private key without colluding with the user to obtain it, even ...
WindowCleaner's user avatar
3 votes
1 answer
292 views

Strong RNG for encryption/authentation algo

I saw in the market several hardware options for creating strong RNG to produce strong KEYS: HSM TPM internal TRNG Intel RDSEED (TRNG)/RDRAND My questions are; What is the strength/entropy ...
Offir's user avatar
  • 283
2 votes
0 answers
72 views

1st round attack on rc4

I'm trying to implement the 1st round attack on RC4 stream cipher according to Attacks on the RC4 stream cipher. For now I am interested in section 4.2 Attack on other key bytes. It works really fine ...
SarkoxedaF's user avatar
2 votes
0 answers
36 views

Safe p-value for NIST randomness test with small sample size

In this journal paper related to physically unclonable function (PUF) [1], the authors used NIST 800-22 test to check if the bitstreams generated by their PUFs are random, which is described as ...
8cold8hot's user avatar
  • 121
2 votes
0 answers
78 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
0 answers
165 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 ...
DannyNiu's user avatar
  • 9,421
2 votes
0 answers
97 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%...
Skary's user avatar
  • 371
2 votes
0 answers
44 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 ...
Ozichukwu's user avatar
  • 153
2 votes
0 answers
48 views

Linear approximattion of $(x+y) \bmod 2^n$ in FSM of SNOW 2.0 where $x,y$ in $F_{2}^n$

I would like to understand the linear approximation of $(x+y) \bmod 2^n$ by linear masking method in the paper refereed ""Improved Linear Distinguis'hers for SNOW 2.0" by Kaisa Nyberg and Johan Wall´...
Subrata Nandi's user avatar
2 votes
0 answers
78 views

Generating sets of unreadable/secure and unique random numbers

In the process of doing some research, I stumbled across the following two claims on the PokerStars website. We do record all of the hole cards in all real money hands. This is an important tool ...
Maxim Gershkovich's user avatar
2 votes
0 answers
92 views

ZK-proof of usage in a seed of CSPRNG

Assume a Player chooses a seed $s$ and he wants to prove that he uses it as a seed to CSPRNG function, where the seed is not public. How can he prove it? Thanks.
user1387682's user avatar
2 votes
0 answers
370 views

How Are Linear Congruential Generator Multipliers Chosen?

There are several numbers that keep coming up when looking at certain random number generators, for example 6364136223846793005 is used in newer pcg-family algorithms and seems to draw it from ...
Whome's user avatar
  • 143
2 votes
0 answers
502 views

Can Verifiable Random Functions be used to pick a random node from a pool?

Let's say that I have a decentralized system and I have a list of nodes published on a public log like a blockchain. I want a node A to be able to connect to ...
David's user avatar
  • 161
2 votes
0 answers
263 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 ...
Deril's user avatar
  • 41
2 votes
0 answers
158 views

Get LCG from output?

Given a standard LCG output, let's say 3 consecutive numbers, I'm wondering how I could get $a$ and $c$ if I already know $m$ LCG formula: Sn+1 = ( aSn + c ) mod m I've seen this posted in a lot of ...
cortvi's user avatar
  • 31
2 votes
0 answers
147 views

CSPRNG output as stream cipher

Say I want to encrypt short messages via radio to a friend. Would a series of key streams based on 36 characters (alphanumerics) generated by a CSPRNG like CryptGenRand and applied to the plain text ...
thebaker's user avatar
2 votes
0 answers
68 views

Using a Secure RNG in Probabilistic Fair Exchange

I am attempting to implement probabilistic fair exchange described in Probabilistic Non-Repudiation without Trusted Third Party. A secures a message using AES with 512 bit keys (in my implementation)....
gsp8181's user avatar
  • 123
2 votes
0 answers
121 views

Special random distribution algorithm

I am implementing ring signatures as a part of an authorization system. Since the number of users could get high enough to make computation on end-user devices infeasible, I am thinking of "...
netcrusher's user avatar
2 votes
1 answer
431 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 ...
Trần An's user avatar
2 votes
1 answer
163 views

Mapping between NIST test and TRNG features

Each of the NIST tests are generally explained in Random Bit Generation - Guide to the Statistical Tests. I was wondering if some one can help me understand them better. For example, which tests show ...
Shannon's user avatar
  • 263
1 vote
0 answers
27 views

Is the random number analiser software reliable for performing Nist 800_22 test

I am working on generating pseudo random numbers from a chaotic oscillator's signal. In literature I have read about the Nist 800-22 test used for checking randomness. I friend gave me a software &...
B Dilany's user avatar
1 vote
0 answers
106 views

Predicting compromised OpenSSL 3.0 DRBG

The OpenSSL 3.0 rand function's DRBG uses the getrandom() system call to get 48 bytes of secure entropy from the kernel. It also ...
Wesley Jones's user avatar
1 vote
0 answers
87 views

Communication through shared seed in RNG

Given that there are two parties, and a process has been conducted by which both parties are knowledgeable of a shared value p, how could two parties communicate with each other over a public channel ...
Kevin Perez's user avatar
1 vote
0 answers
58 views

Public seed expansion for uniform reference strings

Many cryptographic protocols are parameterized by a uniformly random reference string (e.g. the commitment key for Pedersen commitments). Our goal is to publicly generate the random values of this ...
Joseph Johnston's user avatar
1 vote
0 answers
100 views

Concatenating RNG with PRNG

Is it secure to concatenate numbers from an RNG with numbers from a PRNG? I was thinking to throw a dice and use four outcomes to use as real random numbers, one outcome to change to the next ...
Florat's user avatar
  • 21
1 vote
0 answers
273 views

How to create a CSPRNG seed that can be used to shuffle a deck of cards

I want to generate a seed using CSPRNG. I then want to shuffle a standard pack of playing cards (52) using said seed, however, I want the shuffle to be accurate enough that it covers all the possible ...
Kieron Wiltshire's user avatar
1 vote
0 answers
100 views

Cracking a LCG with tricky parameters

I'm given three values $s_0,s_1,s_2 \in \mathbb{Z}_m$ that follows the recursion formular $s_{n+1} = as_n+b \mod m$. I know $m$ and want to calculate $a,b$. It's easy to see that $a=\frac{s_1-s_2}{s_0-...
limeeattack's user avatar
1 vote
0 answers
128 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 \...
Awerde's user avatar
  • 123
1 vote
1 answer
748 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 Number Generator. NIST SP 800-22 has a total of 15 tests. In each test, it has a recommendation for the size of the tested ...
Trần An's user avatar
1 vote
0 answers
49 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 ...
Brandon's user avatar
  • 175
1 vote
0 answers
388 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
198 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
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,711
1 vote
0 answers
90 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
1 vote
0 answers
52 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 (...
Nicola Miotto's user avatar