Limbs.reduce: def of bend-collections-laws-crypto@1.0.0.0 Import: import bend-collections-laws-crypto@1.0.0.0/src/crypto/poly1305/limbs.bend as Limbs Lines 87-92 of bend-collections-laws-crypto@1.0.0.0/src/crypto/poly1305/limbs.bend: https://jend.leeeet.dev/read.txt?path=bend-collections-laws-crypto@1.0.0.0/src/crypto/poly1305/limbs.bend&start_line=87&end_line=92 import Base # Partial reduction of 17 limbs: carry, then 2^130 q = p q + 5 q, so q is # folded back as 5 q on limb 0 and carried again. The result has limbs 0..15 # below 2^8 and a value below 5 * 2^128 < 2p. def reduce(+d: List<&2, U32>) -> List<&2, U32>: +t = carry(16n, d, 0) carry(16n, add([U32.mul(quot(16n, t), 5)], split(16n, t)), 0) Uses (7): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.mul https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-crypto@1.0.0.0/src/crypto/poly1305/limbs.bend&name=add https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-crypto@1.0.0.0/src/crypto/poly1305/limbs.bend&name=carry https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-crypto@1.0.0.0/src/crypto/poly1305/limbs.bend&name=quot https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-crypto@1.0.0.0/src/crypto/poly1305/limbs.bend&name=split