Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PrivKeyFromBytes ¶
PrivKeyFromBytes PrivKeyFromBytes
Types ¶
type EllipticCurve ¶
EllipticCurve y**2 = x**3 + a*x + b % p EllipticCurve represents the parameters of a short Weierstrass equation elliptic curve.
func (*EllipticCurve) Add ¶
func (ec *EllipticCurve) Add(P, Q Point) (R Point)
Add computes R = P + Q on EllipticCurve ec.
func (*EllipticCurve) IsInfinity ¶
func (ec *EllipticCurve) IsInfinity(P Point) bool
IsInfinity checks if point P is infinity on EllipticCurve ec.
func (*EllipticCurve) IsOnCurve ¶
func (ec *EllipticCurve) IsOnCurve(P Point) bool
IsOnCurve checks if point P is on EllipticCurve ec.
func (*EllipticCurve) ScalarBaseMult ¶
func (ec *EllipticCurve) ScalarBaseMult(k *big.Int) (Q Point)
ScalarBaseMult computes Q = k * G on EllipticCurve ec.
func (*EllipticCurve) ScalarMult ¶
func (ec *EllipticCurve) ScalarMult(k *big.Int, P Point) (Q Point)
ScalarMult computes Q = k * P on EllipticCurve ec.
type PrivateKey ¶
PrivateKey represents a Bitcoin private key.
type Secp256KeyPair ¶
type Secp256KeyPair struct{}
Secp256KeyPair Secp256KeyPair
func (*Secp256KeyPair) CheckAddress ¶
func (*Secp256KeyPair) CheckAddress(address string) bool
CheckAddress 验证地址
func (*Secp256KeyPair) DeriveKeyPair ¶
func (*Secp256KeyPair) DeriveKeyPair(secret string) (*PrivateKey, error)
DeriveKeyPair 根据私钥生成秘钥对
func (*Secp256KeyPair) GenerateSeed ¶
func (*Secp256KeyPair) GenerateSeed() (string, error)
GenerateSeed 生成私钥
Click to show internal directories.
Click to hide internal directories.