def split
import bend-collections-laws-crypto@1.0.0.0/src/crypto/poly1305/limbs.bend as Limbsimport Base
75# Limb n (the top one) reduced to its low 2 bits, i.e. the value below 2^130
76# when n = 16; quot is the rest of limb n, the multiple of 2^130.
77def split(n: Nat, +xs: List<&2, U32>) -> List<&2, U32>:
78 match n:
79 case 0n: [U32.and(hd0(xs), 3)]
80 case 1n+k: hd0(xs) <> split(k, tl(xs))
Uses (6)
Used by (7)
- bend-collections-laws-crypto@1.0.0.0/src/crypto/poly1305/limbs:reduce
- bend-collections-laws-crypto@1.0.0.0/proofs/crypto/poly1305/step:pass2_ev
- bend-collections-laws-crypto@1.0.0.0/proofs/crypto/poly1305/step:reduce_ev
- bend-collections-laws-crypto@1.0.0.0/proofs/crypto/poly1305/step:reduce_inv
- bend-collections-laws-crypto@1.0.0.0/proofs/crypto/poly1305/step:reduce_top
- …