Questions tagged as ['random-number-generator']
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 ...
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 ...
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. ...
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 ...
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 ...
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?
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 ...
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 ...
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 ...
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?
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 ...
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 ...
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?

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 ...

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 ...
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 ...
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:
- High-frequency sampling
- Decimator
- Randomness extractor
In this design, (1) produces a correlat ...
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 ...
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?
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 ...

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.

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"
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 ...