Reversible State-Coordinate Encodings for SHA-256:
Formal Properties, Schedule Compatibility, and Constraint-Model Complexity

SRFP311T1 Collaboration
October 2026
[Download PDF Version]
Abstract. Building on the unrolled \(A_i\)-only description of SHA-256 used by Indesteege, Mendel, Preneel, and Rechberger (SAC 2008), we compare four algebraically equivalent ways of encoding reduced-round fixed-target state reachability, together with a fifth factored pilot: an explicit eight-register representation, a forward compact two-sequence representation, the established \(A\)-only state-first form, and a control-first form using scalar \(b\)-words with message-schedule residuals. We restate the exact triangular control-to-round-word bijection and sequential schedule-completion property as a self-contained account of established round algebra, rather than claiming a new SHA-256 transformation. A dependency-free symbolic-DAG audit counts declared 32-bit variables, explicit equations, shared word-level operators, and expression depth under a fixed construction policy. Across five round counts and five encodings, 125 planted legal-message model evaluations pass and 100 deliberately invalid expanded schedules are rejected. At 64 rounds, the \(A\)-only, unfactored control-first, and factored-control variants exhibit operator depths 16, 320, and 11, respectively, although their reachable operator counts agree. These source-level observations are supplemented by a limited three-seed, unpinned Z3 comparison with planted prefix hints and complete terminal states. We prove an exact two-boundary reconstruction threshold at \(h=r-8\) hints and demonstrate it computationally. This is not a general SAT/SMT speedup claim; no full-round cryptanalytic improvement is established.
Keywords: SHA-256; state-coordinate encodings; symbolic DAGs; message schedule; constraint solving; reproducibility.

1. Introduction

The SHA-256 compression function uses sixty-four rounds over eight 32-bit registers and a deterministic expansion of sixteen input words into sixty-four round words [1]. There is no single privileged algebraic encoding of these operations for satisfiability or formal analysis: equivalent descriptions can expose different variables, nonlinear expression depths, and opportunities for common-subexpression elimination. This distinction matters when formulating fixed-target state reachability and internal-state constraints.

The alternative “unrolled” representation of SHA-256 is not new. Indesteege, Mendel, Preneel, and Rechberger derive the \(A_i\)-only state description and its message-modification equation in their SAC 2008 work [2]. Mendel, Nad, and Schläffer subsequently develop automated local-collision methods for reduced SHA-256 [3]. We adopt the established coordinates rather than claim their rediscovery as a contribution.

Research question. Do different, logically equivalent state-coordinate encodings lead to meaningfully different constraint representations, and, after bit-blasting and optimization, different solver performance? We compare four baseline formulations—explicit eight-register, forward compact two-sequence, \(A\)-only state-first, and \(b\)-control-first with residual constraints—plus a fifth, factored \((a,b)\) residual pilot designed to keep operator depth bounded.

Contribution and scope. This draft gives (i) a unified, verifiable derivation of the known scalar and \(A\)-only representations; (ii) an exact triangular parameterization and schedule-residual account, presented as a systematization of known message modification; (iii) a reproducible word-level DAG audit of the four baselines and the factored fifth encoding, with planted-witness consistency checks; and (iv) a three-seed exploratory Z3 pilot and a design for more extensive solver benchmarks. We do not infer improved cryptanalysis from the number of declared words or from these symbolic counts. Neither a new SHA-256 collision nor a practical full-round fixed-target inversion is claimed.

2. Notation and the conventional round function

All word additions and subtractions are in \(\mathcal{W}=\mathbb{Z}/2^{32}\mathbb{Z}\). Write \(\operatorname{ROTR}_n\) for 32-bit rotation and \(\operatorname{SHR}_n\) for logical right shift. The SHA-256 functions are

\[ \begin{aligned} \Sigma_0(x)&=\operatorname{ROTR}_{2}(x)\oplus\operatorname{ROTR}_{13}(x)\oplus\operatorname{ROTR}_{22}(x),\\ \Sigma_1(x)&=\operatorname{ROTR}_{6}(x)\oplus\operatorname{ROTR}_{11}(x)\oplus\operatorname{ROTR}_{25}(x),\\ \sigma_0(x)&=\operatorname{ROTR}_{7}(x)\oplus\operatorname{ROTR}_{18}(x)\oplus\operatorname{SHR}_{3}(x),\\ \sigma_1(x)&=\operatorname{ROTR}_{17}(x)\oplus\operatorname{ROTR}_{19}(x)\oplus\operatorname{SHR}_{10}(x),\\ \operatorname{Ch}(x,y,z)&=(x\wedge y)\oplus(\neg x\wedge z),\\ \operatorname{Maj}(x,y,z)&=(x\wedge y)\oplus(x\wedge z)\oplus(y\wedge z). \end{aligned} \]

Let \((A_i,B_i,C_i,D_i,E_i,F_i,G_i,H_i)\) be the registers before round \(i\). For round constant \(K_i\) and round word \(W_i\) the conventional transition [1] is

