def area_base

bend-collections-laws-crypto@1.0.0.0 · spec/crypto/argon2/argon2.bend:240

import bend-collections-laws-crypto@1.0.0.0/spec/crypto/argon2/argon2.bend as Argon2
import Base

240# |W|: in the first pass, the blocks of finished segments of the lane (all
241# previous blocks of the segment too, when the reference lane is the current
242# one); in later passes the last three segments of the lane, plus the current
243# segment's previous blocks for the same lane; never the block just before
244# the current one ("minus one" when the current index is the first of its
245# segment and the lane is another one).
246def area_base(r0: Bool, +s: Nat, +sl: Nat, +q: Nat) -> Nat:
247  match r0:
248    case True{}:
249      Nat.mul(s, sl)
250    case False{}:
251      Nat.sub(q, sl)

Uses (4)

Used by (8)