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).
87
questions with no upvoted or accepted answers
11
votes
0
answers
685
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 ...
5
votes
0
answers
190
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 ...
5
votes
0
answers
584
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, ...
3
votes
0
answers
123
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 ...
3
votes
0
answers
587
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 ...
3
votes
1
answer
806
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 ...
3
votes
0
answers
61
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 ...
3
votes
0
answers
89
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 ...
3
votes
0
answers
45
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 ...
3
votes
0
answers
384
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 ...
3
votes
0
answers
778
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 ...
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 ...
3
votes
1
answer
80
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 ...
3
votes
1
answer
262
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 ...
2
votes
0
answers
52
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 ...
2
votes
0
answers
30
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 ...
2
votes
1
answer
504
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 ...
2
votes
0
answers
148
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 ...
2
votes
0
answers
93
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%...
2
votes
0
answers
43
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 ...
2
votes
0
answers
47
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´...
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 ...
2
votes
0
answers
77
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.
2
votes
0
answers
336
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 ...
2
votes
0
answers
495
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 ...
2
votes
0
answers
255
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
0
answers
154
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 ...
2
votes
0
answers
145
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 ...
2
votes
0
answers
67
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)....
2
votes
0
answers
120
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 "...
2
votes
1
answer
352
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 ...
2
votes
1
answer
159
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 ...
1
vote
0
answers
74
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 ...
1
vote
0
answers
71
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 ...
1
vote
0
answers
48
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 ...
1
vote
0
answers
92
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 ...
1
vote
0
answers
239
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 ...
1
vote
0
answers
84
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-...
1
vote
0
answers
122
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 \...
1
vote
0
answers
47
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 ...
1
vote
0
answers
74
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 ...
1
vote
0
answers
293
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, ...
1
vote
0
answers
173
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 ...
1
vote
0
answers
54
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 ...
1
vote
0
answers
87
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$, ...
1
vote
0
answers
50
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 (...
1
vote
0
answers
81
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 ...
1
vote
0
answers
87
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 ...
1
vote
0
answers
78
views
'random' function $r_{n+1} = f(r_n)$, $|\{r_i,\forall i\}|=N$, $r_N = r_1$ where a function $g(r_k)=k$ is harder than in ECC?
Is there a deterministic pseudo random function $f$ with $r_{n+1} = f(r_n)$, $|\{r_i,\forall i\}|=N$, $r_N = r_0$, (for given random initial value $r_0$) where a function which derives the index of a ...
1
vote
0
answers
43
views
Help, Feedback and Solutions to a problem on a PoC CSPRNG
Background
I do not recommend trying to roll your own crypto. This is just a for-fun PoC, which won't be used in any public or private scenario.
I am creating a PoC nearly-true random number ...