def cr.vm.fold

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

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

179# x below 2^128 to a value congruent mod p127 below 2^127 + 1
180def cr.vm.fold(x: CrU128) -> CrU128:
181  match x:
182    case CrU128{+h, +l}:
183      cr.vm.fold.pick(W.W64.is_eq(W.W64.shr(h, 63n), W.W64.one()), h, l)

Uses (5)

Used by (2)