def fips_compress16

bend-collections-laws-crypto@1.0.0.0 · src/crypto/sha/packed/core.bend:444

import bend-collections-laws-crypto@1.0.0.0/src/crypto/sha/packed/core.bend as Core
import Base
import bend-collections-laws-crypto@1.0.0.0/src/crypto/sha/state.bend as S

444# window_compress16 specialized to the FIPS table: no constant list is walked.
445def fips_compress16(+a: U32, +b: U32, +c: U32, +d: U32,
446  +e: U32, +f: U32, +g: U32, +h: U32,
447  +i: U32, +j: U32, +k: U32, +l: U32,
448  +m: U32, +n: U32, +o: U32, +p: U32, +q: Nat, +s: S.State) -> S.State:
449  s1 = step(s, 1116352408, a)
450  s2 = step(s1, 1899447441, b)
451  s3 = step(s2, 3049323471, c)
452  s4 = step(s3, 3921009573, d)
453  s5 = step(s4, 961987163, e)
454  s6 = step(s5, 1508970993, f)
455  s7 = step(s6, 2453635748, g)
456  s8 = step(s7, 2870763221, h)
457  s9 = step(s8, 3624381080, i)
458  s10 = step(s9, 310598401, j)
459  s11 = step(s10, 607225278, k)
460  s12 = step(s11, 1426881987, l)
461  s13 = step(s12, 1925078388, m)
462  s14 = step(s13, 2162078206, n)
463  s15 = step(s14, 2614888103, o)
464  s16 = step(s15, 3248222580, p)
465  feedforward(s, kr16(q, W{p, o, n, m, l, k, j, i, h, g, f, e, d, c, b, a}, s16))

Uses (7)

Used by (75)