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
1
vote
1answer
45 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
2answers
613 views

Interpretation of (NIST) Non Overlapping Template Matching Test

Regarding the Non-Overlapping Template test, this test normally gives us a bunch of p-values (148 values). I would like to ask that how do we interpret those values into a single p-value for ...
13
votes
5answers
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
vote
1answer
44 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
124 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 ...
6
votes
2answers
300 views

Proof that Alternating Step Generator and modifed ASG' have equivalent security?

The Alternating Step Generator (ASG) is a PRNG combining 3 LFSRs. Output of the ASG is the XOR of the output of two clock-gated LFSRs. At each step, a single one of these LFSRs is clocked, according ...
0
votes
0answers
79 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
63 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 ...
2
votes
1answer
75 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 ...
16
votes
1answer
6k views

Is openssl rand command cryptographically secure?

I'm wondering if the openssl rand command produces cryptographically secure random bytes. For example when in need for a random password or token: ...
30
votes
6answers
11k views

What does it mean for a random number generator to be cryptographically secure?

I've never heard a good answer. I'd like to hear details about: What are the criteria that make an RNG cryptographically secure? Why must your RNG be cryptographically secure? I.e., what are the ...
1
vote
0answers
58 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
37 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 ...
1
vote
1answer
484 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 ? Edit: I have a hard ...
0
votes
1answer
85 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?
0
votes
1answer
68 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 ...
1
vote
2answers
220 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 ...
0
votes
1answer
74 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
24 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
59 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
510 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 ...
28
votes
5answers
6k views

Could RDRAND (Intel) compromise entropy?

I was recently discussing the issue of RDRAND in Intel chips and the whole issue about how NSA could potentially be influencing Intel to weaken or create backdoors in their design. This petition was ...
5
votes
1answer
2k views

Is SHA-1 secure when used to implement a PRNG

I read SHA-1 is still a secured hashing function with no collision found as of now. However, it's just a matter of time for someone to come up with such a collision or attack. Therefore, in new ...
3
votes
1answer
96 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
84 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 ...
5
votes
2answers
2k views

Entropy measurement from shuffled cards

A standard deck of $52$ shuffled playing cards can be used as a source of randomness. Assuming cards are not replaced as they're drawn, a full deck of cards provides $225.58$ bits of entropy $- 52!$ ...
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´...
6
votes
1answer
1k views

Secure AES Key Generation via Salsa20?

I am not rolling my own crypto or anything - just trying to learn about the Dos and Don'ts of cryptography: specifically about AES encryption and ways to generate keys for that. As far as I've ...
13
votes
1answer
2k views

Cracking a PRNG by observing ranks within groups of its output

Suppose that I am generating random numbers with Python's random module, so that there is a known random number generator (Mersenne Twister in this case). I've ...
1
vote
1answer
86 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
99 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 ...
1
vote
2answers
207 views

What is the fastest way to generate a truly random one-time pad without electrical or any other complicated device?

I want to generate a truly random one-time pad as fast as possible, but without the use of any electrical or any other complicated device. What is the fastest way to do that?
4
votes
1answer
115 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 (...
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 ...
1
vote
2answers
351 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
140 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 ...
2
votes
2answers
88 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.
6
votes
2answers
806 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 ...
8
votes
1answer
753 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
2k views

How to convert AES to a PRNG in order to run NIST Statistical Test Suite?

I want to run statistical tests on my implementation of AES. How should I convert it into a PRNG? Is there a standard way to go about doing this? I could not find much information about this although ...
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 ...
0
votes
1answer
113 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 ...
1
vote
2answers
255 views

Why is LCG PRNG chosen to be as c++ rand() function?

The C++ rand() function is an Linear Congruential Generator (LCG) PRNG. my questions are: Why was this algorithm chosen? What are the pros and cons? Is it good for cryptography?
19
votes
2answers
5k views

What stops the Multiply-With-Carry RNG from being a Cryptographically Secure PRNG?

Despite the fact that Marsaglia's MWC PRNG (multiply-with-carry random number generator) is considered to be "the mother of all RNGs", it does not seem to be considered to be a CSPRNG (...
2
votes
2answers
86 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
132 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
103 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
134 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 ...
0
votes
1answer
79 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
2 3 4 5
14