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
105 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 ...
user avatar
  • 101
0 votes
1 answer
101 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 ...
user avatar
4 votes
3 answers
240 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....
user avatar
0 votes
0 answers
25 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/...
user avatar
1 vote
1 answer
51 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 ...
user avatar
  • 99
0 votes
1 answer
51 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-...
user avatar
  • 303
2 votes
1 answer
82 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 ...
user avatar
  • 21
0 votes
0 answers
73 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 ...
user avatar
  • 303
1 vote
1 answer
56 views

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

Would secrets.choice be random enough to pick winners in a raffle?
user avatar
  • 113
-1 votes
2 answers
63 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
user avatar
  • 17
2 votes
1 answer
50 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) ...
user avatar
0 votes
1 answer
48 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. ...
user avatar
2 votes
0 answers
76 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 ...
user avatar
2 votes
1 answer
86 views

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

What is the likelihood of getting the same result from /dev/random?
user avatar
1 vote
1 answer
70 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 ...
user avatar
1 vote
1 answer
41 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 ...
user avatar
  • 99
2 votes
2 answers
397 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 ...
user avatar
  • 23
0 votes
1 answer
93 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 ...
user avatar
1 vote
1 answer
75 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 ...
user avatar
  • 111
2 votes
1 answer
44 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
user avatar
  • 205
0 votes
1 answer
35 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 ...
user avatar
  • 103
2 votes
1 answer
82 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 ...
user avatar
  • 21
0 votes
0 answers
21 views

Witness Recovery in SPDZ Offline Phase

I am currently reading SPDZ: https://eprint.iacr.org/2011/535.pdf. The MPC protocol uses an encryption scheme $\operatorname{Enc}_{\operatorname{pk}}(x,r)$ based on Brakerski, V. Vaikuntanathan (...
user avatar
1 vote
1 answer
57 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 ...
user avatar
2 votes
3 answers
193 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 ...
user avatar
  • 121
1 vote
3 answers
209 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-...
user avatar
  • 2,089
0 votes
1 answer
78 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 ...
user avatar
  • 421
1 vote
2 answers
73 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 ...
user avatar
4 votes
1 answer
218 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, ...
user avatar
2 votes
1 answer
63 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 ...
user avatar
2 votes
1 answer
97 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 ...
user avatar
  • 480
1 vote
0 answers
108 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 ...
user avatar
  • 11
3 votes
2 answers
227 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 ...
user avatar
2 votes
2 answers
191 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 ...
user avatar
  • 143
0 votes
1 answer
92 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 ...
user avatar
3 votes
1 answer
106 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 ...
user avatar
3 votes
2 answers
459 views

Difference between Non-uniformly random and Uniformly random

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 ...
user avatar
  • 133
1 vote
1 answer
125 views

Incrementing nonces vs regular nonces?

I have recently been studying up on the lorawan protocol for IoT devices. LoraWAN has a handshake, and then communication can commense. Messages are encrypted and MAC'ed. When encryption and MAC's are ...
user avatar
1 vote
1 answer
56 views

Generate unique random values for unqiue input values

I'm going to generate unique random values based per a range of unique input values. In other words I have range of input values which these numbers are part of a series (like a range of serial ...
user avatar
  • 165
1 vote
2 answers
111 views

Does Endianness matter in NIST SP800-22 test?

I am curious about Randomness test suite. One of the famous randomness test suite, DIEHARDER, said that Endianness does not matter for a "GOOD" random generator. Note that this is not the ...
user avatar
  • 123
0 votes
0 answers
41 views

Mersenne twister word size and degree of recurrence combination

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?
user avatar
-1 votes
1 answer
79 views

Neural Network based on pseudorandom number

Recently, I read this paper NEURAL NETWORK BASED CRYPTOGRAPHY. Under the section 3.1 it said: The aim is to improve the randomness of the random numbers generated by any algorithm using an NN. In ...
user avatar
1 vote
3 answers
83 views

Derivating random numbers from random numbers

If I have a "truly random number" $K$ of $L$ bits (whatever "truly random" means... is it a value from a normal distribution a truly random number, or only uniform distributions ...
user avatar
1 vote
1 answer
51 views

Are there on-line ways to use a block cipher to generate unique $n$ bits that guarantee collision-freeness for $2^n$ times?

$n$ is a run-time variable chosen each time the user runs the implementation. One way I can think is to use any block cipher, say AES, as a seeded CSPRNG to randomly shuffle list of numbers $0, 1, \...
user avatar
  • 519
2 votes
1 answer
84 views

Does grouping password characters for readability decrease entropy?

For example, for a randomly generated password of 28 lowercase letters, which is about 128 bits of entropy, how would adding a space after every four characters affect it? ...
user avatar
  • 123
0 votes
0 answers
79 views

Cryptographic Random Beacon VS Random Oracle

Let's start with what I mean by cryptographic random beacon (RB). A RB is a protocol among some parties who generate a random value all together such that: these parties do not trust each other the ...
user avatar
  • 315
6 votes
4 answers
487 views

A source of randomness that anyone can independently, conveniently and robustly access?

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 ...
user avatar
  • 335
0 votes
1 answer
48 views

Random sampling vs incrementing randomness in cryptographic protocols

As an example to my question, I post the ECDSA signing algorithm for reference (from wikipedia) to sign a message $m$: Calculate $e = H ( m )$. Select a random integer $k \in [ 1 , n − 1 ] $ ...
user avatar
  • 164
0 votes
2 answers
216 views

What are the fastest algorithms that sample from the uniform distribution?

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 ...
user avatar
1 vote
0 answers
83 views

Sentinel ("trick") values for lattice attack on DSA with biased k (MSB)

I'm studying lattice attack using this sage script. There are 2 options in script: LSB and MSB. The most interesting option for me is MSB. It recovers private key with less then 100 signatures ...
user avatar

1
2 3 4 5
10