# Tagged Questions

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

561 views

### Will X9.31 remain a secure & acceptable deterministic random generator beyond 2015?

I am actually looking for available crypto libraries including a deterministic random generator for the purpose of a dedicated crypto key generator unit. I have a simple question about the X9.31 based ...
82 views

### Issue about randomness : what if random looks “human” ? [closed]

I read a lot of stuffs about entropy/randomness. But what if a random generator (either digits or strings) once output a "human" patern ? I know it is very unlikely to happen, but if a random code ...
1k views

### How Brittle Are LCG-Cracking Techniques?

There are published techniques for cracking LCGs, but to my eye those techniques seem very brittle — very minor changes can add nonlinearity that renders techniques like the LLL algorithm unusable. ...
137 views

### java.util.Random and Dice Rolls

For this question, a dice roll will be considered two 6 six sided dice, to give a possible output of 2-12. Given a java.util.Random instance r, the output of one roll would be: ...
241 views

### Availability of a simple limited PRNG algorithm

I am in need of a really simple limited PRNG, that either exists or can easily be created in virtually any language on any platform. It takes only the initial seed, and is only expected to generate a ...
109 views

### Random Permutation polynomial

I need to know, please: (1) Is there anyway to pick uniformly at random permutation polynomial in a field of prime order? (2) Are there many permutation polynomials in a field? (3) In a finite ...
3k views

### Is a die implemented in a physics engine truly random?

