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
39 views

Cryptographic Proof of Showing A Construction of PRGs is Also A PRG [closed]

Let G : {0,1}n → {0,1}2n be a PRG (for every n), and let s ∈ {0,1}n. Prove that the following construction is NOT a secure PRG. Gd(s): first run G(s) = x||y (where |x| = |y| = n−bits). Then run G(y) = ...
sangaCat's user avatar
1 vote
1 answer
47 views

Interpretation of the Result of Dieharder Battrery of Tests: Very High p-value Result in rgb_lagged_sum Test in Dieharder Results in "WEAK" Assesment

I'm currently testing the randomness of using SHA-256 in Hash_DRBG mechanism based on this research. The parameters used in the testing are the default parameters, except for when the PRNG fails a ...
vnwrywn's user avatar
  • 23
0 votes
1 answer
75 views

Custom linear random number generator

I've made an implementation of a linear RNG. It has two constants: b and p. Every time new value of ...
MrMgr547's user avatar
0 votes
1 answer
176 views

How good is blake3 compared to a random oracle?

How good is blake3 for generating pseudo-random bitstrings in comparison to a random oracle? Let's say we generated an arbitrarily long pseudo-random bitstring by concatenating blake3 hashes together ...
TypicalHog's user avatar
3 votes
3 answers
174 views

Where are TRNGs an absolute need?

Are there situations currently where a PRNG just will not do? Are there current situations where only a TRNG will be useful? What about if someone uses a cryptographically secure PRNG? What is the ...
Vardhan Mahajan's user avatar
3 votes
1 answer
181 views

Entropy extraction from a Zener diode TRNG

My project is to build a true random number generator that relies on the avalanche effect in a Zener diode. This for a messaging device that uses one-time-pad encryption. Reading about similar ...
Björn Morén's user avatar
1 vote
2 answers
73 views

Should I Test A PRNG Using A Fixed Entropy Source For Its Seed?

I want to test a C implementation of Hash_DRBG—which test_demo.c file I will modify to produce random binaries indefinitely to STDOUT as to be used by piping its output—using DIEHARDER for a research. ...
vnwrywn's user avatar
  • 23
0 votes
0 answers
64 views

Security of the trivium stream cipher

So I've been trying to implement a Non-Deterministic RBG based on randomness polling from non-hardware sources (nothing novel, just a side-project). Since collecting entropy and further conditioning ...
vibhav950's user avatar
5 votes
1 answer
263 views

Conformance of Windows Random Number Generator (SP800-90A) with Key Lifecycle Security Requirements of the BSI

The BSI (Federal Office for Information Security in Germany) has published a paper detailing the requirements of cryptographic modules for certain applications in the energy sector: Key Lifecycle ...
Henning Krause's user avatar
0 votes
1 answer
334 views

Is there a counterpart of /dev/random and /dev/urandom in Windows NT systems?

I am trying to implement a TRNG on Windows and among other entropy sources, I want to extract raw bytes from various kinds of CPU and process info. As per my knowledge, BCryptGenRandom is a CRNG in ...
vibhav950's user avatar
1 vote
1 answer
107 views

Manual entropy collection from sources with an arbitrary base

I'm writing a tool for manually collecting entropy from sources like coins and dice, and I'm wondering how to best deal with the case where the desired number of bits of entropy is not representable ...
Isaac's user avatar
  • 13
1 vote
1 answer
273 views

symmetric key generation - random number vs pbkdf2

I am working on improving my grasp on applied cryptography. Following question is just for learning/understanding purposes.. Lets say I want to generate a 16 byte key that I want to use for some ...
Manohar's user avatar
  • 155
1 vote
1 answer
103 views

Can this algorithm be called a RNG?

So I developed this algorithm as RNG, although it looks random to me, I wanted to know the opinion of more experienced persons in the topic. ...
lucas's user avatar
  • 13
4 votes
4 answers
207 views

Are TRNGs used in low power devices? Why?

I read somewhere that TRNGs are better than cryptographic algorithms that generate pseudo-random numbers (PRNGs) because these algorithms are more energy intensive than TRNGs. By low power devices, I ...
Vardhan Mahajan's user avatar
2 votes
1 answer
185 views

Can I predict CryptGenRandom on my own device?

