Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [randomness]

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

17
votes
4answers
4k views

Using Tweets as a Random seed

I would like to start by saying I know nothing about Cryptography and was reading up on how to choose a random seed and this link is something that I found. What I basically understood that the seed ...
-1
votes
0answers
33 views

What are some shuffling algorithms I can implement?

I am building a mixnet and right now I am looking for an algorithm that can give me a random, secret permutation when applied to the corresponding inputs. The correspondence of the inputs and outputs ...
3
votes
5answers
192 views

Is there a definition of the pseudo-random sequences like PRG or PRF in cryptography?

I have learned the definition of PRGs and PRFs. As I know the meaning of pseudoreandomness. I think that the pseudo-random sequence and the truly random sequence are indistinguishable. I did not find ...
3
votes
1answer
94 views

Implementing randomness extractors

A randomness extractor is a function that takes an input sampled from high entropy distribution and outputs a value that is close to uniform distribution. It is slightly different from a PRG. PRGs ...
4
votes
3answers
3k views

Cryptography's random number problem?

Sophie Chen at Wired Magazine; quantum mechanics could solve cryptography's random number problem Such machine already exist, but it's too huge and not so fast in order to use it all the time. ...
1
vote
1answer
57 views

Interpretation of (NIST) Non Overlapping Template Matching Test

Regarding the Non-Overlapping Template test, this test normally gives us a bunch of p-values (148 values). I would like to ask that how do we interpret those values into a single p-value for ...
4
votes
2answers
159 views

Does AES encrypt /dev/null and feed output to AES again increase entropy of the ciphertext?

I just thought about what would change if would pipe the output of openssl enc -aes-256-ctr -pass pass:"$(dd if=/dev/urandom bs=128 count=1 2>/dev/null | base64)" -nosalt < /dev/zero | pv -pterb ...
1
vote
1answer
43 views

Privacy of randomness using extractors and PRGs

The Wikipedia article on randomness extraction states that they are different to pseudo random number generators but the distinction is very hazy. Both seem to take in some input quasi-randomness and ...
3
votes
3answers
119 views

Is it correct to concatenate (pseudo-)random byte values before testing them with the NIST suite or tools like dieharder?

Let's assume I have thousands of (pseudo-)random 4-byte values. The values are 4 byte random values which a blackbox device gave me. I got these values by requesting them. In between others might have ...
3
votes
1answer
63 views

Proving von Neumann extractor correct

Von Neumann extractor works as follows: Suppose $C$ is a biased coin, with $p = P[C = 1] > P[C = 0]$ and let $b_1b_2\ldots$ be sequence of results by independent coin tosses. For $i \ge 0$ one ...
2
votes
1answer
46 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 ...
15
votes
2answers
2k views

What is the difference between TRNG and CSPRNG?

I understand the output of a TRNG is almost impossible to reproduce, such a flipping a coin 100 times to produce a 100-bit sequence. However, it is also my understanding that a CSPRNG produces an ...
4
votes
0answers
69 views

Use of randomness in an Elgamal like encryption

Suppose I have the following encryption scheme: for a message $m\in\mathbb{F}_p^*$, I generate the ciphertext = $(g^r,f^mh^r)$ where $g$ is the generator of a cyclic group $G$ of unknown order $n$ and ...
-2
votes
1answer
170 views

Using IPv6 as seed + time almost as good as TRNG? [closed]

I just figured out a way to create a RNG that may be almost as good as TRNG (true random number generator) and need some input to confirm/clarify. What if I use the IPv6 address of a visitor as a ...
2
votes
1answer
62 views

Problems understanding the applications of pseudo random number generators

I am trying to explore different methods used to generate pseudo-random numbers for my project in maths and I would be very grateful for some help or references to valuable sources as it is very hard ...
2
votes
1answer
93 views

Some considerations about PRNGs

Recently I read about pseudorandom generators and I have some observations: My conlusion is a such that a secure implementation of a PRNG had to be blocking or returning an error code when it is too ...
1
vote
1answer
79 views

Pseudo-random generators and pitfalls

