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
1 answer
165 views

Seed of pseudo-random number generators

How is the seed of PRNGs generated? They can't be hardcoded I am guessing.
CipherNewbie's user avatar
1 vote
1 answer
2k views

Should we really rely on "Cryptographically Secure Pseudo-Random Number Generators" (CSPRNG) alone to guarantee secure random output?

Would it be over-engineering to for example hash the random numbers a random amount of times too, for instance when using the CSPRNG in client-side JavaScript? (assuming this is not the strongest ...
Neil Yoga Crypto's user avatar
4 votes
2 answers
126 views

Randomized encodings and Indistinguishability obfuscation

I want to understand the difference between randomized encodings and indistinguishability obfuscation (iO). Are randomized encodings a special type of iO?
BlackHat18's user avatar
1 vote
0 answers
33 views

Practical demonstration of random number [closed]

I am tasked with creating a practical demonstration of a random number. This means, generating a random number, then showing something practical with it. Does anyone happen to know something practical ...
user1584421's user avatar
1 vote
2 answers
151 views

Does the p value in randomness tests provide any real value?

In the dieharder test suite there are things like:- diehard_3dsphere| 3| 4000| 100|0.56011310| PASSED and in the NIST IID (brief mode) and randomness ...
Paul Uszak's user avatar
  • 15.2k
1 vote
0 answers
170 views

Is ChaCha20 + HMAC(SHA3) output indistinguishable from randomness?

I was wondering, if the output of following type of ChaCha + HMAC scheme is indistinguishable from randomness: ...
The amateur programmer's user avatar
0 votes
1 answer
47 views

Precise heuristic for size of a uniform sample in $(\mathbb{Z} / N \mathbb{Z})^\times$

I'm primarily a mathematicians dipping my toes into cryptography, and I have often seen/heard cryptographers use the heuristic that a uniformly random sample $a$ from $(\mathbb{Z} / N \mathbb{Z})^\...
stillconfused's user avatar
2 votes
1 answer
251 views

Uniform rejection sampling by shifting or rotating bits from CSPRNG output, safe?

Given a CSPRNG (arc4random, using ChaCha20 keystream), one want to use rejection sampling to get random number on a smaller range avoiding modulo bias (arc4random_uniform()). OpenBSD's ...
Yann Droneaud's user avatar
0 votes
1 answer
130 views

ChaCha Single-Use RNG with All Zero Plaintext + Nonce

I am creating an internal application that will be used to generate and manage self-signed certificates and certificate authorities. Its primary use will be for generating certificates used in SSL ...
Goodies's user avatar
  • 145
0 votes
2 answers
164 views

CS(P)RNG uniqueness

I recently read a StackOverflow post about a CS(P)RNG generating sixteen bytes of random data. The OP wanted this data to be random and unique. One of the answers said that uniqueness and randomness ...
Bram's user avatar
  • 155
1 vote
1 answer
114 views

Derive independent values using block cipher

Suppose having an arbitrary $GF(2^n)$ element $x$. Its distribution is unknown. The task is to derive two $GF(2^n)$ elements $y$ and $z$, that have uniform distribution and are independent from each ...
Georgy Firsov's user avatar
0 votes
2 answers
121 views

Vigenere applied to encrypted data

What happens if you encrypt data with a good cypher that produces a cyphertext that looks random (say, AES but avoiding ECB mode), and then apply a Vigenere cypher to the encrypted random-looking data?...
reed's user avatar
  • 101
2 votes
1 answer
101 views

Security level of the hash of the sum of two uniformly random keys

I generate two uniformly random 127-bit integers $a$ and $b$. I calculate $c=a+b$, which means $c$ can always be represented as a 128-bit integer. $c$ will not be uniformly randomly distributed, but I ...
knaccc's user avatar
  • 4,712
1 vote
1 answer
144 views

Randomness of recursive sequence generation

How good from a randomness point of view are recursively generated sequences using good encryption algorithms? Let us say I take AES128 which generates good random sequences of outputs for counter ...
Viren Sule's user avatar
0 votes
0 answers
10 views

What's the best approach to make PRNGs favourably deterministic a.k.a. biased and how to protect yourself against this? [duplicate]

I mean this has certainly been implemented by some scummy PRNG developers, which thought of the economics behind it (especially in the casino and similar businesses). So it might be even legal in some ...
Sir Muffington's user avatar
0 votes
1 answer
261 views

Using system time in nano-seconds as source of entropy in a smart contract

I am working on a smart-contract to be deployed on ETH chain. I am using an oracle(not the company!) system to get the information from off-chain (outside of the blockchain). Basically, we can think ...
Marci-man's user avatar
  • 101
0 votes
1 answer
136 views

Is this pseudo random function any good and/or original? [closed]

I designed this pseudo-random function algorithm that takes a uint64 and returns a uint64. I'd like to know if it is any good ...
Andrew Tomazos's user avatar
4 votes
3 answers
957 views

Hotbits vs. Random.org vs. Anything else?

I was searching for a random seed to use with a pseudo-random number generator (not trying to encrypt anything). I went to the following web sites: https://www.fourmilab.ch/hotbits/secure_generate....
brethvoice's user avatar
0 votes
0 answers
31 views

How many number of sequences (sample size) should be selected for randomness testing of bock cipher with 256 bits key and block length?

I am working on randomness testing of block cipher. I have gone through the NIST two papers of randomness testing of AES candidate algorithm, links are given below https://csrc.nist.gov/csrc/media/...
Maria Ejaz's user avatar
1 vote
1 answer
67 views

About two sequence conversion methods in NIST 800-90B

I am reading the 800-90B document. In particular, I'm looking at Chapter 5, the chapter on checking that samples conform to IID. There are 11 tests such as Excursion Test Statistic and Number of ...
pioneer's user avatar
  • 315
0 votes
1 answer
100 views

Randomness and authentication on short value outputs (48 bits)

I want to implement a client that generates random 48-bit values and send them as broadcast messages. We assume also there is a legitimate receiver getting those values (so, there is some sort of pre-...
Jimakos's user avatar
  • 735
2 votes
1 answer
185 views

Observations about ENT's Chi Squared test on my own RNG—and HotBits's score

Basic question: ENT seems to trip up generators that pass NIST 800-22 and maybe even dieharder. How do the latter two test suites miss such an obvious failure? There are two things I want to mention ...
Adam's user avatar
  • 59
0 votes
0 answers
96 views

Synchronized random number generation

Let me try to reformulate the problem, as it might help a bit. The requirements are the following: At the beginning of their connection, the two end-points perform a Diffie-Hellman to derive with a ...
Jimakos's user avatar
  • 735
1 vote
1 answer
128 views

Is Python's secrets module random enough for a raffle?

Would secrets.choice be random enough to pick winners in a raffle?
Someone's user avatar
  • 115
-1 votes
2 answers
130 views

predict random keys using python [closed]

How can I write a program in python to predict the random key (urandom) that is used for encryption? I tried to search and I couldn’t find anything related to guessing and predicting urandom in python
Yara's user avatar
  • 17
2 votes
1 answer
111 views

What is the methodology for selecting symbol bit length and window size when performing Shannon Entropy Analysis?

When performing Shannon Entropy analysis on something like an RNG or a file, you must: Select a symbol bit length and number of samples would will perform analysis on at a time (IE: windows size) ...
Liam Kelly's user avatar
0 votes
1 answer
185 views

Implementation of the chaotic map to produce (pseudo)-random number

For my project I used Henon map to generate (pseudo)-random number. I used the following code to generate the matrix of (pseudo)-random number. ...
WhyMeasureTheory's user avatar
2 votes
0 answers
111 views

Extractor and Min-Entropy proof

I'm following a course that speaks about cryptography. In this course we talked about Min-Entropy ($H_{\infty}$) and Extractor. To show that an extractor $Ext:\{0,1\}^n \rightarrow \{0,1\}^l$ that ...
GhostMaggiore's user avatar
2 votes
1 answer
117 views

Probability of getting same result from /dev/{u}random

What is the likelihood of getting the same result from /dev/random?
AAllgood's user avatar
1 vote
1 answer
114 views

Can we apply the Pseudo Random Number (PRNG) as post processing method for True Random Number (TRNG)?

From the NIST SP 800-90B, we can use these cryptographic algorithms (HMAC, AES, Hash function) as a post-processing technique for TRNG. Besides that, can we apply the Pseudo Random Number (PRNG) as a ...
Trần An's user avatar
1 vote
1 answer
64 views

About some tests in NIST SP 800-22 rev 1a and erfc function

I'm learning the randomness test of the NIST SP 800-22 rev 1a documentation. https://csrc.nist.gov/publications/detail/sp/800-22/rev-1a/final As I was reading, a few questions came up and I put them ...
pioneer's user avatar
  • 315
2 votes
2 answers
471 views

Why do most authenticated encryption primitives expect an unpredictable and uniformly random key in order to be secure?

I've noticed that keys for authenticated encryption primitives like AES must be unpredictable and uniformly random in order to be secure. IV values and seeds for PRNGs also have to be unpredictable ...
Eugene's user avatar
  • 23
0 votes
1 answer
132 views

What would be the benefits of a fast PRNG that produces an 8-bit output and could pass 1 Peta Byte of the PractRand test?

Assuming that all other elements like the internal state of the algorithm are considered secured and very hard to discover from a cryptanalytic standpoint. How significant would be for the algorithm ...
Tunnel_Vision's user avatar
1 vote
1 answer
90 views

How to draw words randomly from a physical dictionary?

Suppose I have a real physical dictionary, and I want to draw words from it randomly, using dices. How should I do it? Maybe it's easier to work with a coin since it's easier to convert binary to a ...
Rafaelo's user avatar
  • 23
2 votes
1 answer
57 views

Why randomness space must be significantly larger than the commitment space |R|>>|C| in order to generate a commitment string?

Why randomness space must be significantly larger than the commitment space |R|>|C|? the picture is from https://youtu.be/IkNZWJFcfcU?t=236
Sheldon's user avatar
  • 215
0 votes
1 answer
72 views

Is it cryptographically secure to generate a ECDSA pair using username / password?

I'm thinking let's say you have a smart contract that ensures no double usernames. What's if I generate an ECDSA pair like so: Accept username and password Validate username and password Generate ...
Jack's user avatar
  • 103
2 votes
1 answer
182 views

Salsa20 encryption process

I am studying the Salsa20 algorithm and I was wondering if you could help me understanding the expansion function. I don´t understand what the Pos or stream position as I have read in other places ...
Pedro's user avatar
  • 21
1 vote
1 answer
132 views

Trimming uniformly random input for elliptic curve private keys

Imagine there is 256-bit uniform input from CSPRNG. Suppose there is a curve like secp256r1 whose curve order is slightly less than 256 bits. We cannot just ...
Paul Miller's user avatar
2 votes
3 answers
229 views

Two untrusting people want to come up with a random number

Two people want to come up with a random number. They don't trust each other nor any third party. What are the known solutions to this problem? I am a quantum cryptography student and am currently ...
Dotman's user avatar
  • 121
1 vote
3 answers
331 views

Truly Random Numbers at Scale - Overloaded memory chips generate truly random numbers for encryption

For years, truly random numbers at scale has been elusive. Thus I read this recent research https://www.newscientist.com/article/2303984-overloaded-memory-chips-generate-truly-random-numbers-for-...
Nathan Aw's user avatar
  • 2,257
0 votes
1 answer
258 views

XChaCha20 With a Zeroed Nonce?

We know that for ChaCha20 and XChaCha20, the same key can never be used with the same nonce. But let's say I use a random 256-bit key every time... Then the nonce can be whatever because the key is ...
Evan Su's user avatar
  • 429
1 vote
2 answers
80 views

Why Entropy to be defined as Joint Probability Distribution Sum?

From Stinson's book, during the demonstration of the following Theorem which says: $H(X,Y) \leq H(X) + H(Y)$, with equality if and only if $X$ and $Y$ are independent random variables. The author ...
João Víctor Melo's user avatar
4 votes
1 answer
939 views

Java: SecureRandom.getInstanceStrong() vs new SecureRandom()

Given SecureRandom class is considered suitable for use in cryptography, I consider new SecureRandom() to be secure (funny term, ...
automatictester's user avatar
2 votes
1 answer
218 views

Does Enc and Dec need to be a pseudo-random function for a scheme to be CPA secure?

I am currently going through past finals' questions as exercises for my exam and there are no solutions provided. The question I am currently doing is: Let ∏ = (Enc, Dec, Gen) be a CPA-secure ...
paul lacher's user avatar
2 votes
1 answer
176 views

Existence of algorithm predicting next bit in output sequence

Let $X = [0, 1]\cap \mathbb{Q}$, and let $f:X \rightarrow X$ be a chaotic map (i.e. the logistic map with rational parameter). My question is as follows, and is purely theoretical in nature. Pick ...
user918212's user avatar
1 vote
0 answers
274 views

How secure is it to use a 128-bit random seed to derive a 256-bit key for seeding key-pair generation?

We are developing an open-source peer-to-peer app, Mapeo, designed for users with low technical experience (and no email or phone) to collect data in offline environments. We are generating their ...
Gregor's user avatar
  • 11
3 votes
2 answers
466 views

Are PRNGs Key Derivation Functions?

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 ...
Finlay Weber's user avatar
2 votes
2 answers
1k views

Is it insecure to make nonce using random number generator and hashing algorythm with secret key like HMAC?

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 ...
krystof18's user avatar
  • 143
0 votes
1 answer
183 views

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

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 ...
Finlay Weber's user avatar
3 votes
1 answer
144 views

DIY TRNG on an embedded system for Ethereum private key generation

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 ...
Diego Hernandez Herrera's user avatar

1
2
3 4 5
11