I have a Windows 10 laptop with an algorithm that creates a random number using the PRNG CryptGenRandom. According to Wikipedia: Because CryptGenRandom is the de facto standard CSPRNG in Win32 ...
Riemann's user avatar
  • 221
4 votes
2 answers
786 views

What are the state-of-the-art TRNGs today?

How fast are the fastest ones? Which ones have the most entropy? Which ones are the most practical ones? I tried looking for answers on Wikipedia and also, I tried reading papers, but I am couldn’t ...
Vardhan Mahajan's user avatar
4 votes
2 answers
194 views

Is it valid to transform the tested sample file and re-test, rather than invent additional randomness tests?

I'm enhancing the venerable ent randomness test suite. And I came across this idea in On Independence and Sensitivity of Statistical Randomness Tests. "To ...
Paul Uszak's user avatar
  • 15.3k
1 vote
0 answers
137 views

Can someone give a comprehensive guide on how to run NIST SP 800 90B entropy assessment c code in windows? [closed]

I am trying to run the github code in windows 11. I don't know what all I need to install in my laptop to run the C++ code. It would be a great help if someone can point out the steps to run the code.
Mohit Mittal's user avatar
4 votes
2 answers
1k views

Optimize the speed of a safe prime finder in C

I am trying to implement the Schnorr’s identification protocol in C. I need a safe prime in order to be able to find a generator of the cyclic group efficiently. The problem is that my program takes ...
Prankster2k's user avatar
2 votes
1 answer
199 views

Is Python secrets module using a unsafe RNG on Windows?

The Python secrets module claims to produce cryptographically secure random numbers. I did some research on which random number generator is used when you call the secrets module on Windows. I found ...
Riemann's user avatar
  • 221
5 votes
2 answers
626 views

Generating X ids on Y offline machines in a short time period without collision

In theory this is what I have : Around 10 000 offline machines Each machine will generate around 10 000 ids I can program the machine in any way I want, but I prefer a low memory and low cpu They all ...
y.petremann's user avatar
3 votes
2 answers
125 views

A HRNG that is NIST 800-90 compliant is not suitable for use for OTP generation right?

A HRNG that is NIST 800-90 compliant must use a DRBG in some way regardless of whether it adheres to a RBG1, RBG2 RBG3(XOR), or RBG3(RS) construction. This violates the requirement that the OTP is ...
randumb20's user avatar
3 votes
2 answers
648 views

Why does NIST SP 800-90C RBG3 construction require XOR or reseeding a DRBG with a physical entropy source to produce full entropy?

NIST 800-90C defines 3 classes of random bit generation (RBG) constructions: RBG1, RBG2 and RBG3. All constructions must include a DRBG from NIST SP 800-90A. The particular construction in question is ...
randumb20's user avatar
0 votes
0 answers
34 views

Academic papers for the pros and cons of password based system and digital signature with challenge and response system

I don't really know what should be the correct title for this and the community can correct it after reading. I was the author of PKDSA (Searchable on github). I have the idea to do it because I feel ...
Hern's user avatar
  • 159
1 vote
0 answers
41 views

How did the VB6 PRNG generate a byte output from a specific seed, and how to replicate in C? [closed]

I'm hoping to get some help regarding an old problem that has eluded me. I'm trying to figure out how the VB6 PRNG was used to generate a byte output from the two byte seed that the Randomize() ...
Aky83's user avatar
  • 11
1 vote
0 answers
85 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
2 votes
1 answer
138 views

theoretical hash collisions vs random number collisions

I have a theoretical question about the probability of collisions of hashes versus random numbers. I'm not interested in the exact probabilities. The exact hash function is not relevant (we can assume ...
Garret Wilson's user avatar
1 vote
1 answer
119 views

Collision Resistance in Random Bit Generator

