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
0answers
40 views

Do any block cipher encryption functions (or similar functions) exist which are associative to each other and cyclic?

Most block ciphers encrypt a plaintext deterministically into a ciphertext which allows decryption in the opposite direction. Now, instead of encrypting just one plaintext, I'm looking for a cyclic '...
7
votes
2answers
2k views

Is ISAAC considered secure as a cryptographic random number generator?

The ISAAC site claims it is secure, but I wasn't aware of any trusted 3rd party sources that verified its security.
1
vote
0answers
254 views

What is the purpose of ISAAC's randinit() function?

I am a relative crypto noob; please aim your answers accordingly. :) I'm planning to port the ISAAC CSPRNG algorithm to modern C++. I'm looking at Bob Jenkins' reference implementations: http://...
2
votes
2answers
102 views

Isaac nth number from run

Is there a way of getting the nth random number from a particular seed run in ISAAC? i.e. one day run a selection of 256 numbers and the next day run from the 256th number to get the next 256 random ...
1
vote
1answer
690 views

Trustless, Two-Party Random Number Generation

I've been having trouble with coming up with a random number generator that produces a random number between two parties. My current scheme is this: User 1 gives user 2 the hash of their randomly ...
31
votes
6answers
4k views

What is the practical impact of using System.Random which is not cryptographically random?

I recently noticed a .NET software using PBKDF to derive an encryption key from a password string. This password string was ...
1
vote
1answer
116 views

What is the most secure/reliable CSPRNG currently available? [closed]

In terms of period length, uniformity/distribution, what is the most secure/reliable CSPRNG currently available?
3
votes
1answer
736 views

384-bit ChaCha20 / Salsa20

The standard Salsa20 core is a $\{0,1\}^{384} \to \{0,1\}^{512}$ random function with a 16 byte constant ($\sigma$ for a 32-byte key), an 8 byte nonce, an 8 byte counter, and a 32 byte key. The hash ...
0
votes
0answers
33 views

Help, Feedback and Solutions to a problem on a PoC CSPRNG

Background I do not recommend trying to roll your own crypto. This is just a for-fun PoC, which won't be used in any public or private scenario. I am creating a PoC nearly-true random number ...
0
votes
1answer
82 views

How can I estimate the amount of entropy (with JavaScript) that I'm seeding a CSPRNG with?

I am trying to determine how much entropy is going into a specific CSPRNG in JavaScript, but I can't seem to find a pure-JS client-side implementation of an entropy estimator. So, I need to find a ...
0
votes
1answer
146 views

Different ways of building a ChaCha20-based RNG

Let's say you're building RNG with ChaCha20 and the fast key erasure technique. There seem to be a few ways to do it. The reference implementation in the SUPERCOP benchmarking toolkit looks like ...
3
votes
0answers
94 views

How good is the middle cube method with jumbled digits? [closed]

I had to make my own PRNG for a stream cipher for an inter-school science project. So I thought of cubing the seed instead of squaring it (like in the middle square method). And to prevent prediction ...
2
votes
2answers
163 views

Efficient way of generating a random number of N (less than 64) bits with exactly M bits equal to one [closed]

Would there be an efficient way to implement a function with the following signature: unsigned long long int random_word(size_t n, size_t m) that would generate ...
2
votes
1answer
166 views

LFS Kolmogorov Randomness

Consider following LFS register (where + denotes addition modulo 2) I have found the output sequence as 1,0,1,1. I know that The K(s) of a string s is defined as the length of the shortest computer ...
2
votes
1answer
764 views

How Should Fortuna and Yarrow Compare When Tested With Dieharder

I have both Yarrow and Fortuna implemented as number generators. I ran 100 complete DieHarder (entropy tester) tests for each implementation using the same entropy source. The results were surprising: ...
21
votes
6answers
3k views

Why are PRNG in programming languages not cryptographically secure by default?

In most programming languages, there is a module or function in the stdlib for creating random output like random.random() in Python. Because those functions use a ...
1
vote
2answers
146 views

Would dividing a random number by a constant “ruin” it?

If I get a random number from a cryptographically secure random number generator then divide it by a number, say 2, is it still cryptographically secure?
2
votes
1answer
98 views

