OPENPGP-TOOL(1)

πŸ’– OPENPGP-TOOL(1) πŸ’–

okay bestie, welcome to openpgp-tool β€” it's part of the OpenSC Tools lineup and it's literally here to help you peek at the visible data living on your OpenPGP smart card. yes, that kind of OpenPGP. no, it's not scary, I promise 🫢


✨ NAME ✨

openpgp-tool β€” a utility for accessing visible data on OpenPGP smart cards and compatible tokens. that's it, that's the whole vibe πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

openpgp-tool [OPTIONS]

like. that's it. one binary, a whole pile of options, go off πŸ‘‘


🌸 DESCRIPTION 🌸

so the tea is this: openpgp-tool is your girl for grabbing data off OpenPGP v1.1 and v2.0 smart cards, plus compatible tokens like, for example, the GPF CryptoStick v1.x πŸŽ€

and here's the plot twist that makes this tool iconic β€” that data might not be sitting in PKCS#15 objects, but it's available in custom files on the card instead. so it's not a "missing data" situation, it's a "data in a different place" situation. iykyk 😭

once it's got the data, it can do two things with it:

  • print it on screen for you to read πŸ“Ί
  • hand it off to other programs through environment variables 🌈

main character energy fr fr ✨


πŸ‘‘ OPTIONS πŸ‘‘

every single one, no skips, no cuts, we're doing the full set πŸ’…

  • --card-info, -C β€” show card information. the little ID card pic of your smart card πŸͺͺ
  • --del-key arg β€” delete the key indicated by arg. arg can be 1, 2, 3, or all. yes, all is a real option, use it responsibly bestie πŸ’€
  • --do arg, -d arg β€” dump the private data object (DO) indicated by arg. arg can be written as x, 10x, or 010x to access DO 010x, where x is 1, 2, 3, or 4. so many ways to spell the same thing, we love options 🌸
  • --erase, -E β€” erase (i.e. reset) the card. this is the nuclear button, no takebacks, be so sure before you press it 🚨
  • --exec prog, -x prog β€” execute the given program with data in environment variables. it's giving "pipe it straight into your fave script" 🧚
  • --gen-key arg, -G arg β€” generate a key with the ID given as arg. arg can be one of 1, 2, or 3. new key, who dis πŸ”₯
  • --help, -h β€” print the help message on screen. when in doubt, bestie, ask for help 🫢
  • --key-info, -K β€” show information of keys on the card. the gossip about your keys πŸ‘€
  • --key-type keytype, -t keytype β€” specify the type of the key to be generated. supported values for keytype are rsa for RSA with 2048 bits, and rsaLENGTH for RSA with a bit length of LENGTH. if you don't say anything, it defaults to rsa2048. slay, defaults ✨
  • --pin pin β€” lets you specify the PIN value right on the command line. if the value is set to env:VARIABLE, then the value of the specified environment variable gets used instead. by default, the code is prompted on the command line if it's needed.
okay serious moment, bestie 🚨 on most operating systems, any user can display the command line of any process on the system using utilities such as ps(1). so passing codes on the command line is lowkey risky β€” you should prefer passing the codes via an environment variable on an unsecured system. protecting your PIN is the vibe check that matters πŸ’–
  • --pretty β€” print values in pretty format. aesthetic output for aesthetic people πŸŽ€
  • --raw β€” print values in raw format, as they are stored on the card. no filter, no glow-up, just the actual bytes 🌈
  • --reader arg, -r arg β€” the number of the reader to use. by default, the first reader with a present card is used. if arg is an ATR, the reader with a matching card will be chosen. picking your reader like picking your fit πŸ‘‘
  • --user-info, -U β€” show card holder information. who's the owner, bestie? πŸͺͺ
  • --verify pintype β€” verify PIN (CHV1, CHV2 or CHV3). three flavors of verification, pick your fighter πŸ’…
  • --version, -V β€” print the version of the utility and exit. quick lil flex then bye πŸ‘‹
  • --verbose, -v β€” verbose operation. use it several times to enable debug output. the more times you say it, the more it tells you β€” stack it up πŸ—£οΈ
  • --wait, -w β€” wait for a card to be inserted. it'll just. sit there. patiently. like a good friend 🫢

πŸ’œ AUTHORS πŸ’œ

the openpgp-tool utility was written by Peter Marschall <peter@adpm.de>. thank you for your service, legend πŸ«‘πŸ’–


and that's the whole page, bestie!! this one's from the opensc manual set, dated 04/19/2026 β€” go forth and read your smart cards responsibly βœ¨πŸŽ€πŸ’…

πŸ“¦ where this page comes from