Expand description
§🔐 pgp-lib
Cross-platform, asynchronous Rust library to deal with PGP operations, based on rPGP.
- Basic PGP operations: encrypt, decrypt, sign, verify
- PGP helpers: generate a key pair, read secret/public keys from path, read signature from bytes etc
- HTTP public key discovery via WKD and HKP (requires
key-discovery
feature) - Tokio async runtime (async-std planned)
- Rustls rust crypto (native-tls planned)
See the full API documentation on docs.rs.
§Sponsoring
Special thanks to the NLnet foundation and the European Commission that helped the project to receive financial support from various programs:
- NGI Assure in 2022
- NGI Zero Entrust in 2023
- NGI Zero Core in 2024 (still ongoing)
If you appreciate the project, feel free to donate using one of the following providers:
Re-exports§
pub use native;
Modules§
- Module dedicated to PGP decryption.
- Module dedicated to PGP encryption.
- http
key-discovery
Module dedicated to HTTP. - Module dedicated to PGP signing.
- Module dedicated to PGP helpers.
- Module dedicated to PGP verification.
Enums§
- The global
Error
enum of the library.
Functions§
- Decrypts bytes using the given secret key and its passphrase.
- Encrypts given bytes using the given list of public keys.
- Generates a new pair of secret and public keys for the given email address and passphrase.
- Reads a signed public key from the given path.
- Reads a standalone signature from the given raw bytes.
- Reads a signed secret key from the given path.
- Reads a signed secret key from the given raw string.
- Signs given bytes using the given private key and its passphrase.
- Verifies given standalone signature using the given public key.
Type Aliases§
- The global
Result
alias of the library.