Documentation ¶
Index ¶
- Constants
- Variables
- func EcRecover(msg, signature []byte) ([]byte, error)
- func Equals(sk, other []byte) bool
- func GenerateKey() ([]byte, error)
- func GenerateKeyFromSeed(io.Reader) ([]byte, error)
- func PublicKey(sk []byte) []byte
- func Sign(sk, msg []byte) ([]byte, error)
- func Verify(pk, msg, signature []byte) bool
Constants ¶
View Source
const PrivateKeyBytes = 32
PrivateKeyBytes is the size of a serialized private key.
View Source
const PublicKeyBytes = 65
PublicKeyBytes is the size of a serialized public key.
Variables ¶
View Source
var (
ErrInvalidMsgLength = errors.New("filecoin/go-crypto: invalid message length")
)
Functions ¶
func GenerateKey ¶
GenerateKey creates a new key using secure randomness from crypto.rand.
func GenerateKeyFromSeed ¶
GenerateKeyFromSeed generates a new key from the given reader. Deprecated: use GenerateKey instead - the given reader is no longer used.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.