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

learn more… | top users | synonyms (1)

-2
votes
1answer
49 views

Randomness of a Key in a One Time Pad

The keys used in an One Time Pad are required to be randomly generated from a keyspace $\mathcal{K}$, we require 256 bit random keys, i.e. $\mathcal{K}=\{0,1\}^{256}.$ Suppose we randomly select an ...
0
votes
1answer
67 views

Should I add randomness at the end before AES?

Seen AES, changing a character drastically affects the ecrypted text. I want to make it harder to decrypt AES I send. So, it seems this can be done by adding some special code and some random bytes ...
4
votes
0answers
73 views

Secure entropy extractor for thermal noise collected from camera input?

I have read this paper (pdf) which talks about measuring the entropy of thermal noise collected from camera input. They estimate the minimum entropy at about 4 bits per pixel. Probably estimating 1 ...
-1
votes
1answer
81 views

Can we use merely permutation to hide a message?

This question is related to this: When all shares of a secret are given to adversary as a permuted matrix I think the below question is a simplified version of that. Assume we have a 40-bit ...
2
votes
2answers
181 views

Transforming Gaussian random $[0,1] $ numbers to uniform $[0,255] $

I am not exactly sure if this is for math stackexchange or crypto: A TRNG outputs numbers in $[0,1]$ in a Gaussian distribution. I would like to convert them into uniform random bytes ($[0,255] $) to ...
3
votes
1answer
40 views

Is LUKS Anti-Forensic information splitter (AFsplit) indistinguishable from random data?

I want to know if AFsplit(random_data_input, stripes, digestmod=sha) output is indistinguishable from random data. The purpose ...
0
votes
1answer
57 views

How does Hash with random cryptography work?

I am new in this world of cryptography and while reading some articles I got stuck into something that I did not understand correctly: the use of hash based on random cryptography. On my knowledge, ...
0
votes
0answers
38 views

Is pseudo-random letter insertion secure?

Is pseudo-random letter insertion a secure mechanism? I mean by expanding the key or taking two parameters in the encryption function, you select positions in the text at which to insert random ...
4
votes
2answers
2k views

Randomness test question from FIPS 140-1 and comparison with 140-2

