def prefix
import bend-collections-laws-crypto@1.0.0.0/spec/crypto/poly1305.bend as Poly1305import Base
64def prefix(n: Nat, xs: List<&2, U32>) -> List<&2, U32>:
65 match n xs:
66 case 0n _: Nil{}
67 case 1n+k Nil{}: Nil{}
68 case 1n+k x <> rest: x <> prefix(k, rest)
Uses (3)
Used by (10)
- bend-collections-laws-crypto@1.0.0.0/spec/crypto/poly1305:blocks
- bend-collections-laws-crypto@1.0.0.0/proofs/crypto/poly1305/mac:take_prefix
- bend-collections-laws-crypto@1.0.0.0/spec/crypto/poly1305:poly1305_mac
- bend-collections-laws-crypto@1.0.0.0/proofs/crypto/poly1305/mac:mac_length
- bend-collections-laws-crypto@1.0.0.0/proofs/crypto/poly1305/mac:absorb_ok
- …