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
2answers
237 views

Difference between Non-uniformly random and Uniformly random

I am reading up on Key Deriving Functions (KDF) and in a section of the Real-World Cryptographic book by David Wong, a comparison is being made with Pseudorandom number generator (PRNG). And one of ...
1
vote
1answer
60 views

Incrementing nonces vs regular nonces?

I have recently been studying up on the lorawan protocol for IoT devices. LoraWAN has a handshake, and then communication can commense. Messages are encrypted and MAC'ed. When encryption and MAC's are ...
1
vote
1answer
46 views

Generate unique random values for unqiue input values

I'm going to generate unique random values based per a range of unique input values. In other words I have range of input values which these numbers are part of a series (like a range of serial ...
1
vote
2answers
79 views

Does Endianness matter in NIST SP800-22 test?

I am curious about Randomness test suite. One of the famous randomness test suite, DIEHARDER, said that Endianness does not matter for a "GOOD" random generator. Note that this is not the ...
0
votes
0answers
28 views

Mersenne twister word size and degree of recurrence combination

For a 32-Bit variant of Mersenne twister, if the outputs Should be a 5-Bit integer(word size) then what is the value of recurrence according to the k-distribution?
-1
votes
1answer
55 views

Neural Network based on pseudorandom number

Recently, I read this paper NEURAL NETWORK BASED CRYPTOGRAPHY. Under the section 3.1 it said: The aim is to improve the randomness of the random numbers generated by any algorithm using an NN. In ...
1
vote
3answers
79 views

Derivating random numbers from random numbers

If I have a "truly random number" $K$ of $L$ bits (whatever "truly random" means... is it a value from a normal distribution a truly random number, or only uniform distributions ...
1
vote
1answer
47 views

Are there on-line ways to use a block cipher to generate unique $n$ bits that guarantee collision-freeness for $2^n$ times?

$n$ is a run-time variable chosen each time the user runs the implementation. One way I can think is to use any block cipher, say AES, as a seeded CSPRNG to randomly shuffle list of numbers $0, 1, \...
2
votes
1answer
78 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? ...
0
votes
0answers
50 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
452 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
1answer
45 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 ] $ ...
0
votes
2answers
175 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 ...
1
vote
0answers
43 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 ...
4
votes
1answer
522 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
57 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 ...
2
votes
1answer
204 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 ...
3
votes
1answer
177 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 ...
2
votes
1answer
69 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
112 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
198 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 ...
3
votes
1answer
218 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 ...
4
votes
2answers
366 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 ...
-1
votes
1answer
96 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 ...
1
vote
2answers
152 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
168 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
1answer
68 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
77 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 ...
4
votes
1answer
228 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 ...
5
votes
3answers
273 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...
1
vote
1answer
89 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 ...
3
votes
1answer
135 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 ...
1
vote
4answers
258 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
115 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
89 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
318 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 ...
0
votes
0answers
39 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 ...
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 ...
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, ...
1
vote
0answers
67 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: ...
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
votes
2answers
305 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
vote
1answer
458 views

Dieharder How can I make my input file suitable for Dieharder?

I created my random numbers and I saved them into a txt file. My input file includes just 0 and 1. Here is the link of my file And I of course read some answer before asking that question but I could ...
3
votes
1answer
321 views

AES CTR: Random IV

I want to use AES CTR with a random IV, as this would be the easiest way for me. I have a cryptographic module, that supports true random number generation. Due to compatibility, I must use AES CTR. ...
1
vote
1answer
84 views

is coin-tossing an instance of secure computation (MPC, 2PC, etc.)?

Coin-tossing protocol is defined as a protocol between at least 2 non-trusting parties that allows them to obtain an unbias random bit in such a way that no involved party can influence the output. ...
2
votes
1answer
67 views

How to securely deal cards?

Thanks to a certain pandemic going around I was wondering whether there is any cryptographic way to remotely deal cards without the dealer being able to know them and without requiring to trust a ...
0
votes
0answers
35 views

Alter signature post signing without the private key

There a plethora of signature scheme's but I am wondering if there are scheme's with the following properties: Given that you know the message, alter the signature with the public key in such a way ...
2
votes
0answers
58 views

Fisher Yates on "faulted" random number generator cryptanalysis

For the sake of curiosity and fun, i have implemented a C# program that operate as deck dealer on 40 cards deck (following the Fisher Yates shuffeling algorithm https://en.wikipedia.org/wiki/Fisher%E2%...

1
2 3 4 5
9