Module sequoia_openpgp::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
- Converting a string to a
Password
: UsePassword::from
. - Create a session key: Use
SessionKey::new
. - Use secret keys: See the
KeyPair
example.
Modules§
- Elliptic-curve Diffie-Hellman.
- Cryptographic hash functions and hashing of OpenPGP data structures.
- Memory protection and encryption.
- Multiprecision Integers.
Structs§
- A cryptographic key pair.
- Holds a password.
- Holds a session key.
Enums§
- String-to-Key (S2K) specifiers.
Traits§
- Decrypts a message.
- Creates a signature.
Functions§
- Returns a short, human-readable description of the backend.
- Fills the given buffer with random data.