Consider following simple RBG where SHA-256 of random noise (more than 200Bytes of 4 bits entropy per byte) is computed to produce 256 output bits $\text{output} = \operatorname{SHA-256}(\text{...
crypt's user avatar
  • 2,397
3 votes
1 answer
123 views

What is the result of not connecting the 1st register to the xor gate in LFSR?

I designed 8 bit lfsr in vhdl. According to mathematical theory, I xor processed the outputs of registers 1, 4, 5, 6 and 8 and connected them to the input of register 1. theory says that if I give the ...
Doğukan Karakaya's user avatar
1 vote
0 answers
79 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
0 votes
1 answer
148 views

Is a pseudorandom function (PRF) also a one-way function (OWF)? If yes, how can we proof that a PRF $f_k$ is a OWF? If no, what is the closest work?

Let $f_k$ be a PRF. We claim that $f_k$ is a OWF. PROOF let $f_k$ is not a OWF, there exists a $PPT$ algorithm $A$ that can invert $f_k$ with non-negligible advantage. Even if we know the input $x$ ...
DP2040's user avatar
  • 63
1 vote
0 answers
55 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
7 votes
8 answers
2k views

How to generate random numbers within a range (0,n) from random bits?

What is a good method to generate random numbers between 0 and n from random bits? For example, I have a one million random bits generated according to NIST SP 800 90 publications. Now I need to ...
crypt's user avatar
  • 2,397
6 votes
1 answer
394 views

How can 4 users generate a provable fair random number?

The past few weeks I have been trying to solve a difficult problem. I have asked some cryptography experts but unfortunately they had no clue on how to solve the problem. The situation is as follows, ...
Mathijs's user avatar
  • 61
1 vote
0 answers
94 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
3 votes
3 answers
641 views

How bad are human-generated random numbers really (One Time Pad)?

This is a pretty open question, so I'm mostly looking for gut reactions from experts more educated than I. Given these assumptions which are easy to verify with a quick Google search: One Time Pads ...
Ben Hershey's user avatar
2 votes
1 answer
131 views

Any simple, cryptographically secure AES-based DRNG?

I am looking for a DRNG/DRBG (cryptographically secure) algorithm/function (which I can program into js). I am looking to use a DRNG as a seed generator for generating multiple, identical AES keys on ...
Randusr's user avatar
  • 45
0 votes
1 answer
112 views

Pseudo Random Number Generator test uniform distribution

If I test the Pseudo Random Number Generator(PRNG) and it satisfies the serial test, it is not sure that the resulting distribution is uniform. Is my observation correct? If it is correct, what test ...
Ian Gallegos's user avatar
1 vote
1 answer
92 views

Drawbacks of multiple sources of entropy for AES

Since AES needs IV to be random (unless fed by a unit test), I was wondering how to properly handle it. I know that Intel/AMD now supports the rdrand64 function but ...
Niels's user avatar
  • 23
1 vote
1 answer
363 views

NodeJS : Generate unique 16-digit decimal values [closed]

Situation I need to generate unique 16-digit decimal values in NodeJS API or C++ Addon. It's used internally in my organization (gift card id). And performance doesn't matter as it's generated non-...
JohnnyEast's user avatar
3 votes
0 answers
136 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
  • 139
3 votes
2 answers
932 views

Entropy of a counter

I wondered whether my understanding of entropy is correct, that a 256-bit counter that starts at 0 and counts to 2^256 - 1 by a <...
kaiya's user avatar
  • 143
1 vote
1 answer
62 views

Can I emit a block shorter than internal state of (any) Xorshift PRNG without having to compute the full block?

Xorshift family pseudo-random number generators have a variety of different internal state sizes. Let's take one of this family called xorshift1024*. My question is: Having xorshift1024* a internal ...
phantomcraft's user avatar
17 votes
5 answers
4k views

Examples of frauds discovered because someone tried to mimic a random sequence [closed]

[Moderator note: this question now lives there] So, I'm preparing a talk about the well known fact that humans are bad at the task of generating uniformly random sequences of numbers when asked to do ...
Swike's user avatar
  • 278
3 votes
1 answer
82 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
2 votes
0 answers
61 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
34 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
5 votes
2 answers
212 views

Conditions on a cryptographic hash function for Randomness Extraction

Assume we want to transform semi-random $n$-bit inputs into shorter $k$-bit outputs computationally indistinguishable from uniformly random bit strings, and there is (in some sense, to be specified) ...
fgrieu's user avatar
  • 140k
-1 votes
2 answers
84 views

Do all numbers have all the same chances to be returned using a CSPRNG?

Given a range of numbers, e.g. [1, 2^256], does each number have the same chances to be picked by a CSPRNG, which are 1 in 2^256? My concern is that truly random number generators do have this feature,...
Angelo M.'s user avatar
3 votes
0 answers
665 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
  • 165

1
2 3 4 5
17