keyroost-openpgp 0.5.1

OpenPGP Card (v3.4) APDU command/response layer.
Documentation
  • Coverage
  • 99.37%
    157 out of 158 items documented0 out of 55 items with examples
  • Size
  • Source code size: 98.2 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.61 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 2s Average build duration of successful builds.
  • all releases: 2s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • framefilter/keyroost
    2 1 2
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • framefilter

OpenPGP Card (v3.4) APDU command/response layer.

Phase 4 of extending keyroost toward ykman parity. The OpenPGP applet is a CCID/APDU smartcard applet on YubiKeys and Trussed devices (Solo 2 / Nitrokey 3, via opcard), reachable over the existing PC/SC transport — no second transport stack. This crate is the pure-Rust command/response layer (APDU builders + the application-related-data TLV parser); the actual card exchange lives in keyroost-transport.

Reference: OpenPGP Card spec v3.4, and Nitrokey/opcard-rs.

What is and isn't here

This is the byte layer: it turns intentions into APDU byte vectors and turns response byte slices into typed structures. It performs no I/O. Card transmit, the 61xx / GET RESPONSE reassembly loop, PIN entry, and the higher-level key-management operations are deliberately left for the transport phase; see the TODO(transport) notes on [Instruction] and the builders that are intentionally absent.

Unlike the OATH applet (Yubico's SIMPLE-TLV, short-form lengths only), the OpenPGP applet uses ISO 7816-4 BER-TLV: two-byte ("high") tags and long-form lengths. The parser here handles both forms; see [parse_tlvs].