Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CryptoImplementation ¶
type CryptoImplementation interface { DeriveKeypair() error Sign(Message []byte) []byte IsValidMessage(Message, Signature []byte) bool }
func NewKeyPair ¶
func NewKeyPair(cit CryptoImplementationType, seed []byte, isValidator bool) (CryptoImplementation, error)
NewKeyPair -- Generates a new key pair of specified type.
type CryptoImplementationType ¶
type CryptoImplementationType string
const ( ED25519 CryptoImplementationType = "ED25519" SECP256K1 CryptoImplementationType = "SECP256K1" )
type Ed25519 ¶
type Ed25519 struct {
// contains filtered or unexported fields
}
func (*Ed25519) DeriveKeypair ¶
DeriveKeypair -- Derrive a new keypair from seed
func (*Ed25519) IsValidMessage ¶
IsValidMessage -- Validate message with public key and signature.
type Secp256k1 ¶
type Secp256k1 struct {
// contains filtered or unexported fields
}
func (*Secp256k1) DeriveKeypair ¶
DeriveKeypair -- Derrive a new keypair from seed
func (*Secp256k1) IsValidMessage ¶
IsValidMessage -- Validate message with public key and signature.
Click to show internal directories.
Click to hide internal directories.