Eine aufbereitete Darstellung der Quelle

 
     
 
 
 
Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung


Quelle  EllipticCurve.lean   Sprache: Lean

 

module

public import Mathlib.Algebra.Field.ZMod
public import Mathlib.AlgebraicGeometry.EllipticCurve.Affine.Point

/-! Test for kernel reduction of elliptic curve `nsmul`

In `addOrderOf_basepoint`, the `decide` tests that the kernel is able to reduce the `nsmul`
operation on an elliptic curve to check an equality. `nsmul` on elliptic curves implements
multiplication by doubling and should be relatively fast.
-/


open WeierstrassCurve Affine Point

instance : Fact (Nat.Prime 29) := by decide
instance : Fact (Nat.Prime 37) := by decide

/- A tiny example curve from Example 3.5,
D. Hankerson, A. Menezes, S. Vanstone, Guide to Elliptic Curve Cryptography, Springer, 2004 -/

abbrev curve : Affine (ZMod 29) := ⟨0, 0, 0, 4, 20⟩

def basepoint : curve.Point :=
  .some (x := 1) (y := 5) <| by
    rw [nonsingular_iff, equation_iff]
    decide

theorem addOrderOf_basepoint : addOrderOf basepoint = 37 := by
  apply addOrderOf_eq_prime
  · decide +kernel
  · simp [basepoint]

Messung
CHZG
919910096

¤ Dauer der Verarbeitung: 0.8 Sekunden  ¤

*© Formatika GbR, Deutschland







                                                                                                                                                                                                                                                                                                                                                                                                     

 

Neuigkeiten

Aktuelles
Motto des Tages

Open Source Software


Gedichte
Musik
Bilder

Jenseits des Üblichen

Besucherstatistik

Besucherstatistik

Statistik
#Sources=1,188,068
#Domains=861,805