In FIPS 140-1 there are 4 statistical random number generator tests (The Monobit Test, The Poker Test, The Runs Test and The Long Runs Test. Then FIPS 140-2 came along and supposedly tightened the ...
1
vote
1answer
155 views

Is the result of HMAC-sha256 distinguishable from random noise?

Is if the result of HMAC-sha256 distinguishable from random noise? If so, given: a collection of 1000 keys, and 1000 messages of random noise, 100 signed by each of only 10 of those keys Can ...
9
votes
1answer
180 views

On Linux, does /dev/random unblocking imply that /dev/urandom is seeded?

Linux has the familiar problem that /dev/random blocks too much (insisting on being information-theoretically secure), while /dev/urandom doesn't block enough (it will return data before it's been ...
1
vote
1answer
52 views

How succeptible to accidental collision is the construct sha256(uuid4 + now) in Python?

I need 32 byte pseudorandom sequences that denote unique filenames and am currently using this Python code: ...
0
votes
1answer
31 views

Randomize (encrypted) data to hide the behaviour of the data source

I'd like to transmit a small amount of data, typ. 4 - 16 Byte through a channel that can be eavesdropped at any time. The behaviour, the way the data changes, should be protected too. I could ...
0
votes
2answers
117 views

Is this method of encryption theoretically unbreakable?

I implemented a Stream Cipher using Cryptographically Secure Random Numbers for the key values. The key stream was as long as the plaintext stream. This key data set won't be reused. Have I met all ...
1
vote
1answer
58 views

Levels of strength: The Caesar Cipher

SITREP: I am deciding what form of "Random" Number generation would fit best for a Caesar Cipher that encrypts each letter with a different integer as a shift. This encryption is being handled via C# ...
5
votes
1answer
114 views

Fixed-prefix IV in CBC mode

I know the Initialization Vector needs to be unpredictable. Does it apply to the IV as a whole, or to every bit in the IV? I have multiple devices with poor entropy sharing the same key and I want to ...
0
votes
1answer
23 views

Probability of generating same master secret key in Identity-based Encryption

Suppose multiple servers use same IBE domain parameters (I mean same curve description parameters and field) for master secret key setup. Is there any possibility for generating the same system ...
2
votes
3answers
160 views

How to disguise ciphertext

If I want to have a secret conversation, then I can encrypt it (with OTR etc). However, since big brother watches all communication, sending encrypted data will likely raise flags. Does anyone know of ...
-1
votes
1answer
38 views

Can shuffling plaintext produce a useable key?

If I 'shuffle' the characters in a long text, is there some number of shuffles that will produce apparent randomness approaching a cryptographically secure random number generator? A chapter in a ...
1
vote
1answer
56 views

Create big random number from 2 smaller numbers?

If I have 2 true random numbers from atmospheric noise or a different source. Suppose $x= 299$ and $y= 499$. Is it possible to create a bigger number with $x$ to the power of $y$? Can I use ...
0
votes
2answers
38 views

Is part of an output of secure PRNG also cryptographically secure?

Lets say I generate 192 bits using some secure PRNG. If I now take first 128 bits is it equivalent of generating 128 bits in the first place? P.S. More practical application for me is that I need a ...
1
vote
0answers
66 views

When we use one time pad TWICE in two different ways

Assumption and Notations: All the values defined over the field $\mathbb{F}_p$, where $p$ is a large prime number. We denote multiplicative inverse of value $v$ by $v^{-1}$. All values are non-zero ...
4
votes
1answer
98 views

Exactly how bad is using 'mod' to clamp reduce numbers to a given range?

Let's say I'm naive and want to generate a random integer in the range [0, m), so I do the following: ...
4
votes
1answer
84 views

Why are obfuscators generally defined to be probabilistic algorithms, rather than deterministic ones?

One possible explanation is, randomness is not going to hurt you, so might as well use it. Also, if we are hoping to prove impossibility, it only makes the result stronger. One other explanation is ...
2
votes
1answer
81 views

Which ciphers produce random ciphertext?

I already know AES produces a "random" output. 5e4e6440826d6afc4535fbf078455f791159701a9df624ddd4e4dda84523b6a7 Its ciphertext doesn't follow a pattern and is ...
5
votes
2answers
2k views

Are the SHA family hash outputs practically random?

Say I hashed the output from a random number generator (with nonce), would the resulting SHA256 hash be as random as the inputted number? And If I used the first 5 hex characters, and then used the ...
3
votes
1answer
179 views

Detecting steganography in the stream of short messages

I have stream of millions of short n-bit (n<30) messages generated by some random number generator. The source of random number generator is not available to me. I suspect there are messages used ...
4
votes
1answer
108 views

What is an impure NIST true random number generator?

I'm working on a true random number generator, and I came across this phrase in the American NIST guide, in section 6.4.1 Non-Approved Conditioning Components: The entropy rate provided shall be ...
3
votes
1answer
191 views

Homemade Randomized RSA

Considering the following encryption scheme where RSA is used to encrypt a plaintext m and then we choose a random r and compute: $$A = r + m^e \bmod N$$ and $$B = r^e \bmod N$$ So the ciphertext is ...
1
vote
2answers
79 views

Continuous stream of strong randomness from limited entropy?

I need a continuous (infinite) strong random generator, but I've only got limited entropy as seed. I know there's already a contradiction there, but I'm looking for a practical approach. Suppose I ...
1
vote
1answer
37 views
5
votes
2answers
124 views

Data Leakage and Data Switching

I have two secret values $a$ and $b$ (i.e. they are arbitrary values). I mask them as follow: $v_1=r_1a+r_2$ $v_2=r_1(b-a)$ where $r_1$ and $r_2$ are uniformly random values. I send $v_1$ and $v_2$ ...
6
votes
2answers
174 views

How much entropy is generated by 'random' human keystrokes?

I'm wondering about using human input as an entropy generator. We all know humans are terrible at making up random numbers or keys or passwords. But what if we let a user 'randomly' type in some ...
4
votes
0answers
50 views

Reusing same source for single-source randomness extractor

Let $ext$ be a single-source randomness extractor which takes a $d$-bit seed and a $n$-bit source as input and produces a $m$-bit output. Suppose we have a source $X$ with min-entropy $k$. Is it ...
4
votes
3answers
169 views

Randomness in Public Key Encryption

For a scheme to be at least CPA secure, one has to randomize the scheme. In case of a secret key encryption scheme, the used randomness will typically become part of the cipher text as in the case of ...
4
votes
5answers
188 views

How does generating random numbers “remove entropy from your system”?

In a previous question, I quoted the --gen-random entry in the GPG Man Pages. At the end it says: PLEASE, don’t use this command unless you know what you are ...
0
votes
1answer
35 views

Key derivation function in theory & practice

I am implementing a cryptographic protocol and I'd like to generate a set of seeds using a seed for a pseudo-random function. The reason is that I can pass on only one seed and it can be used to ...
0
votes
1answer
25 views

How to compare two CSPRNGs? [duplicate]

Let's say I am given to CSPRNGs: RNG1 and RNG2. I want to select the best one of the two for cryptography. How should I do it? Any of the two RNGs can be initialized with a secret key during tests and ...
0
votes
0answers
41 views

Existence of a random function under constraints

Let $F_1$ and $F_2$ be two random functions taking as input $N$ bits and returning $N$ bits. Let $C_1$ and $C_2$ two constants of $N$ bits. Is there a random function $P$ taking as input $2N$ bits and ...
4
votes
2answers
283 views

Why calculate pi to estimate randomness?

Why do testing suites calculate $\pi$ (pi) using the Monte Carlo method to determine if a series of numbers are random? As far as I can tell, the Monte Carlo method can be used to estimate $\pi$ ...
2
votes
2answers
175 views

Does it necessarily mean that an RSA moduli generated with poor randomness is not random?

In 2012 a group of researchers collected a large amount of RSA moduli and calculated their greatest common divisor in order to find common factors between them. By finding a common factor they could ...
2
votes
1answer
40 views

Data Switching and Information Leakage

Hypothesis: Let $z,a$ be uniformly random elements of a field $\mathbb{F}_p$ where $p$ is a large prime number. Also, let $(-z)$ be additive inverse of $z$. I have a fixed secret value $x$. I mask ...
9
votes
2answers
1k views

Does an encrypted random sequence conserve its “randomness”?

If you have a random uniform sequence of bits $A$ generated by a TRNG with good performance of randomness tests (eg Dieharder, NIST, Kolmogorov complexity, chi-square, etc) and perform an encryption ...
2
votes
0answers
26 views

Raw /dev/random output for keymat [duplicate]

Noob question: It is my understanding that the raw output from non-blocking /dev/random (where the kernel's entropy_avail estimate is equal to or greater than the number of random bits required) ...
8
votes
3answers
500 views

Why do we require a CSPRNG's output to be indistinguishable from true random?

Everywhere I read, indistinguishability of output from true random is stated as a requirement for CSPRNGs. However nobody bothered to give the rationale for such a strong requirement. Specifically, ...
-1
votes
2answers
108 views

use the same pad reversed

Suppose I have a random number (eg 625 467 921). I use it once to encrypt a message OTP style, and when I want to use them again, I reverse them (eg to ...
3
votes
2answers
513 views

Whitening and randomness extraction

The Von Neumann randomness extractor is explicitly mentioned in the randomness extractor page of Wikipedia, but strangely enough that page does not contain any reference to whitening the results of an ...
2
votes
1answer
361 views

How many bits of entropy can I expect from /dev/urandom in iOS?

Apple's latest security documentation indicates that it now uses CTR_DRBG for generating pseudo-random numbers (previously Yarrow instead of CTR_DRBG), using "timing variations during boot" and ...
2
votes
1answer
79 views

In $\mathbb Z/p\mathbb Z$, is $(a+b\cdot r)$ a random value for fixed $a,b$ and random $r$?

Let $p$ be a prime number. Consider two fixed values $a,b\in\mathbb Z/p\mathbb Z$, where $b\neq0$, and a uniformly random value $r\leftarrow \mathbb Z/p\mathbb Z$. Is $v=a+b\cdot r$ a uniformly ...
2
votes
1answer
111 views

Pseudo Random Function

The definition of pseudo randomness that leads to pseudo random function talks about indistingishability of a key-ed function and a random function. i.e. The key-ed function family $\{F_k\}$ is PRF ...