ecc

package
v0.0.0-...-d9d7dc4 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Marshal

func Marshal(curve Curve, x, y *big.Int) []byte

Marshal converts a point into the uncompressed form specified in section 4.3.6 of ANSI X9.62.

func RecoverPoint

func RecoverPoint(x1 *big.Int, v uint) (y1 *big.Int, err error)

func SM2C

func SM2C() *eccCurve

func Unmarshal

func Unmarshal(curve Curve, data []byte) (x, y *big.Int)

Unmarshal converts a point, serialized by Marshal, into an x, y pair. It is an error if the point is not in uncompressed form or is not on the curve. On error, x = nil.

Types

type Curve

type Curve = elliptic.Curve

A Curve represents a short-form Weierstrass curve with a=-3. See https://www.hyperelliptic.org/EFD/g1p/auto-shortw.html

type CurveParams

type CurveParams = elliptic.CurveParams

CurveParams contains the parameters of an elliptic curve and also provides a generic, non-constant time implementation of Curve.

Jump to

Keyboard shortcuts

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