So, a fair die throw is really random, not pseudo. So, would a RNG implemented as the result of a die throw in a physics engine (say, Newton, Havok, Nvidia's PhysX) be regarded as both ...
65 views

### How good is middle cube method with jumbled digits?

I had to make my own prng for a stream cipher for an inter school science project (I am mentioning that a lot). So I thought of cubing the seed instead of squaring it (like in the middle square ...
92 views

### How can a good encryptor be made?

I am making an encryptor software for a stream cipher with my own PRNG as a project for an inter school science competition. How can I make one so that after it generates the pseudo random nos. it can ...
211 views

### How can a good pseudo-random number generator be made?

I am trying to make a pseudo-random number generator so that I can use it in a synchronous stream cipher for encrypting plain text. I want it to generate numbers which are as random as possible. What ...
642 views

### Interpretation of the results of NIST (p)NRG suite

I have problems interpreting the NIST (sts-2.1.2) suite results. After running the statistics with 100 samples (each sample of 1000000 byte length) a new prng i got this result: ...
59 views

### HMAC_DRBG Generate Process: requesting N bytes at once different from requesting N bytes in total?

Am I correct in assuming that HMAC_DRBG would return different results if I, e.g. first request 4 bytes followed by a request of another 4 bytes instead of asking for 8 bytes at once? It seems that ...
295 views

### How do you test randomness?

Suppose I receive a list of 1 million coinflips, and I want to know how likely it is that the list was randomly generated. My first thought would be to count the number of heads and tails, which ...
185 views

### Are LFSRs enough for this?

Consider the following experiment: Let there be a machine which runs (ie. continually clocks) an LFSR of size (ie. number of bits) $b$, having a button that, when pressed, extracts the next $t$ ...
317 views

...
465 views

### What weaknesses in Hash_DRBG did NIST find and fix?

Matthew Green states in the Practical Kleptography presentation (video, at about 12:15) that Hash_DRBG (from SP800-90A) as originally proposed by NSA had potentially exploitable flaws or bugs and that ...
120 views

### What's causing the poor randomness in this program: the LCG, or the program logic itself?

(Crypto Gods, I should begin by stressing that I haven't lost my mind: I'm not doing this in real life, I'm just trying to understand the theory behind what's happening. With your help, hopefully I ...
1k views

### Security of very simple XOR with random? [duplicate]

I am currently trying to implement a very fast and simple encryption algorithm in Lua for the purpose of using it with ComputerCraft. The main problem is that bitwise operations in Lua (5.2 at least) ...
1k views

### Entropy of two concatenated random values

In this Intel blog posting, the author claims: The amount of work required to brute-force predict a random value that has n bits of entropy is $O(2^n)$. If you concatenate two values together, the ...
100 views

### run length testing [closed]

Looking for guidance/references with/about calculations: I am designing a widget that creates N-bit binary sequences. My customers target spec for the sequence's minimum entropy is X bits/bit. I plan ...
498 views

### Whitening and randomness extraction

The Von Neumann randomness extractor is explicitly mentioned in the randomness extractor page of Wikipedia, but strangely enough that page does not contain any reference to whitening the results of an ...
159 views

### CSPRNG that cannot be used as random extractor

Are there any specific CSPRNG's that cannot be used as randomness extractor within a TRNG? In other words, can you simply provide enough entropy gathered from a good entropy source as seed in any ...
653 views

### True Random Number Generator by milliseconds per keystroke (TRNG-Kms)

The simplest way to generate truly random numbers for OTP keys is to measure the time in milliseconds between each keystroke on a keyboard. The randomness depends on the user typing in various speeds. ...
111 views

### Is my implementation of a PRG at least intuitively secure?

I've devised a PRG using Bezier curves , constructed with Bernstein polynomials, and I was wondering if you guys could help me with some suggestions or constructive criticism. Basicly I take a random ...
3k views

### Is it safe to seed a random number generator from system time?

It seemed to me that the Bouncy Castle SecureRandom class for C#/.NET only uses DateTime.Now.Ticks as its seed by default. I ...
198 views

### Collecting entropy: can I use timing of reading as a separate source from the reading itself?

I'm implementing an entropy gathering program. For that I collect 2 bits from two gpio-pins connected to a random source. I whiten this stream of bits using the von Neumann decorrelation algorithm. ...
94 views

### mixing two asymmetrical random number generator streams

Knuth describes in "the art of computer programming part 2" an algorithm called "M" for mixing two streams of random numbers. This can be used to mix random number streams giving the assurance that ...
164 views

### How to construct a next bit predictor from a distinguisher

I read the claim, without proof, that it is possible to construct a next bit predictor for any PRNG given an oracle distinguisher for that PRNG and vice versa. How do I prove that? A distinguisher ...
2k views

### Random Number Generator based on AES CTR

I've just about done tinkering with an open source DRBG, and I sure would appreciate a bit of advice from this community. Here's the link to the project, hosted at codeproject.com. It is written in ...
311 views

### How does Web Cryptography API produce secure PRNG?

How does Web Cryptography API (eg window.crypto.getRandomValues) produce secure PRNG? Specifications: https://dvcs.w3.org/hg/webcrypto-api/raw-file/tip/spec/Overview.html#RandomSource-interface ...
169 views

### Is it possible to get better randomness by using multiple PRNGs?

I don't know if this question even makes sense, but: Is there be any benefit or impact to some sort of hierarchical (e.g. a PRNG drives the decision for which PRN to pull from a set of PRNGs) or ...
374 views

### LFSR Output Sampling for Berlekamp-Massey

Looking at the use of Linear Feedback Shift Registers in cryptographic algorithms, I have learned that the Berlekamp-Massey algorithm can be used to find the (shortest) LFSR that generates a given ...
1k views

### Fastest random number generator

I just read High performance physical random number generator by K.H. Tsoi, K.H. Leung and P.H.W. Leong. It proposes a physical RNG of speed 400 Mbps. Is this the fastest random number generator at ...
70 views

### Is there a deterministic number generator that allows me to share some (not all) numbers I've generated using a smallish seed?

I was just wondering, is there a type of deterministic number generator that allows me to share some (not all) numbers I've generated using a smallish seed? I have pairs of random numbers and need to ...
689 views

### Trial divisions before Miller-Rabin checks?

I'm trying to understand prime number generation (more correctly, the primality checking) as described in Handbook of Applied Cryptography. The context is circa pages 145 - 150, and specifically ...
683 views

### Mixing Entropy Sources by XOR?

Assume that I have two sources of entropy (say, a hardware RNG and a CSPRNG) and that the two sources are independent (do not know anything about the internal state of the other RNG). Can I mix them ...
74 views

### How exactly are PRNG's used to encrypt material, and what makes one any more secure than the other?

I hope my question isn't as lazy as the title indicates. What I want to ask is how people literally integrate a PRNG with encrypting material. I wrote a silly little script in Python a while back ...
64 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 ...
141 views

### Generating unsigned, bounded random value using signed bounded random values

Use case: I have a random number generator that can generate random numbers in a range that is limited by a number $x$, say $x$ ranges from $2$ to $2^{(n - 1)} - 1$ exclusive. In this case $n$ is ...
551 views

### How do I produce a stream of secure random numbers from AES-Counter mode?

I have just made my own program to encipher, using AES in counter mode, and have validated it using NIST data. So I know I have done it properly. I have read that AES-CTR can produce a stream of ...
119 views

### How can I generate a brief (100) stream of random numbers, not using the computer or throwing dice? [closed]

I am looking for a method of making random numbers that is off-line and is also independent of specialist equipment like a Geiger counter.
3k views

### How vulnerable is the C rand() in public cryptography protocols?

I just learned about the basics of public cryptography a few weeks ago and I am curious as to why the C rand() function should not be used for crypto schemes. For example, say I want to generate a ...
66 views

### What's wrong with this “order-preserving MAC” function?

Please note: this is purely a thought experiment and not intended for any real-world usage! I came up with a simple function $\mathrm{OPF}$ to map the integers $[0,C)$ (where $C$ is the "ChunkSize") ...
264 views

### Why are Fortuna entropy pools reset after a reseed?

I've implemented LibTomCrypt's version of fortuna and am wondering about the pool resetting after a reseed. In fortuna.c in libtomcrypt we have the following (which is that part that adds the entropy ...
653 views

### Secure AES Key Generation via Salsa20?

I am not creating my own cryptography or anything, but to learn about the Dos and Donts of cryptography, I am looking into AES encryption and ways to generate keys for that. As far as I've ...
1k views

### LFSR get output from characteristic polynomial?

Say you have a characteristic polynomial of an LFSR: $$f(X) = X^4 + X^3 + 1$$ How can I use this function f to get the output of the LFSR, given some initial state? Obviously I can create the LFSR ...
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 ...
297 views

### Reseeding a PRNG with the generated PRN

Would reseeding a PRNG with the PRN from the previous generation have any effects whatsoever on the quality of the generated numbers; if so, does this depend on the PRNG used, or are the effects ...