Crate sequoia_openpgp

Source
Expand description

OpenPGP data types and associated machinery.

This crate aims to provide a complete implementation of OpenPGP as defined by RFC 9580 as well as the deprecated OpenPGP as defined by RFC 4880. OpenPGP is a standard by the IETF. It was derived from the PGP software, which was created by Phil Zimmermann in 1991.

This crate also includes support for unbuffered message processing.

A few features that the OpenPGP community considers to be deprecated (e.g., version 3 compatibility) have been left out. We have also updated some OpenPGP defaults to avoid foot guns (e.g., we selected modern algorithm defaults). If some functionality is missing, please file a bug report.

A non-goal of this crate is support for any sort of high-level, bolted-on functionality. For instance, RFC 9580 does not define trust models, such as the web of trust, direct trust, or TOFU. Neither does this crate. RFC 9580 does provide some mechanisms for creating trust models (specifically, UserID certifications), and this crate does expose those mechanisms.

We also try hard to avoid dictating how OpenPGP should be used. This doesn’t mean that we don’t have opinions about how OpenPGP should be used in a number of common scenarios (for instance, message validation). But, in this crate, we refrain from expressing those opinions; we will expose an opinionated, high-level interface in the future. In order to figure out the most appropriate high-level interfaces, we look at existing users. If you are using Sequoia, please get in contact so that we can learn from your use cases, discuss your opinions, and develop a high-level interface based on these experiences in the future.

Despite —or maybe because of— its unopinionated nature we found it easy to develop opinionated OpenPGP software based on Sequoia.

§Experimental Features

This crate may implement extensions where the standardization effort is still ongoing. These experimental features are marked as such in the documentation. We invite you to experiment with them, but please do expect the semantics and possibly even the wire format to evolve.

Re-exports§

pub use anyhow;

Modules§

armor
ASCII Armor.
cert
Certificates and related data structures.
crypto
Cryptographic primitives.
fmt
Utilities for formatting, printing, and user communication.
message
Message support.
packet
Packet-related data types.
parse
Packet parsing infrastructure.
policy
A mechanism to specify policy.
regex
OpenPGP regex parser.
serialize
Packet serialization infrastructure.
types
Primitive types.

Structs§

Cert
A collection of components and their associated signatures.
Message
A message.
PacketPile
An unstructured packet sequence.

Enums§

Error
Errors used in this crate.
Fingerprint
A long identifier for certificates and keys.
KeyHandle
Enum representing an identifier for certificates and keys.
KeyID
A short identifier for certificates and keys.
Packet
Enumeration of packet types.
Profile
Profiles select versions of the OpenPGP standard.

Constants§

VERSION
The version of this crate.

Type Aliases§

Result
Crate result specialization.