creation of (real or pseudo) random numbers (or bits).

learn more… | top users | synonyms (2)

1
vote
3answers
84 views

Is there a PRNG algorithm that allows to switch between states directly, not calling next()?

Basically I need a function with the following interface: getRandomBytes(uint128 seed, uint64 state, uint16 byteCount) Consecutive calls with the same seed and ...
16
votes
1answer
3k 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 (...
0
votes
1answer
14 views

Decomposing a vector of random bits into constituent XORed vectores

Suppose I have N potential predefined, publicly known (pseudo?) random bit vectors: sequence 1: 1001000101010111001... sequence 2: 0100101011101010100... ... sequence n: 0101101010111010001... ...
11
votes
0answers
271 views

AMD's implementation of RDRAND instruction

The latest AMD programmer manuals, dated June 2015, include the RDRAND instruction in the instruction set. For completeness, it lacks ...
4
votes
0answers
39 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
2answers
57 views

How can I be sure the RNGCryptoServiceProvider is able to produce 12 bytes that can have 2^96 values?

I am writing code that needs to produce a truly random number of 96 bits. The requirements are: The code must be able to produce all $2^{96}$ values. The likelihood for any value to come up must be ...
5
votes
1answer
208 views

How should I read these three-dimensional (pseudo)random-generated numbers representations?

Visiting this site: http://lcamtuf.coredump.cx/oldtcp/tcpseq.html#phase I found graphical representations of random-generated sequence numbers, but I can't figure out how to interprete the plots. ...
4
votes
2answers
3k views

How to find generator $g$ in a cyclic group?

As generator $g$ is used in DH how do you find a combination of prime $p$ and $g$? eg: if we choose $p=23$ and its generator is $7$ (given in the book) how do we find the generator?
4
votes
1answer
90 views

Finding all polynomials up to a given degree to generate a bit sequence

Consider the following bit sequence: 00100000110 Using Berlekamp-Massey algorithm we can find the following minimal degree polynomial: $P(x)=x^6 + x^5 + x^4 + 1$ Now, is there a way to find all ...
3
votes
2answers
61 views

Output of a Linear Shift Register given Plaintext and intial state

Given an initial state $S_0 = (0101)$ and plaintext $P = 1010101011$ I need to find the ciphertext. The method to solve this was not taught in my coursework, and the information I have found online ...
2
votes
1answer
78 views

How can I generate cryptographic-quality 1/f noise, aka “pink noise”?

Can anyone suggest how I'd generate cryptographic quality 1/f noise: aka 'pink noise', where the PSD follows 1/f. I'd be happy to derive the pink noise from white noise (e.g. /dev/urandom), but I ...
3
votes
4answers
133 views

If I am about to generate one-time pad, where should I generate my pads from?

If I want to generate a few one-time pads, is it OK to just read required number of bytes from /dev/urandom without weakening information-theoretical security?
5
votes
1answer
55 views

Do the limitations of PRNGs apply to CSPRNGs when shuffling a list?

Suppose, as an example, we want to use the Fisher-Yates algorithm along with a pseudorandom number generator to shuffle a deck of cards. We know that there are limitations with respect to the internal ...
0
votes
1answer
150 views

ECDSA non random k - Retrieve private key [closed]

At the moment I'm playing around with ECDSA. I know that I can retrieve the private key if the same K is used to sign two messages. I tried to use this script: Ruby Script to crack the private key. ...
2
votes
0answers
28 views

How to determine how good our generator of random numbers is [duplicate]

I am using SecureRandom class in java with default constructor and after i run it four times and each times i will take back 4 "supposed highly secured random numbers" . First run : -35 -43 -127 12 ...
6
votes
2answers
328 views

How can a poor RNG impact security?

I have read this article and I do somehow "understand" that the reduction of entropy makes it easier to guess. But how exactly can the security be reduced by that? Can you give a concrete scenario, ...
6
votes
2answers
103 views

What use cases would benefit from a faster RNG?

The paper “Explicit Two-Source Extractors and Resilient Functions” (PDF) by Eshan Chattopadhyay and David Zuckerman is described by some as being a technological leap in RNG – opposed to slow and ...
3
votes
1answer
54 views

Is the following 4 digits code generator secure and non-deterministic?

In a C# WCF service, I need to send a 4 digits code by SMS to validate a user account/password. For security reasons, the code has to be non-deterministic (so that a malicious user/hacker should not ...
6
votes
1answer
70 views

How distinct are the meanings of the terms “CSPRNG,” “DRBG” and “stream cipher”?

Are there universal, consensus definitions for the following terms? Cryptographically secure pseudo-random number generator ("CSPRNG") Deterministic random bit generator ("DRBG") Stream cipher ...
4
votes
0answers
82 views

Secure entropy extractor for thermal noise collected from camera input?

I have read this paper (pdf) which talks about measuring the entropy of thermal noise collected from camera input. They estimate the minimum entropy at about 4 bits per pixel. Probably estimating 1 ...
14
votes
3answers
2k views

Webcam random number generator

I have a question about random number generators. I have read from a real random number generator, based on a webcam ("randcam"). My problem is, that I do not really understand how the generation of ...
2
votes
2answers
220 views

What values constitute failing for ENT tests?

The dieharder tests give a clear PASSED, WEAK, etc and I'm wondering what those thresholds ...
3
votes
0answers
114 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 ...
4
votes
2answers
113 views

Is the RC4 keystream random or not?

I have cause to use the PRNG half of RC4, but am seriously confused as to the randomness of its output. (Only the PRNG half.) On the one hand, there is a large body of literature finding ever ...
4
votes
1answer
111 views

What problems with “random” data would cause this result from Ent?

I'm playing around with a novel kind of source of "random" data and Ent is currently giving me results like this: Entropy = 7.977080 bits per byte. Optimum compression would reduce the size of this ...
5
votes
1answer
102 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 ...
0
votes
0answers
27 views

Security of $(k, 2k)$-bit generator for small seeds

Here is the problem I am working on for context. I have $\epsilon \le 1 - 2^{-k}$ and $\epsilon$ approaches 1 as $k \to \infty$ but I'm stuck on part c). The $f$ is secure iff there does not ...
3
votes
1answer
61 views

I am trying to generate a permutation of polynomial with order m

Suppose m = 5 and N = 64. How do I choose the coefficients such that the polynomial is a permutation of nos from 0 to 63.?
2
votes
2answers
195 views

Transforming Gaussian random $[0,1] $ numbers to uniform $[0,255] $

I am not exactly sure if this is for math stackexchange or crypto: A TRNG outputs numbers in $[0,1]$ in a Gaussian distribution. I would like to convert them into uniform random bytes ($[0,255] $) to ...
7
votes
3answers
212 views

Generating random non-repeating numbers from a small group

I read this Q&A which gave a clever solution: feed an incrementing index into a block key cipher as a way of producing non-repeating random numbers. The problem is the block size of all the good ...
3
votes
1answer
58 views

Updating the seed key of a PRNG while maintaining initial entropy?

Consider a seed key ($n$-bit long) is completely random and entropy of random variable is $n$ and PRNG is using deterministic algorithm and that that deterministic algorithm does not add any entropy ...
0
votes
1answer
48 views

PRNG that takes input a $n$-bit string and gives output a $2n$-bit string?

Recently, I'm reading one paper of Boneh and Zhandry. They have mentioned a pseudo random number generator that takes input a $n$-bit string and gives a $2n$-bit string as output. They just used it as ...
0
votes
0answers
30 views

generate unpredictable value with a shared key

Is there any function that taek a key to generate (un)predictable value ? I hope you will more understand more what I mean with this example f take in input an array, a key and a round number f(...
0
votes
1answer
98 views

Combining multiple PRGs together

Got some theoretical questions about PRGs to solve (given by lecturer for self-learning, no score involved). Tried to find on the internet but couldn't figure out how to solve them, so I will mention ...
6
votes
1answer
284 views

Is it possible to find a Mersenne Twister seed given only the first output?

Suppose I have a Mersenne Twister seeded with some unknown value, and I’ve been given the first output. Given only this first output, and no other information, is it possible to derive the unknown ...
4
votes
1answer
43 views

Generate a random number $r \in \{1,2, \dots , k\}$, where $k$ is not public and is distributedly held

A set of parties can securely generate a random number $r \in \{1,2,3,\dots, k\}$ when $k$ is publicly known. However, can we generate the random number $r$ if $k$ is not publicly known and is held by ...
5
votes
2answers
2k views

Randomness test question from FIPS 140-1 and comparison with 140-2

In FIPS 140-1 there are 4 statistical random number generator tests (The Monobit Test, The Poker Test, The Runs Test and The Long Runs Test. Then FIPS 140-2 came along and supposedly tightened the ...
39
votes
5answers
15k views

Who uses Dual_EC_DRBG?

Recent news articles have suggested that the NSA may be involved in trying to influence the cryptography in public standards or commercially deployed software, to enable the NSA to decrypt the ...
2
votes
0answers
79 views

Bitwise method of generating r for RSA-KEM

It seems that RSA-KEM has a very troublesome method of generating the secret $r$. It seems that the random value needs to be in the range $0 \le r \le {n - 1}$. Now most cryptographic environments ...
0
votes
1answer
114 views

How to calculate the probability to get two random numbers equal from the same generator

I have deterministic random bit generator (DRBG) to generate a random numbers in which it is 10 byte value and I want to turn this algorithm twice, what is the probability to get the two random equal ...
1
vote
1answer
227 views

ElGamal Generator g problem

Having an ElGamal encryption scheme with p=19 which value can not be assigned to g? The answers were : 1,7,11,2 I think you can't assign value 1 to g.
3
votes
2answers
77 views

Non primitive lfsr sequence

Given a non-primitive LFSR sequence (i.e number of states is less than $2^n - 1$); how do we find out the the characteristic polynomial? Will Berlekamp-Massey algorithm work in this case? for example;...
2
votes
1answer
64 views

Is it OK to reseed a Deterministic Random Bit Generator from itself?

I want a deterministic PRNG for simulation purposes, and I don't want to have to worry about spurious correlations like those the DMCT is designed to protect the Mersenne Twister against. So even ...
1
vote
1answer
68 views

Create big random number from 2 smaller numbers?

If I have 2 true random numbers from atmospheric noise or a different source. Suppose $x= 299$ and $y= 499$. Is it possible to create a bigger number with $x$ to the power of $y$? Can I use ...
1
vote
1answer
30 views

Metrics of PRNGs

I am a bit confused on the metrics that can be applied to the output of (deterministic) pseudo-random number generators. I've run output from many RNGs through ENT. The only metrics that really differ ...
2
votes
4answers
658 views

PRNG taking advantage of very large seed

Can anyone suggest a good (CS)PRNG algorithm that takes advantage of having a very large (ideally arbitrarily large) seed? I'd like to use several kilobytes, perhaps several hundred kilobytes, of ...
4
votes
1answer
85 views

How to design a deliberately weak PRNG for experimentation?

I'm looking for a PRNG that is deliberately weak, that is, follows a set of rules stochasticly. For example: Encounters a set of bits that is a multiple of X, starts exhibiting bias, or starts to ...
8
votes
3answers
2k views

HRNG for One Time Pad

I have just advanced to the last grade of high school (in Denmark). In this year, we all get to do one big project, where we can build/invent/create whatever we want to "solve a problem". As I study ...
1
vote
2answers
44 views

Is part of an output of secure PRNG also cryptographically secure?

Lets say I generate 192 bits using some secure PRNG. If I now take first 128 bits is it equivalent of generating 128 bits in the first place? P.S. More practical application for me is that I need a ...