crypto

package
v0.0.1-beta4 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2019 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// CurveED25519
	CurveED25519 = "ed25519"

	// CurveP256 is the standard name for P256 Curve
	CurveP256 = "P-256"
	// SigP256 is the standard name for ES256 Signature algorithm
	SigP256 = "ES256"

	// CurveP256K is the standard name for P256K Curve
	CurveP256K = "P-256K"
	// CurveP256KAlternate is the an alternate name for P256K Curve
	CurveP256KAlternate = "SECP256K1"
	// SigP256K is the standard name for ES256K Signature algorithm
	SigP256K = "ES256K"
	// SigP256KAlternate is the an alternate name for ES256K Signature algorithm
	SigP256KAlternate = "ECDSA256"
)

Variables

This section is empty.

Functions

func CanonizeEncodeP256K

func CanonizeEncodeP256K(sig []byte) []byte

CanonizeEncodeP256K returns the canonical versions of the signature the canonical version enforce low S values if S is above order / 2 it negating the S (modulo the order (N))

func ECCoordinateFromPrivateKey

func ECCoordinateFromPrivateKey(d []byte, curveName string) (xBytes, yBytes []byte)

ECCoordinateFromPrivateKey given an elliptic curve name it will produce X and Y coordiante from D

func GetCurve

func GetCurve(name string) elliptic.Curve

Types

This section is empty.

Jump to

Keyboard shortcuts

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