Questions tagged [random-number-generator]

A random number generator is a software or hardware solution which functions as a generator of (real or pseudo) random numbers (or bits).

Filter by
Sorted by
Tagged with
1
vote
1answer
606 views

ECDSA vulnerability related to recovering private key using same r [closed]

I'm considering this for bitcoin transaction as it uses ECDSA so if the signer generates two signatures suppose s1 and s2. where: I get it that any attacker who have s1 and s2 can recover its private ...
5
votes
3answers
2k views

Encrypting RNG output

Under the following premise: I need to generate multiple symmetric keys; I cannot be sure about the quality of local system RNG; I already have a strong key K (generated by other means / elsewhere). ...
3
votes
1answer
126 views

How can I generate a deterministic evenly distributed random number in a blockchain

Here's the hypothetical. There's a blockchain, which for the sake of simplicity, is modelled around Bitcoin and proof-of-work. My goal, is that for each mined block, rather than a set reward (12.5 ...
0
votes
2answers
61 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 ...
1
vote
1answer
209 views

Looking for CPRNG implementatoin [closed]

I'm looking for commonly used and proven CPRNG implementation in C. What to use? ChaCha20 like in Linux Kernel? Does anybody know other implementations? PS: I don't want to implement by itself ...
1
vote
1answer
385 views

Example of calculating a primitive root for large prime?

I am trying to figure out how to calculate primitive root $w$ for a prime. Following what I read, I generated my prime to be 'safe prime', $p=qr+1$. I know $q$ (also prime) and $r$. Let's assume, ...
0
votes
1answer
259 views

Is there a feasible way to generate an RSA key manually the same way as it is for an ECC one?

In elliptic curves, a private key is just a random number, and one relatively small compared to other crypto systems (256 bits for ECC vs 4096 bits for RSA for example). Suppose I don't trust ...
5
votes
2answers
295 views

What is the relationship between entropy conditioning and final output bias in a TRNG?

This question concerns the conditioning and output of true random number generators. It refers to NIST Special Publication 800-90C, Recommendation for Random Bit Generator (RBG) Constructions. It ...
11
votes
3answers
3k 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
290 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 ...
1
vote
0answers
228 views

Decrypt an tex file encrypted with rand() [closed]

Link to encrypted tex file: https://drive.google.com/open?id=1gZCujDYmEL-FZ5o_xBUS-Ng5979HSsZ7 This is my attempt at solving the problem: ...
7
votes
2answers
618 views

Random number generator issue

I wrote a litte random generator using a geiger tube. I use a 16bit timer that overflows every ~1ms; when i get a reading form the geiger (~36count/minute), i save the current timer value as "random ...
9
votes
1answer
497 views

Can reduced-round ChaCha be used as non-cryptographic fast PRNG to produce output indistinguishable from random data?

The fastest known attack against the Salsa20 family of stream ciphers requires 2137 simple operations against Salsa20/7, or 2244 against Salsa20/8. The 8-round version encrypts data at 1.88 cycles-per-...
1
vote
3answers
691 views

How to deterministically generate a 256 bit ECC key from 128 bits of entropy without a CSPRNG

A safe way to generate a 256 bit ECC key from 128 bits of entropy is to use a CSPRNG, according to this answer: https://crypto.stackexchange.com/a/56551/43864 However, it's difficult to find a cross ...
1
vote
2answers
234 views

Purpose of folding a digest in half

The Linux kernel's random driver generates randomness by hashing an entropy pool using SHA-1. From the driver's source, the SHA-1 hash is apparently folded in half before being returned: ...
3
votes
1answer
520 views

Seeding the Fortuna PRNG for the first time

I am trying to understand how the Fortuna PRNG should be seeded correctly for the first time. Let's assume that we do have a large-enough seed file available, but not any entropy sources during first ...
3
votes
1answer
701 views

384-bit ChaCha20 / Salsa20

The standard Salsa20 core is a $\{0,1\}^{384} \to \{0,1\}^{512}$ random function with a 16 byte constant ($\sigma$ for a 32-byte key), an 8 byte nonce, an 8 byte counter, and a 32 byte key. The hash ...
0
votes
1answer
75 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 ...
3
votes
0answers
76 views

Combining multiple hash functions for HKDF

I'm trying to apply the hash function combination method described in https://eprint.iacr.org/2013/210.pdf to a HKDF PRNG construction. Thing is it needs 4 uniformly random parameters/keys chosen by ...
-1
votes
1answer
239 views

Random number generator in a 2p2 Network

for my thesis I am trying to develop a system where nodes from a peer to peer network agree in generate a random number every tot seconds. I am stocked in this problem since almost 1 week anyone can ...
2
votes
0answers
416 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 ...
1
vote
2answers
92 views

CSPRNG generation vs asymmetric encryption performance

It might sound like a weird comparison, but which one is faster, If I were to generate a CSPRNG every time or to sign(private encrypt) a data?
1
vote
3answers
185 views

Is there a CSPRNG capable of generating a large sequence of numbers from a single seed?

In my CS course i am in dire need of a CSPRNG that can create N numbers starting from a single key. Something like this: CSPRNG(x): Input 64 bit int; Output Array of CSR 64 bit Ints; ...
1
vote
2answers
279 views

How to calculate the bias of cryptographic hash output from biased input?

Assume that I have a hardware entropy source. Not a TRNG, but the source that might feed a TRNG's extraction algorithm. This source produces independent bits with a not unreasonable bias of $60/40$. ...
4
votes
3answers
619 views

What is proper use of a True Random Number Generator?

Let's say I have a true random number generator TRNG. Random numbers are generated on demand from a HW-entropy source, resulting in a 32-bit random value each time it is called. I have to fill an ...
0
votes
2answers
461 views

Algorithm to generate ECDSA keys with random number generator

I have a certified random number generator (TRNG, it does not matter what it is for the question). I would like to use it as a source to generate secp384r1 ECDSA keys. What is the algorithm I should ...
1
vote
3answers
507 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 ...
1
vote
1answer
443 views

Can two different seeds produce the same output from a PRNG?

In general, is it possible that two different seeds produce the same output from a PRNG? I'm not sure how many different types of PRNGs there are and maybe it depends on which one we consider. I know ...
1
vote
1answer
125 views

What are the required properties of a PRNG to make it suitable for a stream cipher?

As an example, if a PRNG passes the BigCrush test suite, and has a period of 2^1024, can it be used on its own to make a secure stream cipher? What are the required properties, and similarly, what ...
2
votes
1answer
112 views

How can we add real values using GF field?

In GF($2^4$) usinfg primitive polynomial g(x) = $x^4 + x^3 +1$, 2+3 = 1 since 010 + 011 = 001, 2 + 2 = 0 Is there any encoding to get 2 + 3 = 5 and 2 + 2 = 4 in GF.
-2
votes
1answer
601 views

Is it possible to attack an SHA-256 hash seeded with PHP’s mt_rand function?

Is it possible to attack this construction if the attacker only knows the hash? ...
-3
votes
1answer
478 views

simple encrypt/decrypt [closed]

I would like to encrypt a file by XORing the source message with a prng of my own. The prng is streaming a flow of sha512 hashes. Each hash is produced from the previous hash plus constant string plus ...
1
vote
0answers
99 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 ...
1
vote
1answer
106 views

Is RC4 cipher just xoring plaintext with a random sequence seeded by key?

After reading about RC4, it seems that it's nothing else than: the plaintext stream is just XOR'ed with a pseudo-random sequence that is initialized/seeded with the key Is there something else in ...
1
vote
2answers
225 views

Why is there a counter in CSPRNGs?

This is probably one of those embarrassingly simple questions, but here goes. Consider the following two constructs: CSPRNG made out of a block cipher (AES) with a counter such as CSPRNG made ...
4
votes
1answer
472 views

Is the seed/salt input of a Key Derivation Function confidential?

I'm implementing a security protocol and for the key management a scheme is proposed using a key derivation function on the remote device. Thereby the input seed is uploaded in plaintext to the remote ...
5
votes
2answers
1k views

Using ChaCha20 as a PRNG with a variable-length seed

As far as I understand, the key stream of the ChaCha20 cipher may be used as a seeded PRNG, where the seed is used to set the key and the nonce. As described in RFC7539, ChaCha20 can be used with a ...
3
votes
2answers
879 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 ...
1
vote
0answers
59 views

Are there any references on using neural networks to distinguish CSPRNGs?

No feasible algorithm should be able to distinguish the outputs of two CSPRNGs. Are there any research papers that present results of actually testing this? In particular, I'm interested in ...
3
votes
2answers
80 views

Can a CSPRNG, seeded with a key, be used to generate a byte sequence as long as the plaintext to XOR it with that?

Given a “safe” (meaning: brute-force is your only shot) cryptographically strong PRNG, wouldn't it be safe to encrypt data using the CSPRNG to create a key as long as the data and then encrypt the ...
0
votes
1answer
131 views

RSA-KEM: minimal number of random bits

I've already asked a few - as yet officially unanswered - questions about RSA-KEM with regards to the input secret encrypted using the public key here and (less on topic for this question) here. ...
0
votes
1answer
579 views

How many random bits are required to create one RSA key?

If we were observing how many bits are taken from a random number source, what is the total number of bits required for creating a 4096 bit key using a current RSA implementation? This means the total ...
1
vote
1answer
677 views

Can I use a random number generator with seed for key derivation?

I don't know a thing about cryptography so I'm judging by what I see in APIs docs. I want to use ECDSA or ECDH in my project. And what I know so far about key derivation in this systems is that they: ...
29
votes
7answers
9k views

Can you use memory errors as a source of randomness for cryptography?

Obviously, if you need a random number for cryptography, your code should use an api that gets it from hardware. However, not all hardware has a SRNG available. If you are working on a security ...
3
votes
1answer
217 views

How is the DUHK attack specific to the ANSI X9.31 RNG?

Recently, the DUHK attack on bad RNG implementations of hardware devices has been published. The attack is based on a (known or reverse engineerable) hardcoded key, which is used for a ANSI X9.31 ...
0
votes
1answer
595 views

How does GRC password generator get 512 bit of secret data?

I'm trying to understand how GRC password generator can get 512 bit of secret data while encrypting 128-bit of data. The generator address is located here: https://www.grc.com/passwords.htm See the "...
0
votes
1answer
379 views

Using NIST SP 800 - 90Ar1 Test Vectors for HMAC_DRBG with Reseeding and AdditionalInput

I'm trying to test my HMAC-DRBG implementation, but I do not understand how the AdditionalInput paramter should be used. From one test case (pr-false): ...
1
vote
1answer
130 views

RNG Source Combining

I'm planning on combining RNGs from several sources (Windows, Linux, OpenBSD, etc.) for generating one time pads but I have some questions that I don't know how to answer regarding xoring the outputs ...
1
vote
2answers
2k views

Is it possible to compress random sequence with high entropy

I have an algorithm that generates pseudo random sequence with length of 100k and high entropy. I would like to check the quality of randomness. So, I used a popular software to compress the generated ...
11
votes
2answers
1k views

Dice vs quantum random number generator

I recently championed quantum key distribution networks. This has led me to also question quantum random number generators. It appears that randomness is randomness, even if made by custom quantum ...

1 2 3
4
5
13