secp256k1

package
v0.0.0-...-d2b8996 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2019 License: BSD-3-Clause Imports: 3 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SECP256K1

func SECP256K1() elliptic.Curve

SECP256K1 -- returns secp256k1 curve

func SecMarshal

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

SecMarshal -- convert a point into the form specified in section 2.3.3 of the SEC 1 standard. https://www.ipa.go.jp/security/enc/CRYPTREC/fy15/doc/1_01sec1.pdf

func SecUnmarshal

func SecUnmarshal(curve elliptic.Curve, data []byte) (*big.Int, *big.Int)

SecUnmarshal -- converts a point, serialised by Marshal, into an x, y pair. On error, x = nil. As described at https://crypto.stackexchange.com/a/8916.

Types

type Scalar

type Scalar struct {
	X *big.Int `json:"X"`
	Y *big.Int `json:"Y"`
}

Scalar -- point.

func NewScalar

func NewScalar(x *big.Int, y *big.Int) *Scalar

NewScalar -- creates new Scalar.

func (*Scalar) Add

func (s *Scalar) Add(curve elliptic.Curve, s2 *Scalar) *Scalar

Add -- add s2 to the s return new Scalar.

Jump to

Keyboard shortcuts

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