Expand description

Client library for OpenPGP card devices (such as Gnuk, Yubikey, or Java smartcards running an OpenPGP card application).

This library aims to offer

This library can’t directly access cards by itself. Instead, users need to supply an implementation of the CardBackend / CardTransaction traits, to access cards.

The companion crate openpgp-card-pcsc offers a backend that uses pcsclite to communicate with smartcards.

The openpgp-card-sequoia crate offers a higher level wrapper based on the Sequoia PGP implementation.

Modules

Data structures that define OpenPGP algorithms.

OpenPGP card data objects (DO)

Data structures for cryptographic material: Private key data, public key data, cryptograms for decryption, hash data for signing.

Structs

Information about the capabilities of a card.

A KeySet binds together a triple of information about each Key on a card

An OpenPGP card access object, backed by a CardBackend implementation.

Low-level access to OpenPGP card functionality.

Enums

Enum wrapper for the different error types of this crate

Identify a Key slot on an OpenPGP card

Errors on the smartcard/reader layer

OpenPGP card “Status Bytes” (ok statuses and errors)

Traits

The CardBackend trait defines a connection with an OpenPGP card via a backend implementation (e.g. via the pcsc backend in the crate openpgp-card-pcsc), A CardBackend is only used to get access to a CardTransaction object.

The CardTransaction trait defines communication with an OpenPGP card via a backend implementation (e.g. the pcsc backend in the crate openpgp-card-pcsc), after opening a transaction from a CardBackend.