Hash.absorb3: def of bend-collections-laws-crypto@1.0.0.0 Import: import bend-collections-laws-crypto@1.0.0.0/src/crypto/hash.bend as Hash Lines 481-492 of bend-collections-laws-crypto@1.0.0.0/src/crypto/hash.bend: https://jend.leeeet.dev/read.txt?path=bend-collections-laws-crypto@1.0.0.0/src/crypto/hash.bend&start_line=481&end_line=492 import Base import bend-collections-laws-crypto@1.0.0.0/src/crypto/keccak/types.bend as TK import bend-collections-laws-crypto@1.0.0.0/src/crypto/keccak/permutation.bend as P import bend-collections-laws-crypto@1.0.0.0/src/crypto/sha3/core.bend as C3 # Compress every whole block (fuel bounds the count: any fuel >= the number of # blocks reads them all; fewer leaves the rest buffered, still correct). The # chaining state and the unread bytes; orig is the list the read r started at. # q is the algorithm's round parameter (24n), kept a variable for the proofs. def absorb3(fuel: Nat, r: Read3, orig: List<&2, U32>, +q: Nat, s: TK.State) -> Sha3State: match fuel r: case 0n _: St3{s, orig} case 1n+p Short3{}: St3{s, orig} case 1n+p Blk3{w0, w1, w2, w3, w4, w5, w6, w7, w8, w9, w10, w11, w12, w13, w14, w15, w16, +rest}: absorb3(p, read3_0(rest), rest, q, P.rounds(q, 0n, C3.inject(s, w0, w1, w2, w3, w4, w5, w6, w7, w8, w9, w10, w11, w12, w13, w14, w15, w16))) Uses (9): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat 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/src/crypto/hash.bend&name=Read3 https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-crypto@1.0.0.0/src/crypto/hash.bend&name=Sha3State https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-crypto@1.0.0.0/src/crypto/hash.bend&name=read3_0 https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-crypto@1.0.0.0/src/crypto/keccak/permutation.bend&name=rounds https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-crypto@1.0.0.0/src/crypto/keccak/types.bend&name=State https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-crypto@1.0.0.0/src/crypto/sha3/core.bend&name=inject