Documentation
¶
Index ¶
- func Compress(curve elliptic.Curve, x, y *big.Int) []byte
- func Marshal(curve elliptic.Curve, x, y *big.Int, compress bool) []byte
- func Secp256k1() elliptic.Curve
- func Sha256(data []byte) []byte
- type CurveParams
- func (curve *CurveParams) Add(x1, y1, x2, y2 *big.Int) (x, y *big.Int)
- func (curve *CurveParams) Double(x1, y1 *big.Int) (x, y *big.Int)
- func (curve *CurveParams) IsOnCurve(x, y *big.Int) bool
- func (curve *CurveParams) Params() *elliptic.CurveParams
- func (curve *CurveParams) ScalarBaseMult(k []byte) (x, y *big.Int)
- func (curve *CurveParams) ScalarMult(Bx, By *big.Int, k []byte) (x, y *big.Int)
- type HmacDRBG
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CurveParams ¶
type CurveParams struct {
P *big.Int // the order of the underlying field
N *big.Int // the order of the base point
B *big.Int // the constant of the KoblitzCurve equation
Gx, Gy *big.Int // (x,y) of the base point
BitSize int // the size of the underlying field
Name string
}
CurveParams ...
func (*CurveParams) Add ¶
func (curve *CurveParams) Add(x1, y1, x2, y2 *big.Int) (x, y *big.Int)
Add returns the sum of (x1,y1) and (x2,y2)
func (*CurveParams) Double ¶
func (curve *CurveParams) Double(x1, y1 *big.Int) (x, y *big.Int)
Double returns 2*(x,y)
func (*CurveParams) IsOnCurve ¶
func (curve *CurveParams) IsOnCurve(x, y *big.Int) bool
IsOnCurve reports whether the given (x,y) lies on the curve.
func (*CurveParams) Params ¶
func (curve *CurveParams) Params() *elliptic.CurveParams
Params returns the parameters for the curve.
func (*CurveParams) ScalarBaseMult ¶
func (curve *CurveParams) ScalarBaseMult(k []byte) (x, y *big.Int)
ScalarBaseMult returns k*G, where G is the base point of the group and k is an integer in big-endian form.
func (*CurveParams) ScalarMult ¶
ScalarMult returns k*(Bx,By) where k is a number in big-endian form.
Click to show internal directories.
Click to hide internal directories.