def cb32

bend-collections-laws-crypto@1.0.0.0 · proofs/crypto/curve25519/mulw.bend:61

import bend-collections-laws-crypto@1.0.0.0/proofs/crypto/curve25519/mulw.bend as Mulw
import Base
import bend-collections-laws-crypto@1.0.0.0/proofs/lib/word.bend as WD
import bend-collections-laws-crypto@1.0.0.0/proofs/crypto/curve25519/num.bend as M
import bend-collections-laws-crypto@1.0.0.0/proofs/crypto/curve25519/limbs.bend as LM
import bend-collections-laws-crypto@1.0.0.0/proofs/crypto/curve25519/poly.bend as PL

61def cb32(+one: Nat, +h1: {one == 1n : Nat}, +a: List<&2, U32>, +b: Nat, +ha: {LM.okb(32n, a, b) == True{} : Bool}) -> {PL.cb(a, Nat.mul(WD.sc(8n, one), WD.sc(8n, one))) == WD.sc(21n, one) : Nat}:
62  +mm = Nat.mul(WD.sc(8n, one), WD.sc(8n, one))
63  +e1 = cb_okb(32n, a, b, mm, ha)
64  +e2 = cbn_pow(5n, mm)
65  +e3 = M.cong_sc(5n, mm, WD.sc(16n, one), mm8(one, h1))
66  Equal.trans(Nat, PL.cb(a, mm), PL.cbn(32n, mm), WD.sc(21n, one), e1, Equal.trans(Nat, PL.cbn(32n, mm), WD.sc(5n, mm), WD.sc(21n, one), e2, e3))

Uses (14)

Used by (2)