# Questions tagged [hamming]

Hamming distance is the number of symbols that differ between two strings. Hamming weight is the distance between a string and the zero string of the same length; i.e. the number of 1 bits for binary strings.

8 questions
1answer
63 views

### Caculating Correlation for CPA attack on AES

I am having some trouble understanding how to calculate the correlation coefficient for CPA attack on AES. In the article Study of Deep Learning Techniques for Side-Channel Analysis and Introduction ...
0answers
149 views

### Closest Keccak256 hashes by Hamming distance? [closed]

What are the two "closest" known Keccak256 (not SHA-3 256) hashes in terms of the Hamming distance between the pair of hashes? EDIT: This was marked as opinion based, so to clarify, when I asked this ...
1answer
122 views

### Why is PRESENT 31 rounds?

I tried a number of different inputs and keys and checked their respective hamming distances after each round. It seems PRESENT has an ideal or near ideal hamming distance (31 to 33) after only a few ...
0answers
85 views

### How many Affine function can be made from $4 \times 4$ and $8 \times 8$ S-boxes?

The nonlinearity of an S-Box is defined as the non-linearity of its vectorial Boolean Function. Let $F$ be the hamming distance between the set of all non-constant linear combinations of component ...
2answers
588 views

### BOOLEAN FUNCTIONS: generate a function $f: \{0, 1\}^n \rightarrow \{0, 1\}$ from a $n \times n$ S-Box

I want to calculate the hamming weight of a S-Box using this formula: $\text{hw}(f) = \sum_{x=0}^{2^n-1} f(x)$. Where $f: \{0, 1\}^n \rightarrow \{0, 1\}$ My problem is that I don't know how to get ...
1answer
1k views

### Calculating XOR Key Sizes

I've been playing around with the Matasano crypto challenges (cryptopals.com). I had a couple false-starts on the challenge that has you creating a program to calculate the key size of a XOR encrypted ...
1answer
3k views

### HMAC ipad and opad choice

It is written in the HMAC paper that the ipad=0x36 and opad=0x5C were chosen such that it maximize the Hamming-Distance of the ...
1answer
1k views

### Hamming Distance vs. Index of Coincidence

When analyzing a repeating-key xor cipher to find the key length, I've read about two key methods (assuming there aren't just repeating chunks of ciphertext for Kasiski's method), for some assumed key ...