SHA-256 ROUND TRIP
One round as a reversible circuit
FWD
BWD
FIPS
POWER
INPUT
TRANSPORT
LOAD
RUN
STEP
STEP
RUN
ROUND BOARD Each gate y ← y ⊞ f(x) leaves x unchanged, so y ← y ⊟ f(x) undoes it. Read right to left, the board is the inverse of the paper, (2.8)–(2.12).
INSPECTOR the last step, worked out
EQUATIONS numbers as in the paper
LEFT TO RIGHT · THE FORWARD ROUND
- 1–4T₁ = h ⊞ Σ₁(e) ⊞ Ch(e, f, g) ⊞ Kt ⊞ Wt(1.5)
- 5e′ = d ⊞ T₁(1.7)
- 6–7a′ = T₁ ⊞ Σ₀(a) ⊞ Maj(a, b, c) = T₁ ⊞ T₂(1.6, 1.7)
- 8b′ = a, c′ = b, d′ = c, f′ = e, g′ = f, h′ = g(1.7)
RIGHT TO LEFT · THE INVERSE
- 8a = b′, b = c′, c = d′, e = f′, f = g′, g = h′(2.8)
- 7–6T̂₁ = a′ ⊟ Σ₀(b′) ⊟ Maj(b′, c′, d′)(2.9, 2.10)
- 5d = e′ ⊟ T̂₁(2.11)
- 4–1h = T̂₁ ⊟ Σ₁(f′) ⊟ Ch(f′, g′, h′) ⊟ Kt ⊟ Wt(2.12)
GATE LEVEL
BITS = WORDS
SCRATCH = 0
REVERSES