Skip to main content

Module ocard

Module ocard 

Source
Expand description

An OpenPGP card open in one transaction, as openpgp-card 0.7 speaks to it (Heiko Schaefer’s, MIT OR Apache-2.0), whatever carries its APDUs: the system’s smart card service on a computer (super::smartcard), NFC on a phone (super::phone). One reading of what the key says, one mapping of its status words, one signing and opening path on every device.

  • Status words in words (CardError): 63Cx a wrong PIN with x tries left, 6983 a locked PIN, 6600 (the specification’s “security-related issues”, kept for the touch button) a touch missed, and so is 6982 just after the PIN was taken, when the key asks for a touch; a card taken out while it worked (a reader’s “RemovedCard”, a phone’s key moved away), the key removed.
  • Nothing is logged here. openpgp-card writes whole APDUs at the “trace” level, a VERIFY’s PIN included, and the card’s answers (session keys): Sioul installs no logger, and caps the level at “info” as each program starts (super::cap_logging).

Structs§

OpenCard 🔒
One OpenPGP card, open in one transaction, whatever carries it: PC/SC on a computer, NFC on a phone.

Functions§

algorithm_name 🔒
“Ed25519”, “Curve25519”, “RSA 4096”, “NIST P-256”: as GnuPG and YubiKey Manager name them.
card_error 🔒
What the card or the reader said, as Sioul says it. touch_after_pin: the key took the PIN in this transaction and asks for a touch, so that its refusal now is the touch’s.
touch_of 🔒
What a key’s user interaction flag says of its touch (DO D6 for signing, D7 for decrypting, D8 for authenticating: its first byte, the touch policy). A card without the flag asks for none; a flag that does not read is a touch maybe asked: said “If your key asks for a touch…”, a wrong guess costing nothing.