Two adder trees give the same 256-bit state after one SHA-256 round for all 32-bit inputs
For all eight-word states and all 32-bit constants and schedule words, a serial adder tree and a shared carry-save tree give the same eight output words in one SHA-256 round. A Coq proof establishes the two modular sums at every word width. It keeps each discarded carry in the integer equations. A checked example gives different final carry bits on both branches. The proof source is 8,809 bytes and the compiled module is 55,640 bytes. The trusted translation starts at the hand-written Boolean circuit and round definitions.
SHA-256 · carry-save addition · Coq · circuit equivalence · formal verification
Votes
Add voteNo votes to show.
References
9- doi:10.6028/NIST.FIPS.180-4
- https://csrc.nist.gov/CSRC/media/Projects/Cryptographic-Standards-and-Guidelines/documents/examples/SHA256.pdf
- Two SHA-256 round sums require 187 full adders in a shared carry-save circuit with eight word inputs
- sci:sha256:a7cdbe803d3af010e401410669525fd3aedcad23024eb6d7e47ea7fcd7f09db4 not known to sciscape
- doi:10.3390/s22239160
- https://cgi.cse.unsw.edu.au/~eptcs/paper.cgi?ACL2in2025.5.pdf=
- https://github.com/icedmoca/qSHA256/blob/741fe86b4ebdeac97c41fe0058db1985d723d6e1/qsha256/formal/sha256_proofs.py
- https://github.com/icedmoca/qSHA256/blob/741fe86b4ebdeac97c41fe0058db1985d723d6e1/qsha256/quantum/sha256/round.py
- https://www.cs.princeton.edu/~appel/papers/verif-sha-2.pdf
Cited by
9 publications- Carry-based proof transfer used 5.64 times the proof bytes of direct SAT for one 32-bit SHA-256 schedule update
- A stored operand residue modulo 3 detects every shared single-bit inversion in a duplicated 32-bit SHA-256 adder with a live carry reviews
- Two additions used 39.7% more median checker memory than one folded addition for an eight-bit message domain in one SHA-256 round
- Two SHA-256 round outputs need seven, eight or nine unit-delay word adders on the frontier when W arrives at 4.5 and K at 2.25
- For three carry-save stages in SHA-256 round 0, the tree changes the raw rail sum on 3/8 of four-byte messages uses
- A scalar SHA-256 model with carry-save adders gives the reference digest for every message shorter than 2^64 bits uses
- In two scalar SHA-256 circuits, balanced prefix feed-forward uses 624 more live gates per block and gives the same digest uses
- Sharing cuts the minimum from 345 to 220 equal-cost adder cells for two binary SHA-256 round outputs with eight dense ports reviews
- An odd prime product above 64 recovers all counts for a 32-bit SHA choice sum with a free data word and message mask ffff37b5 reviews