\[ \begin{aligned} T_{1,i}&=H_i+\Sigma_1(E_i)+\operatorname{Ch}(E_i,F_i,G_i)+K_i+W_i,\\ T_{2,i}&=\Sigma_0(A_i)+\operatorname{Maj}(A_i,B_i,C_i),\\ (A_{i+1},B_{i+1},C_{i+1},D_{i+1})&=(T_{1,i}+T_{2,i},A_i,B_i,C_i),\\ (E_{i+1},F_{i+1},G_{i+1},H_{i+1})&=(D_i+T_{1,i},E_i,F_i,G_i). \end{aligned} \label{eq:standard} \]

For an ordinary 512-bit block, \(W_0,\dots,W_{15}\) are its sixteen words, and

\[ W_i=W_{i-16}+\sigma_0(W_{i-15})+W_{i-7}+\sigma_1(W_{i-2}),\qquad 16\leq i\leq63. \tag{1} \]

For analyses with \(r<64\), we take the first \(r\) standard constants and schedule words. If \(r\leq16\), \(W_0,\ldots,W_{r-1}\) are unconstrained round words.

3. Scalar-state coordinates and exact equivalence

Prior-art attribution. Equations (2)–(3) are a reindexing of the standard unrolled SHA-256 round identities; Indesteege et al. give the corresponding \(A\)-only state and message-word equations in their Equations (12)–(14) [2]. Our notation makes the intermediate \(E\)-sequence explicit and places the message-schedule residuals in the same coordinate system. The following equivalence theorem is included for completeness, not as a claim to invent the recurrence.

Define sequences \(a_0,\ldots,a_{r+3}\) and \(b_0,\ldots,b_{r+3}\) by

\[ \begin{aligned} (A_i,B_i,C_i,D_i)&=(a_{i+3},a_{i+2},a_{i+1},a_i),\\ (E_i,F_i,G_i,H_i)&=(b_{i+3},b_{i+2},b_{i+1},b_i). \end{aligned} \]

In particular, for the fixed initial chaining state \(h=(h_0,\ldots,h_7)\),

\[ (a_3,a_2,a_1,a_0)=(h_0,h_1,h_2,h_3),\quad (b_3,b_2,b_1,b_0)=(h_4,h_5,h_6,h_7). \]

