creation of (real or pseudo) random numbers (or bits).

learn more… | top users | synonyms (2)

0
votes
0answers
9 views

How often does /dev/urandom sample seeding from /dev/random? [migrated]

Unless I am totally confused and it doesn't do that. I want to know whether or not /dev/urandom will gain increased entropy if I take a hardware RNG and plug its entropy into /dev/random. So to ...
4
votes
1answer
46 views

How to design a deliberately weak PRNG for experimentation?

I'm looking for a PRNG that is deliberately weak, that is, follows a set of rules stochasticly. For example: Encounters a set of bits that is a multiple of X, starts exhibiting bias, or starts to ...
0
votes
0answers
34 views

How to convert the 128 bit output of AES_CTR to 32 bit number? [on hold]

I want to run Dieharder test suite on the output of AES_CTR. How should I form the text file consisting of the cipher text obtained from AES_CTR, to be run directly with Dieharder package for linux? ...
3
votes
1answer
65 views

How to convert AES to a PRNG in order to run NIST Statistical Test Suite?

I want to run statistical tests on my implementation of AES. How should I convert it into a PRNG? Is there a standard way to go about doing this? I could not find much information about this although ...
0
votes
2answers
33 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 ...
6
votes
4answers
761 views

Are there any practical ways to transfer random data securely?

The owner of the random.org service recommends that you do not use randomly generated numbers from their website in cryptographic keys. This makes sense, but it got me wondering. Is it possible to ...
5
votes
1answer
98 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 ...
1
vote
0answers
30 views

how to change math.random() implemented in javascript to securerandom [closed]

In Javscript code in one of our application,I am trying to change Math.random to secure random.I am not sure ,how to change.can anybody help?
8
votes
1answer
330 views

Uniformly distributed secure floating point numbers in [0,1)

Is there any way to generate cryptographically secure uniformly distributed floating point numbers in the interval [0,1)? For example, in Javascript, there is ...
9
votes
1answer
110 views

Is CPU timing jitter a usable entropy source?

In some virtualized environments, the only source of entropy available is CPU timing jitter. Can one get enough entropy from this source for practical uses? Also, is this secure against local ...
2
votes
1answer
28 views

Is PKCS#7 padding generated with a pseudo-random-number generator okay?

Let's take this PHP code. We use libsodium and libsodium-php. You have $text, $senderPrivateKey, ...
3
votes
1answer
44 views

Is (1 bit HW signal) XOR (8 bits PRNG output) sufficient for a HWRNG?

This is really a follow up question to a comment made regarding How to roll a HWRNG In the situation of whitening a hardware generated random bit stream, "XORing the two bitstreams should be fine ...
12
votes
1answer
67 views

How to tell if a hardware RNG is rigged?

On a related note of building my own RNG, as someone suggested to use several commericial solutions how can I check if it is rigged against me? (although I am still strongly biased to a homebrew ...
4
votes
2answers
79 views

Is the RC4 keystream random or not?

I have cause to use the PRNG half of RC4, but am seriously confused as to the randomness of its output. (Only the PRNG half.) On the one hand, there is a large body of literature finding ever ...
3
votes
0answers
58 views

Implementation specific differences between RDRAND and RDSEED

I've read Intel's The Difference Between RDRAND and RDSEED and Intel Digital Random Number Generator (DRNG) Software Implementation Guide, but I have some open questions that are specific to usage in ...
5
votes
0answers
47 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 ...
3
votes
2answers
123 views

Will entropy be lost by using a DRBG?

Lets assume we have a DRGB (deterministic random bit generator) which is seeded by a good true RBG (random bit generator). Before any bit has been read from the DRBG, the entropy is clearly the number ...
4
votes
1answer
87 views

CTR DRBG dependent on request size?

I am trying to understand the CTR DRBG specification in NIST SP 800-90A. It seems slightly different to a pure stream cipher in that the key and counter are reset after each generate call using the ...
2
votes
2answers
90 views

Given PRNG $G(s)$, why is $G(s) || G(s+1)$ not a PRNG?

I have given a pseudorandom Generator $G(s)$, $|s|=n$ whose expansion $l(n)$ is $>2n$. I also know that $G^\prime(s) := G(s_1,\ldots,s_{\lfloor\frac{n}{2}\rfloor})$ is a pseudorandom generator. Now ...
7
votes
2answers
166 views

Hardware Random Numbers - How to convert Voltage signal into binary?

I have a physical unit, e.g. a resistor. I bias it with current and measure the voltage. Let us assume that the fluctuations ($\Delta V=V-<V>$) of this voltage signal are random. Now, $\Delta V$ ...
4
votes
5answers
125 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 ...
3
votes
1answer
52 views

gpg --gen-random quality level: is higher “better”?

The GNU Privacy Guard manual pages have this to say about using the gpg --gen-random 0|1|2 count command: Emit count random bytes of the given quality level 0, ...
2
votes
1answer
66 views

Collision likelihood from /dev/urandom for VMs using the same underlying hardware

We have multiple virtual machines sharing the same physical hardware. We use /dev/urandom for session key generation. But a question comes up: if ...
2
votes
1answer
72 views

Does Mersenne Twister generate homogeneous numbers?

I have been assigned to generate 15000+ homogeneous and uniform random numbers for a work. I have been searching if Mersenne Twister generate homogeneous distribution of numbers but I don't find ...
10
votes
0answers
153 views

AMD and RDRAND instruction

The latest AMD programmer manuals, dated June 2015, include the RDRAND instruction in the instruction set. For completeness, it lacks ...
10
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
25 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) ...
4
votes
1answer
192 views

