EMV & Card Tools
The EMV & Card Tools group — offline authentication verifiers (SDA, DDA), cryptogram calculators for EMV 4.1, EMV 4.2, M/Chip and VSDC, issuer-script secure messaging, CAP tokens and HCE contactless keys. Each tool is hex-driven, with annotated outputs and an audit log.
On this page
Introduction
The EMV & Card Tools group — smart card, EMV and contactless payment tools — is organised by the stage of a transaction it belongs to: offline authentication first (SDA, DDA), then the cryptogram calculators for each scheme, then the issuer-script and token tools that run after authorisation.
Every calculator carries its own activity log on the right, so each intermediate value — derived key, session key, recovered certificate — is visible rather than just the final result.
All tools
Every tool in this group, in the order an EMV transaction reaches them — each card links to the detailed reference below.
SDA Verification
Static Data Authentication: the terminal verifies issuer-signed static data against a CA public key. The tool splits the job into the two steps the terminal performs — recover the issuer public key from its certificate, then use that key to check the signature over the card’s static data.
Retrieve Issuer Public Key
emv-tools · Retrieve Issuer Public Key
- CA PK Modulus and CA PK Exponent
- From the Visa / MasterCard CA hierarchy, for the index in tag
8F. - Issuer PK Certificate
- Tag
90. - Issuer PK Remainder
- Tag
92; optional. - Issuer PK Exponent
- Tag
9F32.
Button: Retrieve Key. Every field carries a live character count, and one with an odd number of hex characters is flagged before you run it — the usual cause of a certificate that will not recover.
Verify SSAD
emv-tools · Verify SSAD
- Issuer PK Modulus
- The key recovered in the previous step.
- SSAD (Signed Static Data)
- Tag
93, built from the AFL records.
Button: Verify SSAD. The log reports the recovered hash alongside the pass/fail result, so a mismatch can be traced to the data rather than the key.
DDA Verification
Dynamic Data Authentication: the card signs terminal-supplied dynamic data, proving it holds the ICC private key. Three tabs walk the chain down — issuer key, then card key, then the signature itself.
emv-tools · Retrieve Issuer PK — The Retrieve Issuer PK form filled in, beside the activity log
Retrieve ICC Public Key
emv-tools · Retrieve ICC Public Key
- Issuer PK Modulus / Exponent
- Recovered on the first tab.
- ICC PK Certificate
- Tag
9F46. - ICC PK Remainder
- Tag
9F48; optional. - ICC PK Exponent
- Tag
9F47. - Static Data To Authenticate
- The AFL-built record the certificate hash covers.
- AIP
- Tag
82, which the hash includes when the card asks for it.
Button: Retrieve ICC Key.
Verify SDAD
emv-tools · Verify SDAD
- ICC PK Modulus / Exponent
- From the previous tab.
- SDAD (Signed Dynamic Data)
- Tag
9F4B, returned by INTERNAL AUTHENTICATE. - Dynamic Data
- The terminal’s unpredictable number, e.g. from tag
9F37.
Button: Verify Dynamic Signature.
EMV 4.1 Crypto Calculator
The reference cryptogram calculator, and the one to learn the flow on: five tabs that follow the key hierarchy from the issuer master key down to the response cryptogram — UDK Derivation, Session Keys, Cryptogram, ARPC, Utilities. The scheme-specific calculators below are the same shape with their own derivations.
UDK Derivation
emv-tools · UDK Derivation
- Master Derivation Key (MDK)
- 32 hex characters; the counter turns green at the right length.
- PAN and PAN Sequence
- What binds the derived key to one card. The PAN is Luhn-checked, and a failure is a warning rather than a block: the banner reads PAN Luhn checksum failed, but calculation will proceed, which is what you want for test PANs.
- Derivation Option
OPTION_AorOPTION_B.- Key Parity
ODD,EVENor none.
Button: Calculate UDK.
Session Keys
emv-tools · Session Key Derivation
- Master Key (UDK)
- The card key from the previous tab.
- Initial Vector (IV)
- 32 hex characters; zeros for the common case.
- ATC
- The transaction counter the session key is diversified on.
- Branch Factor and Height
- The EMV tree parameters, defaulting to 50 and 8.
- Key Parity
Button: Generate Session Key.
Cryptogram
emv-tools · Application Cryptogram
- Session Key
- From the Session Keys tab.
- Terminal Data
- The CDOL-built terminal side of the request.
- ICC Data
- AIP, ATC, CVR and the rest of the card side.
- Cryptogram Type
ARQC,TCorAAC. The button label follows the selection.- Padding Method
- e.g.
METHOD_1_ISO_9797.
ARPC
emv-tools · ARPC Generation
- Session Key and Transaction Cryptogram
- The ARQC the card produced.
- Response Code
- The two-character ARC, e.g.
Y3. - ARPC Method
- Method 1 or 2.
Button: Generate ARPC.
Utilities
Key validation helpers that sit alongside the derivation tabs. Paste a Key (Hex) and Calculate KCV returns its check value — the quickest way to confirm the key you loaded is the key you meant.
emv-tools · Cryptographic Utilities
EMV 4.2 Crypto Calculator
The same five tabs against the EMV 4.2 rules. The UDK tab states its derivation in the panel subtitle — EMV 4.2 Option A — and drops the separate parity selector, so the form is just the master key and the card identifiers.
emv-tools · UDK Derivation · EMV 4.2 Option A
- Master Derivation Key (MDK)
- 32 characters.
- Primary Account Number (PAN)
- PAN Sequence Number
Button: Calculate UDK. Session key, cryptogram and ARPC follow on their own tabs exactly as in 4.1.
MasterCard M/Chip Crypto Calculator
M/Chip’s own derivation, with a fifth tab that 4.1 and 4.2 do not have: Session Key (EMV 2000), kept for cards personalised against the older scheme.
emv-tools · UDK
- MDK, PAN, PAN Sequence No.
- UDK Derivation Option
Option AorOption B.- Key Parity
NONEby default here, unlike the EMV 4.1 tool.
Button: Generate UDK. The cryptogram tab is labelled AAC/ARQC/TC — one tab covering all three types.
VSDC Crypto Calculator
Visa Smart Debit/Credit, in four tabs: UDK, Session Keys, AAC/ARQC/TC, ARPC.
emv-tools · UDK
- MDK, PAN, PAN Sequence No.
- UDK Derivation Option
Option Aby default.- Key Parity
Oddby default.
Button: Generate UDK.
Secure Messaging
Issuer scripts reach the card after authorisation, and Secure Messaging is what protects them: SMI for integrity, SMC for confidentiality. Three tabs cover the sequence — derive the session keys, build the encrypted PIN block a PIN-change script carries, then MAC the command.
Session Key
emv-tools · Session Key
- Input Key Type
MKto start from the master keys.- MK-SMI and MK-SMC
- The integrity and confidentiality master keys, 32 characters each.
- Application Cryptogram (AC)
- Diversifies the session keys onto this transaction.
- Command Number
- Advances with each script command in the sequence.
Button: Generate Session Keys.
PIN Block
emv-tools · PIN Block Generation
- Output PIN Block Format
Standard EMV PIN Blockby default.- SK-ENC
- The encryption session key from the previous tab.
- New PIN
- The value the script will set.
Button: Generate PIN Block.
MAC
The MAC covers the command as the card will see it, so the form takes the APDU apart rather than asking for one hex blob:
emv-tools · MAC Calculation
- SK-MAC
- The integrity session key.
- Class, INS, P1, P2, Lc, Le
- The APDU header and lengths.
- ARC and AC
- Authorisation response code and application cryptogram.
- Payload
- The script data itself.
CAP Token Computation
Computes the Chip Authentication Programme token some banks ask for as an online-banking second factor — the number a customer reads off a handheld reader and types into the website.
emv-tools · Chip Authentication Programme
- IPB
- Issuer Processing Base, the mask that selects which bits reach the token.
- IAF
- Issuer Action Format.
- PAN + SN
- PAN with its sequence number appended.
- CID
- Cryptogram Information Data.
- ATC
- Application Transaction Counter.
- AC
- The application cryptogram the card generated.
- IAD
- Issuer Application Data.
Button: Generate Token.
HCE (Host Card Emulation)
Host Card Emulation puts the card credential in a phone instead of a chip, so the key that signs a tap is short-lived by design. The Visa HCE calculator follows that chain across four tabs: card key, then the Limited-Use Key it produces, then the two contactless cryptograms an HCE wallet can present.
emv-tools · UDK — The UDK form filled in with a master key, PAN and PAN sequence number, beside the activity log
LUK Key
The Limited-Use Key is bound to a point in time, which is what limits it:
emv-tools · LUK Key Generation
- UDK
- The card key from the first tab.
- Current Year (YY) and Current Hours (HH)
- The window the key belongs to.
- Hourly Counter
- Which key within that hour.
Button: Generate LUK.
MSD
Magnetic Stripe Data mode — the legacy contactless path, where the phone presents a dynamic value in a magstripe-shaped message.
emv-tools · MSD Cryptogram
- LUK_ATC
- The limited-use key with its counter.
- MSD Device Type
- Drop-down.
qVSDC
The full contactless cryptogram. Each field is labelled with the EMV tag it comes from, so a capture can be transcribed straight in:
emv-tools · qVSDC Cryptogram
- LUK
- Amount (9F02), Amount, Other (9F03)
- Country Code (9F1A), Currency Code (5F2A)
- TVR (95), AIP (82), CVR (from 9F10)
- Transaction Date (9A), Transaction Type (9C)
- Unpredictable No. (9F37), ATC (9F36)
Tips
- For SDA / DDA work, double-check the CA public key index in tag
8Fmatches the CA you supply — mismatched indices is the most common SDA failure. - Cryptogram versions vary by issuer, and the CVN is encoded inside the IAD (tag
9F10) — read it before picking a calculator, because the derivation differs. - Work the tabs left to right. Each one consumes what the previous produced, and the activity log keeps every intermediate key so you can restart mid-chain rather than from the master key.
Try it on your own transactions
Free and open source. Download the studio and run these calculators on your desk in minutes.
Testing with a team, or certifying with a scheme? Pro raises the CPS ceiling, unlocks the full algorithm set and deep simulator tweaks, plus hosted endpoints and priority support.
Register for Pro