Documentation
¶
Index ¶
- func ConstructPrivateKey(data []byte, curve elliptic.Curve) (*ecdsa.PrivateKey, error)
- func DecodePublicKey(data []byte, curve elliptic.Curve) (*ecdsa.PublicKey, error)
- func EncodePublicKey(key *ecdsa.PublicKey, compressed bool) []byte
- func GenerateECKeyPair(c elliptic.Curve, rand io.Reader, alg ECAlgorithm) (*PrivateKey, *PublicKey, error)
- func ValidatePoint(curve elliptic.Curve, x, y *big.Int) error
- type ECAlgorithm
- type EthereumPrivateKey
- type EthereumPublicKey
- type PrivateKey
- type PublicKey
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConstructPrivateKey ¶
func DecodePublicKey ¶
func GenerateECKeyPair ¶
func GenerateECKeyPair(c elliptic.Curve, rand io.Reader, alg ECAlgorithm) (*PrivateKey, *PublicKey, error)
func ValidatePoint ¶ added in v1.2.3
ValidatePoint checks that (x, y) is a valid, non-infinity affine point on the given curve. Both coordinates must be non-nil, non-negative, strictly less than the field prime and satisfy the curve equation.
Types ¶
type EthereumPrivateKey ¶ added in v1.1.0
type EthereumPrivateKey struct {
*ecdsa.PrivateKey
}
type EthereumPublicKey ¶ added in v1.1.0
type PrivateKey ¶
type PrivateKey struct {
Algorithm ECAlgorithm
*ecdsa.PrivateKey
}
func (*PrivateKey) Public ¶
func (this *PrivateKey) Public() crypto.PublicKey
type PublicKey ¶
type PublicKey struct {
Algorithm ECAlgorithm
*ecdsa.PublicKey
}
Click to show internal directories.
Click to hide internal directories.