def rc_sq

bend-collections-laws-crypto@1.0.0.0 · proofs/crypto/curve25519/rel.bend:52

import bend-collections-laws-crypto@1.0.0.0/proofs/crypto/curve25519/rel.bend as Rel
import Base
import bend-collections-laws-crypto@1.0.0.0/spec/crypto/curve25519/field.bend as FS
import bend-collections-laws-crypto@1.0.0.0/src/crypto/curve25519/field.bend as F
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/limbs.bend as LM
import bend-collections-laws-crypto@1.0.0.0/proofs/crypto/curve25519/cong.bend as G

52def rc_sq(+one: Nat, +h1: {one == 1n : Nat}, +pp: Nat, +hP: {Nat.add(1n+pp, 19n) == WD.sc(255n, one) : Nat}, +x: List<&2, U32>, +a: Nat, +ox: {LM.okb(32n, x, 255n) == True{} : Bool}, +cx: G.ceq(pp, FS.value(x), a)) -> G.ceq(pp, FS.value(F.sq(x)), FS.fmul(1n+pp, a, a)):
53  rc_mul(one, h1, pp, hP, x, x, a, a, ox, cx, ox, cx)

Uses (12)

Used by (1)