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
3
votes
2answers
48 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
vote
1answer
347 views

Practical sources of entropy on an Android device?

What Android API's can be used a practical sources of entropy ? Given the requirement of sourcing entropy on the phone for purposes of seeding a PRNG, what are good options ?
0
votes
1answer
59 views

How many 12 bit integers output are required to reverse the Mersenne Twister?

I am creating a web app that applies Python's random algorithm (Mersenne Twister) to generate random 12-bit integers. I am concerned as to how a user can predict ...
0
votes
1answer
69 views

Would knowing the random seed help to break AES or similar?

Consider I knew the seed of the random number generator that Bob uses to send encrypted emails to Alice. Would I have an advantage in deciphering the message? Also, how does, for example, openssl ...
0
votes
1answer
14 views

Allowing third party to verify and/or replay a draw

I’m not an expert in crypto, and I would like to design draw system (like a lottery, but choosing one of the participants), the most open possible, allowing a third party to verify the data/draws, and ...
0
votes
0answers
23 views

When will the random bit sequence start to repeat in pseudo random number generator

Let's say we have the Blum-Micali pseudorandom number generator. from wikipedia: Let $p$ be an odd prime, and let $g$ be a primitive root modulo $p$. Let $x_0$ be a seed, and let $x_{i+1} = g^{x_i}\ ...
0
votes
2answers
46 views

Extracting Randomness from a Poisson Distribution

I'm working on a quantum random number generator based on the shot noise of CMOS camera sensor. Shot noise in an image is caused by the variance of the number of photons hitting the sensor per unit of ...
5
votes
1answer
499 views

Is it possible to construct a PRNG where the output numbers have a certain distribution of hamming weights?

I am in need of a non-uniform random number generator where each n-bit output has a hamming weight with a certain binomial distribution. For example, I would like a non-uniform PRNG which generates ...
3
votes
1answer
95 views

Is it possible to predict a randomly generated BigInteger that uses Java's default Random library?

I've seen it posted on different forms here and here that explain how java.util.Random library uses a linear congruential pseudorandom number generator which can be ...
3
votes
1answer
80 views

Randomness extractors from Bourgain’s breakthrough- applications?

Some exciting progress to pure mathematics is due to Bourgain Springer - Multilinear Exponential Sums in Prime Fields Under Optimal Entropy Condition on the Sources with applications to randomness ...
2
votes
0answers
38 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´...
0
votes
1answer
83 views

Pseudorandom number generation predictability

Can you expect with certainty that any pseudo-random number generator will produce the same stream with a shared seed?
1
vote
1answer
81 views

Construct a specific length-doubling pseudorandom generator from a length-doubling pseudorandom

Let $G$ be a length-doubling pseudorandom generator (i.e., for any $n\in \mathbb{N}$ and for any $s\in\{0, 1\}^n$ it holds that $G(s)\in\{0, 1\}^{2n}$). Can you construct a length-doubling ...
2
votes
3answers
97 views

Why can a symmetric encryption algorithm be considered a pseudo-random number generation algorithm?

I have a question from my teacher: "Why can a symmetric encryption algorithm be considered a pseudo-random number generation algorithm? Can anyone explain it to me? And sorry if my english is not ...
18
votes
2answers
4k views

A website that identifies an RNG from its output

This happened during a discussion of RNG entropy, and the difficulty of verifying the level of entropy in a long sequence of bits (e.g. a private key.) A colleague of mine told me about a website ...
2
votes
1answer
59 views

If ChaCha20 is being used just as a CSPRNG, is nonce needed?

I'm planning to use ChaCha20 just as a CSPRNG. Key is random (taken from strong initial entropy source) and will be constantly replaced via DJB's fast key-erasure scheme. What should I use as the ...
1
vote
2answers
342 views

Why is Math.floor(Math.random()*9000) not secure in JavaScript?

I heard that one can predict the output from Math.Random() of JavaScript, but another day I had an idea to combine Math.random() ...
2
votes
1answer
80 views

How to get the original list back given a shuffled list and seed?

Say I have a shuffled list that was shuffled in Python using random.shuffle(). The shuffling was performed using a seeded random number generator. Is there a way I ...
8
votes
1answer
751 views

RFC6979: error in reference implementation?

If I correctly understand RFC 6979, there is an error in the ref implementation section 3.2. In the step H2, RFC specification says ...
6
votes
2answers
801 views

How to analyze the off-by-one error's impact on the entropy of the result?

I'm reading Jean-Philippe Aumasson's book Serious Cryptography to learn more about cryptography. On page 37, the author gives an example of Cryptocat's off-by-one error in its PRNG implementation in ...
2
votes
1answer
86 views

Mathematical proof or any reference of “Deterministic random bit generator cannot produce more randomness than the randomness of seed”

The heading tells everything. Any proof or any kind of reference is welcome regarding this: Can we get more randomness from a deterministic random bit generator than the entropy that we feed to the ...
4
votes
1answer
111 views

Murder Mystery Party

For a "Murder Mystery Party", one person is chosen anonymously to be the murderer (i.e., only the murderer knows who the murderer is) by shuffling cards with everyone randomly taking a private card (...
0
votes
1answer
90 views

Dieharder input file with a sequence of only binary numbers

I have a RNG producing sequences of binary numbers, ad I would like to run Dieharder test using them as an ascii txt input file. However I haven't been able to do it properly. Should I use a header ...
2
votes
2answers
80 views

Mathematical definition of deterministic and non-deterministic random bit generators

Can anyone give the mathematical definition of deterministic and non-deterministic random bit generator? Providing a reference will also be very helpful.
2
votes
2answers
84 views

Doesn't d6 to binary for 256-bit bitcoin private key generation produce biased results?

If the mapping table looks like: 1: 000 2: 001 3: 010 4: 011 5: 100 6: 101 Then you are guaranteed that your key will never have a chain of 4 or more 1s, much fewer chains of 3 ones than would ...
7
votes
1answer
130 views

Distance between consecutive primes distribution

In several prime generation schemes I saw we pick a random number uniformly at random from a wide range and find the next prime after it. Obviously with such a scheme some primes are more likely than ...
4
votes
1answer
100 views

Can a PRNG be made into a CSPRNG by hashing the outputs?

So I was contemplating this answer to my last question, and it got me thinking: If I understand it right, one of the required properties of a CSPRNG is that it resists leaking information about its ...
3
votes
1answer
128 views

Is the PCG PRNG a CSPRNG, or why not?

Is the PCG family of PRNG algorithms cryptographically secure, and if not, what about them makes them inadequate for that? I have a good enough understanding of the general problem space that if you ...
2
votes
1answer
62 views

Faster Shuffling for a Simple Application

Alice, Bob, and Charlie are working on three projects. Alice is the manager. At the beginning of each day, she chooses one project to work on (this choice is based on her preferences and is not ...
0
votes
0answers
30 views

NIST Approved Entropy Source List

Per NIST SP 800-90B – Section 3 – Entropy Source Validation : This Recommendation provides requirements for validating an entropy source at a stated entropy rate. Validation consists of testing by an ...
1
vote
1answer
61 views

Min Entropy Value for Health Test per NIST 800-90B for 32 bit Noise Source

NIST 800-90B recommends Section 4.4.1 Repetition Count Test & Adaptive Proportion Test for health test on Noise sources. In the equation to calculate the cut-off value C for Repetition Count Test,...
0
votes
2answers
94 views

PRNG next bit test

I would like to know whether a specific PRNG satisfy the next-bit test or not. will satisfying all of NIST statistical tests on PRNG guarantees passing the next-bit test? Or is there a specific ...
1
vote
1answer
25 views

Does concatinating mutliple digests of hashes from CSRN result in a CSRN?

Kind of a noob question. Suppose; We generate 1,000 cryptographic-ally secure random numbers & store each of them in an array1. For each number in this array1, we take the hash sha256(CSRN) then ...
30
votes
4answers
10k views

The GCD strikes back to RSA in 2019 - Good randomness is the only solution?

When someone collects lots of RSA public modulus, the first thing comes to mind is; $$\text{GCD them all}$$ If you calculate the GCD of two different RSA modulus and if the result is not 1 then you ...
8
votes
2answers
737 views

Perfect shuffle possible with limited raw entropy?

I am trying to shuffle a standard 52-card deck in a perfect way (every outcome should be possible at an equal chance). I am not, at this point, concerned with cryptanalysis attacks against it. I have ...
1
vote
2answers
211 views

The importance of randomness in the creation of a key

Why does it matter what kind of random number generation is used during key generation? E.g. this answer states ...
1
vote
1answer
83 views

Creating Random Pad from XORed Sections of Pi

If two strings of equal length from random offsets in Pi were XORed together, would this result in a cryptographically secure random number suitable for use in a one-time pad? If so, would this mean ...
0
votes
1answer
76 views

PRNG XOR Pipeline

For an OTP I need the 'best' random data I can acquire. Please check if my thinking for stacking PRNGs together in a pipeline can only make the output statistically better, never worse?! So take a ...
1
vote
3answers
112 views

Should the seed of CSPRNG produce the same random number?

Assume we are designing a CSPRNG to be used in encryption like that used for ECC-based cryptography. Is it required that the seed always produces the same random number always? Or should it be ...
1
vote
1answer
89 views

What is the weakpoint of PRNG based encryption? [closed]

Let's say I used this encryption schema: In words instead of images: Hash the encryption key with SHA256 Split it in half, first half use as XOR key for first 128 bit block of plaintext Hash the ...
1
vote
1answer
119 views

Is it possible to recover the seed value from a Mersenne Twister PRNG state?

So I know that you can recover the state of a mersenne twister generator by observing a sequence which is long enough. I was wondering if you could be able to recover the actual seed value used or ...
2
votes
1answer
115 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 ...
0
votes
0answers
44 views

using non prime numbers in Blum Blum Shub or Blum Micali

I would like to use Blum Blum Shub, or Blum Micali methods as random number generators only. I am not interested in their encryption capabilities. I was wondering, if I replaced the prime numbers ...
12
votes
4answers
3k views

Can we use a Cryptographic hash function to generate infinite random numbers?

I have seen that there are PRNG that can generate a specific number of random-numbers. The Mersenne Twister as an example, can generate 2**19937 (if I'm not wrong) but... can we use a cryptographic ...
1
vote
0answers
19 views

Default RNG used by openssl for certificate generation [duplicate]

I have generated a certificate using openssl with the below command. ...
1
vote
1answer
89 views

What is the difference between $\in$ and $\in_{\small R}$?

I have a simple question about basic math. When I read different papers bout ABE, I see different methods to choose a random exponent. What is the difference between the following options? Choose a ...
0
votes
0answers
32 views

How is Pre Master Secret related to Client.random or Server.random if DH KEX is RSA

For TLS 1.2 cipher Suite AES256-GCM-SHA384, RSA is KEX(key exchagne algorithm). As per standards of RSA Diffie Hellman KEX, after 'ServerHello' message client gets server certificate and it generates ...
4
votes
2answers
262 views

What are usable entropy sources in a headless machine without /dev/random or any cryptography API?

If I have a headless machine (no mouse movements, no keyboard presses, or user input), without any cryptography CSPRNG APIs, where can I collect entropy from?
1
vote
1answer
135 views

Can the OpenSSL random number generator be considered cryptographically secure? [duplicate]

The OpenSSL Random Number generator documented here uses an OS-provided entropy source coupled with a MD5 hash function. Does it impact the quality of randomness to use a broken cryptographic hash ...
4
votes
1answer
222 views

Any speed up methods for finding the index of a random value produced by the Inversive congruential generator?

The Inversive congruential generator produces random values with: $$x_{n+1} = a\cdot x_{n}^{-1} + b \mod P$$ (special case if $x_n=0$ -> $x_{n+1}=b$) starting with an initial value $x_0$ With well ...

1
2 3 4 5
13