2.6 KiB
2.6 KiB
OpenPGP card client library
This project implements a client library for the OpenPGP card specification, in Rust.
The project consists of a number of crates:
- openpgp-card, which offers an implementation-agnostic, relatively low level OpenPGP card client API. It is PGP implementation agnostic.
- openpgp-card-sequoia, a higher level API for conveniently using openpgp-card with Sequoia PGP.
- openpgp-card-pcsc, a backend to communicate with smartcards via pcsc.
- openpgp-card-scdc, a backend to communicate with smartcards via an scdaemon instance.
- openpgp-card-tests, a testsuite to run OpenPGP card operations on smartcards.
Architecture
graph BT
OP["openpgp-card-pcsc <br/> (backend)"] --> OC
OS["openpgp-card-scdc <br/> (backend)"] --> OC["openpgp-card </br> (low level API)"]
OC --> OCS["openpgp-card-sequoia <br/> (high level, sequoia based API)"]
OC -.-> U1[non-sequoia/low level user application]
OCS -.-> U2[sequoia-based user application]
classDef userApp stroke-dasharray: 5 5;
class U1,U2 userApp;
The backends implement very simple transport functionality. They can send
APDU commands and receive responses. All OpenPGP card-specific logic,
as well as command chaining are handled in openpgp-card
.
Acknowledgements
This project is based on the OpenPGP Card spec, version 3.4.1.
Other helpful resources included:
- The free Gnuk OpenPGP card implementation by gniibe.
- The Rust/Sequoia-based OpenPGP card client code in kushaldas' project johnnycanencrypt.
- The scdaemon client implementation by the GnuPG project.
- The open-keychain project, which implements an OpenPGP card client for Java/Android.
- The Rust/Sequoia-based OpenPGP card client code by Robin Krahl.