kkeyroost

Learn · OpenPGP

OpenPGP card

An on-card PGP keypair for signing and encrypting email and files, signing git commits, and SSH — with the private key sealed inside the device.

keyroost screenshot — The OpenPGP card tab: card details, PINs, and on-card key generation or import.
The OpenPGP card tab: card details, PINs, and on-card key generation or import.

What it is

The OpenPGP Card (v3.4) is a smart-card application that holds up to three private keys and performs operations with them on-device:

Because the private keys never leave the card, a compromised laptop can ask the card to sign or decrypt while it's present, but can't walk away with the keys themselves.

Generate on-card vs. import

PINs

The card uses a user PIN (day-to-day) and an admin PIN (management), each with its own retry counter that locks the function after too many wrong tries. How key PINs work →

What keyroost does with OpenPGP

k

Read card status and a slot's public key, and verify a PIN without changing anything; generate or import RSA keys — RSA-2048 on a factory card, since on-card generation follows the slot's own algorithm attributes — by host keygen or from a PKCS#1/PKCS#8 PEM/DER file, for the sign, encrypt, or auth slot (--slot auth); sign (SHA-256 or SHA-1), decrypt, and authenticate (client/SSH signature with the Authentication key); set cardholder name / URL; register a key for GnuPG; change the user or admin PIN and unblock a locked PIN (via the admin PIN / PW3); and factory-reset the applet.

keyroostctl openpgp status --reader yubikey
keyroostctl openpgp sign --in msg.txt --pin-stdin --reader yubikey
keyroostctl openpgp authenticate --in chal.bin --pin-stdin --reader yubikey
keyroostctl openpgp change-pin --old-pin-stdin --new-pin-stdin --reader yubikey

The card byte layer is a pure-Rust, in-tree implementation of the OpenPGP Card spec (APDU + BER-TLV); RSA keygen/parsing is the one scoped host-side dependency.

Authoritative resources