def window_rounds
bend-collections-laws-crypto@1.0.0.0 · src/crypto/sha/core.bend:127
import bend-collections-laws-crypto@1.0.0.0/src/crypto/sha/core.bend as Core
import Base
import bend-collections-laws-crypto@1.0.0.0/src/crypto/sha/state.bend as S
127
128
129def window_rounds(n: Nat, win: ShaWindow, ks: List<&2, U32>, s: S.State) -> S.State:
130 match n win ks:
131 case 0n _ _:
132 s
133 case 1n+q _ Nil{}:
134 s
135 case 1n+q W{a, +b, c, d, e, f, +g, h, i, j, l, m, o, r, +t, +u} k <> kt:
136 +w = (small1(b) + g + small0(t) + u : U32)
137 window_rounds(q, W{w, a, b, c, d, e, f, g, h, i, j, l, m, o, r, t}, kt,
138 step(s, k, w))