30 releases
0.5.0 | May 28, 2024 |
---|---|
0.5.0-alpha.1 | Apr 7, 2024 |
0.4.2 | Feb 16, 2024 |
0.4.0 | Sep 5, 2023 |
0.0.1 | Jun 30, 2021 |
#321 in Cryptography
590 downloads per month
Used in 20 crates
(13 directly)
300KB
6K
SLoC
OpenPGP card client library
This crate implements a client library for the OpenPGP card specification, in Rust.
This library provides OpenPGP library agnostic access to OpenPGP cards. Its communication with cards is based on simple data structures that closely match the formats defined in the OpenPGP card specification.
Card access backends
This crate doesn't contain code to talk to cards. Implementations of the traits
CardBackend
/CardTransaction
need to be provided for access to cards.
The crates card-backend-pcsc and the experimental crate card-backend-scdc provide implementations of these traits for use with this crate.
lib.rs
:
Client library for OpenPGP card devices (such as Gnuk, Nitrokey, YubiKey, or Java smartcards running an OpenPGP card application).
This library aims to offer
- low-level access to all features in the OpenPGP card specification via the crate::ocard package,
- without relying on a particular OpenPGP implementation.
The library exposes two modes of access to cards:
- low-level, unmediated, access to card functionality (see crate::ocard), and
- a more opinionated, typed wrapper API that performs some amount of caching [Card].
Note that this library can't directly access cards by itself.
Instead, users need to supply a backend that implements the
card_backend::CardBackend
and card_backend::CardTransaction
traits.
For example card-backend-pcsc
offers a backend implementation that uses PC/SC to
communicate with Smart Cards.
See the architecture diagram for an overview of the ecosystem around this crate.
Dependencies
~2.5–3.5MB
~66K SLoC