The two scalar identities for each \(0\leq i

\[ \boxed{a_{i+4}=b_{i+4}-a_i+\Sigma_0(a_{i+3})+\operatorname{Maj}(a_{i+3},a_{i+2},a_{i+1})} \tag{2} \]
\[ \boxed{W_i=b_{i+4}-K_i-a_i-b_i-\Sigma_1(b_{i+3})-\operatorname{Ch}(b_{i+3},b_{i+2},b_{i+1}).} \tag{3} \]

Equivalently, (2) may be displayed in the five-tap form

\[ b_k=a_k+a_{k-4}-\Sigma_0(a_{k-1})-\operatorname{Maj}(a_{k-1},a_{k-2},a_{k-3}),\quad k\geq4. \tag{4} \]
Theorem 3.1 (Equivalence of round descriptions). Fix an initial state, \(1\leq r\leq64\), and arbitrary round words \(W_0,\ldots,W_{r-1}\in\mathcal{W}\). A trajectory satisfies the conventional SHA-256 round equations if and only if its corresponding scalar sequences satisfy (Boundary), (2), and (3) for every round.
Substitute (Mapping) into the conventional \(E\)-update. Since \(E_{i+1}=b_{i+4}=a_i+T_{1,i}\), we obtain \(T_{1,i}=b_{i+4}-a_i\). Substitution into the \(A\)-update \(a_{i+4}=T_{1,i}+T_{2,i}\) yields (2). Solving the definition of \(T_{1,i}\) for \(W_i\) yields (3). Conversely, the reconstructed \(W_i\) gives \(T_{1,i}=b_{i+4}-a_i\); (2) then gives the conventional \(A\)-update, and the remaining six registers shift as in (Mapping). Hence the transitions agree exactly.
Remark 3.2 (Reversibility and terminology). When \(W_i\) is known, one conventional SHA-256 round is invertible as a state transition: the shifted registers recover seven preceding registers and the remaining register is recovered by modular subtraction. The coordinates above do not linearize the entire SHA-256 function. Although modular additions are linear over the additive group of \(\mathcal{W}\), the Boolean \(\operatorname{Ch}\)/\(\operatorname{Maj}\) gates and the mixture of XOR-rotations with modular addition are not globally linear over a single common algebraic structure.

4. Exact triangular controllability

Fix an initial state \(h\) throughout this section and define controlled inputs

\[ u_i:=b_{i+4},\qquad 0\leq iChoose the controls \(u_0,\ldots,u_{r-1}\) arbitrarily. Equation (2) computes \(a_4,\ldots,a_{r+3}\) in increasing index order. Equation (3) then computes \(W_0,\ldots,W_{r-1}\). Let \(\mathcal T_{h,r}:\mathcal{W}^r\to\mathcal{W}^r\) denote this map \(u\mapsto W\).

Lemma 4.1 (Prefix dependence). For every \(0\leq i \[ W_i=u_i+\Phi_{h,i}(u_0,\ldots,u_{i-1}). \tag{5} \]
The assertion for \(a_0,\ldots,a_3\) follows from (Boundary). For \(k\geq4\), recurrence (2) expresses \(a_k\) using \(b_k=u_{k-4}\) and earlier \(a\)-words, proving the claim by induction. Substituting into (3), \(b_{i+4}=u_i\) occurs once with coefficient \(+1\); all other terms depend only on earlier controls and the fixed IV. Their sum defines \(\Phi_{h,i}\).
Theorem 4.2 (Triangular bijection with unit diagonal). For any fixed IV and \(1\leq r\leq64\), \(\mathcal T_{h,r}\) is a bijection. Its inverse is given recursively by \[ u_i=W_i-\Phi_{h,i}(u_0,\ldots,u_{i-1}),\qquad i=0,\ldots,r-1. \] No assumptions about collision resistance, message expansion, or numerical linearization are needed.
Equation (5) determines \(u_0\) uniquely from \(W_0\), then \(u_1\) uniquely from \(W_1\) and \(u_0\), and so forth. Induction gives a unique preimage for every element of \(\mathcal{W}^r\). Every step is valid because adding or subtracting a fixed element of \(\mathcal{W}\) is a bijection.
Corollary 4.3 (Exact diagonal perturbation). Hold all controls except \(u_j\) fixed and replace \(u_j\) by \(u_j+\Delta\). Then \(W_i\) is unchanged for every \(ij\) need not change linearly.
Apply (5) to the unchanged prefixes and to \(i=j\).
Remark 4.4 (Not a GF(2) linearization). The word triangular describes dependency order and a unit additive coefficient, not superposition of arbitrary bit flips. Both \(\Phi_{h,i}\) and the inverse recurrence may be highly nonlinear. A binary influence matrix obtained by single-bit perturbations is therefore not, in general, an exact linear system for simultaneous modifications.

5. Sequential message-schedule compatibility

For \(16\leq i

\[ \operatorname{R}_i=W_i-W_{i-16}-\sigma_0(W_{i-15})-W_{i-7}-\sigma_1(W_{i-2})\in\mathcal{W}. \tag{6} \]

An arbitrary scalar trajectory is a legal SHA-256 message trajectory through \(r\) rounds exactly when every \(\operatorname{R}_i\) vanishes.

Proposition 5.1 (Unit-leading-coefficient residual). For each \(16\leq i
By Lemma 4.1, \(W_i=u_i+\Phi_{h,i}(u_0,\ldots,u_{i-1})\). Every other round-word index appearing in (6) is strictly smaller than \(i\) and hence depends only on the earlier controls. Grouping those terms gives the formula; set \(u_i=-\Psi_{h,i}\).
Theorem 5.2 (Sequential schedule completion). Fix a chaining state \(h\) and \(16\leq r\leq64\). Each choice of the first sixteen controls \((u_0,\ldots,u_{15})\in\mathcal{W}^{16}\) admits exactly one extension \((u_{16},\ldots,u_{r-1})\) for which every residual \(\operatorname{R}_{16},\ldots,\operatorname{R}_{r-1}\) is zero. Consequently, the schedule-compatible controlled trajectories have exactly \(|\mathcal{W}|^{16}=2^{512}\) elements and are in bijection with the 512-bit message blocks.
The first sixteen controls determine \(W_0,\ldots,W_{15}\) by Theorem 4.2. For \(i=16,\ldots,r-1\), compute the expanded word from (1). Proposition 5.1 gives exactly one \(u_i\) that makes the reconstructed \(W_i\) equal the expanded word. This constructs a valid extension uniquely. Conversely, each legal \(r\)-round schedule is determined by its first sixteen \(W\)-words, which correspond bijectively to the first sixteen controls.

The theorem is a restatement of the deterministic SHA-256 message expansion in scalar coordinates. Its useful analytical consequence is that the \(r-16\) schedule residuals are sequentially solvable when controls are ordered forward, even though a solver enforcing a prescribed terminal state may face a coupled, nonlinear system.

6. Terminal-state reconstruction and boundary constraints

The scalar coordinates also give a simple deterministic backward identity. Solving (4) for the word four steps earlier yields

\[ a_{k-4}=b_k-a_k+\Sigma_0(a_{k-1})+\operatorname{Maj}(a_{k-1},a_{k-2},a_{k-3}). \tag{7} \]
Proposition 6.1 (Four-word backward peel). Given a complete terminal register state at round \(r\geq4\), the values \(a_r,\ldots,a_{r+3}\) and \(b_r,\ldots,b_{r+3}\) are known. Applying (7) for \(k=r+3,r+2,r+1,r\) uniquely reconstructs \(a_{r-1},a_{r-2},a_{r-3},a_{r-4}\), respectively.
For \(k=r+3\) all \(a\)-terms on the right have indices at least \(r\) and are terminal words. This determines \(a_{r-1}\). Descending \(k\) by one at each step requires only already-known or already-reconstructed words. All operations are deterministic modular additions and Boolean evaluations.

The peeling statement should not be confused with solving a prescribed fixed-target SHA-256 instance. For a fixed initial IV \(h\) and an \(r\)-round legal schedule, the message selects a point in \(\mathcal{W}^{16}\). Imposing a specified eight-word terminal register state adds eight coupled conditions on those choices. A count of input and output words does not by itself prove that a particular target is reachable, nor that finding an input is efficient.

For the one-block compression function, write the final state before feed-forward as \(S_r(h,M)\) and define

\[ \operatorname{Compress}_r(h,M)=h+S_r(h,M). \]

Addition is wordwise modulo \(2^{32}\). A NIST-IV compression fixed point requires \(S_{64}(\mathrm{IV}_{\mathrm{NIST}},M)=0\). An internal-state fixed point instead requires \(S_{64}(\mathrm{IV}_{\mathrm{NIST}},M)=\mathrm{IV}_{\mathrm{NIST}}\). Neither is established here. Full SHA-256 hashing also requires standard padding and length encoding [1].

7. Source-level encoding audit and factored pilot

The five encodings express the same fixed-IV, \(r\)-round state-reachability problem: a complete terminal working state is prescribed from an independently evaluated legal SHA-256 message, and all round words beyond the first sixteen must obey the standard schedule. Four are the original baseline models; the fifth is a factored-control pilot proposed by the dependency-depth audit. The following declarations specify precisely which words are solver-level inputs and which are derived expression-DAG nodes.

  1. Explicit eight-register. Declare eight state words at the end of each round, including six explicit copy/shift equations, and all \(r\) round words. Constrain all eight round updates, \(r-16\) schedule equations, and eight terminal words: \(9r\) declared words and \(9r-8\) equalities.
  2. Forward compact \((a,b)\). Declare two updated state words per round and all \(r\) round words. Constrain two update equations per round, the schedule equations, and the terminal words: \(3r\) declared words and \(3r-8\) equalities.
  3. Established \(A\)-only state-first. Declare \(r\) updated \(a\)-words, compute every \(b\)-word nonrecursively from the five-tap relation, and derive each \(W_i\) as an expression. Constrain only \(r-16\) schedule residuals and eight terminal words: \(r\) declared words and \(r-8\) equalities.
  4. Unfactored control-first \((b\to a\to W)\). Declare \(r\) updated \(b\)-controls, recursively substitute for the \(a\)-words using the five-tap relation, and derive all \(W_i\). Constrain the schedule residuals and terminal words: \(r\) declared words and \(r-8\) equalities.
  5. Factored \((a,b)\) residual pilot. Declare both \(a_k\) and \(b_k\) at each round; impose the \(r\) five-tap equalities, but reconstruct \(W_i\) as expressions rather than declaring independent round-word variables. Constrain the \(r-16\) schedule residuals and eight terminal words: \(2r\) declared words and \(2r-8\) equalities.

All word arithmetic is exact modulo \(2^{32}\). Declared-word counts exclude constants and derived DAG nodes, and do not predict the number of variables after SMT lowering or bit-blasting. The factory hashes only syntactically identical expressions; it does not perform algebraic normalization or semantic common-subexpression elimination.

Table 1: Expanded source-level audit of the four original encodings. “Vars” = declared 32-bit inputs; “Eq” = explicit word equalities; “Ops” = reachable, syntactically hash-consed word-operator nodes; “Depth” = maximum operator-chain length. Neither depth nor ops count is a CNF-size or runtime measurement.
\(r\)EncodingVarsEqOpsDepth
168-register1441364168
16forward \((a,b)\)48404175
16\(A\)-only168495
16control-first16819380
198-register1711635338
19forward \((a,b)\)57495346
19\(A\)-only191142516
19control-first191143695
248-register2162087288
24forward \((a,b)\)72647296
24\(A\)-only241672916
24control-first2416729120
328-register28828010408
32forward \((a,b)\)968810416
32\(A\)-only3224104116
32control-first32241041160
648-register57656822888
64forward \((a,b)\)19218422896
64\(A\)-only6456228916
64control-first64562289320

Bounded versus recursive expression depth. In the \(A\)-only encoding, every updated \(a_k\) is a declared variable. Consequently, a derived \(b_k\) depends on a bounded five-word \(a\)-window rather than a chain of earlier derived \(a\)-words; \(W_i\) and its schedule-residual expression likewise have bounded nesting. Under our exact builder and depth convention, the maximum reachable depth is 16 for \(19\le r\le64\). For unfactored control-first, however, each derived \(a_k\) recursively depends on earlier derived \(a\)-words. The measured longest chain has depth exactly \(5r\) for \(16\le r\le64\) (depths 80, 95, 120, 160, and 320 in Table 1). These are syntactic word-level operator depths, not proofs of solver propagation complexity; a solver may introduce shared intermediate variables and flatten both descriptions.

Boundary-based dead-node elimination. At \(r=16\) there are no message-schedule residual equations. In the \(A\)-only model the terminal \(a\)-words are declared directly, and only the four terminal \(b\)-expressions need to be evaluated; the reconstructed \(W_i\) do not enter any constraint and are removed by reachability pruning. This gives 49 reachable operator nodes, versus 193 in unfactored control-first and 417 in forward \((a,b)\). At \(r=19\), the schedule constraints reactivate more of the early scalar trajectory, but \(A\)-only still uses 425 nodes against 436 control-first nodes. This is a property of the specific boundary problem and expression construction, related to backward terminal peeling; it is not a general proof that \(A\)-only SAT instances will be smaller.

Convergence of reachable operator counts, not DAG isomorphism. At \(r=24,32,64\), the forward compact, \(A\)-only, and unfactored control-first models each have exactly 729, 1041, and 2289 reachable word-operator nodes, respectively. The equality also holds componentwise for addition/subtraction, Boolean AND, XOR, rotations, shifts, and complement. An additional deterministic sweep for every integer \(16\le r\le64\) shows that the \(A\)-only and control-first totals first coincide at \(r=20\), while the forward compact model joins them at \(r=24\), and the equalities persist through \(r=64\). These are equal operation histograms under the present builder, not identical node sets and not a graph-isomorphism theorem. In particular, different maximum depths rule out operator-label-preserving DAG isomorphism. The observed convergence suggests that, once enough schedule equations are active, reachability pruning removes little of the derived expressions; the effect of the variable/equality partition and compiled representation still needs direct solver measurement.

Schedule-tap omissions and an exact operation-count identity. For a truncated instance ending after round \(r\), define the set of round-word indices appearing explicitly in at least one active schedule equality and its complement among the sixteen independently specified message words:

\[ \begin{aligned} \mathcal{T}_r&=\bigcup_{i=16}^{r-1}\{i,i-2,i-7,i-15,i-16\},\\ \mathcal{U}_r&=\{0,\ldots,15\}\setminus\mathcal{T}_r. \end{aligned} \]

The index \(i\) is included because \(W_i\) occurs on the left of the schedule equality; the other four indices are precisely the right-hand-side schedule taps. The set \(\mathcal U_r\) records explicit schedule non-incidence, not independence of the corresponding message words from the final chaining state.

Proposition 7.1 (Schedule-gap identity for the audited DAG builder). Let \(F_r\) and \(C_r\) denote, respectively, the reachable word-operator node counts of the forward compact and unfactored control-first encodings produced by the artifact's Factory with a fixed initial state and eight prescribed terminal words. For every integer \(16\le r\le64\),
\[ F_r-C_r=14|\mathcal U_r|. \tag{8} \]
The difference per unreferenced round word, ordered by {add/subtract, AND, XOR, rotate-right, shift-right, NOT}, is exactly \((5,2,3,3,0,1)\). In particular, for \(24\le r\le64\),
\[ F_r=C_r=39r-207, \tag{9} \]
and the \(A\)-only and factored residual encodings have the same total count in this interval.
This is a statement about the exact finite expression templates and syntactic reachability policy in the released code. Each early \(W_m\) not appearing in a schedule equality is a declared round-word input in the forward compact encoding, so its associated round-update expression is retained. In the control-first encoding, the inverse round-word reconstruction for such an \(m\) has no path to a schedule or terminal equality and is pruned. Comparing the two corresponding round-word operator templates gives the per-word histogram \((5,2,3,3,0,1)\), totaling fourteen; all other reachable operator contributions agree in the count. The tap-incidence set determines exactly which inverse expressions are reachable, proving (8) by a finite template-and-incidence count. At \(r=24\), \(\mathcal U_{24}=\varnothing\) and both totals equal 729. For each subsequent round, the hash-consed templates contribute 39 additional reachable operators (11 add/subtract, 4 AND, 11 XOR, 10 rotates, 2 shifts, 1 NOT), establishing \(729+39(r-24)=39r-207\). The accompanying verification script checks the claimed histogram identities at every integer round count in the stated range.
Table 2: Exact schedule-tap omissions and the resulting forward-minus-control source-level operation counts. The final missing word is \(W_8\) at \(r=23\).
\(r\)\(|\mathcal U_r|\)\(F_r-C_r\)\(\mathcal U_r\)
1616224\(0,1,\ldots,15\)
1712168\(2:8,\,10:13,\,15\)
189126\(3:8,\,11:13\)
19798\(4:8,\,12,13\)
20570\(5:8,\,13\)
21342\(6,7,8\)
22228\(7,8\)
23114\(8\)
2400\(\varnothing\)

The result is a source-level projection/pruning property, not a generic circuit-complexity lower bound, a demonstration of cryptanalytic “shielding” of state differences, or an SMT speedup. In particular, a \(W_m\) omitted from the explicit residuals can still affect the terminal state through the forward recurrence. This suggests a concrete benchmark question: does the syntactic pruning survive preprocessing and bit-blasting across solver implementations?

Table 3: Fifth model pilot: factored \((a,b)\) control with reconstructed \(W_i\) and explicit five-tap equalities. Depth remains bounded under the tested source-level construction.
\(r\)VarsEqOpsDepth
1632241935
19383043611
24484072911
326456104111
64128120228911

Factored controls: a fifth encoding hypothesis. The measured depth contrast motivates an intermediate encoding: retain both \(a_k\) and \(b_k\) as explicit state variables, enforce the five-tap equality at each step, but eliminate independent \(W_i\) variables by reconstructing round words from those states. This introduces \(2r\) primary words and \(2r-8\) equalities, while limiting the measured maximum operator depth to 11 for \(19\le r\le64\). It has exactly the same reachable operator counts as unfactored control-first for every tested \(r\in[16,64]\), despite different dependency depths. This is a testable design trade-off between explicit equalities and deeply substituted expressions, not evidence of a SAT/SMT speedup.

Audit and validity checks. The original four-encoding artifact was supplemented with a fifth-model pilot. Five planted legal-message witnesses per model and round count, for \(r\in\{16,19,24,32,64\}\), satisfy every equation (125 model evaluations). For \(r>16\), modifying the expanded word \(W_{16}\) yields incompatible schedules rejected by every model (100 checks). A separate deterministic scan of round counts 16 through 64 checks the operation-count convergence and depth patterns. These checks are semantic consistency tests on planted reachable states; they do not establish equivalence for every possible assignment by exhaustive enumeration, nor do they measure CNF complexity.

Planned solver benchmark. Compare all five encodings on paired fixed-target and independently defined internal-trajectory tasks, using at least fifty planted seeds per round count with identical targets, solver versions, settings, and machine. Record preprocessing statistics, auxiliary bit variables and clauses after lowering, solver wall time, median and interquartile range, and PAR-2 with prespecified timeout handling. Include explicit SAT, UNSAT, and unknown outcomes; independently replay any candidate witnesses. Particular attention should go to \(A\)-only versus unfactored and factored control-first: identical pre-lowering operation counts do not settle the trade-off between recursive depth, explicit constraints, and solver learning.

8. Algorithms and reproducible validation

The accompanying Python artifact implements both the scalar construction and a conventional eight-register forward replay. A separate test harness reimplements the conventional round core, independently feeds legal expanded schedules into both representations, generates arbitrary control trajectories, and checks final SHA-256 digests against the Python standard-library hashlib implementation for several padded messages.

# Listing 1: State-first reconstruction for r arbitrary round words. All arithmetic is mod 2^32.
input: IV h, controls u[0..r-1]
a[0..3], b[0..3] := reversed halves of h
for k = 4 .. r+3:
    b[k] := u[k-4]
    a[k] := b[k] - a[k-4] + Sigma0(a[k-1]) + Maj(a[k-1], a[k-2], a[k-3])
for i = 0 .. r-1:
    W[i] := b[i+4] - K[i] - a[i] - b[i] - Sigma1(b[i+3]) - Ch(b[i+3], b[i+2], b[i+1])
output: a, b, W
# Listing 2: Sequential legal-schedule completion from sixteen controls.
input: IV h, initial controls u[0..15], round count r >= 16
reconstruct a, b, W for the first 16 rounds
for i = 16 .. r-1:
    wanted := W[i-16] + sigma0(W[i-15]) + W[i-7] + sigma1(W[i-2])
    u[i] := wanted - Phi_i(u[0..i-1])
    compute a[i+4], b[i+4], W[i] from the scalar equations
    assert W[i] == wanted
output: schedule-compatible trajectory

Test protocol. A fixed PRNG seed of 20261031 generates 25 valid-message and 25 arbitrary-control test cases for each of \(r\in\{1,4,8,16,17,19,32,64\}\). The tests cover (a) round-trip reconstruction from a legal message, (b) forward replay of arbitrary controls using their reconstructed \(W\), (c) the exact unit-diagonal perturbation property, and (d) agreement between the schedule-validity predicate and explicit expansion. The full-digest reference check uses messages of lengths 0, 3, 6, 55, 56, 120 bytes, covering single- and multiple-block padding cases. Tests are deterministic and use no external packages.

Table 4: Results from the included deterministic validation harness. “Pass” means all cases in that row passed. These are functional tests, not solver-speed benchmarks.
Validation categoryTrialsResult
Valid-message round-trip (scalar versus standard rounds)200Pass
Arbitrary-control round replay200Pass
Exact triangular, unit-diagonal perturbation200Pass
Schedule residual versus expansion consistency200Pass
Full SHA-256 digests versus hashlib6Pass

Explicit schedule-incompatibility example. For \(r=19\), seed 2026, otherwise random controls, and overrides \(b_{13}=\mathtt{00000000}\), \(b_{14}=\mathtt{FFFFFFFF}\), the reconstructed round words replay exactly in the conventional round engine. However, their three schedule residuals are

\[ (\operatorname{R}_{16},\operatorname{R}_{17},\operatorname{R}_{18})=(\mathtt{8745760A},\mathtt{906D380E},\mathtt{7193B91C}). \]

They are nonzero; the controlled trajectory is not a valid 19-round message-schedule trajectory. This counterexample makes the distinction between round invertibility and legal-message compatibility concrete.

Computational-complexity interpretation. State reconstruction and round-word reconstruction each require \(O(r)\) word operations and \(O(r)\) storage. Completion of the valid schedule also requires \(O(r)\) operations, as does the standard schedule expansion. The coordinate transformation by itself therefore does not yield an asymptotically faster general SHA-256 evaluation algorithm or a shortcut to the fixed-target boundary condition.

8.1. Exploratory solver pilot and an exact hint threshold

The preceding audit concerns source-level DAG complexity. We also performed a small, independent QF_BV runtime pilot to test whether the different encodings exploit the fixed-state boundary in practice. The source-derived quantities in this subsection are evaluated for full 32-bit words, the standard NIST IV, and the official expanded-message schedule.

Proposition 8.1 (Complete scalar reconstruction from two boundaries). Fix a starting chaining state and all eight registers after \(r\ge 8\) rounds. If the first \(h\) consecutive round words are given, where \(h\ge r-8\), then at most one complete \(r\)-round word sequence can realize both boundaries. For \(16\le r\le24\) and \(h=r-8\le16\), this unique candidate is computed directly from the first \(h\) message words and the terminal state, then checked for message-schedule consistency; no satisfiability solver is necessary.
The IV and first \(h\) round words determine the forward scalar prefix \(a_0,\dots,a_{h+3}\). The full terminal state provides \(a_r,\dots,a_{r+3}\) and \(b_r,\dots,b_{r+3}\); applying Proposition 6.1 gives \(a_{r-4},\dots,a_{r-1}\). When \(h\ge r-8\), the intervals \([0,h+3]\) and \([r-4,r+3]\) are adjacent or overlap. Thus the entire \(a\)-sequence is known. The five-tap recurrence uniquely computes all \(b_k\), and the scalar message-reconstruction identity uniquely computes every \(W_i\). If the forward and backward information conflict, or the resulting expanded schedule does not match, the given boundaries are incompatible; otherwise the candidate is unique.

For \(r=18,19,20\), the threshold \(h=r-8\) is respectively \(10,11,12\). A separate direct-reconstruction implementation recovered the exact original sixteen message words in 140 of 140 planted tests (20 seeds for each \(r=18,\ldots,24\)), after which ordinary SHA-256 forward replay and message expansion were checked. This is a correctness experiment for the proposition, not a preimage attack: the terminal target was produced from a planted message.

Solver protocol. We used Z3 4.13.3, one process at a time, with a one-second wall-clock cutoff, three independent planted-message seeds (20261031–20261033), and the definitions shared-expression SMT-LIB2 output. For each \(r\in\{18,19,20\}\) and \(h\in\{9,10,11,12\}\), exactly \(W_0,\ldots,W_{h-1}\) were fixed to their planted values, together with all eight terminal register words. The remaining message and state variables were not pinned. Five encodings were paired on precisely the same terminal target and prefix. Every reported satisfying model was independently reconstructed into \(W_0,\ldots,W_{15}\) and verified by conventional SHA-256 expansion and forward replay. The 180-trial grid was augmented with 24 selected terminal-mask comparisons.

Table 5: Verified SAT outcomes in the unpinned full-terminal Z3 pilot. Each entry is verified solutions out of three instances; 0/3 means a one-second timeout on all three instances, not UNSAT.
RoundsPrefix \(h\)Eight-reg.Forward \((a,b)\)\(A\)-onlyControl-firstFactored \((a,b)\)
1890/30/30/30/30/3
18100/33/33/30/33/3
18110/33/33/30/33/3
18123/33/33/33/33/3
1990/30/30/30/30/3
19100/30/30/30/30/3
19110/33/33/30/33/3
19120/33/33/30/33/3
2090/30/30/30/30/3
20100/30/30/30/30/3
20110/30/31/30/30/3
20120/33/33/30/33/3

At each exact boundary-completion threshold \(h=r-8\), the forward compact, \(A\)-only, and factored residual encodings solved all three seeds. Their median successful runtimes, respectively, were 17, 23, and 22 ms at \((r,h)=(18,10)\); 19, 22, and 21 ms at \((19,11)\); and 18, 26, and 24 ms at \((20,12)\). At \((18,12)\) all five encodings succeeded, with median times of 426 ms (eight-register), 17 ms (forward compact), 21 ms (\(A\)-only), 100 ms (unfactored control-first), and 23 ms (factored residual). Below the direct-completion threshold, the \(A\)-only encoding recovered one of three \(r=20,h=11\) instances in 398 ms; no solver success was observed in the other tested below-threshold cells at this cutoff.

Why the terminal mask matters. At \(r=18\) with \(h\in\{12,15\}\), a supplementary experiment compared fixing only \(A,E\) with fixing all eight terminal registers, for the \(A\)-only and factored residual models. For every such three-seed group, the full eight-register target produced 3/3 verified solutions (median 20–23 ms), whereas the \(A,E\)-only target produced 0/3 under the one-second cutoff. This observation is consistent with exact backward peeling enabling constant propagation; the runtimes alone do not establish that this is the only solver-internal cause.

Limits of the runtime evidence. Across 204 pilot trials there were 73 independently verified SAT outcomes and 131 timeouts. The instances have planted reachable targets and planted prefix hints; they are not unassisted preimage problems. Three seeds, a one-second limit, a single SMT solver and machine, and lack of bit-blast statistics are inadequate for a publishable performance ranking. A larger paired multi-solver experiment with calibrated timeouts, resource-use measurements, and at least fifty seeds is still needed.

9. Relationship to solver formulations and prior work

The \(A\)-only transformation used here was previously written down and deployed for message modification by Indesteege et al. [2]; the local-collision and automated-search lineage includes Mendel, Nad, and Schläffer [3]. We therefore treat the five-tap recurrence, its message-word inverse, and ordinary backwards peeling as known algebraic tools. The triangular and residual statements above make their dependency structure explicit for a reproducible encoding comparison; they are not presented as new cryptanalytic primitives.

Table 1 is an initial comparison of source-level descriptions, not a SAT/SMT/CP-SAT result. In particular, the longer control-first expression chains are a syntactic effect of recursively substituting the \(a\)-words; introducing intermediate equality variables can materially change the compiled solver instance. Conversely, symbolic variables in a forward model may disappear under copy propagation. It would be misleading to attribute performance to nominal variable counts alone.

Recent automated reduced-step cryptanalysis and practical collision work [4, 5, 6, 7] motivates an empirical evaluation, but this manuscript makes no claim to improve those attacks. A novel conditional invariance or performance gain over the established \(A\)-only formulation remains a hypothesis until proved and benchmarked.

10. Limitations and research questions

Our formal results show exact equivalence and a convenient parameterization, but do not establish an efficient 64-round attack. Several limitations are explicit:

  1. Not globally linear. The modular-additive triangular diagonal is exact, but interactions among carries, XOR-based rotations, \(\operatorname{Ch}\), and \(\operatorname{Maj}\) are nonlinear.
  2. No prescribed-boundary solver. Sequential schedule completion recovers the ordinary 512-bit legal-message domain; it does not solve \(S_{64}(h,M)=S^*\) for a specified \(S^*\).
  3. No collision or fixed-point certificate. No distinct full-round colliding message pair and no standard-IV compression fixed point are supplied.
  4. No established solver ranking. The three-seed Z3 pilot is too small and has too short a cutoff for reliable performance generalizations. Controlled multi-solver benchmarking with representative instances and confidence intervals is required.
  5. Coordinate identity is prior art. Indesteege et al. already introduced the \(A\)-only message-modification form. The contribution to evaluate here is the encoding methodology, not mathematical originality of the recurrence.

Natural follow-up questions are whether the scalar representation exposes useful conditional gate invariants; whether a hybrid linear/nonlinear decomposition reduces solver propagation cost; and whether it yields a demonstrably smaller independent nonlinear core under additional boundary constraints. Those are research hypotheses, not consequences of Theorem 5.2.

11. Conclusion

The unrolled SHA-256 state coordinates known from prior collision research admit a compact, triangular control-to-round-word description and a sequential schedule-completion interpretation. We have instantiated five equivalent fixed-terminal encodings and checked their satisfiable planted instances. A source-level DAG audit demonstrates differences in declared variables, equality counts, and expression depth, but these are not substitutes for compiled CNF statistics or solver run distributions. An exact two-boundary reconstruction threshold explains a sharp change in the limited hinted-target pilot, but a much larger paired five-encoding benchmark against the established \(A\)-only baseline is needed to assess solver efficiency.

Reproducibility statement

The supplied archive includes the hint-transition solver runner, clean per-trial CSV, summary tables, exact reconstruction tests, and source-level audit scripts and CSV outputs (four_encoding_audit.py, five_encoding_pilot.py, and the corresponding count/scan CSV files), the earlier sha256_reversible_state_control.py, and the functional-validation harness. Reproduce the baseline audit with python four_encoding_audit.py --outdir . --trials 5 and the fifth-model pilot with python five_encoding_pilot.py; no external Python packages are required. The extended audit tests 125 legal model evaluations and 100 incompatible schedules across rounds 16, 19, 24, 32, and 64. Reported symbolic counts depend on the explicitly documented encoding policy and cannot be compared directly to bit-blasted solver statistics.

Disclosure and manuscript status

This is a pre-submission working draft. Author attribution and any disclosure of computational resources, affiliations, acknowledgements, or repository DOI should be supplied by the submitting author. The present results should not be described as a successful collision attack or as an independently established cryptanalytic security break.

References

  1. National Institute of Standards and Technology. Secure Hash Standard (SHS). FIPS PUB 180-4, August 2015. doi:10.6028/NIST.FIPS.180-4.
  2. S. Indesteege, F. Mendel, B. Preneel, and C. Rechberger. Collisions and Other Non-random Properties for Step-Reduced SHA-256. In Selected Areas in Cryptography (SAC 2008), pp. 276–293. doi:10.1007/978-3-642-04159-4_18.
  3. F. Mendel, T. Nad, and M. Schläffer. Improving Local Collisions: New Attacks on Reduced SHA-256. In EUROCRYPT 2013, pp. 262–278. doi:10.1007/978-3-642-38348-9_16.
  4. Y. Li, F. Liu, and G. Wang. New Records in Collision Attacks on SHA-2. In EUROCRYPT 2024, pp. 158–186. doi:10.1007/978-3-031-58716-0_6.
  5. Y. Li, F. Liu, G. Wang, X. Dong, and S. Sun. The First Practical Collision for 31-Step SHA-256. In ASIACRYPT 2024, pp. 237–266. doi:10.1007/978-981-96-0941-3_8.
  6. Z. Zhang, M. Li, L. Gao, and M. Wang. Collision Attacks on SHA-256 up to 37 Steps with Improved Trail Search. In EUROCRYPT 2026, pp. 91–120. doi:10.1007/978-3-032-25333-0_4.
  7. Y. Li, F. Liu, G. Wang, and J. Shi. Pushing the Limit of Memory-Efficient Collision Attack Framework for SHA-2. In CRYPTO 2026, pp. 289–320. doi:10.1007/978-3-032-35412-9_10.