Has it been Pwned

Cryptographic rounds

Shuffle a deck once and some cards that started together may still be neighbors. More passes can spread them across the deck. Many ciphers and hashes also work in passes, called rounds or steps. Each pass takes the current values and transforms them for the next one.

Watch one bit spread

Run the same mixing passes on two eight-bit inputs, A and B. At first, only their leftmost bits differ. Watch what happens as each pass mixes across a wider group.

Underlined cells differ between A and B at that stage.
  1. Input

    Change the first bit of B.

    A is 1 0 1 1 0 1 0 1. B is 0 0 1 1 0 1 0 1.

    1 of 8 bit differs

  2. Round 1

    Mix neighbors in pairs.

    A is 1 1 1 0 0 1 0 1. B is 0 0 1 0 0 1 0 1.

    2 of 8 bits differ

  3. Round 2

    Mix across pairs in each group of four.

    A is 1 1 0 1 0 1 0 0. B is 0 0 1 0 0 1 0 0.

    4 of 8 bits differ

  4. Round 3

    Mix across the two halves.

    A is 1 1 0 1 1 0 0 1. B is 0 0 1 0 0 1 1 0.

    8 of 8 bits differ

Spreading a local change across the working values is called diffusion. The diagram uses a small teaching example. In real ciphers and hashes, differences can spread unevenly or cancel, so the count need not rise in every round. The number of changed bits alone says little about whether a design is secure.

Check how the diagram mixes the bits

In each group, keep the left half. Compare it, bit by bit, with the right half. Write 0 on the right when the two bits match and 1 when they differ. This operation is called XOR. Round 1 uses groups of two, round 2 groups of four, and round 3 one group of eight.

Why researchers try fewer rounds

Researchers can run a shorter version of a design and ask whether a pattern in the inputs still leaves a detectable pattern after mixing. They may be looking for a way to recover a secret key, to recognize a cipher by its behavior, or to find two messages that share a hash.

The gap between the rounds reached by an attack and the rounds in the standard is one way to talk about a security margin. A new result can reach more rounds or lower the cost at the same count. A fraction such as seven out of ten tells you which version was studied. To judge the result, also look at the goal, the data and computing resources required, and the conditions the researchers assume. Compare round counts within the same design, since each design does different work in a round.

AES-128 uses ten rounds

AES encrypts a block using a secret key. It keeps the block in a small grid of bytes, its state. After an initial key addition, a typical round substitutes new byte values, shifts the rows, mixes each column and combines the result with values derived from the key. The last round skips the column mixing. NIST FIPS 197, Table 3 and Section 5.1.

Anthropic reported a faster key-recovery estimate for a seven-round variant. Key recovery means figuring out the secret key. The calculation assumes an impractically large amount of data from encrypting inputs the researcher can choose. The result improves the analysis at seven rounds. A claim about standard AES-128 would need evidence for all ten. Anthropic’s report, Section 4.

Seven-round AES-128 evidenceCompare seven-round AES studiesEncryption guide

SHA-256 uses 64 steps per block

SHA-256 starts with a fixed value and processes the message one block at a time. Each step combines values from the current state, the message block and fixed constants. The result of processing a block helps set the starting state for the next one. The final output is a short digest. A collision is a pair of different messages that produce the same digest. NIST FIPS 180-4, Section 6.2.

38 of 64 steps

Omer Goldzweig reports finding an actual pair that collides on the 38-step variant from the standard starting value. The successful search took 53 GPU-hours after 52,300 vCPU-hours of preparation. Goldzweig’s preprint.

Read the 38-step evidence

39 of 64 steps

Jiaying Gong and colleagues estimate how much work a search for a collision would take on a 39-step variant. Their result is a cost model. Compare that with the colliding pair and measured times in the 38-step report. Gong and colleagues’ preprint.

Read the 39-step analysis

What a full SHA-1 collision looks like

In 2017, the SHAttered team published two different PDFs with the same digest under standard SHA-1, all 80 steps per block. That is direct evidence against the collision resistance of the deployed hash. In the SHA-256 examples, the reported collision and estimate both target shorter variants of SHA-256. The SHAttered paper.

Read the full SHA-1 caseHash functions guideCompare recent hash research

Three questions to ask about a claim

Which version did they study?
Name the construction, the round count and its starting conditions. AES used inside a hash answers a different question from AES used to encrypt.
What did the researchers achieve?
Spotting a pattern, recovering a key and finding a collision are distinct results. Look for what the researchers actually computed and what they estimated.
What would it take in practice?
Check the required inputs, time, memory and preparation. Compare them with the conditions an attacker would face in the system you care about.

A worked reading of new SHA-3 and SHAKE collision estimates