This tool verifies that Standard SHA-256, SHA256SW, and Convoluted SHA-256 implementations produce identical final hashes and intermediate round states, with zero Hamming distance across all rounds.
Run the "abc" test vector to confirm that all implementations produce the correct hash.
Standard SHA-256: Uses registers a..h
, where e = d + T1
, a = T1 + T2
, and Ch(e,f,g) = (e & f) ^ (~e & g)
. The state is updated each round by shifting registers.
SHA256SW: Uses sliding windows a[i..i+3] = [d,c,b,a]
and b[i..i+3] = [h,g,f,e]
, computing b[i+4] = T1 + d
, a[i+4] = T1 + T2
, where T1 = h + S1(e) + Ch(e,f,g) + K[i] + W[i]
and Ch(e,f,g) = (e & f) + (~e & g)
. The addition in Ch
is equivalent to XOR due to mutual exclusivity of (e & f)
and (~e & g)
. The sliding window ensures identical state evolution.
Convoluted SHA-256: Uses a single state array with obfuscated operations: Ch(e,f,g) = (e & f) + (~e & g)
, a rearranged Maj(a,b,c) = ((a ^ c) & b) ^ (a & c)
, and a SHA256SW.c
-like update (e_new = d + T1
, a_new = T1 + T2
). All operations are equivalent, producing identical states.
This tool confirms that all implementations produce identical hashes and intermediate states, with zero Hamming distance, validating their equivalence to Standard SHA-256.
Content by Research Identifier: 7B7545EB2B5B22A28204066BD292A0365D4989260318CDF4A7A0407C272E9AFB