def rel
import bend-collections-laws-crypto@1.0.0.0/spec/crypto/argon2/argon2.bend as Argon2import Base
import bend-collections-laws-crypto@1.0.0.0/spec/lib/common.bend as C
267# x = J1^2 / 2^32; y = (|W| * x) / 2^32; zz = |W| - 1 - y.
268def rel(+w: Nat, +j1: U32) -> Nat:
269 +x = C.high(32n, Nat.mul(U32.to_nat(j1), U32.to_nat(j1)))
270 Nat.sub(Nat.sub(w, 1n), C.high(32n, Nat.mul(w, x)))
Uses (6)
Used by (7)
- bend-collections-laws-crypto@1.0.0.0/spec/crypto/argon2/argon2:step
- bend-collections-laws-crypto@1.0.0.0/proofs/crypto/argon2/fill:ixs
- bend-collections-laws-crypto@1.0.0.0/proofs/crypto/argon2/fill:ixs_mid
- bend-collections-laws-crypto@1.0.0.0/proofs/crypto/argon2/index:rel_eq
- bend-collections-laws-crypto@1.0.0.0/proofs/crypto/argon2/fill:ix_lt
- …