package
0.20.1
Repository: https://github.com/libp2p/go-libp2p-core.git
Documentation: pkg.go.dev

# Packages

No description provided by the author

# 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 Deprecated: use github.com/libp2p/go-libp2p/core/crypto.ECDSAKeyPairFromKey instead.
ECDSAPublicKeyFromPubKey generates a new ecdsa public key from an input public key Deprecated: use github.com/libp2p/go-libp2p/core/crypto.ECDSAPublicKeyFromPubKey instead.
GenerateECDSAKeyPair generates a new ecdsa private and public key Deprecated: use github.com/libp2p/go-libp2p/core/crypto.GenerateECDSAKeyPair instead.
GenerateECDSAKeyPairWithCurve generates a new ecdsa private and public key with a speicified curve Deprecated: use github.com/libp2p/go-libp2p/core/crypto.GenerateECDSAKeyPairWithCurve instead.
GenerateEd25519Key generates a new ed25519 private and public key pair.
GenerateEKeyPair returns an ephemeral public key and returns a function that will compute the shared secret key.
GenerateKeyPair generates a private and public key Deprecated: use github.com/libp2p/go-libp2p/core/crypto.GenerateKeyPair instead.
GenerateKeyPairWithReader returns a keypair of the given type and bitsize Deprecated: use github.com/libp2p/go-libp2p/core/crypto.GenerateKeyPairWithReader instead.
GenerateRSAKeyPair generates a new rsa private and public key Deprecated: use github.com/libp2p/go-libp2p/core/crypto.GenerateRSAKeyPair.
GenerateSecp256k1Key generates a new Secp256k1 private and public key pair Deprecated: use github.com/libp2p/go-libp2p/core/crypto.GenerateSecp256k1Key instead.
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 Deprecated: use github.com/libp2p/go-libp2p/core/crypto.KeyPairFromStdKey instead.
MarshalECDSAPrivateKey returns x509 bytes from a private key Deprecated: use github.com/libp2p/go-libp2p/core/crypto.MarshalECDSAPrivateKey instead.
MarshalECDSAPublicKey returns x509 bytes from a public key Deprecated: use github.com/libp2p/go-libp2p/core/crypto.MarshalECDSAPublicKey instead.
MarshalPrivateKey converts a key object into its protobuf serialized form.
MarshalPublicKey converts a public key object into a protobuf serialized public key Deprecated: use github.com/libp2p/go-libp2p/core/crypto.MarshalPublicKey instead.
PrivKeyToStdKey converts libp2p/go-libp2p-core/crypto private keys to standard library (and secp256k1) private keys Deprecated: use github.com/libp2p/go-libp2p/core/crypto.PrivKeyToStdKey instead.
PubKeyToStdKey converts libp2p/go-libp2p-core/crypto private keys to standard library (and secp256k1) public keys Deprecated: use github.com/libp2p/go-libp2p/core/crypto.PubKeyToStdKey instead.
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 Deprecated: use github.com/libp2p/go-libp2p/core/crypto.MarshalECDSAPrivateKey instead.
UnmarshalECDSAPublicKey returns the public key from x509 bytes Deprecated: use github.com/libp2p/go-libp2p/core/crypto.UnmarshalECDSAPublicKey instead.
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 Deprecated: use github.com/libp2p/go-libp2p/core/crypto.UnmarshalPrivateKey instead.
UnmarshalPublicKey converts a protobuf serialized public key into its representative object Deprecated: use github.com/libp2p/go-libp2p/core/crypto.UnmarshalPublicKey instead.
UnmarshalRsaPrivateKey returns a private key from the input x509 bytes Deprecated: use github.com/libp2p/go-libp2p/core/crypto.UnmarshalRsaPrivateKey.
UnmarshalRsaPublicKey returns a public key from the input x509 bytes Deprecated: use github.com/libp2p/go-libp2p/core/crypto.UnmarshalRsaPublicKey.
UnmarshalSecp256k1PrivateKey returns a private key from bytes Deprecated: use github.com/libp2p/go-libp2p/core/crypto.UnmarshalSecp256k1PrivateKey instead.
UnmarshalSecp256k1PublicKey returns a public key from bytes Deprecated: use github.com/libp2p/go-libp2p/core/crypto.UnmarshalSecp256k1PublicKey instead.

