# Functions
ConfigDecodeKey decodes from b64 (for config file) to a byte array that can be unmarshalled.
ConfigEncodeKey encodes a marshalled key to b64 (for config file).
ECDSAKeyPairFromKey generates a new ecdsa private and public key from an input private key.
ECDSAPublicKeyFromPubKey generates a new ecdsa public key from an input public key.
GenerateECDSAKeyPair generates a new ecdsa private and public key.
GenerateECDSAKeyPairWithCurve generates a new ecdsa private and public key with a specified curve.
GenerateEd25519Key generates a new ed25519 private and public key pair.
GenerateKeyPair generates a private and public key.
GenerateKeyPairWithReader returns a keypair of the given type and bit-size.
GenerateRSAKeyPair generates a new rsa private and public key.
GenerateSecp256k1Key generates a new Secp256k1 private and public key pair.
KeyEqual checks whether two Keys are equivalent (have identical byte representations).
KeyPairFromStdKey wraps standard library (and secp256k1) private keys in libp2p/go-libp2p/core/crypto keys.
MarshalECDSAPrivateKey returns x509 bytes from a private key.
MarshalECDSAPublicKey returns x509 bytes from a public key.
MarshalPrivateKey converts a key object into its protobuf serialized form.
MarshalPublicKey converts a public key object into a protobuf serialized public key.
PrivKeyToStdKey converts libp2p/go-libp2p/core/crypto private keys to standard library (and secp256k1) private keys.
PubKeyToStdKey converts libp2p/go-libp2p/core/crypto private keys to standard library (and secp256k1) public keys.
PublicKeyFromProto converts an unserialized protobuf PublicKey message into its representative object.
PublicKeyToProto converts a public key object into an unserialized protobuf PublicKey message.
UnmarshalECDSAPrivateKey returns a private key from x509 bytes.
UnmarshalECDSAPublicKey returns the public key from x509 bytes.
UnmarshalEd25519PrivateKey returns a private key from input bytes.
UnmarshalEd25519PublicKey returns a public key from input bytes.
UnmarshalPrivateKey converts a protobuf serialized private key into its representative object.
UnmarshalPublicKey converts a protobuf serialized public key into its representative object.
UnmarshalRsaPrivateKey returns a private key from the input x509 bytes.
UnmarshalRsaPublicKey returns a public key from the input x509 bytes.
UnmarshalSecp256k1PrivateKey returns a private key from bytes.
UnmarshalSecp256k1PublicKey returns a public key from bytes.
# Constants
ECDSA is an enum for the supported ECDSA key type.
Ed25519 is an enum for the supported Ed25519 key type.
RSA is an enum for the supported RSA key type.
Secp256k1 is an enum for the supported Secp256k1 key type.
WeakRsaKeyEnv is an environment variable which, when set, lowers the minimum required bits of RSA keys to 512.
# Variables
ECDSACurve is the default ecdsa curve used.
ErrBadKeyType is returned when a key is not supported.
ErrNilPrivateKey is returned when a nil private key is provided.
ErrNilPublicKey is returned when a nil public key is provided.
ErrNilSig is returned when the signature is nil.
ErrNotECDSAPubKey is returned when the public key passed is not an ecdsa public key.
ErrRsaKeyTooSmall is returned when trying to generate or parse an RSA key that's smaller than MinRsaKeyBits bits.
KeyTypes is a list of supported keys.
PrivKeyUnmarshallers is a map of unmarshallers by key type.
PubKeyUnmarshallers is a map of unmarshallers by key type.
# Structs
ECDSAPrivateKey is an implementation of an ECDSA private key.
ECDSAPublicKey is an implementation of an ECDSA public key.
ECDSASig holds the r and s values of an ECDSA signature.
Ed25519PrivateKey is an ed25519 private key.
Ed25519PublicKey is an ed25519 public key.
RsaPrivateKey is a rsa private key.
RsaPublicKey is a rsa public key.
# Type aliases
GenSharedKey generates the shared key from a given private key.
PrivKeyUnmarshaller is a func that creates a PrivKey from a given slice of bytes.
PubKeyUnmarshaller is a func that creates a PubKey from a given slice of bytes.
Secp256k1PrivateKey is a Secp256k1 private key.
Secp256k1PublicKey is a Secp256k1 public key.