A message from our CEO about the future of Stack Overflow and Stack Exchange. Read now.

Questions tagged [randomness]

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

Filter by
Sorted by
Tagged with
0
votes
0answers
23 views

NIST test suite for random numbers [closed]

I am using sts-2.1.2 (NIST test suite for random numbers) in Ubuntu 16.04 for testing random numbers and I've installed it successfully. However I don't know how to perform test on random numbers, how ...
-3
votes
0answers
31 views

Can i decrypt the msg if i know the source code of whole application which was used to encrypt the msg? [closed]

Here is the scenario: following can be seen from source code Encryption algorithm used : either AES-256 or blowfish location of salt salt generated using urandom function Hash generated using ...
8
votes
2answers
695 views

Perfect shuffle possible with limited raw entropy?

I am trying to shuffle a standard 52-card deck in a perfect way (every outcome should be possible at an equal chance). I am not, at this point, concerned with cryptanalysis attacks against it. I have ...
1
vote
2answers
146 views

The importance of randomness in the creation of a key

Why does it matter what kind of random number generation is used during key generation? E.g. this answer states ...
1
vote
0answers
36 views

Why does a “never-repeating” nonce limit a key to safely encrypt only a single block?

This questions comes from a section outlined in RFC 5297 on SIV-AES. The paragraph in particular outlines the idea of a never repeating nonce vs an "almost always" non-repeating nonce. If the nonce ...
0
votes
0answers
41 views

Crack LCG given 2 output values only

I want to try to break an LCG generator just as programming practice task. I found similar issue at Cracking a linear congruential generator. Assume that m is given. The answer to the link above ...
1
vote
0answers
35 views

OTP Random Pad Renewal Without Extending Message

So I recently learned about the concept of a One Time Pad; and I from what I understand it means that if a XOR key is completely random and equal to or longer than the plaintext, it makes it so that ...
1
vote
1answer
80 views

Creating Random Pad from XORed Sections of Pi

If two strings of equal length from random offsets in Pi were XORed together, would this result in a cryptographically secure random number suitable for use in a one-time pad? If so, would this mean ...
1
vote
1answer
55 views

How should one handle the identity value and other “obviously” weak secret random values?

In RSA, ECDSA, ElGamal and quite a few other schemes, using a secret (random) value equal to 1 might not provide any form of security, while still being mathematically sound. For RSA, ECDSA or ...
0
votes
1answer
295 views

SHA256 output to 1-6 number range?

I want to calculate a random number (1 to 6) from the output of sha256. Can I assurance the probability of 6 abilities is the same?
1
vote
1answer
50 views

How does AES-GCM produce different ciphertexts, and how can the algorithm decrypt the values if they're random?

The title explains it. How does AES-GCM (or other modes for that matter) generate random ciphertexts per execution, and how does the algorithm decrypt a random value since the sender randomizes the ...
4
votes
2answers
234 views

What are usable entropy sources in a headless machine without /dev/random or any cryptography API?

If I have a headless machine (no mouse movements, no keyboard presses, or user input), without any cryptography CSPRNG APIs, where can I collect entropy from?
2
votes
2answers
66 views

Given a hash function; assuming domain % codomain = 0 and uniform collision distribution; how is entropy lost by collisions (not output truncation)?

Assuming our domain and codomain both have 4 elements, the uniform distribution of inputs to outputs means the function is injective. It is widely agreed that randomly selecting a domain element ...
1
vote
2answers
104 views

Why doesn't the ability to sample a single random bit imply the construction of a random oracle?

I'm trying to understand exactly how the random oracle model differs from the standard model. In many proofs & applications there are some assumptions that some randomness is sampled (i.e. a bit $...
1
vote
1answer
52 views

What is the correct way to choose the start parameters for NIST tests? [duplicate]

I had an idea of creating a pseudo-random binary sequence with that code: ...
2
votes
1answer
49 views

Why are inputs to boolean functions usually modelled as random variables? [closed]

I ask this because it might one of those things that "everybody knows/does", but never gets written or explained anywhere... Is it just a matter of aesthetics (in the mathematical sense of the word), ...
1
vote
1answer
168 views

Why does the Fiat-Shamir heuristic not work without a random oracle?

Consider the following three stage interactive zero knowledge proof in round $i$ The prover sends some commitment $a_i$ to the verifier. The verifier picks a challenge $c_i\in \{0 ,1\}$ Depending on ...
1
vote
2answers
95 views

Is a number generator based on hashing an incremental string considered random?

Consider the following system 1 - fixed string as a seed, example "something" 2 - concat an increment number "something-1" 3 - hash it, assume it is "9f2054ea4d2c" 4 - take the first 3 digits to ...
1
vote
1answer
55 views

Is it possible to calculate the random factor $r$ from a encrypted message and the private key in a Paillier cryptosystem?

I have already done my research and found various sources that state that it is possible but there are also a lot of them that says it is not possible to recover $r$. This Q/A on this site for example ...
1
vote
3answers
119 views

Why does mt19937 fail the universal test in NIST SP 800-22?

Update: with the help of @SqueamishOssifrage and @PaulUzdak, we discovered that my NIST SP 800-22 has a broken universal test. So this becomes a moot question. Check this report. It seems to sail ...
1
vote
1answer
70 views

How can we reduce indistinguishability-from-random to other security notions?

In probabilistic encryption schemes, different notions of security exists. I'm interested in the relationship between two notions. One is the indistinguishability-from-random notion of security and ...
-1
votes
1answer
81 views

What is a popular entropy source for seeding a CSPRNG, which is actually weak and unreliable? [closed]

Say I want to seed a CSPRNG. What sources are popular, but unreliable? What sources should I even use?
1
vote
1answer
95 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?
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 ...
2
votes
2answers
144 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
1answer
273 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
2answers
149 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
1answer
104 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
2answers
206 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 ...
1
vote
1answer
109 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
79 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 ...
2
votes
1answer
102 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
2answers
155 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?
1
vote
1answer
105 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. ...
4
votes
1answer
305 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
4answers
350 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
0answers
72 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
1answer
29 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 ...
3
votes
1answer
181 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 ...
3
votes
2answers
195 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 (...
4
votes
3answers
239 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
2answers
226 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
1answer
68 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}$ (...
3
votes
1answer
187 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
1answer
69 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
1answer
78 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
1answer
89 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
0answers
65 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 $...
-1
votes
1answer
63 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
1answer
103 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,...