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-keyarg β delete the key indicated by arg. arg can be1,2,3, orall. yes,allis a real option, use it responsibly bestie π--doarg,-darg β dump the private data object (DO) indicated by arg. arg can be written asx,10x, or010xto access DO010x, where x is1,2,3, or4. 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 π¨--execprog,-xprog β execute the given program with data in environment variables. it's giving "pipe it straight into your fave script" π§--gen-keyarg,-Garg β generate a key with the ID given as arg. arg can be one of1,2, or3. 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-typekeytype,-tkeytype β specify the type of the key to be generated. supported values for keytype arersafor RSA with 2048 bits, andrsaLENGTHfor RSA with a bit length ofLENGTH. if you don't say anything, it defaults torsa2048. slay, defaults β¨--pinpin β lets you specify the PIN value right on the command line. if the value is set toenv: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 π--readerarg,-rarg β 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? πͺͺ--verifypintype β verify PIN (CHV1,CHV2orCHV3). 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
- fedora 43: opensc 0.27.1-2.fc43 Β· LGPL-2.1-or-later AND BSD-3-Clause
- fedora 44: opensc 0.27.1-2.fc44 Β· LGPL-2.1-or-later AND BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms