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
3 votes
2 answers
704 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 ...
dade's user avatar
  • 133
1 vote
1 answer
488 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 ...
NotQuiteSo1337's user avatar
1 vote
1 answer
148 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 ...
VSB's user avatar
  • 165
1 vote
2 answers
173 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 ...
TyeolRik's user avatar
  • 123
-1 votes
1 answer
99 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 ...
emonhossain's user avatar
1 vote
3 answers
98 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 ...
sanscrit's user avatar
1 vote
1 answer
71 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, \...
caveman's user avatar
  • 563
2 votes
1 answer
94 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? ...
typo's user avatar
  • 123
1 vote
0 answers
124 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 ...
A.Solei's user avatar
  • 385
6 votes
4 answers
584 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 ...
chausies's user avatar
  • 335
0 votes
1 answer
64 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 ] $ ...
Panos's user avatar
  • 314
0 votes
2 answers
455 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 ...
Guerlando OCs's user avatar
1 vote
0 answers
181 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 ...
Igor Matyuh's user avatar
4 votes
1 answer
865 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 ...
Vladimir Gamalyan's user avatar
1 vote
1 answer
134 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 ...
LimesBytefend's user avatar
2 votes
1 answer
280 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 ...
DurandA's user avatar
  • 453
4 votes
0 answers
375 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 ...
DurandA's user avatar
  • 453
2 votes
1 answer
94 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 ...
Laura's user avatar
  • 377
2 votes
2 answers
124 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$, $...
elonnoe's user avatar
  • 23
0 votes
1 answer
330 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 ...
ShAr's user avatar
  • 152
3 votes
1 answer
479 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 ...
Chris VP's user avatar
4 votes
2 answers
758 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 ...
DurandA's user avatar
  • 453
-1 votes
1 answer
98 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 ...
Nigel Kukard's user avatar
1 vote
2 answers
231 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 ...
Dayu's user avatar
  • 11
8 votes
4 answers
252 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 $...
Ritesh Singh's user avatar
2 votes
1 answer
73 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 ...
Turbo's user avatar
  • 908
2 votes
1 answer
181 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 ...
camel-cdr's user avatar
  • 123
4 votes
1 answer
271 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 ...
Ritesh Singh's user avatar
5 votes
3 answers
369 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...
Ritesh Singh's user avatar
1 vote
1 answer
131 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 ...
Sami's user avatar
  • 37
3 votes
1 answer
152 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 ...
krkhan's user avatar
  • 87
1 vote
4 answers
467 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:...
user avatar
0 votes
1 answer
112 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 ...
quest's user avatar
  • 151
3 votes
1 answer
264 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 ...
sunknudsen's user avatar
5 votes
2 answers
380 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 ...
DannyNiu's user avatar
  • 9,001
0 votes
0 answers
47 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 ...
LWE-13's user avatar
  • 251
35 votes
8 answers
12k 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 ...
K. B.'s user avatar
  • 383
1 vote
0 answers
84 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, ...
user185887's user avatar
11 votes
5 answers
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 ...
rdkylp's user avatar
  • 111
-1 votes
2 answers
1k 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 ...
quest's user avatar
  • 151
1 vote
0 answers
81 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 ...
quest's user avatar
  • 151
2 votes
1 answer
2k 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 ...
quest's user avatar
  • 151
3 votes
1 answer
1k 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. ...
earthling's user avatar
  • 165
1 vote
1 answer
310 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. ...
vxek's user avatar
  • 445
2 votes
1 answer
86 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 ...
Tobias Kienzler's user avatar
0 votes
0 answers
47 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 ...
ovanwijk's user avatar
  • 135
2 votes
0 answers
94 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%...
Skary's user avatar
  • 361
0 votes
0 answers
72 views

How do I retrieve a number which has been multiplied with a random number?

I have a 1024-bit number $n$ obtained by multiplying two 512-bit randomly generated prime numbers $p$ and $q$. Then there's $\phi = (p-1)(q-1)$, which is another 1024-bit number. I do not have $\phi$ ...
Combiner_85's user avatar
2 votes
1 answer
108 views

How does randomized hashing defeat collision attack?

SEC#1 recommends randomized hashing when using SHA-1 with ECDSA; SPHINCS+ uses randomized hashing in WOTS+ to defeat collision attack so as to reduce signature size. How does a randomized hashing ...
DannyNiu's user avatar
  • 9,001
2 votes
1 answer
243 views

How to verify the claim of entropy available made by Linux 4.5?

The Linux kernel has an entropy source and it estimates its amount of bits in the device /proc/sys/kernel/random/entropy_avail. How can I verify that this number ...
user84129's user avatar

1 2
3
4 5
11