Skip to main content

Module smartcard

Module smartcard 

Source
Expand description

Security keys through the system’s smart card service, PC/SC: pcscd (pcsc-lite) on Linux, the Smart Card service on Windows, CryptoTokenKit on macOS. The OpenPGP card protocol is openpgp-card 0.7’s, its transport card-backend-pcsc 0.5’s (both Heiko Schaefer’s, MIT OR Apache-2.0).

  • Shared, one operation at a time. Each reader is connected in shared mode, so that GnuPG may share the key when its scdaemon.conf says pcsc-shared; one transaction serves one operation, and the key is then disconnected, which resets it (pcsc’s own Drop disposes with ResetCard): its PIN, once given, does not stay given for another program.
  • Readers one by one. card-backend-pcsc skips, silently, a reader it cannot connect to: a key that GnuPG holds for itself would read as no key. Sioul connects each reader itself, and counts a sharing violation as a busy key, which the window says, with “Let GnuPG release it”.
  • The card itself (its reading, its PIN, its signing and opening, its status words in words, nothing logged): super::ocard, shared with the phone.

Structs§

PcscReaders
The system’s readers, through PC/SC.

Functions§

establish 🔒
The smart card service, reached; else why not.
readers_of 🔒
The readers the service knows: none is no error.