canokey-protocol 0.1.0

Transport-free APDU and TLV codecs with caller-owned protocol operations
Documentation
  • Coverage
  • 100%
    153 out of 153 items documented3 out of 66 items with examples
  • Size
  • Source code size: 81.85 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.76 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 4s Average build duration of successful builds.
  • all releases: 4s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • canokeys/libcanokey
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • dangfan

canokey-protocol

Transport-free APDU conversations and caller-owned operations for CanoKey devices.

This crate is the wire-format foundation of the libcanokey host library. It provides encoders and parsers for command and response APDUs (apdu), bounded definite-length BER TLV codecs (tlv), typed protocol errors with command context (error), and the owned, caller-driven Operation state machine (operation) that drives an exchange of complete APDUs step by step. There is no I/O, transport trait, runtime, threading, or mutable global state: the library builds bytes and parses bytes, and the caller performs every transmit.

Most applications should depend on the canokey facade crate instead, which re-exports everything needed to talk to a device. Depend on canokey-protocol directly only when you are building a new applet binding on top of the operation model, or when you need the APDU/TLV codecs for other low-level work.

Full API contracts (ownership, execution rules, error taxonomy) live in docs/design/api-design.md in the repository.

License: Apache-2.0