def cr.vm.norm

bend-osdev-crypto@0.1.0.0 · vmac.bend:192

import bend-osdev-crypto@0.1.0.0/vmac.bend as Vmac
import Base
import bend-osdev-word64@0.1.0.0/word64.bend as W

192# x (below 2^127 + 1) fully reduced mod p127
193def cr.vm.norm(+x: CrU128) -> CrU128:
194  match x:
195    case CrU128{h, l}:
196      cr.vm.norm.pick(Bool.and(W.W64.is_eq(h, cr.vm.m63()), W.W64.is_eq(l, W.W64.max())), x)

Uses (6)

Used by (1)