def ixi

bend-collections-laws-crypto@1.0.0.0 · proofs/crypto/argon2/fill.bend:96

import bend-collections-laws-crypto@1.0.0.0/proofs/crypto/argon2/fill.bend as Fill
import Base
import bend-collections-laws-crypto@1.0.0.0/src/crypto/blake/blake2b/types.bend as T
import bend-collections-laws-crypto@1.0.0.0/src/crypto/argon2/blamka.bend as G
import bend-collections-laws-crypto@1.0.0.0/src/crypto/argon2/argon2.bend as I

96# The reference block index from the pseudo-random lane pr, as the implementation computes it.
97def ixi(+r0: Bool, +s: Nat, +l: Nat, +idx: Nat, +p: Nat, +q: Nat, +sl: Nat, +pr: T.Lane) -> Nat:
98  +rl = I.ref_lane(Bool.and(r0, Nat.is_eq(s, 0n)), l, I.hi(pr), p)
99  +w = I.area(I.area_base(r0, s, sl, q), idx, Nat.is_eq(rl, l))
100  Nat.add(Nat.mul(rl, q), Nat.mod(Nat.add(I.start(r0, s, sl), I.rel(w, G.lo(pr))), q))

Uses (15)

Used by (2)