Questions tagged [randomness]
Usage of randomness (i.e. non-predictable data, usually in the form of bits or numbers) for cryptographic purposes.
554
questions
1
vote
2
answers
186
views
Is the product of two NONZERO elements independently drawn from a prime field uniformly distributed?
Let $\mathbb{Z}_p$ be a prime field, $a, b$ be two random elements independently drawn from $\mathbb{Z}_p^*$, and $$
c = a* b \mod p,$$ is $c$ uniformly random? and why?
How is this question related ...
0
votes
2
answers
37
views
Does the permutation cycle of a PRNG change completely with different seeds?
Apologies if this seems like a trivial question.
I've been learning PRNG and cryptographic basics and I don't think I've found an answer to this question (At least that I understand).
My understanding ...
1
vote
0
answers
67
views
Generating random numbers in MPC, but the upper bound remains secret
Suppose we are using secret sharing-based MPC over a prime-order field. Given shares of a secret integer $s$, is there a way to generate shares of uniformly random integer in $[0,s)$ such that $s$ ...
1
vote
1
answer
512
views
Key generation from partially random data
Suppose an embedded system without a true random number generator peripheral, but nevertheless it is necessary to generate a secret key. Suppose also that this embedded system has an analog-to-digital ...
0
votes
2
answers
137
views
How 7z zip is able to decrypt a file that had the exact same input data and same password, if the encrypted file is different every time? [duplicate]
how does 7z perfectly "restores" the missing random encryption key parts used to generate the different encrypted file?
I watched this in a loop. Every time the encrypted file contents ...
5
votes
3
answers
867
views
CVE-2024-31497, nonces and random numbers: Can someone explain, please?
Regarding CVE-2024-31497 a German article "Nur NIST P-521 betroffen: PuTTY-Lücke kompromittiert private SSH-Schlüssel" wrote something about a vulnerability in PuTTY.
The issue was claimed ...
4
votes
2
answers
4k
views
What is better source of random bytes: Yubikey or /dev/random (or both)? [closed]
Let's say I need to generate a key, I have these three options as to where to get random data:
Yubikey (gpg-connect-agent 'SCD RANDOM 16384' /bye)
...
3
votes
0
answers
76
views
Deriving a cryptographic PRNG from a publicly random sequence
Consider a model of computation where we have a public oracle that provides access to a random sequence $R$. Given an index $i$ the oracle returns either 0 or 1, with the responses being deterministic,...
2
votes
0
answers
74
views
Why are most ABE KeyGen algorithms probabilistic algorithms?
It seems that in most Attribute Based Encryption schemes, the keygen algorithm is probabilistic, which means that given the same public key, master secret key and attribute set (or access structure), ...
0
votes
3
answers
191
views
Why are most KeyGen algorithms constructed to be probabilistic algorithms?
Are deterministic keygen algorithms unsafe? Why?
1
vote
0
answers
75
views
How to instruct VeraCrypt to use my hardware entropy source
As a hobby I built a radioactive decay based RNG, that I am still perfecting.
I would like to know how to use its output to contribute to VC entropy pool for key generation.
I know that before ...
0
votes
1
answer
77
views
Can a PPT adversary get secret $a$ from public messages $m_i=x_i-a \mod p-1$ for i=1,2, ...,n?
Consider I have a secret $a \in Z_P^*$ and n public messages where $m_i=x_i -a \mod p-1$ and $x_i \in Z_p$ for i=1,2, ..., n. Given that $a$ and $x_i$ for $i=1,2, ..., n$ are secrets, can a PPT ...
2
votes
1
answer
88
views
Interpretation of the Result of Dieharder Battrery of Tests: Very High p-value Result in rgb_lagged_sum Test in Dieharder Results in "WEAK" Assesment
I'm currently testing the randomness of using SHA-256 in Hash_DRBG mechanism based on this research. The parameters used in the testing are the default parameters, except for when the PRNG fails a ...
0
votes
1
answer
289
views
How good is blake3 compared to a random oracle?
How good is blake3 for generating pseudo-random bitstrings in comparison to a random oracle?
Let's say we generated an arbitrarily long pseudo-random bitstring by concatenating blake3 hashes together ...
3
votes
1
answer
174
views
Judgment of Results from NIST Randomness Testing
I am using the NIST suite to test the randomness of binary numbers and I have a 64KB dataset. I am confused with the results in finalAnalysisReport.txt.
I have the ...
0
votes
0
answers
107
views
Generating UUID from Keccak-256 hash
Is generating Keccak-256 hashes with timestamp + nonce (ensured to be unique for each run), and taking its most significant 16 bytes sufficient to generate random V4 UUIDs?
Obviously the 13th hex ...
1
vote
2
answers
262
views
The security of using a digital signature scheme twice with randomness
Suppose $\Pi=(Gen,Sign,Vrfy)$ is a secure signature scheme, is the following signature scheme $\Pi'$ secure?
$Gen'$: The same as $Gen$, output public-private key pair $pk,sk$ on input $1^n$
$Sign'$: ...
1
vote
0
answers
163
views
If G is a PRG, is G' necessarily a PRG?
Given:
A function $$G: \{0,1\}^{3n} \to \{0,1\}^{6n}$$ which is known to be a secure Pseudorandom Generator (PRG).
A derived function $$G'(x_1 \| x_2) = G_b(x_1\|0^n\|x_2), \text{ where } x_1, x_2 \...
0
votes
0
answers
56
views
RSA random key generation [duplicate]
How RSA keys are tested for primality if they are random generated? I imagine this could be time consuming task.
2
votes
2
answers
187
views
A question about "attacks on MAC key space"
At page 336 in "Handbook of Applied Cryptography - Menezes", I see the sentence
For $n$-bit MAC with $t$-bit key space this requires $2^t$ MAC operations, after which one expects $1+2^{(t-n)...
1
vote
1
answer
120
views
Can this algorithm be called a RNG?
So I developed this algorithm as RNG, although it looks random to me, I wanted to know the opinion of more experienced persons in the topic.
...
0
votes
2
answers
154
views
From Entropy's perspective how Encryption affects a Message?
How Ciphers, specifically, Substitution Ciphers and Transposition Ciphers manipulate the Entropy of Plaintext w/wo the aid of Entropy Source?
Reversely, how Decryption manipulates the entropy of ...
1
vote
0
answers
88
views
Two-party randomness for KEM
As indicated in an earlier Q / A, KEM's do not necessarily directly encrypt a pre-generated random value. However, it is clear that some KEM's do actually do this, with RSA-KEM being an obvious ...
2
votes
1
answer
98
views
NIST random number tests report
I am using the NIST test suite to test random binary numbers. when I tried it for data.pi, the generated report has some items that can not be interpreted.
for example, the coeffecients named C0~C10. ...
4
votes
2
answers
887
views
What are the state-of-the-art TRNGs today?
How fast are the fastest ones? Which ones have the most entropy? Which ones are the most practical ones?
I tried looking for answers on Wikipedia and also, I tried reading papers, but I am couldn’t ...
4
votes
2
answers
202
views
Is it valid to transform the tested sample file and re-test, rather than invent additional randomness tests?
I'm enhancing the venerable ent randomness test suite. And I came across this idea in On Independence and Sensitivity of Statistical Randomness Tests.
"To ...
2
votes
0
answers
52
views
Deterministically secure PRG from deterministically secure OWF
Consider the construction of "A Pseudorandom Generator from any One-way Function" [HILL99] in Hastad et al.
One way to proof pseudorandomness of this construction is by contradiction.
That ...
0
votes
0
answers
52
views
Does randomization make a big difference in the output of the BKZ algorithm?
We all know that block Korkine-Zolotarev (BKZ) algorithm is essentially a deterministic lattice reduction algorithm. However, in the actual implementation, the BKZ algorithm contains some ...
1
vote
0
answers
210
views
Can someone give a comprehensive guide on how to run NIST SP 800 90B entropy assessment c code in windows? [closed]
I am trying to run the github code in windows 11. I don't know what all I need to install in my laptop to run the C++ code. It would be a great help if someone can point out the steps to run the code.
3
votes
2
answers
158
views
A HRNG that is NIST 800-90 compliant is not suitable for use for OTP generation right?
A HRNG that is NIST 800-90 compliant must use a DRBG in some way regardless of whether it adheres to a RBG1, RBG2 RBG3(XOR), or RBG3(RS) construction. This violates the requirement that the OTP is ...
3
votes
2
answers
761
views
Why does NIST SP 800-90C RBG3 construction require XOR or reseeding a DRBG with a physical entropy source to produce full entropy?
NIST 800-90C defines 3 classes of random bit generation (RBG) constructions: RBG1, RBG2 and RBG3. All constructions must include a DRBG from NIST SP 800-90A. The particular construction in question is ...
0
votes
1
answer
208
views
If we supply a random uuid4 hashed salt to Hashid, will it be considered secure?
Ideally, Hashids -: https://pypi.org/project/hashID/ are considered insecure and it is recommended that we should not use them for any sensitive functions. Though, is a HashId considered secure if we ...
0
votes
1
answer
60
views
Does quantum-sourced randomness allow a potential random oracle instantiation?
My question is essentially the same as this one.
The random oracle is a black box that does two things.
Maintain a lookup table for any query that has already been asked.
For all new queries, toss a ...
2
votes
2
answers
283
views
Good entropy from entropy test (90B) but still fail NIST800-22
I designed my TRNG with FPGA. My TRNG has a good entropy performance with a value of 0.99x over several test times. But for the NIST800-22, during several run times, sometimes my sequence passes all ...
1
vote
2
answers
302
views
Are Universally Unique Lexicographically Sortable Identifiers (ULIDs) safe to use as a session id?
The spec ( https://github.com/ulid/spec which is not a real standard ) explains that there are 80 random bits in an ULID. UUIDv4 is better from a security aspect, as it has 122 bits for randomness. ...
1
vote
1
answer
96
views
Threshold Paillier encryption key generation time
I have used the threshold version of Paillier encryption without a trusted dealer in an application. I have tested the key generation phase with different security key sizes such as 80, 512, 1024, and ...
2
votes
1
answer
95
views
Is there any secure deterministic two-party computation protocol?
The notion of security considered here is privacy. Is there a secure two-party protocol does not rely on randomness at all when considering passive adversaries (or active adversaries)? If the answer ...
1
vote
1
answer
79
views
Can the last n bitcoin blocks (including transactions) be reliable enough to be used as a seed for a PRNG or an input to a crypto hash-function?
Suggested by u/HolgerBier on reddit
Is it unpredictable enough or too difficult to manipulate (as in more than a few hundred million USD) to have a sequence of blocks?
1
vote
1
answer
76
views
Does game-theoretical fairness work in when the goal of one party is randomness
When we take the coin flip in Blum's algorithm in "Coin flipping by telephone a protocol for solving impossible problems", where Alice and Bob both want ownership over the same car, then one ...
0
votes
1
answer
237
views
Is a pseudorandom function (PRF) also a one-way function (OWF)? If yes, how can we proof that a PRF $f_k$ is a OWF? If no, what is the closest work?
Let $f_k$ be a PRF. We claim that $f_k$ is a OWF. PROOF let $f_k$ is not a OWF, there exists a $PPT$ algorithm $A$ that can invert $f_k$ with non-negligible advantage. Even if we know the input $x$ ...
2
votes
1
answer
382
views
Walsh-Hadamard transform in randomness testing
I am working on using the Hadamard transform as a way to map randomly generated values and then apply statistical tests as defined by Nist or other institutions. One resource online I found ...
1
vote
1
answer
290
views
Frequency Monobits Test
As detailed in the paper Statistical test suite for random and pseudorandom number generators for cryptographic applications by NIST, the first test is given as a basic significance test, it uses a ...
1
vote
3
answers
175
views
Why cant you use randomness to seed more randomness?
If I have 256 bits of handwavium "perfectly random data" and I hash these 256 bits of data with a secure hash function (possibly SHA-256).
Could the resulting hash be considered "...
0
votes
1
answer
66
views
Runs and Autocorrelation test
I have the book "Handbook of applied cryptography". In there we have example for random tests.
I have bits sequence ...
7
votes
8
answers
3k
views
How to generate random numbers within a range (0,n) from random bits?
What is a good method to generate random numbers between 0 and n from random bits?
For example, I have a one million random bits generated according to NIST SP 800 90 publications. Now I need to ...
6
votes
1
answer
527
views
How can 4 users generate a provable fair random number?
The past few weeks I have been trying to solve a difficult problem.
I have asked some cryptography experts but unfortunately they had no clue on how to solve the problem.
The situation is as follows, ...
2
votes
2
answers
216
views
A problem about matrix
I have an idea but I don't know if it will work. For the appropriate $p$ it is easy to find $n$ linearly independent $x_i$. Then we compute the inner product between the $x_i$. I think the information ...
5
votes
2
answers
398
views
Paillier cryptosystem break with random number
In the Paillier cryptosystem we choose $n=p\,q$ where $p$ and $q$ are primes, $g=n+1$, $\lambda=\phi(n)$, $\mu=\lambda^{-1}\bmod n$.
The public key is: $(n,g)$.
The private key is: $(\lambda,\mu)$.
...
5
votes
2
answers
418
views
DDH hardness with shared public parameters
DDH is believed hard for subgroup of $ℤ^*_p$ with order $q=(p-1)/2$ when $p$ is a safe prime chosen randomly.
What if $p$ isn't random: When parameters are shared, $p$ mightn't have been chosen ...
4
votes
3
answers
1k
views
How bad are human-generated random numbers really (One Time Pad)?
This is a pretty open question, so I'm mostly looking for gut reactions from experts more educated than I.
Given these assumptions which are easy to verify with a quick Google search:
One Time Pads ...