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
2
votes
1answer
71 views

Does grouping password characters for readability decrease entropy?

For example, for a randomly generated password of 28 lowercase letters, which is about 128 bits of entropy, how would adding a space after every four characters affect it? ...
22
votes
5answers
4k 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 ...
0
votes
0answers
48 views

Cryptographic Random Beacon VS Random Oracle

Let's start with what I mean by cryptographic random beacon (RB). A RB is a protocol among some parties who generate a random value all together such that: these parties do not trust each other the ...
6
votes
4answers
431 views

A source of randomness that anyone can independently, conveniently and robustly access?

Does there exist a source of randomness that anyone in the world can independently, conveniently and robustly access? For example, the 10th decimal place of the temperature in Mexico City is ...
0
votes
2answers
171 views

What are the fastest algorithms that sample from the uniform distribution?

Lots of cryptography algorithms rely on pseudorandom number generators. Sometimes, given a plaintext, you need to generate a pseudorandom number from it. What are some fast algorithms that do so? I've ...
0
votes
1answer
44 views

Random sampling vs incrementing randomness in cryptographic protocols

As an example to my question, I post the ECDSA signing algorithm for reference (from wikipedia) to sign a message $m$: Calculate $e = H ( m )$. Select a random integer $k \in [ 1 , n − 1 ] $ ...
3
votes
1answer
169 views

Use of scrambler LFSR for randomness extraction of semi-random source

I am using a linear feedback shift register (LFSR) in a scrambler configuration as a randomness extractor for a weakly random source. This source is semi-random (aka. Santha-Vazirani source): the bits ...
1
vote
0answers
35 views

Sentinel ("trick") values for lattice attack on DSA with biased k (MSB)

I'm studying lattice attack using this sage script. There are 2 options in script: LSB and MSB. The most interesting option for me is MSB. It recovers private key with less then 100 signatures ...
3
votes
1answer
134 views

How to ensure that a cryptographic implementation is reasonably sound/robust?

I know from the bottom of my heart how bad the idea of custom-crypto is. I absolutely concur with the recommendation that it should only be done by professionals who specialize in implementing crypto ...
4
votes
1answer
501 views

Weakness of XORing random bytes with secret key

Side A generates 16 (high quality) random bytes and performs XOR with a 16-byte secret key, then data transfers to side B, where the same secret key is used to recover the original 16 random bytes. Is ...
1
vote
1answer
99 views

What is a "set synchronized CSPRNG"?

I'm looking to implement a performant revocation method for JWTs. I'm reading a paper, in which the following section's second paragraph states: If we use the client hashing approach described ...
1
vote
1answer
56 views

How to generate a random string in Python for a mission-critical application

I'm trying to figure something out, but it is difficult for me. I need to generate a fully random string in Python. My current function is attached below. I just want to know whether this is secure ...
1
vote
2answers
2k views

Is it possible to compress a random sequence with high entropy?

I have an algorithm that generates a pseudorandom sequence with a length of 100k and high entropy. I would like to check the quality of its randomness. So, I used a popular software program to ...
2
votes
1answer
196 views

Randomness extraction from a Santha-Vazirani (semi-random) source

In a quest to better understand randomness extractors (in the context of TRNG post-processing), I read some papers about the von Neumann Extractor and Santha-Vazirani (SV-) sources. The von Neumann ...
9
votes
3answers
882 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 ...
2
votes
1answer
67 views

Is generalized birthday attack only suitable for the problem with multiple solutions?

In David Wagner's article A Generalized Birthday Problem, he said and I quote: Our algorithm works only when one can extend the size of the lists freely, i.e, in the special case where there are ...
2
votes
2answers
111 views

Advantage of Adversary against a simple function?

Attacker has to win following game by distinguishing that output was updated by a certain function or not? Attacker queries an oracle for the output. Oracle generates fresh 4 random bytes $a$, $b$, $...
-1
votes
1answer
197 views

