Coordinates used when checking a primality certificate's scalar multiplication: either the point at infinity or a finite pair of natural numbers. Curve membership and reduced coordinates are checked separately.
Instances For
@[instance_reducible]
Equations
- Hex.ECPP.instReprPoint = { reprPrec := Hex.ECPP.instReprPoint.repr }
Equations
- One or more equations did not get rendered due to their size.
- Hex.ECPP.instReprPoint.repr Hex.ECPP.Point.infinity prec✝ = Repr.addAppParen (Std.Format.nest (if prec✝ ≥ 1024 then 1 else 2) (Std.Format.text "Hex.ECPP.Point.infinity")).group prec✝
Instances For
Equations
- Hex.ECPP.instBEqPoint.beq Hex.ECPP.Point.infinity Hex.ECPP.Point.infinity = true
- Hex.ECPP.instBEqPoint.beq (Hex.ECPP.Point.affine a a_1) (Hex.ECPP.Point.affine b b_1) = (a == b && a_1 == b_1)
- Hex.ECPP.instBEqPoint.beq x✝¹ x✝ = false
Instances For
@[instance_reducible]
Equations
@[instance_reducible]
Equations
- Hex.ECPP.instDecidableEqPoint.decEq Hex.ECPP.Point.infinity Hex.ECPP.Point.infinity = isTrue ⋯
- Hex.ECPP.instDecidableEqPoint.decEq Hex.ECPP.Point.infinity (Hex.ECPP.Point.affine x_2 y) = isFalse ⋯
- Hex.ECPP.instDecidableEqPoint.decEq (Hex.ECPP.Point.affine x_2 y) Hex.ECPP.Point.infinity = isFalse ⋯
- Hex.ECPP.instDecidableEqPoint.decEq (Hex.ECPP.Point.affine a a_1) (Hex.ECPP.Point.affine b b_1) = if h : a = b then h ▸ if h : a_1 = b_1 then h ▸ isTrue ⋯ else isFalse ⋯ else isFalse ⋯
Instances For
A canonical point has both coordinates below the modulus.
Equations
- Hex.ECPP.Point.canonical n Hex.ECPP.Point.infinity = true
- Hex.ECPP.Point.canonical n (Hex.ECPP.Point.affine x_1 y) = (decide (x_1 < n) && decide (y < n))
Instances For
Infinity belongs to every short curve; finite points satisfy its equation.
Equations
- Hex.ECPP.Point.onCurve n a b Hex.ECPP.Point.infinity = true
- Hex.ECPP.Point.onCurve n a b (Hex.ECPP.Point.affine x_1 y) = Hex.ECPP.onCurve n a b x_1 y
Instances For
Complete one division branch, consuming exactly one inverse witness.
Equations
- One or more equations did not get rendered due to their size.
- Hex.ECPP.addWithInverse n x₁ y₁ x₂ d v inverses = none
Instances For
Partial affine addition with explicit inverse witnesses.
Equations
- One or more equations did not get rendered due to their size.
- Hex.ECPP.add? n a Hex.ECPP.Point.infinity Q inverses = some (Q, inverses)
- Hex.ECPP.add? n a P Hex.ECPP.Point.infinity inverses = some (P, inverses)
Instances For
Replay accepts only canonical points on the supplied curve after each addition. This makes both arithmetic invariants local, executable checks.
Equations
- One or more equations did not get rendered due to their size.