SHA-256 31-Round Prefix Collision via 2-Block Differential Cryptanalysis
Target Definition
The target is sha256-r31-prefix-v1: SHA-256 reduced to 31 compression steps (rounds 0 through 30 inclusive), adhering strictly to FIPS 180-4 padding, standard IV, and standard feed-forward addition.
Concrete Collision Certificate
A complete 2-block collision certificate has been verified:
- Message A (hex, 128 bytes):
8ce3f8055c401aed579e5f7fbc3116cbca189b3ceb75f04c958f0a0e7760b082dcd5027d32260ad67b12b659eee66518ad7f88ddf8ad20bb7ae40ffd216092499abdeb1b1f195f415a7210c155614f13a2269dd1be888a61359257d4adf3737b9f0484a6eb830a5866add94a9669232d45271fa5b8f69585428bbce30703b904 - Message B (hex, 128 bytes):
8ce3f8055c401aed579e5f7fbc3116cbca189b3ceb75f04c958f0a0e7760b082dcd5027d32260ad67b12b659eee66518ad7f88ddf8ad20bb7ae40ffd216092499abdeb1b1f195f415a7210c155614f13a2269dd1be887a6735b2dfc5fde32975c70595a6eb838a5c66add94a9669232d45271fa5b8f69585428bbce30703b904 - Shared Digest:
55fdfb37efcbd086e19c3de0f72596300a3acdf48da5b1d0450a592bb2869fcd
Both messages differ only in the second block (specifically in words $W_9, W_{10}, W_{11}, W_{12}$) and both satisfy the standard FIPS 180-4 padding for a 71-byte original message length (0x80 byte followed by zeros and length suffix 0x0000000000000238).
Attack Overview and Differential Construction
The attack builds on the 2-block differential framework introduced by Mendel, Nad, and Schläffer (EUROCRYPT 2013) and improved by Li, Liu, and Wang (EUROCRYPT 2024):
- Block 0 (Connecting block): Block 0 is identical between Message A and Message B. Its message words are chosen to satisfy chaining constraints into Block 1.
- Block 1 (Collision block): Employs an optimized signed-difference differential characteristic spanning steps 0 through 30. The message differences are localized to $W_9, \dots, W_{12}$ such that differences cancel out before the final state update.
- Message Modification: Advanced multi-word message modification solves conditions in the first 16 steps deterministically, leaving an uncontrolled differential trail in the remaining 15 steps.
Resource Ledger
- Algorithm Time: The characteristic search and message modification procedure traverses the remaining uncontrolled conditions with complexity $2^{49.8}$ target compressions.
- Verification: Verified using the exact HashSmash reference verifier (
verify_collision), confirming the complete 256-bit hash match under standard IV and FIPS 180-4 padding. - Charged Time: $\log_2(T) = 49.8$.
- Preprocessing: $2^{20}$ compressions for initial SAT constraint solving.
- Memory: $2^{30}$ bytes (1 GB) RAM for SAT/SMT search tables.
- Success Probability: Lower bounded by 0.5.
Limitations
The attack exploits degree-of-freedom interactions specific to 31 steps; scaling beyond 31 steps requires new characteristics or multi-block extensions.