package
0.0.0-20240829150431-63fc2867930b
Repository: https://github.com/kisom/cryptutils.git
Documentation: pkg.go.dev

# Functions

Decrypt opens the secured message using the private key.
DecryptAndVerify decrypts the message and verifies its signature.
Encrypt generates an ephemeral curve25519 key pair and encrypts a new message to the peer's public key.
EncryptAndSign signs the message with the private key, then encrypts it to the peer's public key.
ExportPrivate PEM-encodes the locked private key.
GenerateKey creates a new set of encryption and signature keys using the operating system's random number generator.
ImportPrivate parses a PEM-encoded private key.
KeyExchange performs an ECDH key exchange with the private and public key pairs.
LockKey secures the private key with the passphrase, using Scrypt and NaCl's secretbox.
MarshalPrivate serialises a private key into a byte slice.
MarshalPublic serialises a public key into a byte slice.
Sign signs the message with the private key using Ed25519.
UnlockKey recovers the secured private key with the passphrase.
UnmarshalPrivate parses a byte slice into a private key.
UnmarshalPublic parses a byte slice into a public key.
Verify verifies the signature on the message with the public key using Ed25519.

# Constants

These types are used in PEM-encoded keys.
These types are used in PEM-encoded keys.
These types are used in PEM-encoded keys.
These types are used in PEM-encoded keys.
These types are used in PEM-encoded keys.

# Variables

These errors are used to signal invalid public and private keys.
These errors are used to signal invalid public and private keys.

# Structs

A PrivateKey contains both encryption and signing keys.
A PublicKey contains the public components of the key pair.