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
0
votes
0answers
23 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 ...
1
vote
0answers
31 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%...
0
votes
0answers
48 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$ ...
2
votes
1answer
71 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 ...
0
votes
0answers
47 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 ...
1
vote
2answers
88 views

Where can I find a sample of data with a known entropy to see how well NIST SP 800-90B does on it?

I'd like a sample of true random data from a source that has a known entropy. It's not easy to even produce true random data in sufficient quantity --- much less know the entropy of the source. For ...
0
votes
0answers
35 views

Security analysis of encrypting a matrix after homomorphic encryption by the random mask

Problem Definition Alice has two private matrices $M_A$ ($N*M$), $M_a$, where $M_a$ is the binary matrix of $M_A$ Bob has a private matrix $M_B$($N*M$) Alice and Bob are semi-honest server and ...
-2
votes
1answer
112 views

Does the following protocol of secure a matrix satisfy one-time-pad?

Problem Definition: Alice wants to send a matrix $MR_A$ which encrypts its original private matrix $M_A$ ($M\times N$ size, all elements in $M_A$ is in {0,1,2,3,4,5}) to Bob without letting Bob knows ...
0
votes
1answer
42 views

Why does l'Ecuyer reject p-values close to 1?

When applying several tests to a given generator, p-values smaller than 0.01 or larger than 0.99 are often obtained by chance even if the RNG behaves correctly with respect to these tests (such values ...
1
vote
0answers
29 views

NIST STS randomness testing inconsistent results

I have generated the nine datasets according to this document for AES-128 and testing these for randomness using NIST STS. However, the results are inconsistent. Sometimes there appear a * in the ...
2
votes
2answers
91 views

What's wrong with NIST SP 800-90B?

NIST SP 800-90B offers various tests for estimating entropy. They also offer an implementation of these tests. With their program called ea_iid, estimating ...
5
votes
3answers
3k views

Why is the output of a True Random Number Generator (TRNG) insecure after it has been compressed?

I came across the following statement regarding true random number generators (TRNG): A “P1 medium” [AIS31] true random number generator (TRNG) may not be directly used due to cryptographic reasons. ...
3
votes
2answers
434 views

Distribution of the Difference of Uniformly Random Elements

In the search to decision reduction of 'On Ideal Lattices and Learning with Errors over Rings', the authors implicitly use the fact that the difference of distinct, uniformly random elements of a (...
0
votes
0answers
114 views

Randomness Testing of Block Ciphers with 256-bit Block/ Key length

NIST explained the process of "Randomness Testing of the AES Candidate Algorithms" in the document. The document explains the generation of 9 datasets for AES candidates with 128-bit block ...
1
vote
1answer
67 views

How can we define $\epsilon$-differential privacy for non-deterministic algorithms?

We know that non-trival deterministic algorithm does not guarantee privacy and randomization is essential for privacy (pp.16 in [Dwork and Roth 2014] ). The well-known $\epsilon$-diferential privacy ...
0
votes
1answer
66 views

Explaining the reason of radically more accuracy while using different set of hash functions instead of same set of hash functions on some operations

So I am looking for an explanation of an experiment. In this experiment, I took a set of k hash functions. Say the total number of data points I am working on is d. Call an algorithm A which used that ...
7
votes
1answer
82 views

What quality of randomness is needed for randomized side channel countermeasures?

Using per-operation randomness is a popular and effective way to protect cryptographic implementations against side-channel attacks, e.g. using Shuffling (randomizing the processing order eg for AES ...
3
votes
1answer
108 views

randomness of encrypt

In the paper "Efficient Encryption from Random Quasi-Cyclic Codes" of Gaborit et al. p.14, I read "Encrypt$(pk=(G,Q,s),\mu,\theta)$: uses randomness $\theta$ to generate $\epsilon \...
0
votes
0answers
54 views

RNG randomization strength for PRF seed

Consider a use case that requires the creation of multiple asymmetric key pairs. There are two options for generating random seeds for a PRF: Use a software based RNG and generate a new seed for each ...
1
vote
1answer
147 views

Is it possible to create a 128-bit UUID from a weak entropy source?

I am looking at a seemingly popular piece of JavaScript code to generate a UUID which is supposed to be a 128-bit number: ...
2
votes
1answer
133 views

Using SHA2 as random number generator?

I need to generate secure pseudorandom numbers in an embedded system. Instead of having to port some RNG library, could I just use an existing SHA2 function as a random number generator (n-th random ...
0
votes
0answers
56 views

What is the probability that a random function is invertible?

Having a random function - $R\in{}\mathcal{R}$ s.t. $R:\{0,1\}^n\rightarrow{}\{0,1\}^n$. What is the probability that $R$ is invertible? I know calculating it suppose to be straight forward, but I'...
3
votes
1answer
73 views

Hide Randomness in Ciphertext

Ciphertext has the property to appear random. As a matter of fact, randomness is the first test, an encryption algorithm must pass. However, there are various setups, which monitor the incoming/ ...
0
votes
0answers
42 views

Understanding a claim made by NIST SP 800-22 on the possibility of calculating $\beta$, the probability of error type 2 in a hypothesis test

NIST SP 800-22 on page 1-4 (that's page 16 of the PDF) states the following. Pay attention to the bold passages. (Emphasis are mine.) Are they true?! Can you advise? One of the primary goals of ...
0
votes
2answers
70 views

Extracting Randomness from a Poisson Distribution

I'm working on a quantum random number generator based on the shot noise of CMOS camera sensor. Shot noise in an image is caused by the variance of the number of photons hitting the sensor per unit of ...
0
votes
1answer
83 views

random mask reversible after homomorphic encryption

I would like to know if this process is feasible under homomorphic encryption, ideally under paillier or any other additive scheme Apply a mask X to obfuscate a message A ie. Am = A (op) X where (op)...
1
vote
1answer
54 views

Can hashes be used to generate larger random numbers?

As far as I understand a hash transforms data into a fixed length representation. For example, a random function returns 8-byte numbers and a hash function has a block size of 32-bytes. If I now ...
1
vote
1answer
29 views

Does splitting random data reduce its security?

Let's say I've got some securely-generated random data I want to encode as words, 32 bits of it. My wordlist is 2048 words, so each word encodes 11 bits of information. I write a routine to pack ...
18
votes
2answers
4k views

A website that identifies an RNG from its output

This happened during a discussion of RNG entropy, and the difficulty of verifying the level of entropy in a long sequence of bits (e.g. a private key.) A colleague of mine told me about a website ...
1
vote
2answers
393 views

Why is Math.floor(Math.random()*9000) not secure in JavaScript?

I heard that one can predict the output from Math.Random() of JavaScript, but another day I had an idea to combine Math.random() ...
0
votes
0answers
22 views

How to save an encryption key to a binary file to be used in NIST STS

I wrote a simple logistics function that i use for my pesudo random number generator.I want to test it's randomness so i downloaded a custom windows version of NIST STS. the program rqeuires you to ...
1
vote
1answer
55 views

What is a “set synchronized CSPRNG”?

I'm looking to implement a performant revocation method for JWTs. I'm reading a paper, in which the following section's second paragraph states: If we use the client hashing approach described ...
0
votes
1answer
219 views

Dieharder input file with a sequence of only binary numbers

I have a RNG producing sequences of binary numbers, ad I would like to run Dieharder test using them as an ascii txt input file. However I haven't been able to do it properly. Should I use a header ...
1
vote
0answers
74 views

libgcrypt and rdrand usage

For some reasons, I was looking into libgcrypt source code and found this. If I understand this correctly, while asking to use /dev/random for some bytes, it actually checks first if rdrand is ...
2
votes
2answers
102 views

Mathematical definition of deterministic and non-deterministic random bit generators

Can anyone give the mathematical definition of deterministic and non-deterministic random bit generator? Providing a reference will also be very helpful.
1
vote
0answers
53 views

Would the result of encrypting weak random data via AES-128 with a CSPRNG-generated key be considered strong/secure random data?

I am trying to understand the security implications of using a well known block (or stream but in this example block) cipher like AES-128 to produce pseudo-random data. My specific question is would ...
2
votes
2answers
94 views

Doesn't d6 to binary for 256-bit bitcoin private key generation produce biased results?

If the mapping table looks like: 1: 000 2: 001 3: 010 4: 011 5: 100 6: 101 Then you are guaranteed that your key will never have a chain of 4 or more 1s, much fewer chains of 3 ones than would ...
8
votes
2answers
774 views

Perfect shuffle possible with limited raw entropy?

I am trying to shuffle a standard 52-card deck in a perfect way (every outcome should be possible at an equal chance). I am not, at this point, concerned with cryptanalysis attacks against it. I have ...
1
vote
2answers
269 views

The importance of randomness in the creation of a key

Why does it matter what kind of random number generation is used during key generation? E.g. this answer states ...
1
vote
0answers
77 views

Why does a “never-repeating” nonce limit a key to safely encrypt only a single block?

This questions comes from a section outlined in RFC 5297 on SIV-AES. The paragraph in particular outlines the idea of a never repeating nonce vs an "almost always" non-repeating nonce. If the nonce ...
0
votes
0answers
76 views

Crack LCG given 2 output values only

I want to try to break an LCG generator just as programming practice task. I found similar issue at Cracking a linear congruential generator. Assume that m is given. The answer to the link above ...
1
vote
0answers
52 views

OTP Random Pad Renewal Without Extending Message [duplicate]

So I recently learned about the concept of a One Time Pad; and I from what I understand it means that if a XOR key is completely random and equal to or longer than the plaintext, it makes it so that ...
1
vote
1answer
86 views

Creating Random Pad from XORed Sections of Pi

If two strings of equal length from random offsets in Pi were XORed together, would this result in a cryptographically secure random number suitable for use in a one-time pad? If so, would this mean ...
1
vote
1answer
67 views

How should one handle the identity value and other “obviously” weak secret random values?

In RSA, ECDSA, ElGamal and quite a few other schemes, using a secret (random) value equal to 1 might not provide any form of security, while still being mathematically sound. For RSA, ECDSA or ...
0
votes
1answer
538 views

SHA256 output to 1-6 number range?

I want to calculate a random number (1 to 6) from the output of sha256. Can I assurance the probability of 6 abilities is the same?
1
vote
1answer
107 views

How does AES-GCM produce different ciphertexts, and how can the algorithm decrypt the values if they're random?

The title explains it. How does AES-GCM (or other modes for that matter) generate random ciphertexts per execution, and how does the algorithm decrypt a random value since the sender randomizes the ...
4
votes
2answers
287 views

What are usable entropy sources in a headless machine without /dev/random or any cryptography API?

If I have a headless machine (no mouse movements, no keyboard presses, or user input), without any cryptography CSPRNG APIs, where can I collect entropy from?
2
votes
2answers
109 views

Given a hash function; assuming domain % codomain = 0 and uniform collision distribution; how is entropy lost by collisions (not output truncation)?

Assuming our domain and codomain both have 4 elements, the uniform distribution of inputs to outputs means the function is injective. It is widely agreed that randomly selecting a domain element ...
1
vote
2answers
121 views

Why doesn't the ability to sample a single random bit imply the construction of a random oracle?

I'm trying to understand exactly how the random oracle model differs from the standard model. In many proofs & applications there are some assumptions that some randomness is sampled (i.e. a bit $...
1
vote
1answer
139 views

What is the correct way to choose the start parameters for NIST tests? [duplicate]

I had an idea of creating a pseudo-random binary sequence with that code: ...

1
2 3 4 5
8