Is it possible to find a Mersenne Twister seed given only the first output?

Suppose I have a Mersenne Twister seeded with some unknown value, and I’ve been given the first output. Given only this first output, and no other information, is it possible to derive the unknown ...
3
votes
2answers
807 views

Generating unbiased numbers with a biased six sided die?

Eve takes a fair six-sided die and adds some heavy paint to the side of the die with the 6 on it. This results in a biased die that rolls a 6 with probability 2/7, and each other number (1-5) with ...
8
votes
3answers
487 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, ...
2
votes
1answer
92 views

Stream Ciphers and cycling questions

For all PRNGs (including CSPRNGs) lets say there is a sequence x, y, z, then when the PRNG cycles back to x, then the sequence following it will be exactly the same as before. Is this true for all ...
1
vote
1answer
128 views

Is it possible to create “non overlapping” RNGs?

For example, let's say I want two cryptographically strong RNGs (R1 and R2). And I want them to have the following property: R1 (resp. R2) will never generate the same random number twice. R1 (resp. ...
2
votes
1answer
53 views

Has there been any research on entropy efficient information-theoretically secure PRNGs?

I have an idea for an research project, but I am first wondering if it has been researched or implemented before. I think I have a way to come up with a set of PRNG algorithms which have the ...
4
votes
2answers
768 views

Is it secure to concatenate two 16-bit random numbers into a 32-bit one?

I'm working on a security application for RF modules aimed to protect a communication between an autarkic sensor and a line-powered receiver against MITM (man-in-the-middle attacks). I decided to use ...
5
votes
1answer
504 views

How to generate unique (random) numbers that can be traced back to a unique source number?

I need to generate unique (random) numbers that I can trace back to a unique source number. For example: source number A can generate numbers A1, A1, A3 .... Am source number B can generate numbers ...
2
votes
1answer
55 views

Using Skein as PRNG

I have read that the Skein hash can be used for quite a few different functions, including a PRNG. Would using the 1024 Skein hash to return 16KB of data be appropriate for a PRNG? Or would it only be ...
2
votes
2answers
176 views

Is it okay to include relative time for true random number generation?

Similar questions have been asked regarding use of time in true random number generation, but I'd like to consider using time as just one source of entropy, complementing others. True random number ...
5
votes
2answers
341 views

Is Curve25519 vulnerable to private key exposure in the case of a bad RNG?

I'm really excited by what I've learned of advancements in elliptic-curve cryptography. Curve25519 seems to be a great choice at this point in time, but if I recall correctly, some elliptic curve ...
4
votes
2answers
87 views

A periodic PRNG based on hash function?

I need a PRNG which provides 128 bytes numbers. Let's say that given a symmetric key $K$ and an internal state $s$ I use the PRF HMAC-SHA512 this way: The output is PRNG($K, s$) = ...
8
votes
2answers
516 views

How feasible would it be to generate 300 million public key pairs in 8 hours?

Assume there is a hypothetical situation where one would need to generate hundreds of millions of public key pairs of reasonable strength in a limited time. What would be required in terms of ...
4
votes
3answers
90 views

How does the birthday paradox apply to random keys?

I'm developing a web app where I wish to use pseudorandom keys for items, perhaps akin to Imgur. I was thinking about how many combinations I need to reduce the chance of someone guessing any random ...
2
votes
0answers
42 views

Testing PRNG quality from ECC public keys?

Having a large set of ECC public keys $P_i = n_iB$ on a fixed curve $E$ over a prime field, is there a way to determine if coefficients $n_i$ were generated using a bad PRNG? In other words, can a ...
3
votes
1answer
49 views

Prove that H(s) = G(!s) is a CPRNG if G(s) is one

Given a cryptographic pseudo-random number generator $G$, prove that $H$ with $H(s) = G(!s)$ is also a cryptographic pseudo-random number generator. Here $s$ is a binary string; $!s$ is its ...
6
votes
1answer
171 views

Can it ever be impossible to invert a PRNG?

I've read about the possibility of inverting the Mersenne Twister after 624 numbers of output. 624 matches the state size of my implementation of the Twister. Coincidence? If the generator only ...
3
votes
1answer
98 views

How to generate a large random number from smaller ones?

I'm using a function randInt that takes as input two integers as upper and lower bounds (inclusive) and outputs a pseudorandom number in that interval. ...
4
votes
1answer
148 views

Cryptographic random numbers for key generation

I am trying to understand how a cryptographic library works (for example, one that provides assymetric encryption such as RSA), but I'm running into a few problems about the key-generation. There are ...
2
votes
1answer
132 views

Is there a secure source of entropy on a typical microcontroller?

On a device that does not have a hardware RNG, what is the best source for entropy? Some options and pitfalls floating around: Use the ADC to read something analog: can become deterministic if ...
2
votes
2answers
160 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 ...
-2
votes
1answer
83 views

Shuffleless PRNG function with non-repeating values?

I need a simple PRNG function of type: Integer = PRNG(n, maxval) as I would like to count from 0 to maxval, not in a linear manner, but in a pseudorandom manner where I still use every value, but ...
6
votes
1answer
524 views

Can hash functions improve a lousy PRNG?

If I have a poor PRNG, could a cryptographically secure hash function make a better output? Say the PRNG can produce as much numbers as you wish, reasonably random, but not good enough to be used in ...