Usage of randomness (i.e. non-predictable data, usually in the form of bits or numbers) for cryptographic purposes.

learn more… | top users | synonyms

0
votes
1answer
66 views

PHP secure random number generator [on hold]

I was trying to find a better way to generate random numbers in PHP and thought that using /dev/urandom would be the way to go (based on a few lectures). So I thought I would implement the following, ...
1
vote
0answers
20 views

Is there a Javascript and Java implementation of a good CSPRNG [on hold]

I need to use a cryptographically secure pseudo random number generator in my client running Javascript and in my server running Java. Is there a well-known implementation of a good CSPRNG in both ...
1
vote
1answer
58 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 ...
8
votes
3answers
2k 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 ...
0
votes
0answers
26 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 ...
1
vote
1answer
130 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 ...
1
vote
0answers
88 views

To prove $r_2$ is a uniformly at random value in $Z_n$, where $r_2=r_1 . m$

$m$ is arbitrary value in $Z_n$, where n is RSA modulo. Then we do: $r_2=r_1 . m (modn)$, where $r_1$ is a random value such that $r_1\in Z^*_n$. ** Question(1): is $r_2$ a uniformly at random ...
5
votes
2answers
189 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 ...
2
votes
1answer
93 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 ...
2
votes
1answer
351 views

Entropy of the key

Suppose a $1000$-bit key used in the one-time pad is not randomly and uniformly generated. Suppose that the values of the first $5$ bits are $0$, and the other $995$ bits are randomly generated and ...
1
vote
1answer
93 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 ...
3
votes
0answers
44 views

Feasible way to check n-dimensional equidistribution of PRNGs

I am currently gathering some test methods and test suites for random number generator qualities, and am a bit stuck at finding something feasible to test for n-dimensional equidistribution. As input ...
2
votes
1answer
115 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 ...
1
vote
1answer
426 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 ...
5
votes
1answer
92 views

Are poly1305 authenticators distinguishable from random data?

Assume Alice authenticates a message $M$ with nonce $N$ and secret key $K$, creating authenticator $A$. She then sends $A$ across the network. The Poly1305 paper does not seem to specify whether it ...
2
votes
1answer
78 views

Strategy for random CTR initial counter values

Alice has a secret key which she uses to encrypt messages in CTR mode. CTR mode is critically vulnerable to counter reuse, and Alice has a problem: she has terrible memory and no pen to write anything ...
4
votes
4answers
264 views

Given $n$ bits, how many “truly random” sequences/numbers can be constructed?

Suppose we have $n$ bits, so we can have $2^n$ different bit sequences. Some sequences don't look random, say, all $1$ or $0$. There are also other patterns like $10101010…$, $11001100…$ and such. ...
1
vote
0answers
51 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 ...
4
votes
1answer
159 views

Understanding hash entropy

I have been told that one advantage of using a hash function is that it spreads entropy over all input bits. But it also seems to be true that a bad hash algorithm can make things less random. But how ...
5
votes
3answers
242 views

How useful is NIST's Randomness Beacon for cryptographic use?

NIST have just launched a new service called the NSANIST Randomness Beacon. It has been met with some initial skepticism. Perhaps the cryptography community would have used it before June 2013 when ...
2
votes
2answers
88 views

Proving a decision was randomly made [duplicate]

Alice and Bob want to agree on a bit $0$ or $1$. Both know it would be fair to pick that at random, but there's no way they could meet to throw a dice and no third party they could trust. Are there ...
4
votes
2answers
502 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 ...
4
votes
1answer
206 views

Difference RSA keypair creation openSSL and openPGP?

Creating a 2048bits RSA keypair I figured that doing this using openssl takes as an input 32bytes of "randomness" from /dev/urandom gpg (openGPG) takes as input ...
-2
votes
2answers
105 views

How to best mix two arbitrary/random n-bit words? [closed]

Given two arbitrary/random $n$-bit words, how could one best mix them to get one $n$-bit word for general crypto usages? I suppose that one should have an adequate measure of goodness of the mix ...
2
votes
1answer
96 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 ...
0
votes
1answer
104 views

Prime factors of non-random keys

I have been working on a challenge i found on the internet. It is as follows: You've stumbled onto a significant vulnerability in a commonly used cryptographic library. It turns out that the ...
2
votes
1answer
114 views

Detecting steganography in the stream of short messages

I have stream of millions of short n-bit (n<30) messages generated by some random number generator. The source of random number generator is not available to me. I suspect there are messages used ...
3
votes
1answer
70 views

Collecting entropy from a stream to a file

I have a potentially infinite stream of data originating in some physical phenomena that may expose random behavior (due to quantum effects, thermal noise, the butterfly effect in chaotic dynamical ...
2
votes
1answer
85 views

/dev/random only needed for key generation / CPU pattern encryption

Consider the following scenarios: using OpenSSL to encrypt a file with Rijndael-256 using LUKS to encrypt a hard-drive that is used every day Exactly when is entropy from ...
2
votes
2answers
336 views

Are the SHA family hash outputs practically random?

Say I hashed the output from a random number generator (with nonce), would the resulting SHA256 hash be as random as the inputted number? And If I used the first 5 hex characters, and then used the ...
1
vote
0answers
242 views

Random Number Generation with a Entropy pool versus Seed

To give a little background I'm currently implementing a crypto library in JavaScript. I have started porting across Linux's random number generator because its both publicly scrutinized, it is ...
2
votes
1answer
118 views

password generation: random length or max length

In short: Is it cryptographically stronger to have a known length password of the maximum length allowed, or a random length password somewhere in the range of the longest length possible? Does the ...
3
votes
1answer
124 views

How can two (or more) parties share and agree upon a common random seed?

I really don't know how to call this simple problem: Two (or more) parties need to establish a common (non-secret) value to be used as a seed for a deterministic RNG. The only requirement is that each ...
2
votes
1answer
527 views

How are IVs used in association with RSA Encryption?

How are IVs used in association with RSA Encryption? Can someone explain why we use them in this RSA context?
3
votes
2answers
680 views

Why is sharing the seed and using SecureRandom “deterministically” so bad?

I've recently been reading an article about "using cryptography to store credentials", and I would love it someone explained this in more detail… Up until Android 4.1, Android used a SecureRandom ...
2
votes
1answer
127 views

How do I prove that this PRNG is easily distinguished from a random sequence of numbers (modulo m)?

I was studying Crypto, and this question came up. Using a PRG like the multiplicative congruence generator: $b_{i+1} = a \cdot b_i \mod m$ How do I prove that the output of this PRG, or any PRG's ...
1
vote
2answers
539 views

Estimating random number entropy for input into 256 bit hash

Assuming a random number generation process outputs lots of numbers between 0-9. First I gathered up a bunch of the numbers, converted them to binary and created a bitmap. Not so random as you can ...
1
vote
1answer
154 views

Intuition for random variables in cryptography

I have a simple question about the use of random variables for encryption schemes, to make sure my intuition is correct. We say $P(K = k)$ to represent the probability that a particular key $k$ is ...
3
votes
1answer
179 views

How does redundancy in a file effects performance and security of encryption?

Does redundancy in a file or data effect performance and security of encryption? (for example for AES, if not for general case) Is it easier to encrypt something that has high redundancy or something ...
10
votes
6answers
2k views

How exactly is “true randomness” defined in the realms of cryptography?

Especially in relation to stream ciphers, I frequently read about (sometimes theoretical, sometimes practical) attacks that are able to "distinguish a ciphertext from a truly random stream". What's ...
5
votes
2answers
161 views

Fast post-processing for broken RDRAND

Let's assume that the Intel RDRAND instruction does not return fully random numbers, e.g. because it has been engineered with a backdoor for the NSA. If the Intel RDRAND instruction is used directly ...
7
votes
6answers
352 views

Do ciphertexts leak information about their algorithmic creators?

If an adversary holds thousands of encrypted files that were encrypted with the same cipher, can he determine which cipher method had been used on the files? Assume that the adversary has no prior ...
6
votes
2answers
385 views

Why are HOTP and TOTP implementations all using 6 digits and not more?

I was checking the RFC's after wondering for some time. In RFC 4226 - HOTP: An HMAC-Based One-Time Password Algorithm, it states on the appendix: A simple enhancement in terms of security would be ...
1
vote
1answer
123 views

Does it necessarily mean that an RSA moduli generated with poor randomness is not random?

In 2012 a group of researchers collected a large amount of RSA moduli and calculated their greatest common divisor in order to find common factors between them. By finding a common factor they could ...
6
votes
1answer
345 views

How random is the shared secret in the Diffie Hellman key agreement

How random is the value $ZZ$ in the DH protocol? This question was triggered by this somewhat naïve implementation in I2P shown by Sergei at Stackoverflow. Obviously $ZZ$ is distinguishable from a ...
12
votes
1answer
4k views

What to watch for with openssl generating weak keys? (low entropy)

(Disclaimer: I am regular software engineer with only basic crypto knowledge, so helpful if can be explained for a layman.) I am concerned about generating weak keys on a shared linux box with ...
53
votes
5answers
28k views

Technical feasibility of decrypting https by replacing the computer's PRNG

Intel has an on-chip RdRand function which supposedly bypasses the normally used entropy pool for /dev/urandom and directly injects output. Now rumors are going on that Intel works together with the ...
1
vote
1answer
237 views

Encryption schemes and pseudorandom permutations

Can an encryption scheme (deterministic or not) be viewed as a pseudorandom permutation taking as input a message and returning a value of the same bit-encoding length ? Thank you.
3
votes
3answers
220 views

Construct a random permutation from a random function?

How can we construct a (pseudo) random permutation from a (pseudo) random function ? I've seen a method from Luby-Rackoff which allows to construct a PRP of length $2N$ from a PRF of input/output ...