Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [statistical-test]

Statistical testing is used to estimate the likelihood of a hypothesis given a set of data. In cryptanalysis, statistical testing is commonly used to detect non-randomness in the data, e.g. distinguish the output of a PRNG from a truly random bitstream or to find the correctly decrypted message among several incorrect decryption attempts.

1
vote
2answers
115 views

Statistical Tests for Pseudorandom Functions

Say I have an implementation of a potential Pseudo-Random function and I want to test whether my implementation does at least not contain any obvious flaws. As far as I understand, in other ...
3
votes
2answers
84 views

How to make a hypothesis test for a simple statistical test for a certain RNG?

I'm self-studying about hypothesis test in the context of RNGs. I'm building a hypothesis test from scratch. I'm taking the simplest statistical test I can think of: how many $1$s are there in the ...
1
vote
1answer
40 views

Origin of the Chi-Squared test statistic for serial test (two bit test)

On page 181 of Handbook of Applied Cryptography Chapter Five, it states the following: The purpose of this test is to determine whether the number of occurrences of 00, 01, 10, and 11 as ...
2
votes
1answer
59 views

NIST STS incorrect results for sample files

So I wanted to check the outcome of a hardware TRNG and see if its entropy is good enough. I downloaded the source files for statistical test suit from nist.gov website, compiled them on my macOS ...
3
votes
1answer
151 views

Golomb's Randomness postulates

In Handbook of applied cryptography, Golomb's randomness postulates are given: Let $s$ be a periodic sequence of period $N$. Golomb’s randomness postulates are the following. R1: In the cycle $s_N$ ...
1
vote
2answers
231 views

Interpretation of (NIST) Non Overlapping Template Matching Test

Regarding the Non-Overlapping Template test, this test normally gives us a bunch of p-values (148 values). I would like to ask that how do we interpret those values into a single p-value for ...
1
vote
2answers
97 views

Is it possible to test 15-bit PRNG with the library TestU01?

The library TestU01 inconvenient for generators that don't produce 32-bit outputs. But is it possible to somehow test say a 15-bit generator with it? How could that be done? For instance, the ...
3
votes
3answers
136 views

Is it correct to concatenate (pseudo-)random byte values before testing them with the NIST suite or tools like dieharder?

Let's assume I have thousands of (pseudo-)random 4-byte values. The values are 4 byte random values which a blackbox device gave me. I got these values by requesting them. In between others might have ...
2
votes
0answers
44 views

Statistical test strange behaviour [closed]

Hi I'm running the dieharder test suite (this) to test an algorithm, but I've found somethings that I don't understand. This is the command that I run to test my binary file ...
2
votes
1answer
86 views

adaptation of NIST sp800-22 for short sequences

I would like to ask about the NIST test suite for randomness evaluation. The test suite consists of 15 subtests which evaluate the particular property of the sequence. In fact, each test has an ...
4
votes
1answer
87 views

Sequence test for an image cipher

I am reading a paper on security analysis of a cipher image using the paper at the following URL: https://ieeexplore.ieee.org/stamp/stamp.jsp?tp=&arnumber=8306512&tag=1 It indicates some ...
3
votes
1answer
521 views

Is there are a metric based on collisions to compare bad hash functions?

Bad hash functions are not so perfect as in the "general collision probability" hypothesis... And a general concept of "collision resistence" not need the constraint of independence between the ...
1
vote
0answers
47 views

How to perform Black box testing of a key exchange protocol?

Though obviously not an alternative for proper cryptanalysis, I was wondering about statistical/black box analysis. Should I produce a new key exchange protocol. With the same shape as Diffie-Hellman: ...
1
vote
0answers
154 views
2
votes
1answer
246 views

How can I calculate non-linearity of an s-box element wise?

First i transform the s-box into row matrix like if i have 4×4 s-box having 16 elements into 1×16 row matix then substitute the binary values in column . multiply the matrix by mobius trasformation ...
4
votes
1answer
174 views

How is the inter and the intra distance of a PUF calculated?

I was wondering, if I want to calculate the intra distance of a PUF, and I have already measured $n$ times a response to a challenge. Do I choose one reference value and compare the hamming distance ...
0
votes
1answer
115 views

Explanation of the EPC Gen2 randomness standard's first rule

When we read PRNG requirements of the EPC standard, first rule (page 57 in this link) in the documentation; Probability of a single RN16: The probability that any RN16 drawn from the RNG has ...
1
vote
0answers
94 views

LIL (PRNG) statistical test does not appear to be in a stable state [closed]

I am trying to run the LIL statistical testing tool that can be found here http://webpages.uncc.edu/yonwang/liltest/ When I execute the jar with: ...
1
vote
1answer
576 views

Quality test for an hardware source of randomness

Say that I developed an hardware source of randomness, which I would like to use to seed a cryptographically secure random number generator. How would I go about testing it? Are there standardized ...
10
votes
3answers
650 views

Estimated entropy per bit given P-value of a statistical test, and number of bits tested?

Assume that a certain statistical RNG test (say from the NIST Statistical Test Suite, Dieharder, etc..) gives us a certain P-value (per the definition [*] used in NIST Special Publication 800-22), ...
0
votes
1answer
1k views

NIST random test suite choosing bitstream length and count [closed]

First it asks for bitstream length. Usage: ./assess <stream length> <stream length> is the length of the individual bit stream(s) to be processed ...
1
vote
1answer
129 views

Plaintext for randomness evaluation of cryptographic algorithms?

I’m running an experiment to test the randomness output of many cryptographic algorithms based on INST test suite to measure the randomness of their outcome. However I’m searching to a sample data ...
5
votes
1answer
254 views

Statistical tests for PRNG that generates a sequence which is not binary

Is there a pratical application to PRNG that generates a sequence which is not a binary one? A ternary, quaternary sequence, for instance. If so, how can we test this? Is there any alternative test ...
1
vote
1answer
68 views

Determining the degree of freedom for a chi-squared test on a strict avalanche criterion matrix

I have read that the degree of freedom is calculated by subtracting 1 from the number of states a random variable can be in. I am performing a goodness of fit test on a 64*32 strict avalanche ...
4
votes
1answer
278 views

What problems with “random” data would cause this result from Ent?

I'm playing around with a novel kind of source of "random" data and Ent is currently giving me results like this: Entropy = 7.977080 bits per byte. Optimum compression would reduce the size of this ...
1
vote
1answer
619 views

Testing implementation of cryptography algorithms: Brainstorm

