def le_bytes
import bend-collections-laws-crypto@1.0.0.0/spec/crypto/poly1305.bend as Poly1305import Base
import bend-collections-laws-crypto@1.0.0.0/spec/lib/common.bend as C
58# num_to_n_le_bytes: the low n bytes of x.
59def le_bytes(n: Nat, +x: Nat) -> List<&2, U32>:
60 match n:
61 case 0n: Nil{}
62 case 1n+k: U32.from_nat(C.low(8n, x)) <> le_bytes(k, C.high(8n, x))
Uses (6)
Used by (8)
- bend-collections-laws-crypto@1.0.0.0/spec/crypto/poly1305:poly1305_mac
- bend-collections-laws-crypto@1.0.0.0/proofs/crypto/poly1305/final:bytes_le
- bend-collections-laws-crypto@1.0.0.0/proofs/crypto/poly1305/final:bytes_le_to
- bend-collections-laws-crypto@1.0.0.0/proofs/crypto/poly1305/final:fin_eq
- bend-collections-laws-crypto@1.0.0.0/proofs/crypto/poly1305/final:tag_eq
- …