# 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 Deprecated: use github.com/libp2p/go-libp2p/core/crypto.ECDSACurve instead.
ErrBadKeyType is returned when a key is not supported.
ErrNilPrivateKey is returned when a nil private key is provided Deprecated: use github.com/libp2p/go-libp2p/core/crypto.ErrNilPrivateKey instead.
ErrNilPublicKey is returned when a nil public key is provided Deprecated: use github.com/libp2p/go-libp2p/core/crypto.ErrNilPublicKey instead.
ErrNilSig is returned when the signature is nil Deprecated: use github.com/libp2p/go-libp2p/core/crypto.ErrNilSig instead.
ErrNotECDSAPubKey is returned when the public key passed is not an ecdsa public key Deprecated: use github.com/libp2p/go-libp2p/core/crypto.ErrNotECDSAPubKey instead.
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.
Deprecated: use github.com/libp2p/go-libp2p/core/crypto.MinRsaKeyBits instead.
PrivKeyUnmarshallers is a map of unmarshallers by key type Deprecated: use github.com/libp2p/go-libp2p/core/crypto.PrivKeyUnmarshallers instead.
PubKeyUnmarshallers is a map of unmarshallers by key type Deprecated: use github.com/libp2p/go-libp2p/core/crypto.PubKeyUnmarshallers instead.

# Type aliases

ECDSAPrivateKey is an implementation of an ECDSA private key Deprecated: use github.com/libp2p/go-libp2p/core/crypto.ECDSAPrivateKey instead.
ECDSAPublicKey is an implementation of an ECDSA public key Deprecated: use github.com/libp2p/go-libp2p/core/crypto.ECDSAPublicKey instead.
ECDSASig holds the r and s values of an ECDSA signature Deprecated: use github.com/libp2p/go-libp2p/core/crypto.ECDSASig instead.
Ed25519PrivateKey is an ed25519 private key.
Ed25519PublicKey is an ed25519 public key.
GenSharedKey generates the shared key from a given private key Deprecated: use github.com/libp2p/go-libp2p/core/crypto.GenSharedKey instead.
Key represents a crypto key that can be compared to another key Deprecated: use github.com/libp2p/go-libp2p/core/crypto.Key instead.
PrivKey represents a private key that can be used to generate a public key and sign data Deprecated: use github.com/libp2p/go-libp2p/core/crypto.PrivKey instead.
PrivKeyUnmarshaller is a func that creates a PrivKey from a given slice of bytes Deprecated: use github.com/libp2p/go-libp2p/core/crypto.PrivKeyUnmarshaller instead.
PubKey is a public key that can be used to verifiy data signed with the corresponding private key Deprecated: use github.com/libp2p/go-libp2p/core/crypto.PubKey instead.
PubKeyUnmarshaller is a func that creates a PubKey from a given slice of bytes Deprecated: use github.com/libp2p/go-libp2p/core/crypto.PubKeyUnmarshaller instead.
RsaPrivateKey is an rsa private key Deprecated: use github.com/libp2p/go-libp2p/core/crypto.RsaPrivateKey instead.
RsaPublicKey is an rsa public key Deprecated: use github.com/libp2p/go-libp2p/core/crypto.RsaPublicKey instead.
Secp256k1PrivateKey is an Secp256k1 private key Deprecated: use github.com/libp2p/go-libp2p/core/crypto.Secp256k1PrivateKey instead.
Secp256k1PublicKey is an Secp256k1 public key Deprecated: use github.com/libp2p/go-libp2p/core/crypto.Secp256k1PublicKey instead.