def mod32
import bend-collections-laws-crypto@1.0.0.0/src/math/w64.bend as W64import Base
import bend-collections-laws-crypto@1.0.0.0/src/math/u64.bend as W
135# a mod d for d > 0
136def mod32(+a: W.U64, +d: U32) -> U32:
137 U32.from_nat(mod_step(mod_step(U32.to_nat(U32.mod(hi(a), d)), 65536n, dig1(lo(a)), U32.to_nat(d)), 65536n, dig2(lo(a)), U32.to_nat(d)))
Uses (10)
Used by (7)
- bend-collections-laws-crypto@1.0.0.0/proofs/math/typed/w64div:mod32_value
- bend-collections-laws-crypto@1.0.0.0/proofs/math/typed/w64div:impl_mod
- bend-collections-laws-crypto@1.0.0.0/spec/math/w64:Mod32.value
- bend-collections-laws-crypto@1.0.0.0/src/math/instances:u32_mulmod
- bend-collections-laws-crypto@1.0.0.0/src/math/w64:mm_pick
- …