Module crypto

Source
Expand description

Cryptographic primitives.

This module contains cryptographic primitives as defined and used by OpenPGP. It abstracts over the cryptographic library chosen at compile time. Most of the time, it will not be necessary to explicitly use types from this module directly, but they are used in the API (e.g. Password). Advanced users may use these primitives to provide custom extensions to OpenPGP.

§Common Operations

Modules§

ecdh
Elliptic-curve Diffie-Hellman.
hash
Cryptographic hash functions and hashing of OpenPGP data structures.
mem
Memory protection and encryption.
mpi
Multiprecision Integers.

Structs§

KeyPair
A cryptographic key pair.
Password
Holds a password.
SessionKey
Holds a session key.

Enums§

AEADAlgorithm
AEAD modes.
Curve
Elliptic curves used in OpenPGP.
HashAlgorithm
The OpenPGP hash algorithms as defined in Section 9.5 of RFC 9580.
PublicKeyAlgorithm
The OpenPGP public key algorithms as defined in Section 9.1 of RFC 9580.
S2K
String-to-Key (S2K) specifiers.
SymmetricAlgorithm
The symmetric-key algorithms as defined in Section 9.3 of RFC 9580.

Traits§

Decryptor
Decrypts a message.
Signer
Creates a signature.

Functions§

backend
Returns a short, human-readable description of the backend.
random
Fills the given buffer with random data.