Documentation
¶
Index ¶
Constants ¶
View Source
const ( // PublicKeySize is the size, in bytes, of public keys as used in this package. PublicKeySize = ed25519.PublicKeySize // PrivateKeySize is the size, in bytes, of private keys as used in this package. PrivateKeySize = ed25519.PrivateKeySize // SignatureSize is the size, in bytes, of signatures generated and verified by this package. SignatureSize = ed25519.SignatureSize // SeedSize is the size, in bytes, of private key seeds. These are the private key representations used by RFC 8032. SeedSize = ed25519.SeedSize )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PrivateKey ¶
type PrivateKey struct {
Key ed25519.PrivateKey
}
PrivateKey based on the secp256k1 curve
func DeriveHardenedKey ¶
func DeriveHardenedKey(parent crypto.PrivateKey, chaincode []byte) (*PrivateKey, error)
func GenerateKey ¶
func GenerateKey(rand io.Reader) (*PrivateKey, error)
func PrivateKeyFromBytes ¶
func PrivateKeyFromBytes(privKey []byte) (*PrivateKey, error)
PrivateKeyFromBytes get a private key from seed []byte
func (PrivateKey) Bytes ¶
func (pk PrivateKey) Bytes() []byte
Bytes returns the byte representation of the private key
func (PrivateKey) PublicKey ¶
func (pk PrivateKey) PublicKey() crypto.PublicKey
PublicKey return the public key that is derived from the private key
Click to show internal directories.
Click to hide internal directories.