Questions tagged as ['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).
Score: 3
Finlay Weber avatar
Are PRNGs Key Derivation Functions?
ng flag

PRNG is a mechanism to produce randomness from an initial random seed, so basically a way to derive more secrets from one secret.

Looking at the Wikipedia entry for KDF you find

In cryptography, a key derivation function (KDF) is a cryptographic algorithm that derives one or more secret keys from a secret value such as a main key, a password, or a passphrase.

Which sounds to me like what PRNGS a ...

Score: 1
Andy avatar
How to check security strength of random k if k is an input parameter of ECDSA signature generation function using openssl-fips
pe flag

As I understand,

1.The security strength is specified in bits according to https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-90Ar1.pdf

2.Security strength is depend on the length of entropy input when generating random number

So, in the signature generation function, if the random k is an input parameter (not generate random k in this function)

How to check valid k? security strength of  ...

Score: 1
Finlay Weber avatar
When are PRNG used and when are CSPRNG used
ng flag

I understand that PRNG are Random Number Generators that uses a deterministic algorithm based off of a seed.

I also understand that CSRNG are PRNG that are cryptographic-ally safe to use for generating random numbers.

And by cryptographic-ally safe, I believe this means that even if an attacker knows the deterministic algorithm and the seed, they would not be able to predict the next random number.  ...

Score: 2
krystof18 avatar
Is it insecure to make nonce using random number generator and hashing algorythm with secret key like HMAC?
ag flag

I'm building a project on Arduino Mega microcontroller and I need some nonce generator for challenge-response exchange. But I failed to find some alphanumerical string generators. Then I came up with an idea to make one using the random() function that generates random int in limit you give and hash that integer with HMAC using another secret key (one that could be auto-generated on startup since it  ...

Score: 2
Alexander D'Attore avatar
Node.js uuid.v4 vs crypto.randomUUID. Which implementation is more cryptographically secure?
cn flag

For a long time I've used the uuid npm package for my v4 uuid needs. It seems in recent versions of node they have introduced a built-in crypto module with the method randomUUID.

Some benchmarks have been done to show crypto.randomUUID is much faster than uuid.v4 (roughly 3x +).

However I can't find any information about how the implementations differ (if at all) in terms of how they choose random num ...

Score: 0
Finlay Weber avatar
Is hashing random numbers generated from a TRNG enough to create a key?
ng flag

Is hashing random numbers generated from a TRNG enough to create a key?

Basically taking the output of something like a Lavarand and pass that through a hash function like sha-2.

I guess at the end of the day the core of my question is, can an hash function be used as a pseudorandom number generator?

Score: 1
Finlay Weber avatar
How are the keys used in cryptography generated?
ng flag

It seems there are keys everywhere in cryptography. From things like HMAC to encryption (both asymmetric and symmetric).

The bit I do not totally understand now is how are cryptographic keys generated? I know they have to be random, but is that all the properties required?

Do the method of generation also differ depending on the use case? For example does the generation method differ for keys used i ...

Score: 3
Diego Hernandez Herrera avatar
DIY TRNG on an embedded system for Ethereum private key generation
cn flag

I'm trying to build this Ethereum hardware wallet on a custom designed embedded system and I'm no expert. Googling around I found this Robust, low-cost, auditable random number generation for embedded system security paper. As I read the proposal in this paper, it sounded quite safe; a real TRNG. Neverthless, as I struggled to simulate the circuit in any online circuit builder, I thought that maybe I ...

Score: 3
dade avatar
Difference between Non-uniformly random and Uniformly random
bt flag

I am reading up on Key Deriving Functions (KDF) and in a section of the Real-World Cryptographic book by David Wong, a comparison is being made with Pseudorandom number generator (PRNG). And one of the differences is said to be that KDF takes non-uniformly random arbitrary length input, while PRNG takes Uniformly random k-bit key. Even though both have Uniformly random arbitrary length output.

Basi ...

Score: 0
Mohammed Siddique avatar
Mersenne twister word size and degree of recurrence combination
cn flag

For a 32-Bit variant of Mersenne twister, if the outputs Should be a 5-Bit integer(word size) then what is the value of recurrence according to the k-distribution?

Score: 1
Mohammed Siddique avatar
Program to predict a 5-bit output from mersenne Twister random module from python
cn flag

Is there a program to predict the mersenne twister random module in python for a 5-bit integer output, provided the consecutive 3994 outputs are available? The random module is not seeded so i guess, it'll use the system time as it's seed value since no os.random function is used! and it's seeded only once(assumption). Does my claims look valid! and is it really predictable? please forgive me if i'm wro ...

Score: 1
TyeolRik avatar
How to reproduce seeds in Random Number Generator like WELL, KISS etc
cn flag

I am curious about Padding the seeds of Random Number Generator.
(I am sure that terminology, padding the seeds, is not correct. If someone knows the proper word, please let me know :) )

What is padding the seeds that I mentioned?

You know that Pseudo-Random Number generator need seed to do its job properly. For example, one of the most famous RNG, mt19937 need only one seed.

However, in KISS algor ...

Score: 1
Tom avatar
Can AES fail PractRand?
tf flag
Tom

Mellisa O'Neil tested Xoroshiro128+ with 512 terabytes (2^49 bytes) of data. And finally it failed. Would AES fail PractRand with enough data?

When we can expect that AES will fail? Maybe with $2^{64}$ of data?

Score: 6
A source of randomness that anyone can independently, conveniently and robustly access?
in flag

Does there exist a source of randomness that anyone in the world can independently, conveniently and robustly access? For example, the 10th decimal place of the temperature in Mexico City is sufficiently random. But it's inconvenient for Bob to access independently, and it can't be measured robustly anyways.

The source of randomness must also be secure, in that no one party controls it (or access ...

Score: 0
What are the fastest algorithms that sample from the uniform distribution?
ru flag

Lots of cryptography algorithms rely on pseudorandom number generators. Sometimes, given a plaintext, you need to generate a pseudorandom number from it. What are some fast algorithms that do so?

I've seen one that uses SHA256 and other that uses AES, but I couldn't find any literature about them or some implementation that I can use. They should be fast because processors nowadays have hardware  ...

Score: 1
Mittal G avatar
When not to reject a random number generator?
co flag

I have constructed a true random number generator, and I applied the NIST randomness Test Suite to its results. I have generated around 200 files with my TRNG, each being $10^6$ bits in length.

The test reports are as follows: The TRNG failed some of the tests (e.g., Binary Matrix Rank Test) less than $5$ times, i.e., only 5 files out of $200$ failed some of the tests. However, $20$ files failed the Ra ...

Score: 1
DurandA avatar
Randomness extraction on correlated data in TRNG
us flag

True random number generator (TRNG) designs I read about mostly consist of two digital stages:

  • Low-frequency sampling (of a physical noise source)
  • Randomness extractor

The noise signal is sampled at a low frequency to avoid correlation. Functionally, this is equivalent to the following three stages:

  1. High-frequency sampling
  2. Decimator
  3. Randomness extractor

In this design, (1) produces a correlat ...

Score: 2
DurandA avatar
Randomness extraction from a Santha-Vazirani (semi-random) source
us flag

In a quest to better understand randomness extractors (in the context of TRNG post-processing), I read some papers about the von Neumann Extractor and Santha-Vazirani (SV-) sources. The von Neumann extractor is a simple algorithm that works on independent, biased sources such as a biased coin. However, available physical sources of randomness are imperfect and are biased and correlated. Santha and Va ...

Score: 0
zelda191919 avatar
How can I recover mersenne twister when only the part of the bits?
id flag

https://github.com/tna0y/Python-random-module-cracker Here, when we get 32*624 bits of outputs from Mersenne-twister we can recover Mersenne twister. My question is when we get the parts of the bits, how can we recover Mersenne twister? For example function getrandbits from python random module gives only part of the bits. Is it available to untwist it?

Score: 2
Mittal G avatar
Can we combine two true random generators to obtain a new one?
co flag

It is well known that a true random generator exploits the randomness occurs in some physical phenomena. Also, the output of a true random generators can be either biased or correlated. Therefore, de-skewing techniques are required.

My question is that if we have two true random bit generators whose outputs are not passing the test-suite of NIST, can we combine these outputs to obtain a random bi ...

Score: 0
Design an algorithm to generate random session key
gr flag

good day. I am asked to design the a simple algorithm to generate random session key id of block length of 8 and change continuously every time it refreshes. Is there any simple algorithm to create random session key id encrypt and decrypt it? I would prefer not to use library supported in python module.

Please kindly advise.

Score: 1
Security proof for PRNG
jp flag

Could you help to find an example of where the next kind of proof is performed, please? "if we can distinguish the randomly generated bits of a PRNG from a random sequence, then we can distinguish the underlying block cipher/permutation from a random permutation"

Score: 0
Wolden avatar
CSPRNG in Javascript?
cn flag

I'm trying to obtain a random, unpredictable quite long number (± 20-25 digits) using Javascript (created by user's client) as fast and light as possible. Is this solution reliable, robust and secure enough?

When the online page is opened, the 13-digit timestamp is stored. A timer determines the number of milliseconds before user clicks on 'OK' (let's assume he got a short text to read or anythi ...