base_elliptic

package
v1.0.2032 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func F

func F(f ...int) *big.Int

Fx to big.Int f = [233, 74, 0] when x^233 + x^74 + 1 f = [283, 12, 7, 5, 0] when x^283 + x^12 + x^7 + x^5 + 1

func HI

func HI(s string) *big.Int

hex to *big.Int

Types

type Curve

type Curve interface {
	elliptic.Curve
	BinaryParams() *CurveParams
}

func NewCurve

func NewCurve(params *CurveParams) Curve

Create new elliptic curves over binary fields warning: params dose not validated.

`base_elliptic` uses `ellipse.CurveParams` for compatibility with `crypto.ellipse` package. But do not use the functions of `ellipse.CurveParams`. It will be panic.

type CurveParams

type CurveParams struct {
	Name    string
	BitSize int
	F       *big.Int // field
	A, B    *big.Int // params
	Gx, Gy  *big.Int // generator
	N       *big.Int // order
	H       int      // cofactor
}

Jump to

Keyboard shortcuts

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