# Tagged Questions

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

67 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 ...
15 views

### How to set M parameter for frequency test within a block

I am using statistical tests to determine whether a sequence of bit is random, one of them is frequency test within a block. In a nutshell: Within a block of M a number of 1 is counted. A joined ...
29 views

### correlation between the timing data produced by different keys with similar inputs in AES

Is there or can there be any correlation between the timing data produced by different keys with similar inputs in AES? If yes, what type of correlation?
74 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 ...
26 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 ...
111 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 ...
61 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 ...
21 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 ...
113 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 ...
27 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 ...
152 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: ...
220 views

### What values constitute failing for ENT tests?

The dieharder tests give a clear PASSED, WEAK, etc and I'm wondering what those thresholds ...
294 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$ ...
96 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 ...
86 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 ...
59 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 ...
63 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 ...
399 views

...
438 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 ...
2k 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 ...
94 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 ...
110 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 ...
112 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 ...
87 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 ...
455 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'...
84 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 ...
94 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.
2k 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 ...
963 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?
142 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 ...
385 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 ...
342 views

### Odds of false error detection in a randomness test using the chi-squared test?

Common Criteria classifies the requirements for true Random Number Generators, and specifies how these should be tested against failures (these can occur accidentally, or following deliberate attack, ...
1k views

### How to test distribution of a hash function?

From what I've found, it is generally accepted a cryptographic hash function like SHA-2 has an evenly, randomly distributed output. Is there a way to test this without running through the entire 2^...
1k views

### Example of CHI Square test on Caesar Cipher?

I am trying to get my head round the chi square test, when used with the Caesar cipher. I started off using this formula, $$X = \sum_{i = 1}^k \frac{f_i · f'_i}{n · n'}$$ Where \$...
119 views

### How does one measure the decrease in security, if any, of RC4 when mapping to a specific range of values?

For a project using RC4, the output is to be mapped to values of 0 to 35. Thus, only 36 unique output values representing the letters A to Z and 0 to 9. To avoid bias, the RC4 byte output (with a ...
1k views

### Measuring entropy for a ciphertext only attack

When bruteforcing a password (e.g. the common attacks on DES), where you have ciphertext only, you need a way to assess whether a decrypted plaintext is the right one. I believe the EFF DES machine ...