Does this paper find cryptographic weakness of SHA-256?

I found only the abstract and tables of this paper https://dl.acm.org/doi/abs/10.1145/3409501.3409513 From the abstract In this paper, the researchers proved that the modified SHA256 is viable to ...
0
votes
1answer
73 views

Cryptographically correct way to roll a giveaway winner

I'm looking to create a fair selection of a giveaway winner, but I am versed enough in cryptography theory to determine if the below would hold up to public scrutiny if published on github. The reason ...
3
votes
1answer
202 views

Why does the NIST Runs Test include a Frequency Test?

In the NIST suite of RNG tests (https://csrc.nist.gov/publications/detail/sp/800-22/rev-1a/final), one of the tests is the Runs Test, which tests counts of runs of 1's and 0's. According to the ...
0
votes
1answer
89 views

Explaining the reason of radically more accuracy while using different set of hash functions instead of same set of hash functions on some operations

So I am looking for an explanation of an experiment. In this experiment, I took a set of k hash functions. Say the total number of data points I am working on is d. Call an algorithm A which used that ...
3
votes
1answer
2k views

NIST random test suite choosing bitstream length and count [closed]

I am trying to use the statistical test suite software from NIST SP800-2. First it asks for bitstream length. ...
2
votes
3answers
665 views

Random Galois fields

Note: I have now answered this by my own research and can generate random fields up to G(2^9) in reasonable time. I would need to find more speedups for larger fields. At this time G(2^8) takes a few ...
4
votes
2answers
346 views

Is a LFSR sufficient for post-processing a biased TRNG?

I am building a TRNG on a FPGA based on ring oscillators. I found out that Linear Feedback Shift Registers (LFSRs) are commonly used for the post-processing of TRNGs. Here is my initial design: Let's ...
11
votes
5answers
4k views

Radioactive Decay, Gaussian or Uniform?

I'm trying to understand the nature of true randomness. I'm building an RNG using a radioactive source. Basically, I'm measuring the time between consecutive decays which in theory should be ...
1
vote
2answers
146 views

Is it safe to say that a XOR with an unknown input provides a random output?

I am wondering if you have an input $x_{1}$ and you XOR it with an unknown random second input $x_{2}$, is it safe to say that the resulting $x_{1}\oplus x_{2}$ will be random ? The final idea would ...
8
votes
4answers
166 views

Why are $\lceil 1/\operatorname{entropy-per-bit} \rceil$ number of bits not sufficient to generate an unbiased bit?

Consider a biased RNG badrand() generating 1 with probability $0.9$ and 0 with probability $...
2
votes
2answers
209 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 ...
4
votes
3answers
3k views

ISO 9564-1 format 4: do I need an IV?

ISO 9564-1 format 4 describes an extended PIN block format. Simply said, this standard can be used to encrypt 4-digit PIN codes in a secure way. The standard mentions (simplified) to add random ...
2
votes
3answers
843 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
67 views

On randomness related terminology clarification

It was suggested to provide a new question in the comments in How to combine $n$ 'less random' bits to generate one 'more random' bit?. Why there is no unbiased randomness (seeking ...
1
vote
1answer
74 views

Test the randomness of a random permutations, that was generated without Fisher-Yates?

Overview of the problem Before this gets immediately flagged as duplicate, I'm not interested in testing the Fisher-Yates shuffle for randomness, since this can simply be done by testing the ...
5
votes
3answers
263 views

How to combine $n$ 'less random' bits to generate one 'more random' bit?

Suppose we have a random number generator badrand() generating 1 with probability $0.9$ and 0...
4
votes
1answer
226 views

What is the NIST recommended maximum bias for random number generators?

What is the maximum bias recommended by NIST for random number generators? This answer says that it is $2^{-64}$. Is it same for all applications? Does NIST have a publication with more information? I ...
1
vote
1answer
81 views

Is there any standard present to measure strength of a generated key using true random number generator?

I was wondering how to measure the security strength of a generated secret key for the below protocol: "A 128 bit random number is generated by TRNG and the random number will be used as a ...
1
vote
4answers
256 views

Any famous approach for analyzing the randomness of data?

I'm writing a function that will allow me to analyze the randomness of some input data and return some stats about the probability of this data to be random. Obviously it should be based on two things:...
0
votes
1answer
77 views

Soundness of Trevisan’s Extractor Against Quantum Side Information

I wonder how sound Trevisan's extractor can be against quantum side information. I checked many papers. And all of these papers were aiming to explain how sound Trevisan's Extractor is against quantum ...
3
votes
1answer
108 views

How to get ramdom number between 1 and 2048 from /dev/hwrng?

I am (perhaps naively) evaluating the security considerations of using the following code to create BIP39 seed phrases (on a read-only and offline Raspberry Pi). Apparently, using ...
3
votes
2answers
86 views

How big does M need to be in Blum Blum Shub?

I've read that Blum Blum Shub is a CSPRNG, defined by x_n+1 = x_n^2 mod M. I didn't understand that, and couldn't find any sources on how big should M be. Are 32 ...
5
votes
2answers
316 views

Recommendation of lightweight RNG for Miller-Rabin primality test

Miller-Rabin tests the compositeness of candidate numbers (hence, input $x$) that's often used as a primality test. The M-R test requires different random numbers for accuracy and confidence in the ...
32
votes
8answers
10k views

Why do some people believe that humans are "bad at" generating random numbers/characters like this?

I'm not even sure if they are serious, but I've heard many times that some people refuse to not only trust their computer to generate a random string (which is understandable) but also don't trust ...
0
votes
0answers
38 views

Can disjoint distributions be Computationally indistinguishable?

As mentioned in these notes definition 2 We say that $\{Xn\}_n$ and $\{Yn\}_n$ are computationally indistinguishable if, for all $\mathsf{nuPPT}$ $D$, there exists a negligible function $ε$ such that ...
1
vote
1answer
116 views

random mask reversible after homomorphic encryption

I would like to know if this process is feasible under homomorphic encryption, ideally under paillier or any other additive scheme Apply a mask X to obfuscate a message A ie. Am = A (op) X where (op)...
1
vote
0answers
73 views

How does a pseudorandom generator produce a similar distribution to $U_{n}$?

According to Wikipedia, a function ${\displaystyle G:\{0,1\}^{\ell }\to \{0,1\}^{n}}$ with ${\displaystyle \ell < n}$ is a pseudorandom generator against $\mathcal {A}$ with bias $\epsilon$ if, ...
2
votes
3answers
171 views

Where can I find a sample of data with a known entropy to see how well NIST SP 800-90B does on it?

I'd like a sample of true random data from a source that has a known entropy. It's not easy to even produce true random data in sufficient quantity --- much less know the entropy of the source. For ...
1
vote
0answers
64 views

Nth term for Linear Congruence Generators

We can get the N+1th term for a Linear Congruence Generator like this: x[n+1] = A * x[n] (mod m) by raising the A to the exponent of n like this: ...
1
vote
4answers
341 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
2answers
123 views

Extracting Randomness from a Poisson Distribution

I'm working on a quantum random number generator based on the shot noise of CMOS camera sensor. Shot noise in an image is caused by the variance of the number of photons hitting the sensor per unit of ...
-1
votes
2answers
268 views

NIST Statistical Test Segmentation Fault (Core dumped)

I am trying to use NIST Statistical Test When I have 1 line number which is includes 7467 character,(all of the are either 1 or 0) the test is working I am following these steps: ./assess 7467, then ...
1
vote
0answers
64 views

Min Entropy per Bit for Trevisan's Extractor/or An Extractor

We know that: trevisan's extractor based on min entropy of the relative system. For trevisan extractor, we need source, seed, min entropy value per bit and error rate for per bit I have the code for ...

1
2 3 4 5
9