secp256k1

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2023 License: LGPL-3.0 Imports: 9 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Curve

type Curve = types.Curve

func NewCurve

func NewCurve() Curve

type CurveImpl

type CurveImpl struct {
	// contains filtered or unexported fields
}

func (*CurveImpl) AltBasePoint

func (c *CurveImpl) AltBasePoint() Point

func (*CurveImpl) BasePoint

func (c *CurveImpl) BasePoint() Point

func (*CurveImpl) BitSize

func (*CurveImpl) BitSize() uint64

func (*CurveImpl) CompressedPointSize

func (*CurveImpl) CompressedPointSize() int

func (*CurveImpl) DecodeToPoint

func (*CurveImpl) DecodeToPoint(in []byte) (Point, error)

func (*CurveImpl) DecodeToScalar

func (*CurveImpl) DecodeToScalar(in []byte) (Scalar, error)

func (*CurveImpl) HashToScalar

func (c *CurveImpl) HashToScalar(in []byte) (Scalar, error)

func (*CurveImpl) NewRandomScalar

func (*CurveImpl) NewRandomScalar() Scalar

func (*CurveImpl) ScalarBaseMul

func (*CurveImpl) ScalarBaseMul(s Scalar) Point

func (*CurveImpl) ScalarFromBytes

func (*CurveImpl) ScalarFromBytes(b [32]byte) Scalar

ScalarFromBytes sets a Scalar from LE bytes.

func (*CurveImpl) ScalarFromInt

func (*CurveImpl) ScalarFromInt(in uint32) Scalar

func (*CurveImpl) ScalarMul

func (*CurveImpl) ScalarMul(s Scalar, p Point) Point

func (*CurveImpl) Sign

func (*CurveImpl) Sign(s Scalar, p Point) ([]byte, error)

Sign accepts a private key `s` and signs the encoded point `p`.

func (*CurveImpl) Verify

func (*CurveImpl) Verify(pubkey, msgPoint Point, sig []byte) bool

type Point

type Point = types.Point

type PointImpl

type PointImpl struct {
	// contains filtered or unexported fields
}

func NewPointFromCoordinates

func NewPointFromCoordinates(x, y secp256k1.FieldVal) *PointImpl

func (*PointImpl) Add

func (p *PointImpl) Add(b Point) Point

func (*PointImpl) Copy

func (p *PointImpl) Copy() Point

func (*PointImpl) Encode

func (p *PointImpl) Encode() []byte

func (*PointImpl) Equals

func (p *PointImpl) Equals(other Point) bool

func (*PointImpl) IsZero

func (p *PointImpl) IsZero() bool

func (*PointImpl) ScalarMul

func (p *PointImpl) ScalarMul(s Scalar) Point

func (*PointImpl) Sub

func (p *PointImpl) Sub(b Point) Point

type Scalar

type Scalar = types.Scalar

type ScalarImpl

type ScalarImpl struct {
	// contains filtered or unexported fields
}

func (*ScalarImpl) Add

func (s *ScalarImpl) Add(b Scalar) Scalar

func (*ScalarImpl) Encode

func (s *ScalarImpl) Encode() []byte

func (*ScalarImpl) Eq

func (s *ScalarImpl) Eq(other Scalar) bool

func (*ScalarImpl) Inverse

func (s *ScalarImpl) Inverse() Scalar

func (*ScalarImpl) IsZero

func (s *ScalarImpl) IsZero() bool

func (*ScalarImpl) Mul

func (s *ScalarImpl) Mul(b Scalar) Scalar

func (*ScalarImpl) Negate

func (s *ScalarImpl) Negate() Scalar

func (*ScalarImpl) Sub

func (s *ScalarImpl) Sub(b Scalar) Scalar

Jump to

Keyboard shortcuts

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