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
205 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
140 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
153 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 ...
2
votes
1answer
169 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
142 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
719 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 ...
3
votes
1answer
166 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
210 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
73 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&...
5
votes
2answers
291 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
218 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 ...
3
votes
2answers
533 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
165 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
225 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
244 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 ...
6
votes
1answer
637 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 ...
2
votes
3answers
842 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
205 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
320 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
73 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 ...
4
votes
3answers
233 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
71 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
72 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 ...
11
votes
3answers
4k 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
344 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
590 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
80 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
77 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
448 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 public log like a blockchain. I want a node A to be able to connect to ...
3
votes
4answers
150 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
2k 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 ...
1
vote
0answers
234 views

Cryptography puzzle [closed]

I have this cryptography puzzle that I am struggling with. To be clear, if possible, I would first just like some hints to point me towards the solution. The puzzle is as follows: "There is a secret ...
1
vote
3answers
1k views

What’s the difference between a secret key and a seed?

I always hear that if you have the seed then you can easily obtain the key. So, is the secret key just typically an expanded version of the seed? If so, via some key derivation algorithm? Also, if ...
0
votes
2answers
162 views

Can I generate same random number given same entropy value?

Given the hypothetical fact that I can predict the same entropy value used to generate a random number, can I generate the same random value, say in a Windows based python application?
3
votes
2answers
104 views

Encrypting a pseudorandom message

Does encrypting a pseudorandom message need the same requirements from a block cipher? For instance, can we decrease the number of rounds of AES if we want to cipher a random block, without any ...
0
votes
1answer
142 views

Problem with a reduction using Hybrid Argument

I have an issue with this proof. We define two games: $$H'(\lambda):$$ 1) Pick $R \in \mathcal{R}(n,l)$ (the space of truly random functions from $\{0,1\}^n$ to $\{0,1\}^l$ 2) we define $\mathit{Enc}...
1
vote
2answers
88 views

Are there any key exchange schemes that only require entropy on one side?

Are there any cryptographically secure (in terms of confidentiality) key exchange schemes which are usable if one partner in the connection is entirely deterministic and has absolutely no entropy? I ...
1
vote
0answers
107 views

Is there an algorithm or protocol that allows to securely generate random shuffles when two parties are not colluding without a sever side seed?

I am building an app that pits one party against another party in a gambling transaction – both parties have competing interests and have an incentive not to cheat the other party. I am looking for a ...
4
votes
2answers
1k views

Public Randomness-Based Random Number Generator using Mobile Phone?

I have an idea to create a True Random Number Generator that use randomness source from a smartphone sensors. My idea is to collect sensors data from a lot of smartphone using mobile apps and then the ...
0
votes
2answers
128 views

SRP with random, but constant private-value b

In RFC5054, the SRP6a algorithm states that the client and the server should generate random ephemeral private values $a$ and $b$ respectively which are used for further derivation in the handshake ...
4
votes
3answers
2k views

Why in one time pad must the key distribution to be truly random

One time pad required a truly random key. Why canwt it be a psudo-random key? For example, if the key distribution is that for each bit the probability to get 1 is 0.6 and the probability to get 0 is ...
0
votes
1answer
83 views

Pad ciphertext with arbitrary number of bits

I have a symmetric-key encryption scheme. I think the output from this scheme (MAC + IV + CBC ciphertext) should already be practically indistinguishable from random, but I would like to pad the ...
1
vote
0answers
72 views

Beginners question about revealing randomness in probabilistic asymmetric encryption

I am encrypting "1" with probabilistic encryption with a foreign public key (I don't have the private key for it) which results in an encrypted file e. Can I prove to a third party, that e contains ...
17
votes
4answers
12k views

How can C rand() be exploited if a secure seed is used?

I've just started doing a research project on CSPRNGs and I would like to know what kind of vulnerabilities a regular PRNG has with a secure seed. For example, if I generate a random number using ...
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 ...
1
vote
2answers
258 views

Entropy after shuffling result of /dev/urandom

first of all: Im pretty paranoid. I am creating a seed on my linux server using the following command: cat /dev/urandom |tr -dc A-Z9|head -c${1:-81} Since I don´...
-2
votes
1answer
5k views

How to calculate entropy of a random number?

I am having a set of random numbers and I want to calculate entropy of them. I searched many entropy calculation formula, but I didn't get it. Can you elaborate a little bit?
-2
votes
1answer
1k views

Assuming that NP = RP, how would this impact cryptography?

In terms of complexity classes, we assume that NP = RP. In other words, we assume that there is a randomized algorithm that solves a NP complete problem (and through polynomial time reductions, ...
1
vote
2answers
578 views

Does my code have modulo bias

I am writing a password generator in Go, but I want to make sure I am avoiding modulo bias. My solution is to get a random number from crypto/rand in the range [0, len(alphabet) ** passwordLength), ...
2
votes
3answers
1k views

Why it is not recommended to create your own random generator number?

I read in a book: mastering bitcoin that one should not create his own random number generator and instead use a cryptographic secure pseudorandom number generator (CSPRNG) Why is it so? Say I'm ...

1 2 3
4
5
9