Blamka.fBlaMka: def of bend-collections-laws-crypto@1.0.0.0 Import: import bend-collections-laws-crypto@1.0.0.0/spec/crypto/argon2/blamka.bend as Blamka Lines 21-27 of bend-collections-laws-crypto@1.0.0.0/spec/crypto/argon2/blamka.bend: https://jend.leeeet.dev/read.txt?path=bend-collections-laws-crypto@1.0.0.0/spec/crypto/argon2/blamka.bend&start_line=21&end_line=27 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/spec/crypto/blake/blake2b.bend as B # fBlaMka(x, y) = x + y + 2 * trunc(x) * trunc(y), modulo 2^64, where # trunc(x) * trunc(y) is the 64-bit product of the low 32 bits of x and y. def fBlaMka(x: T.Lane, y: T.Lane) -> T.Lane: match x y: case T.W{+xl, +xh} T.W{+yl, +yh}: +p = lane_of(Nat.mul(U32.to_nat(xl), U32.to_nat(yl))) B.add(B.add(T.W{xl, xh}, T.W{yl, yh}), B.add(p, p)) Uses (5): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.mul https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.to_nat https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-crypto@1.0.0.0/spec/crypto/argon2/blamka.bend&name=lane_of https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-crypto@1.0.0.0/spec/crypto/blake/blake2b.bend&name=add https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-crypto@1.0.0.0/src/crypto/blake/blake2b/types.bend&name=Lane