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 โ€” Causes npa-tool to 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 variables PIN, PUK, CAN, MRZ, and NEWPIN. You may want to clean your environment before enabling this. (default=off)
โš ๏ธ bestie, please clean your environment before turning --env on. the env vars PIN, PUK, CAN, MRZ, and NEWPIN are 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. Use 7F4C0E060904007F000703010203530103 to 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, use eID for the electronic identification application and eMRTD for 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: --break brute forces your PIN/CAN/PUK, and --disable-all-checks disables 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