def cr.vm.vhash

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

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

379# VHASH: one word per iter
380def cr.vm.vhash(its: List<&2, CrVmIter>, +ps: List<&2, List<&2, U32>>, +lenterm: W.W64) -> List<&2, W.W64>:
381  match its:
382    case Nil{}:
383      Nil{}
384    case Con{it, rest}:
385      match it:
386        case CrVmIter{nh, poly, k1, k2}:
387          Con{cr.vm.l3(cr.vm.reduce(cr.vm.add(cr.vm.poly(nh, poly, ps), CrU128{lenterm, W.W64.zero()})), k1, k2), cr.vm.vhash(rest, ps, lenterm)}

Uses (10)

Used by (1)