NPA-TOOL(1)
๐ NPA-TOOL โ the OpenSC tool that reads your ID card / ePassport
okay bestie, welcome to npa-tool(1) from the OpenSC Tools collection ๐ซถ she's a whole main character in the smartcard world and she's about to tell you everything about the little chip in your ID card or passport.
โจ NAME โจ
npa-tool โ displays information of an ID card or ePassport. ๐ณ๐
๐ธ SYNOPSIS ๐ธ
npa-tool [OPTIONS]
literally that's it. no positional args, just vibes and options ๐
๐ฆ DESCRIPTION ๐ฆ
The npa-tool utility is used to display information stored on an ID card or on a passport and to perform some write and verification operations. no cap, she does reads and writes and checks.
Extended Access Control version 2 is performed according to ICAO Doc 9303 or BSI TR-03110 so that an ICAO compliant machine readable travel document (MRTD) as well as EAC compliant ID cards, for example the German ID card (neuer Personalausweis, nPA), may be read. so yeah, both your passport and your fancy German ID card are getting read. iconic behavior honestly ๐
๐ OPTIONS ๐
--help,-hโ Print help and exit. your "wait what does this do" bestie ๐ฅบ--version,-Vโ Print version and exit. she's telling you who she is ๐โโ๏ธ--reader arg,-r argโ 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. yes, you can literally pick by ATR. iykyk ๐ฅ--verbose,-vโ Causesnpa-toolto be more verbose. Specify this flag several times to be more verbose. stack it like it's a combo, bestie โ more-v, more words ๐ฃ๏ธ
๐ Password Authenticated Connection Establishment (PACE)
--pin [STRING],-p [STRING]โ Run PACE with (transport) eID-PIN. ๐--puk [STRING],-u [STRING]โ Run PACE with PUK.--can [STRING],-c [STRING]โ Run PACE with Card Access Number (CAN).--mrz [STRING],-m [STRING]โ Run PACE with Machine Readable Zone (MRZ). Enter the MRZ without newlines. do not hit enter mid-MRZ, i'm begging ๐--envโ Specify whether to use environment variablesPIN,PUK,CAN,MRZ, andNEWPIN. You may want to clean your environment before enabling this. (default=off)
โ ๏ธ bestie, please clean your environment before turning--envon. the env varsPIN,PUK,CAN,MRZ, andNEWPINare just sitting there and you don't want randos reading them. be safe ๐
๐ PIN management
--new-pin [STRING],-N [STRING]โ Install a new PIN. glow up for your PIN โจ--resume,-Rโ Resume eID-PIN (uses CAN to activate last retry). (default=off)--unblock,-Uโ Unblock PIN (uses PUK to activate three more retries). (default=off) โ three more retries, that's the deal ๐ค
๐ก๏ธ Terminal Authentication (TA) and Chip Authentication (CA)
--cv-certificate FILENAME,-C FILENAMEโ Specify Card Verifiable (CV) certificate to create a certificate chain. The option can be given multiple times, in which case the order is important. ORDER. MATTERS. do not shuffle these like a playlist ๐ง--cert-desc HEX_STRINGโ Certificate description to show for Terminal Authentication.--chat HEX_STRINGโ Specify the Card Holder Authorization Template (CHAT) to use. If not given, it defaults to the terminal's CHAT. Use7F4C0E060904007F000703010203530103to trigger EAC on the CAT-C (Komfortleser). yes that's the exact string, copy it character for character, no typos ๐--auxiliary-data HEX_STRING,-A HEX_STRINGโ Specify the terminal's auxiliary data. If not given, the default is determined by verification of validity, age and community ID.--private-key FILENAME,-P FILENAMEโ Specify the terminal's private key. ๐คซ--cvc-dir DIRECTORYโ Specify where to look for the certificate of the Country Verifying Certification Authority (CVCA). If not given, it defaults to/home/fm/.local/etc/eac/cvc.--x509-dir DIRECTORYโ Specify where to look for the X.509 certificate. If not given, it defaults to/home/fm/.local/etc/eac/x509.--disable-ta-checksโ Disable checking the validity period of CV certificates. (default=off) โ turning this off means nobody's checking those validity periods anymore, so like, know what you're doing ๐ซฃ--disable-ca-checksโ Disable passive authentication. (default=off)
๐ Card application
--application appโ What application to select on the card, useeIDfor the electronic identification application andeMRTDfor the ePassport application. (default=eID)
๐ Read and write data groups
reading time bestie, get comfy ๐
--read-all-dgsโ Read all available data groups.--read-dg1โ Read data group 1.--read-dg2โ Read data group 2.--read-dg3โ Read data group 3.--read-dg4โ Read data group 4.--read-dg5โ Read data group 5.--read-dg6โ Read data group 6.--read-dg7โ Read data group 7.--read-dg8โ Read data group 8.--read-dg9โ Read data group 9.--read-dg10โ Read data group 10.--read-dg11โ Read data group 11.--read-dg12โ Read data group 12.--read-dg13โ Read data group 13.--read-dg14โ Read data group 14.--read-dg15โ Read data group 15.--read-dg16โ Read data group 16.--read-dg17โ Read data group 17.--read-dg18โ Read data group 18.--read-dg19โ Read data group 19.--read-dg20โ Read data group 20.--read-dg21โ Read data group 21.
and now the โ๏ธ write girlies:
--write-dg17 HEX_STRINGโ Write data group 17.--write-dg18 HEX_STRINGโ Write data group 18.--write-dg19 HEX_STRINGโ Write data group 19.--write-dg20 HEX_STRINGโ Write data group 20.--write-dg21 HEX_STRINGโ Write data group 21.
๐ notice how reads go all the way up to dg21 but writes only exist for dg17 through dg21. that's just how she is. respect the range.
๐งฎ Verification of validity, age and community ID
--verify-validity YYYYMMDDโ Verify chip's validity with a reference date. ๐--older-than YYYYMMDDโ Verify age with a reference date.--verify-community HEX_STRINGโ Verify community ID with a reference ID.
๐ง Special options, not always useful
(the original literally says that, bestie, i'm not being shady)
--break,-bโ Brute force PIN, CAN or PUK. Use together with options-p,-a, or-u. (default=off) โ yes she said-a. that's what the manpage says. we report, we don't fix ๐--translate FILENAME,-t FILENAMEโ Specify the file with APDUs of HEX_STRINGs to send through the secure channel. (default=stdin)--tr-03110v201โ Force compliance to BSI TR-03110 version 2.01. (default=off)--disable-all-checksโ Disable all checking of fly-by-data. (default=off)
โ ๏ธ okay real talk:--breakbrute forces your PIN/CAN/PUK, and--disable-all-checksdisables all the fly-by-data checking. these are the "i know exactly what i'm doing" buttons. handle with care, no cap ๐ซถ
๐ AUTHORS ๐
npa-tool was written by Frank Morgner <frankmorgner@gmail.com>. thank you frank, you ate ๐
and that's the whole page, bestie ๐ this was npa-tool from the opensc source, dated 04/19/2026, page NPA-TOOL(1). go read some smartcards, slay, and remember: clean your environment ๐
โจ
๐ฆ 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