def prev_index
import bend-collections-laws-crypto@1.0.0.0/spec/crypto/argon2/argon2.bend as Argon2import Base
295# The previous block: B[l][j - 1], or B[l][q - 1] for j = 0.
296def prev_index(+l: Nat, +q: Nat, +j: Nat, first: Bool) -> Nat:
297 match first:
298 case True{}:
299 Nat.add(Nat.mul(l, q), Nat.sub(q, 1n))
300 case False{}:
301 Nat.sub(Nat.add(Nat.mul(l, q), j), 1n)
Uses (5)
Used by (5)
- bend-collections-laws-crypto@1.0.0.0/spec/crypto/argon2/argon2:seg_go
- bend-collections-laws-crypto@1.0.0.0/proofs/crypto/argon2/fill:prev_lt
- bend-collections-laws-crypto@1.0.0.0/proofs/crypto/argon2/fill:seg_eq
- bend-collections-laws-crypto@1.0.0.0/proofs/crypto/argon2/fill:seg_len
- bend-collections-laws-crypto@1.0.0.0/proofs/crypto/argon2/index:prev_index_eq