Documentation ¶
Overview ¶
Package secp256r1 implements soominhyunwoo-SDK compatible ECDSA public and private key. The keys can be protobuf serialized and packed in Any.
Index ¶
- Variables
- func RegisterInterfaces(registry codectypes.InterfaceRegistry)
- type PrivKey
- func (m *PrivKey) Bytes() []byte
- func (*PrivKey) Descriptor() ([]byte, []int)
- func (m *PrivKey) Equals(other cryptotypes.LedgerPrivKey) bool
- func (m *PrivKey) Marshal() (dAtA []byte, err error)
- func (m *PrivKey) MarshalTo(dAtA []byte) (int, error)
- func (m *PrivKey) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*PrivKey) ProtoMessage()
- func (m *PrivKey) PubKey() cryptotypes.PubKey
- func (m *PrivKey) Reset()
- func (m *PrivKey) Sign(msg []byte) ([]byte, error)
- func (m *PrivKey) Size() (n int)
- func (m *PrivKey) String() string
- func (m *PrivKey) Type() string
- func (m *PrivKey) Unmarshal(dAtA []byte) error
- func (m *PrivKey) XXX_DiscardUnknown()
- func (m *PrivKey) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *PrivKey) XXX_Merge(src proto.Message)
- func (*PrivKey) XXX_MessageName() string
- func (m *PrivKey) XXX_Size() int
- func (m *PrivKey) XXX_Unmarshal(b []byte) error
- type PubKey
- func (m *PubKey) Address() tmcrypto.Address
- func (m *PubKey) Bytes() []byte
- func (*PubKey) Descriptor() ([]byte, []int)
- func (m *PubKey) Equals(other cryptotypes.PubKey) bool
- func (m *PubKey) Marshal() (dAtA []byte, err error)
- func (m *PubKey) MarshalTo(dAtA []byte) (int, error)
- func (m *PubKey) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*PubKey) ProtoMessage()
- func (m *PubKey) Reset()
- func (m *PubKey) Size() (n int)
- func (m *PubKey) String() string
- func (m *PubKey) Type() string
- func (m *PubKey) Unmarshal(dAtA []byte) error
- func (m *PubKey) VerifySignature(msg []byte, sig []byte) bool
- func (m *PubKey) XXX_DiscardUnknown()
- func (m *PubKey) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *PubKey) XXX_Merge(src proto.Message)
- func (*PubKey) XXX_MessageName() string
- func (m *PubKey) XXX_Size() int
- func (m *PubKey) XXX_Unmarshal(b []byte) error
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func RegisterInterfaces ¶
func RegisterInterfaces(registry codectypes.InterfaceRegistry)
RegisterInterfaces adds secp256r1 PubKey to pubkey registry
Types ¶
type PrivKey ¶
type PrivKey struct {
// secret number serialized using big-endian encoding
Secret *ecdsaSK `protobuf:"bytes,1,opt,name=secret,proto3,customtype=ecdsaSK" json:"secret,omitempty"`
}
PrivKey defines a secp256r1 ECDSA private key.
func GenPrivKey ¶
GenPrivKey generates a new secp256r1 private key. It uses operating system randomness.
func (*PrivKey) Descriptor ¶
func (*PrivKey) Equals ¶
func (m *PrivKey) Equals(other cryptotypes.LedgerPrivKey) bool
Equals implements SDK PrivKey interface.
func (*PrivKey) MarshalToSizedBuffer ¶
func (*PrivKey) ProtoMessage ¶
func (*PrivKey) ProtoMessage()
func (*PrivKey) PubKey ¶
func (m *PrivKey) PubKey() cryptotypes.PubKey
PubKey implements SDK PrivKey interface.
func (*PrivKey) Sign ¶
Sign hashes and signs the message usign ECDSA. Implements sdk.PrivKey interface.
func (*PrivKey) XXX_DiscardUnknown ¶
func (m *PrivKey) XXX_DiscardUnknown()
func (*PrivKey) XXX_Marshal ¶
func (*PrivKey) XXX_MessageName ¶
func (*PrivKey) XXX_Unmarshal ¶
type PubKey ¶
type PubKey struct { // Point on secp256r1 curve in a compressed representation as specified in section // 4.3.6 of ANSI X9.62: https://webstore.ansi.org/standards/ascx9/ansix9621998 Key *ecdsaPK `protobuf:"bytes,1,opt,name=key,proto3,customtype=ecdsaPK" json:"key,omitempty"` }
PubKey defines a secp256r1 ECDSA public key.
func (*PubKey) Descriptor ¶
func (*PubKey) Equals ¶
func (m *PubKey) Equals(other cryptotypes.PubKey) bool
Equals implements SDK PubKey interface.
func (*PubKey) MarshalToSizedBuffer ¶
func (*PubKey) ProtoMessage ¶
func (*PubKey) ProtoMessage()
func (*PubKey) VerifySignature ¶
VerifySignature implements SDK PubKey interface.
func (*PubKey) XXX_DiscardUnknown ¶
func (m *PubKey) XXX_DiscardUnknown()
func (*PubKey) XXX_Marshal ¶
func (*PubKey) XXX_MessageName ¶
func (*PubKey) XXX_Unmarshal ¶
Click to show internal directories.
Click to hide internal directories.