I've read the Chapter "Randomness" from the Serious Cryptography book and it raised some questions. Namely: It is written that Mersenne Twister is proved to be cryptographically irreliable. And that ...
19
votes
5answers
2k views

How many hex digits do I need to compare when manually checking hash functions?

I sometimes run sha256sum on large files after transferring them from one place to another, and will just skim the hash output to verify it's correct. But, I usually just look at the first/last 5 or 6 ...
2
votes
1answer
54 views

adaptation of NIST sp800-22 for short sequences

I would like to ask about the NIST test suite for randomness evaluation. The test suite consists of 15 subtests which evaluate the particular property of the sequence. In fact, each test has an ...
4
votes
1answer
81 views

Sequence test for an image cipher

I am reading a paper on security analysis of a cipher image using the paper at the following URL: https://ieeexplore.ieee.org/stamp/stamp.jsp?tp=&arnumber=8306512&tag=1 It indicates some ...
1
vote
1answer
104 views

repeatedly hashing result and using reverse sequence as RNG secure?

I want to have a source of randomness for which: no one but me can predict the next number in the sequence. I know the entire sequence in advance, but I have no way of manipulating it once the first ...
1
vote
1answer
85 views

LFS Kolmogorov Randomness

Consider following LFS register (where + denotes addition modulo 2) I have found the output sequence as 1,0,1,1. I know that The K(s) of a string s is defined as the length of the shortest computer ...
0
votes
1answer
64 views

Expected Linear Complexity of a sequence

Let (s) be a sequence of length n. What are the expected linear complexities of (s) and $(s)^{\infty}$ (meaning that the periodic version of s)? I have no idea of the answer to this question? What ...
0
votes
1answer
89 views

Dieharder input data format. Do I need new line at the end?

I am testing my sequence for randomness using Dieharder with a command like dieharder -a -g 202 -f in.txt >>result.txt my in.txt looks like ...
2
votes
1answer
88 views

How long random value is required in random masking method?

I heard that random masking method requires a random number whose length is as long as a message to be sent, but I’m not sure that. So, I'd like to ask about that. 1. Boolean masking : $ x_i \oplus ...
4
votes
1answer
102 views

Synthetic Jitter to Combat Timing Attacks

We are working on some tooling. It has a networking kernel. We would like to think that jitter built into the kernel would help with timing attacks? Is this true?
1
vote
0answers
52 views

What is fixed randomness and unfixed randomness?

I have found these notions recently in an article. What is fixed randomness ? What is unfixed randomness ? Link of the article : http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.431.9034&...
0
votes
0answers
19 views

Randomized response with more than 2 options

It is well-known that the binary randomized response mechanism is differentially private, with $\varepsilon=ln(3)$ if each person answers truthfully with probability $0.5$, and uniformly randomly ...
4
votes
2answers
88 views

uuidgen has consistent 13th digit and it's 4

I ran uuidgen 10k times and noticed that the 13th digit is always 4. Why is that?
1
vote
1answer
71 views

In a specific Paillier implementation, why is r prime?

I have a question about an implementation of the Paillier cryptosystem. In the description of Paillier above, encryption of a plaintext message $m$ on $\mathbb {Z}_{n^{2}}$, $0\leq m<n$, proceeds ...
2
votes
2answers
156 views

What is special about an entropy count (RNDGETENTCNT) of 160 for libsodium initialization?

(Moved from StackOverflow) In the Usage documentation for libsodium, before calling the initialization function sodium_init, they suggest you check the entropy ...
1
vote
0answers
70 views

How Are Linear Congruential Generator Multipliers Chosen?

There are several numbers that keep coming up when looking at certain random number generators, for example 6364136223846793005 is used in newer pcg-family algorithms and seems to draw it from ...
1
vote
1answer
86 views

When will a function $f$ be a truly random function?

I'm familiar with a definition of a truly random function: $f$ is a truly random function if it was selected uniformly from the set of all the functions $f(x):\{0,1\}^{n} \to \{0,1\}^{n}$ But I'm ...
3
votes
3answers
126 views

Mechanism to get 10 pseudo-random positive numbers up to maximum from a seed (32-byte hash)?

I have learned new crypto words, so I rewrote the question: I have quite random 32-byte hash which I want to use as a seed for generation of 10 pseudo-random positive numbers up to some maximum ...
3
votes
1answer
154 views

Discrete Gaussian Sampling role in Lattice-Based Crypto?

I'm reading up on how post-quantum cryptography works, and stumbled upon the notion of discrete Gaussian sampling. However, I can't understand where it fits in the greater picture - currently it feels ...
1
vote
4answers
196 views

If you XOR a random input with a biased input, the output is random - why?

Ive seen in an answer to this question here : https://stackoverflow.com/questions/5889238/why-is-xor-the-default-way-to-combine-hashes/5889288#5889288 that If you XOR a random input with a biased ...
1
vote
2answers
180 views

Leak Information?

Let a,b,c,d be selected at random from $\mathbb Z^*_q$. We pick values $r_1,r_2,r_3,z_1,z_2,z_3 \gets \mathbb Z^*_q$. Do $u_1,u_2$ that are computed as follows, leak information about values $a,b,c,d$...
3
votes
1answer
245 views

Does adding a random number to my data make it secure?

Say I have some real valued data that i want to keep secure. Now I have to pass on some modified version of the data to a second party for some computation, but i do not wish to reveal my data to the ...
0
votes
2answers
53 views

Technical term for hash value being uncorrelated to input message?

Is there a technical term for the desirable property of hash functions. That a small change to the input message will produce a massive unpredictable and seemingly uncorrelated change to the output ...
3
votes
3answers
124 views

How to thwart a cleartext message's size?

Here is a question I don't find addressed in my cryptography books: let's say Alice want to send Bob a message of length N. what is the proper way for Alice to hide N? I am thinking Alice should do ...
2
votes
2answers
67 views

Can I prove my app uses randomness right way?

We are developing an iOS app which employs Shamir Secret Sharing algorithm. We made all possible steps users can trust us. We can't remember their secrets nor we can save encoded fragments. But they ...
1
vote
2answers
62 views

Does digital randomness require energy?

I can't find anything related on Google. I hope this is the correct site to ask this question. I have been thinking about Randomness. Basically, generating randomness using a Computer Program. It is ...
7
votes
3answers
916 views

How to evaluate chi squared result?

I've been recently working on a (supposedly) TRNG. I'm still at the beginning of the project, so it is certainly not cryptographically secure yet, for now I'm just playing around. In fact, I've ...
6
votes
2answers
230 views

Are my random numbers really “bad” or is that a statistical effect which “must” happen from time to time?

My software uses a TRNG (entropy source) which is part of an MCU. A check of random numbers generated by my software, carried out by a testing authority revealed a problem, which I have to examine ...
5
votes
2answers
171 views

Security of the AES with a Secret S-box

In this paper they change the $AES$ S-box to a uniformly random one and answer the questions: How does the security of AES change when the S-box is changed by a secret S-box? Would it be safe to ...
0
votes
1answer
55 views

Does a concatenation of hashes of differently prefixed variations of any chosen message contain all possible finite bitstrings?

Let $A$ denote a sequence of bits. Let $H$ denote a cryptographic hash function that has no limit on the length of its input (for example, SHA-3). Consider the following infinite sequence of ...
0
votes
1answer
72 views

How to interpret a formula from the handbook of applied cryptography

In the handbook of applied cryptography, we can find the following formula for testing PRNG. My question is what does mean 2 in the upper index of the ...
2
votes
0answers
225 views

Can Verifiable Random Functions be used to pick a random node from a pool?

Let's say that I have a decentralized system and I have a list of nodes published on a pubic log like a blockchain. I want a node A to be able to connect to another ...
3
votes
4answers
136 views

secretKey ⊕ (secretKey ≪ 1), is randomness lost?

A truly random secret key is run through a cipher secretKey ⊕ (secretKey ≪ 1) is randomness lost? As in, is the computational cost to guess the ciphertext from <...
0
votes
2answers
511 views

Probability last character sha256 hash

A quick question. I want to use the last character of a SHA256 hash (blockhash of a bitcoin block) as my random source. Is 100 /16(amount of different chars) = 6.25% true for all characters or are ...