curve

package
v0.1.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 2, 2022 License: BSD-3-Clause Imports: 4 Imported by: 3

Documentation

Overview

Package curve provides definitions of several models of elliptic curves defined over finite fields of large prime characteristic.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EllCurve

type EllCurve interface {
	Field() GF.Field
	Order() *big.Int
	Cofactor() *big.Int
	NewPoint(x, y GF.Elt) Point
	// Predicates
	IsOnCurve(Point) bool
	IsEqual(EllCurve) bool
	IsValid() bool
	// Arithmetic operations
	Identity() Point
	Neg(Point) Point
	Add(Point, Point) Point
	Double(Point) Point
	ClearCofactor(Point) Point
	ScalarMult(Point, *big.Int) Point
}

EllCurve represents an elliptic curve group.

type Isogeny

type Isogeny interface {
	Domain() EllCurve
	Codomain() EllCurve
	Push(Point) Point
}

Isogeny represents an isogeny between two elliptic curves.

type M

type M = *mtCurve

type Model

type Model int
const (
	Weierstrass Model = iota
	WeierstrassC
	TwistedEdwards
	Montgomery
)

func (Model) New

func (m Model) New(name string, f GF.Field, a, b GF.Elt, r, h *big.Int) EllCurve

type Point

type Point interface {
	Copy() Point
	IsIdentity() bool
	IsEqual(Point) bool
	IsTwoTorsion() bool
	X() GF.Elt
	Y() GF.Elt
}

Point represents an elliptic curve point.

type RationalMap

type RationalMap interface {
	Domain() EllCurve
	Codomain() EllCurve
	Push(Point) Point
	Pull(Point) Point
}

RationalMap represents a birational map between two elliptic curves.

type T

type T = *teCurve

type W

type W = *weCurve

type WC

type WC = *wcCurve

Directories

Path Synopsis
Package toy provides small instances of elliptic curves.
Package toy provides small instances of elliptic curves.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL