def fips_compress16
mylsm-lsm-store@0.6.0.1 · src/hub_sha/core.bend:743
import mylsm-lsm-store@0.6.0.1/src/hub_sha/core.bend as Core
import Base
import mylsm-lsm-store@0.6.0.1/src/hub_sha/state.bend as S
743
744def fips_compress16(
745 +word_a: U32,
746 +word_b: U32,
747 +word_c: U32,
748 +word_d: U32,
749 +word_e: U32,
750 +word_f: U32,
751 +word_g: U32,
752 +word_h: U32,
753 +word_i: U32,
754 +word_j: U32,
755 +round_constant: U32,
756 +word_l: U32,
757 +word_m: U32,
758 +count: U32,
759 +word_o: U32,
760 +word_p: U32,
761 +rounds_left: Nat,
762 +state: S.State
763) -> S.State:
764 s1 = step(state, 1116352408, word_a)
765 s2 = step(s1, 1899447441, word_b)
766 s3 = step(s2, 3049323471, word_c)
767 s4 = step(s3, 3921009573, word_d)
768 s5 = step(s4, 961987163, word_e)
769 s6 = step(s5, 1508970993, word_f)
770 s7 = step(s6, 2453635748, word_g)
771 s8 = step(s7, 2870763221, word_h)
772 s9 = step(s8, 3624381080, word_i)
773 s10 = step(s9, 310598401, word_j)
774 s11 = step(s10, 607225278, round_constant)
775 s12 = step(s11, 1426881987, word_l)
776 s13 = step(s12, 1925078388, word_m)
777 s14 = step(s13, 2162078206, count)
778 s15 = step(s14, 2614888103, word_o)
779 s16 = step(s15, 3248222580, word_p)
780 feedforward(state, kr16(rounds_left, W{word_p, word_o, count, word_m, word_l, round_constant, word_j, word_i, word_h, word_g, word_f, word_e, word_d, word_c, word_b, word_a}, s16))