ECDSAPrivateKey is an implementation of an ECDSA private key Equals compares two private keys GetPublic returns a public key Raw returns x509 bytes from a private key Sign returns the signature of the input data Type returns the key type
*ECDSAPrivateKey : Key
*ECDSAPrivateKey : PrivKey
func MarshalECDSAPrivateKey(ePriv ECDSAPrivateKey) (res []byte, err error)
ECDSAPublicKey is an implementation of an ECDSA public key Equals compares to public keys Raw returns x509 bytes from a public key Type returns the key type Verify compares data to a signature
*ECDSAPublicKey : Key
*ECDSAPublicKey : PubKey
func MarshalECDSAPublicKey(ePub ECDSAPublicKey) (res []byte, err error)
ECDSASig holds the r and s values of an ECDSA signatureR*big.IntS*big.Int
Ed25519PrivateKey is an ed25519 private key. Equals compares two ed25519 private keys. GetPublic returns an ed25519 public key from a private key. Raw private key bytes. Sign returns a signature from an input message. Type of the private key (Ed25519).
*Ed25519PrivateKey : Key
*Ed25519PrivateKey : PrivKey
Ed25519PublicKey is an ed25519 public key. Equals compares two ed25519 public keys. Raw public key bytes. Type of the public key (Ed25519). Verify checks a signature against the input data.
*Ed25519PublicKey : Key
*Ed25519PublicKey : PubKey
GenSharedKey generates the shared key from a given private key
PubKeyUnmarshaller is a func that creates a PubKey from a given slice of bytes
RsaPrivateKey is a rsa private key Equals checks whether this key is equal to another GetPublic returns a public key(*RsaPrivateKey) Raw() (res []byte, err error) Sign returns a signature of the input data(*RsaPrivateKey) Type() pb.KeyType
*RsaPrivateKey : Key
*RsaPrivateKey : PrivKey
RsaPublicKey is a rsa public key Equals checks whether this key is equal to another(*RsaPublicKey) Raw() (res []byte, err error)(*RsaPublicKey) Type() pb.KeyType Verify compares a signature against input data
*RsaPublicKey : Key
*RsaPublicKey : PubKey
Secp256k1PrivateKey is a Secp256k1 private keyKeysecp256k1.ModNScalar Equals compares two private keys GetPublic returns a public key Raw returns the bytes of the key Sign returns a signature from input data Type returns the private key type
*Secp256k1PrivateKey : Key
*Secp256k1PrivateKey : PrivKey
Secp256k1PublicKey is a Secp256k1 public key Equals compares two public keys Raw returns the bytes of the key Type returns the public key type Verify compares a signature against the input data
*Secp256k1PublicKey : Key
*Secp256k1PublicKey : PubKey
Package-Level Functions (total 31)
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
Package-Level Variables (total 12)
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
PrivKeyUnmarshallers is a map of unmarshallers by key type
PubKeyUnmarshallers is a map of unmarshallers by key type
Package-Level Constants (total 5)
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. This should be used exclusively in
test situations.
The pages are generated with Goldsv0.8.2. (GOOS=linux GOARCH=amd64)
Golds is a Go 101 project developed by Tapir Liu.
PR and bug reports are welcome and can be submitted to the issue list.
Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds.