curve256k1

package
v1.0.2078 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsOnCurve

func IsOnCurve(p *Point) bool

Types

type Point

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

func (*Point) FromJacobian

func (p *Point) FromJacobian(v *PointJacobian) *Point

FromJacobian reverses the Jacobian transform. If the point is ∞ it returns 0, 0.

func (*Point) NewGenerator

func (p *Point) NewGenerator() *Point

func (*Point) NewPoint

func (p *Point) NewPoint(x, y *big.Int) (*Point, error)

func (*Point) Set

func (p *Point) Set(q *Point) *Point

func (*Point) ToBig

func (p *Point) ToBig(x, y *big.Int) (xx, yy *big.Int)

type PointJacobian

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

func (*PointJacobian) Add

func (p *PointJacobian) Add(a, b *PointJacobian) *PointJacobian

Add set p = a + b.

func (*PointJacobian) Double

func (p *PointJacobian) Double(v *PointJacobian) *PointJacobian

Add set p = a + a.

func (*PointJacobian) Equal

func (p *PointJacobian) Equal(v *PointJacobian) int

func (*PointJacobian) FromAffine

func (p *PointJacobian) FromAffine(v *Point) *PointJacobian

FromAffine returns a Jacobian Z value for the affine point (x, y). If x and y are zero, it assumes that they represent the point at infinity because (0, 0) is not on the any of the curves handled here.

func (*PointJacobian) ScalarBaseMult

func (p *PointJacobian) ScalarBaseMult(k []byte) *PointJacobian

func (*PointJacobian) ScalarMult

func (p *PointJacobian) ScalarMult(q *PointJacobian, k []byte) *PointJacobian

func (*PointJacobian) Select

func (p *PointJacobian) Select(a, b *PointJacobian, cond int) *PointJacobian

func (*PointJacobian) Set

func (*PointJacobian) Zero

func (p *PointJacobian) Zero() *PointJacobian

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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