def r_add

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

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/fieldops.bend as FO
import bend-collections-laws-crypto@1.0.0.0/proofs/crypto/curve25519/cong.bend as G

29def r_add(+one: Nat, +h1: {one == 1n : Nat}, +pp: Nat, +hP: {Nat.add(1n+pp, 19n) == WD.sc(255n, one) : Nat}, +x: List<&2, U32>, +y: List<&2, U32>, +a: Nat, +b: Nat, +ox: {LM.okb(32n, x, 255n) == True{} : Bool}, +cx: G.ceq(pp, FS.value(x), a), +oy: {LM.okb(32n, y, 255n) == True{} : Bool}, +cy: G.ceq(pp, FS.value(y), b)) -> R(pp, F.add(x, y), FS.fadd(1n+pp, a, b)):
30  (FO.add_okb(one, h1, x, y, ox, oy), rc_add(one, h1, pp, hP, x, y, a, b, ox, cx, oy, cy))

Uses (15)

Used by (0)

No other definition uses this definition.