Why does the NIST CTR DRBG apparently output the internal state when no additional input is given?

After reading through the specification of the FIPS CTR_DRBG in SP 800-90A (see Section 10.2.1), I got the impression that the output of the DRBG coincides with its internal state as long as no ...
10
votes
1answer
1k views

What are the methods to construct a primitive binary nonlinear feedback shift register (NLFSR)?

Given a binary shift register of $n$ bits, a primitive binary nonlinear feedback shift register will generate a sequence with a period of $2^n - 1$. While I am unable to find a paper which directly ...
3
votes
1answer
1k views

Linear Feedback Shift Register Taps

Linear feedback shift register tap charts are availale for registers of length 3 to 168. Does anyone have a chart for register lengths from 168 to 256 or beyond?
2
votes
2answers
103 views

Are there any practical differences between running a PRNG on a subset of bits from an RNG compared to running the RNG?

Given an RNG and a PRNG. We define RNG(k) to mean that the RNG produces k random bits. We define PRNG(k, seed) to mean that the PRNG uses seed to produce k pseudo-...
3
votes
1answer
131 views

How can I generate a deterministic evenly distributed random number in a blockchain

Here's the hypothetical. There's a blockchain, which for the sake of simplicity, is modelled around Bitcoin and proof-of-work. My goal, is that for each mined block, rather than a set reward (12.5 ...
1
vote
1answer
37 views

Side-channel resistant discrete uniform sampling on $d\neq 2^t$ values?

Assume you have some source of $\mathsf{Bern}(1/2)$'s (probably some CSPRNG in practice). What is generally done to sample from $\mathsf{Unif}([d])$ in a side-channel resistant way (assuming $d$ isn't ...
4
votes
2answers
114 views

Randomizing Prime Field Elements

I need my code to generate random elements from $GF(p)$ ($F_p$ or $Z_p$, if you will). The Crypto API I have available provides one with random bit strings. To tailor that to my needs, I can think of ...
6
votes
1answer
460 views

How did SHA-1 'feed' Blum Blum Shub

One of the most (in)famous hardware derived random number generators was Lavarand (patent). It did it with funky lava lamps. An image of the lamps was hashed and fed into Blum Blum Shub (BBS) to ...
4
votes
2answers
2k views

How many bits of entropy can I expect from /dev/urandom in iOS?

Apple's latest security documentation indicates that it now uses CTR_DRBG for generating pseudo-random numbers (previously Yarrow instead of CTR_DRBG), using "timing variations during boot" and "...
84
votes
11answers
10k views

Is modern encryption needlessly complicated?

RSA, DES, AES, etc., all use (relatively) complicated mathematics to encrypt some message with some key. For each of these methods, there have been several documented vulnerabilities found over the ...
9
votes
0answers
474 views

What level of security is provided when a Feistel Cipher is used as a round function of another Feistel Cipher?

Recently, I was reading: Are there any specific requirements for the function F in a Feistel cipher?, and the answer posted mentions a Feistel Cipher named Turtle, which uses a four-round Feistel ...
4
votes
2answers
142 views

How was the 5 digit random number in the VIC cipher generated?

Knowing that VIC was a "spy cipher" it is unlikely that the agents used a cryptographic device to genreate the 5 digit number but how did they do it?
2
votes
0answers
66 views

Generating sets of unreadable/secure and unique random numbers

In the process of doing some research, I stumbled across the following two claims on the PokerStars website. We do record all of the hole cards in all real money hands. This is an important tool ...
6
votes
1answer
1k views

Hash functions to generate a one-time pad

Maybe this is a newbie question: Stream cypher, will XOR message bits with one-time pad bits. Suppose I have a pseudorandom number generator, like a Mersenne Twister or something similar. I could use ...
1
vote
1answer
189 views

Interpretation of certain results of NIST Test Suite

I am using NIST Test suite on a PRNG and have a confusion regarding some specific results. Following is the part of the results: ...
1
vote
2answers
60 views

Derive operations from an arbitrary number

I don't really know how to phrase this question, so I'll just mention the idea. This is partially reminiscent (at least in spirit to white box crypto): Can one derive arithmetic operations from a ...
6
votes
3answers
2k 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 ...
2
votes
1answer
150 views

Testing PRNG quality from ECC public keys?

Having a large set of ECC public keys $P_i = n_iB$ on a fixed curve $E$ over a prime field, is there a way to determine if coefficients $n_i$ were generated using a bad PRNG? In other words, can a ...
3
votes
2answers
380 views

Implementing randomness extractors

A randomness extractor is a function that takes an input sampled from high entropy distribution and outputs a value that is close to uniform distribution. It is slightly different from a PRG. PRGs ...
17
votes
3answers
3k views

Can we assume that a hash function with high collision resistance also means a highly uniform distribution?

I want to use a hash function to generate a random sequence from number 0-n. And so I would like to find a good function that results in values that are seemingly random (does not need to be secure), ...
3
votes
1answer
194 views

Asymmetric CSPRNG where the public key only works backward

Is there an asymmetric cryptographically secure pseudo random number generator in which the public key only goes backward? For example, I'd like to generate 5,000 digits, then provide the public key ...
-2
votes
1answer
57 views

Given a point $c$ in a field $Z_p$. Can we get another value $c^{'}$ such that $\left(c^{\prime}-c\right)$ is invertible in $Z_p$?

If we have a point in a field $c$. Can we get another value $c^{'}$ such that $\left(c^{\prime}-c\right)$ is invertible in $Z_p$ ?
2
votes
2answers
2k views

HMAC-SHA512 output randomness?

This is regarding an online roulette game that claims to be fair. Here is the explanation: Two strings are created: ...
2
votes
1answer
318 views

Enumerating the bias of NIST and Pearson randomness extractors

The following is an extract from a paper about using your mobile phone as a true random number generator (TRNG). The mobile phone bit is incidental to this question though. I'm interested in the ...
3
votes
2answers
144 views

Does a regularly reseeded PRNG provide backtracking resistance?

I'm currently discussing a security topic with some of my classmates. A cryptographic PRNG typically provides backtracking resistance if an adversary that compromises the internal PRNG state cannot ...
1
vote
1answer
132 views

Understanding $\varepsilon$-advantage in cryptographically secure deterministic RNG

In Efficient and Secure Pseudo-Random Number Generation by Vazirani & Vazirani, it is stated that every pseudorandom number generator which satisfies the XOR Condition can securely output $\log n$ ...
1
vote
1answer
726 views

Can I use a random number generator with seed for key derivation?

I don't know a thing about cryptography so I'm judging by what I see in APIs docs. I want to use ECDSA or ECDH in my project. And what I know so far about key derivation in this systems is that they: ...
2
votes
1answer
95 views

Mapping between NIST test and TRNG features

Each of the NIST tests are generally explained in Random Bit Generation - Guide to the Statistical Tests. I was wondering if some one can help me understand them better. For example, which tests show ...
5
votes
1answer
233 views

Using a non-secure random generator for IV or salt generation

I was just looking at a post on Code Review when I noticed the other answer to the post. While I would agree mostly with the answer, I do however doubt if having a Cryptographically Secure PRNG is ...
1
vote
1answer
91 views

Stream cipher — Are all random bit generators suitable for stream cipher?

I learned the stream cipher using LFSR in the book. I wonder whether all random bit generators (i.e. BBS, Rabin generator) are suitable for stream cipher. I search using keywords "stream cipher" and "...
4
votes
3answers
295 views

Can a deck of cards be used as a practical source of cryptographic randomness?

This is not a duplicate of Entropy measurement from shuffled cards, as this concerns use of cards as a cryptographic entropy source, rather than calculating entropy from some number of cards. The ...
2
votes
3answers
197 views

Are XOFs and KDFs more usable than DRBGs?

CSPRNGs have 2 design requirements: output unpredictability, back-tracing resistance. In addition to which, NIST SP 800-90Ar1 added other features such as a) instance customization/personalization,...
2
votes
0answers
45 views

Is it possible to use a XOF function as csrng? [duplicate]

Let's say we "seed" a xof function (eg. SHAKE256) with x cryptographically random bytes (enough so that they can't be bruteforced), could said function be used as a cryptographically secure random ...

1 2
3
4 5
14