An implementation of the Stateless OpenPGP Interface using Sequoia.
This implements the Stateless OpenPGP Command Line Interface (SOP) using the Sequoia OpenPGP implementation. This crate implements the Rust SOP interface, as well as providing a command line frontend.
SOP implementations enjoy broad compatibility, see the OpenPGP interoperability test suite.
SOP cli primer
To build the cli frontend, enable the "cli" feature, e.g. using cargo build --features=cli
or cargo install sequoia-sop --features=cli
.
To demonstrate SOP, let's generate a key, and encrypt and decrypt a message:
First, we generate a key for julia@example.org
. Next, we extract
the certificate, i.e. the key without the secret key material.
|
Here, we encrypt a message with Julia's certificate, and decrypt it with her key.
Selecting different crypto backends
Sequoia PGP supports a number of different crypto libraries. In order to select one for use with this crate, disable the default features and explicitly select a backend.
To select an alternate crypto backend when building the cli frontend, for example the OpenSSL backend, do:
Or to install it from crates.io:
In order to use it from Rust, depend sequoia-openpgp and select a backend, like so:
[]
= { = "*", = false }
= { = "*", = false, = ["compression", "crypto-openssl"] }