Poly1305.absorb: def of bend-collections-laws-crypto@1.0.0.0 Import: import bend-collections-laws-crypto@1.0.0.0/spec/crypto/poly1305.bend as Poly1305 Lines 105-111 of bend-collections-laws-crypto@1.0.0.0/spec/crypto/poly1305.bend: https://jend.leeeet.dev/read.txt?path=bend-collections-laws-crypto@1.0.0.0/spec/crypto/poly1305.bend&start_line=105&end_line=111 import Base # for each block: n = le_bytes_to_num(block | [0x01]); a += n; a = (r * a) % p def absorb(bs: List<&2, List<&2, U32>>, +r: Nat, a: Nat) -> Nat: match bs: case Nil{}: a case b <> rest: +n = le_num(List.append(&2, U32, b, [1])) absorb(rest, r, modp(Nat.mul(r, Nat.add(a, n)))) Uses (8): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List.append https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.add 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 https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-crypto@1.0.0.0/spec/crypto/poly1305.bend&name=le_num https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-crypto@1.0.0.0/spec/crypto/poly1305.bend&name=modp