I wonder what kind of techniques can be used to validate implementation of cryptography algorithms? The obvious one is to run specific algorithms against publically known test vectors (i.e. from ...
0
votes
0answers
36 views

How were the diffusion statistics for norx calculated?

I was reading the norx specification and came across this section, which provides some kind of statistics about the diffusion of the norx round function. However, I don't see how these values were ...
3
votes
2answers
498 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 ...
0
votes
1answer
61 views

How to compare two CSPRNGs? [duplicate]

Let's say I am given to CSPRNGs: RNG1 and RNG2. I want to select the best one of the two for cryptography. How should I do it? Any of the two RNGs can be initialized with a secret key during tests and ...
3
votes
1answer
411 views

Avalanche effect sample size

With a fixed key size – key has 128 bits, while block size is 8 byte – how do I calculate how many different keys and texts I have to test for an cryptanalytic statistics study? Differently worded: ...
2
votes
2answers
911 views

What values constitute failing for ENT tests?

The dieharder tests give a clear PASSED, WEAK, etc and I'm wondering what those thresholds ...
3
votes
2answers
594 views

Why calculate pi to estimate randomness?

Why do testing suites calculate $\pi$ (pi) using the Monte Carlo method to determine if a series of numbers are random? As far as I can tell, the Monte Carlo method can be used to estimate $\pi$ ...
4
votes
0answers
147 views

Using machine-learning techniques for data-dependent operations in ciphers

From 'Methods of Symmetric Cryptanalysis' by Dmitry Khovratovich, The data-dependent operations are one of the most controversial design concepts. We say that an operation is data-dependent, if it ...
3
votes
1answer
101 views

Minimum number of independent trials needed to detect a bias [closed]

Suppose, I suspect that the probability of occurrence of a particular bit as $0$ is $.558$. Since, it is not $.5$, so this is possibly a bias. Now, my question is: What is the minimum number of ...
1
vote
1answer
101 views

Available programs that can verify the working of a simple substitution cipher

Is there any tool available that can test whether a simple substitution cipher is working. I will put my scenario in detail. Lets say I built a simple substitution cipher that maps 8 bit data to 16 ...
2
votes
0answers
100 views

Infer encoding mechanism from $n$-grams distance?

I have a series of obfuscated strings which across the set of strings have regions of high variance and regions of low variance – implying some encoding mechanism as opposed to an encryption procedure ...
2
votes
0answers
506 views

Chi-Squared Step of Vigenere Cipher Decryption [duplicate]

So, I have been assigned an assignment where I had to solve a Vigenere cipher. Following along with this webpage I managed to get all the way to the chi-squared step. But, that is the problem. Upon ...
16
votes
2answers
6k views

Shannon confusion and diffusion concept

I read the document(not the whole document) from Shannon where he speaks about the concepts of confusion and diffusion. I read in many places(not in the document but around the internet) that ...
4
votes
1answer
130 views

Statistical tests for pseudorandom permutations

I'm implementing a format-preserving encryption scheme similar to those described in the literature. I want to sanity test my PRP using some statistical tests like TestU01. However, I'm not sure how ...
2
votes
1answer
186 views

run length testing [closed]

Looking for guidance/references with/about calculations: I am designing a widget that creates N-bit binary sequences. My customers target spec for the sequence's minimum entropy is X bits/bit. I plan ...
3
votes
1answer
159 views

Is my implementation of a PRG at least intuitively secure?

I've devised a PRG using Bezier curves , constructed with Bernstein polynomials, and I was wondering if you guys could help me with some suggestions or constructive criticism. Basicly I take a random ...
4
votes
0answers
167 views

Feasible way to check n-dimensional equidistribution of PRNGs

I am currently gathering some test methods and test suites for random number generator qualities, and am a bit stuck at finding something feasible to test for n-dimensional equidistribution. As input ...
4
votes
4answers
864 views

Given $n$ bits, how many “truly random” sequences/numbers can be constructed?

Suppose we have $n$ bits, so we can have $2^n$ different bit sequences. Some sequences don't look random, say, all $1$ or $0$. There are also other patterns like $10101010…$, $11001100…$ and such. I'...
1
vote
0answers
117 views

Definition of a Statistical Test

In Professor Boneh's online Cryptography course at Coursera, I am a little puzzled by his definition of a statistical test where he writes: A(x) = iff |#0(x) - #1(x)| <= 10.√n Now, if – as an ...
0
votes
1answer
141 views

Testing hardware random number generators? [closed]

I would like to know how to test hardware random number generators. What techniques, tools or tricks to solve the problem ? Any practical difficulties, implementation complexities etc.
5
votes
2answers
5k views

Randomness test question from FIPS 140-1 and comparison with 140-2

In FIPS 140-1 there are 4 statistical random number generator tests (The Monobit Test, The Poker Test, The Runs Test and The Long Runs Test. Then FIPS 140-2 came along and supposedly tightened the ...
10
votes
5answers
2k views

How to prove the security of the PRNG?

Are there any realties tests or criterias that prove the security of the PRNG? What kind of tests or criteria?
2
votes
2answers
255 views

Differential privacy definition

Differential privacy defines "privacy" of a mechanism $A$ as the "closeness" of the two distribution $Pr[A(D) \in S]$ and $Pr[A(D') \in S]$ where $D,D'$ differ in one element. And the distance between ...
0
votes
2answers
573 views

Computational indistinguishability and example of non polynomial algorithm

The wikipedia page on computational indistinguishability says that two ensembles are not distinguishable if "any non-uniform probabilistic polynomial time algorithm A" cannot tell them apart. To help ...