Documentation ¶
Overview ¶
Package ECDSA implements Cosmos-SDK compatible ECDSA public and private key. The keys can be serialized.
Index ¶
- type PrivKey
- func (sk *PrivKey) Bytes() []byte
- func (sk *PrivKey) MarshalTo(dAtA []byte) (int, error)
- func (sk *PrivKey) PubKey() PubKey
- func (sk *PrivKey) Sign(msg []byte) ([]byte, error)
- func (sk *PrivKey) String(name string) string
- func (sk *PrivKey) Unmarshal(bz []byte, curve elliptic.Curve, expectedSize int) error
- type PubKey
- func (pk *PubKey) Address(protoName string) tmcrypto.Address
- func (pk *PubKey) Bytes() []byte
- func (pk *PubKey) MarshalTo(dAtA []byte) (int, error)
- func (pk *PubKey) String(curveName string) string
- func (pk *PubKey) Unmarshal(bz []byte, curve elliptic.Curve, expectedSize int) error
- func (pk *PubKey) VerifySignature(msg []byte, sig []byte) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PrivKey ¶
type PrivKey struct {
ecdsa.PrivateKey
}
func GenPrivKey ¶
GenPrivKey generates a new secp256r1 private key. It uses operating system randomness.
func (*PrivKey) Sign ¶
Sign hashes and signs the message usign ECDSA. Implements SDK PrivKey interface.
type PubKey ¶
func (*PubKey) Address ¶
Address creates an ADR-28 address for ECDSA keys. protoName is a concrete proto structure id.
func (*PubKey) Bytes ¶
Bytes returns the byte representation of the public key using a compressed form specified in section 4.3.6 of ANSI X9.62 with first byte being the curve type.
func (*PubKey) String ¶
String returns a string representation of the public key based on the curveName.
Click to show internal directories.
Click to hide internal directories.