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
- Converting a string to a
Password
: UsePassword::from
. - Create a session key: Use
SessionKey::new
. - Use secret keys: See the
KeyPair
example.
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.
- Session
Key - Holds a session key.
Enums§
- AEAD
Algorithm - AEAD modes.
- Curve
- Elliptic curves used in OpenPGP.
- Hash
Algorithm - The OpenPGP hash algorithms as defined in Section 9.5 of RFC 9580.
- Public
KeyAlgorithm - The OpenPGP public key algorithms as defined in Section 9.1 of RFC 9580.
- S2K
- String-to-Key (S2K) specifiers.
- Symmetric
Algorithm - The symmetric-key algorithms as defined in Section 9.3 of RFC 9580.