Questions tagged [randomness]
Usage of randomness (i.e. non-predictable data, usually in the form of bits or numbers) for cryptographic purposes.
542
questions
32
votes
6
answers
5k
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 ...
2
votes
2
answers
227
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 ...
3
votes
1
answer
618
views
Randomness Testing of Cryptographic Algorithim
I am new to algorithim randomness and confused at I guess a basic level question. Is it common for any cryptographic algorithim to have repetitions in its output i.e.let say 34 and D8 are two ...
2
votes
2
answers
438
views
Statistical Analysis of Cryptographic Hashing Algorithms
I was wondering how can I use NIST Statistical Test Suite to check for the randomness of output generated by a cryptographic hashing algorithm, let say SHA-256?
To be specific, how will I generate ...
-2
votes
1
answer
120
views
If an algorithm can not produce a true random stream, then an algorithm can not alter its entropy [closed]
Can a transform lower the Kolmogorov entropy of a true random stream and then restore that stream with out loss.
If not true then this means a transform can not raise or lower the entropy.
3
votes
2
answers
249
views
How can the 'randomness' of a finite sample of binary keys from a finite key space be estimated?
Given a set of bit sequences generated by an extractor, what would be a valid setting for estimating the
randomness of these generated keys and what resolutions can be drawn for
that extractor in ...
3
votes
1
answer
668
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:
...
2
votes
3
answers
2k
views
AIS31 Software and Documentation
I have learned that there are two main test suitcase for randomness (reference):
AIS 31 - German Federal Office for Information Security (BSI)
SP 800-90B - U.S. National Institute for Standards and ...
1
vote
1
answer
539
views
How does bit-wise operation work for encrypting grayscale images? [closed]
How does bit-wise operation work for encrypting grayscale images?
In my Khan Academy course they encrypt an image with bitwise_and, ...
3
votes
2
answers
281
views
What is the proof that a hash output contains random binary numbers
I have heard quotes by many that a SHA-512 hash output is random.
Does anyone know what method was used to come to this conclusion? If it is not randomized, how could that be shown?
2
votes
1
answer
1k
views
NIST random excursion results
NIST specifies so-called random excursions test and random excursions variant test. From the description I can derive that the number of p-values should be 8 in the first case and 18 in the second. ...
6
votes
1
answer
894
views
Can future Bitcoin hashes be considered a good source to generate random numbers?
There are a lot of miners trying to calculate the next valid SHA-256 hash using random strings, so can I consider that generated hashes have good randomness? How can I prove it?
For example, use the ...
2
votes
4
answers
651
views
Randomness Testing
Let say I have three sequences:
S1 = {1,2,3,4,5,6,7,8,9,10}
S2 = {3,7,1,9,4,10,5,8,6,2}
S3 = {8,3,10,2,6,7,1,5,9,4}
i.e. S2 and S3 are just the permutations of S1. Is there any method to check how ...
1
vote
0
answers
85
views
Randomness Test of Permuted Sequence
As we can generate a permuted sequence using KEY in KSA (Key Scheduling Algo) of RC4. Is there any way to check the randomness of the permuted sequence?
Let say I created 100 different permuted ...
0
votes
1
answer
36
views
Can randomness protect a list of signatures against forgery attacks?
Suppose we have a list of signatures $S = [s_1, .., s_n]$ for a list of messages $M = [m_1, .., m_n]$, and we want to verify that $S$ is a valid signature of $M$, so each $s_i$ should be valid for ...
4
votes
1
answer
217
views
What information does $g^x$ reveal about $x$?
Let $p$ be a large prime number. Let $G$ be a subgroup of $\mathbb{Z}_p^*$ with order $q$ - again a large prime. Let $g$ be a generator of $G$.
Consider the following standard protocol for ...
4
votes
2
answers
461
views
Verifying randomness and uniqueness of TRNG output
We need to verify two claims about a set of numbers:
They are random
They are unique in the set (the set is about 200 billion (2TB bin storage))
Supposedly, the numbers were generated by a TRNG (...
7
votes
3
answers
785
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 ...
-1
votes
2
answers
2k
views
How to test for randomness using FIPS 140-2 [closed]
I designed a PRBG which produced 20000 bits. Please help me here. How do I test for randomness using FIPS 140-2 suit. I know what each test entails. Question is, can I get like a program/software/code ...
0
votes
1
answer
351
views
Does encoding a secret affect security?
My question is simple. I have a secret that is generated with a 10 byte long pseudorandom generator library (e.g. Java's SecureRandom), that in theory provides a security equivalent to $2^{40}$ (...
4
votes
1
answer
436
views
Von Neumann Extractor - Which bit is retained?
Which bit is retained in the Von Neumann debiasing algorithm? 00 and 11 are discarded and 10, 01 are retained but is the first or the second bit retained or does it matter?
In other words:
first: ...
1
vote
1
answer
167
views
ECDSA signature of a random 32 byte number vs. the hash of the number
I'm working on an application that involves signing a 32 byte random number generated by the OS. Assuming the RNG works as intended, is it safe to sign the random number itself rather than a hash of ...
1
vote
1
answer
204
views
Origin of the Chi-Squared test statistic for serial test (two bit test)
On page 181 of Handbook of Applied Cryptography Chapter Five, it states the following:
The purpose of this test is to determine whether the number of occurrences of 00, 01, 10,
and 11 as ...
-2
votes
1
answer
109
views
Where can I find some thought-provoking questions on the fundamentals of Cryptography? [closed]
The question might sound broad, allow me to explain. Cryptography is a diverse domain. I have been in Crypto research since last four years. Recently, one of my colleague got interviewed by an IT ...
0
votes
0
answers
238
views
Prove that a given signature scheme is secure under random message attacks
This is a follow up to my previous question.
Consider the following signature scheme:
$\operatorname{KeyGen} (1^k$) : On input of a security parameter $k$, choose a symmetric bilinear group with $e : ...
-1
votes
1
answer
102
views
Random letter swap soloution
I am working on a way to decipher some text generated by a small piece of code (see below).
This piece of code swaps letters in the sentence at random and was wondering if there where any techniques ...
1
vote
1
answer
204
views
Security of (2,2) Shamir's visual secret sharing scheme : How are the 2 shares random?
From the Visual Cryptography by Shamir and Noar.
Let us take the pixel expansion as 2. Therefore, each pixel will be represented by 2 pixels (also called as subpixels) in a share. Since this is a (2,...
8
votes
1
answer
605
views
How did I get a nonuniform distribution of UUID4s across MD5 space?
We have a system that processes data. Each entity has an ID that is generated using uuid4() in Python. Later, that ID is used as a partition key for AWS Kinesis. ...
-1
votes
1
answer
528
views
Brute forcing/hacking Secure passphrases - difficulty for random strings vs real words
I was wondering about this topic of brute forcing passwords,or ANY other way to deriving them - and asking myself whats more secure (relatively):
A Password which includes
A) 30 digits length- a ...
2
votes
3
answers
2k
views
Low entropy - how does it compromise the crypto
One of the often pointed out mistake in dealing with crypto is not having enough entropy in the system. Without enough entropy the random numbers generated are not random enough.
But what I am not ...
3
votes
2
answers
2k
views
NIST randomness test p values
I have a binary sequence of length $2^{20}$. I am using the NIST statistical test, assess.
What should be taken for ./assess and ...
2
votes
1
answer
890
views
Is there any bias whatsoever in modern hash function outputs?
The following is a representative example of a common hash function:-
The asymmetry is clear, and I would expect additional edge effects in the A and E output words. So I'd be surprised if the ...
4
votes
1
answer
1k
views
Golomb's Randomness postulates
In Handbook of applied cryptography, Golomb's randomness postulates are given:
Let $s$ be a periodic sequence of period $N$. Golomb’s randomness postulates
are the following.
R1: In the cycle $s_N$ ...
-2
votes
1
answer
95
views
Method for generating random number(s) [closed]
I was reading about random numbers and their usage in security. I'd like to verify with more experienced people how good this method of generating random numbers will be.
Human beings are very hard ...
3
votes
2
answers
3k
views
Example of cryptography random number
I read that random numbers are being used in cryptography and security. I think I have idea how to truly generate true random, non-deterministic number. But before continuing further I'd like to ask ...
2
votes
1
answer
1k
views
How to determine the fastest OpenSSL cryptographic algorithm
This question does have to do with cryptography, but not necessarily with encrypting meaningful data. This is my first post here, so if I'm going about this question incorrectly please let me know.
...
2
votes
3
answers
268
views
Impact of a non-uniform distribution in a secret sharing scheme
When it comes to the secret sharing schemes, it seems that the random numbers need to be drawn uniformly. Is there any difference between the random numbers from uniform distribution and the non-...
18
votes
4
answers
4k
views
Using Tweets as a Random seed
I would like to start by saying I know nothing about Cryptography and was reading up on how to choose a random seed and this link is something that I found. What I basically understood that the seed ...
3
votes
5
answers
459
views
Is there a definition of the pseudo-random sequences like PRG or PRF in cryptography?
I have learned the definition of PRGs and PRFs. As I know the meaning of pseudoreandomness. I think that the pseudo-random sequence and the truly random sequence are indistinguishable.
I did not find ...
4
votes
2
answers
950
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 ...
5
votes
3
answers
4k
views
Cryptography's random number problem?
Sophie Chen at Wired Magazine;
quantum mechanics could solve cryptography's random number problem
Such machine already exist, but it's too huge and not so fast in order to use it all the time.
...
3
votes
2
answers
2k
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 ...
5
votes
2
answers
872
views
Does AES encrypting /dev/zero and feeding output to AES again increase entropy of the ciphertext?
I just thought about what would change if would pipe the output of
...
1
vote
1
answer
88
views
Privacy of randomness using extractors and PRGs
The Wikipedia article on randomness extraction states that they are different to pseudo random number generators but the distinction is very hazy. Both seem to take in some input quasi-randomness and ...
4
votes
3
answers
286
views
Is it correct to concatenate (pseudo-)random byte values before testing them with the NIST suite or tools like dieharder?
Let's assume I have thousands of (pseudo-)random 4-byte values. The values are 4 byte random values which a blackbox device gave me. I got these values by requesting them. In between others might have ...
4
votes
1
answer
475
views
Proving von Neumann extractor correct
Von Neumann extractor works as follows:
Suppose $C$ is a biased coin, with $p = P[C = 1] > P[C = 0]$ and let $b_1b_2\ldots$ be sequence of results by independent coin tosses. For $i \ge 0$ one ...
3
votes
2
answers
308
views
Does this description of verifiable random functions seem accurate?
I've been thinking about verifiable random functions recently due to my interest in sortition (random selection of political officials). I wrote up this little paragraph below, and I'm wondering: Does ...
15
votes
2
answers
3k
views
What is the difference between TRNG and CSPRNG?
I understand the output of a TRNG is almost impossible to reproduce, such a flipping a coin 100 times to produce a 100-bit sequence. However, it is also my understanding that a CSPRNG produces an ...
4
votes
0
answers
170
views
Use of randomness in an Elgamal like encryption
Suppose I have the following encryption scheme: for a message $m\in\mathbb{F}_p^*$, I generate the ciphertext = $(g^r,f^mh^r)$ where $g$ is the generator of a cyclic group $G$ of unknown order $n$ and ...
-2
votes
1
answer
212
views
Using IPv6 as seed + time almost as good as TRNG? [closed]
I just figured out a way to create a RNG that may be almost as good as TRNG (true random number generator) and need some input to confirm/clarify.
What if I use the IPv6 address of a visitor as a ...