EMV 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.

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.

The EMV & Card Tools hub with cards for the EMV 4.1, EMV 4.2, MasterCard and VSDC crypto calculators, SDA and DDA verification, CAP Token, HCE Visa and Secure Messaging
emv-tools EMV & Card Tools hub

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

Verify issuer-signed static data against a CA public key.

View details →
DDA Verification

Check the card’s signature over terminal-supplied dynamic data.

View details →
EMV 4.1 Crypto Calculator

The reference cryptogram chain: UDK, session keys, ARQC/TC/AAC, ARPC and key utilities.

View details →
EMV 4.2 Crypto Calculator

The same chain under the EMV 4.2 rules, derivation stated on the form.

View details →
MasterCard M/Chip Crypto

M/Chip derivation, with a separate EMV 2000 session key tab.

View details →
VSDC Crypto Calculator

Visa Smart Debit/Credit: UDK, session keys, AAC/ARQC/TC and ARPC.

View details →
Secure Messaging

Build and verify SMC / SMI protection on issuer scripts.

View details →
CAP Token Computation

Compute Chip Authentication Programme tokens for banking 2FA.

View details →
HCE (Host Card Emulation)

Generate the Limited-Use and Single-Use Keys HCE tokenisation needs.

View details →

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

Retrieve Issuer Public Key form with CA PK modulus and exponent, issuer PK certificate, remainder and exponent fields, each showing a live character count
emv-tools Retrieve Issuer Public Key

Inputs

  • 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

Verify SSAD form with the recovered issuer PK modulus and the signed static application data, above the Verify SSAD button
emv-tools Verify SSAD

Inputs

  • 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.

DDA - Dynamic Data Authentication with its three tabs (Retrieve Issuer PK, Retrieve ICC PK, Verify SDAD), the Retrieve Issuer PK form filled in, beside the activity log
emv-tools DDA Verification

Retrieve ICC Public Key

Retrieve ICC Public Key form with issuer PK modulus and exponent, ICC PK certificate, remainder and exponent, static data to authenticate and the AIP
emv-tools Retrieve ICC Public Key

Inputs

  • 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

Verify SDAD form with the ICC PK modulus and exponent, the signed dynamic data, and the dynamic data from tag 9F37
emv-tools Verify SDAD

Inputs

  • 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.

EMV 4.1 Crypto Calculator on the UDK Derivation tab with a master derivation key, PAN, PAN sequence, derivation option and key parity, beside the activity log
emv-tools EMV 4.1 Crypto Calculator

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 OptionOPTION_A or OPTION_B.
  • Key ParityODD, EVEN or none.

Button: Calculate UDK.

Session Keys

Session Key Derivation form with the master key (UDK), an all-zero initial vector, ATC, branch factor, height and key parity above the Generate Session Key button
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

Application Cryptogram form with a session key, terminal data, ICC data, a cryptogram type of ARQC and ISO 9797 method 1 padding, above the Generate ARQC button
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 TypeARQC, TC or AAC. The button label follows the selection.
  • Padding Method — e.g. METHOD_1_ISO_9797.

ARPC

ARPC Generation form with a session key, the transaction cryptogram, a Y3 response code and an ARPC method, above the Generate ARPC button
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

Cryptographic Utilities panel with a single hex key field above the Calculate KCV button
emv-tools Cryptographic 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 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 4.2 Crypto Calculator on the UDK Derivation tab, labelled EMV 4.2 Option A, with master derivation key, PAN and PAN sequence number fields, beside the activity log
emv-tools EMV 4.2 Crypto Calculator
  • 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.

MasterCard M/Chip Crypto Calculator with UDK, Session Key (EMV 2000), Session Keys, AAC/ARQC/TC and ARPC tabs, the UDK form filled in, beside the activity log
emv-tools MasterCard M/Chip Crypto Calculator
  • MDK, PAN, PAN Sequence No.
  • UDK Derivation OptionOption A or Option B.
  • Key ParityNONE by 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.

VSDC Crypto Calculator on the UDK tab with MDK, PAN, PAN sequence number, derivation option and odd key parity, beside the activity log
emv-tools VSDC Crypto Calculator
  • MDK, PAN, PAN Sequence No.
  • UDK Derivation OptionOption A by default.
  • Key ParityOdd by 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.

MasterCard Secure Messaging on the Session Key tab with an MK input key type, MK-SMI and MK-SMC keys, the application cryptogram and a command number, beside the activity log
emv-tools MasterCard Secure Messaging

Session Key

  • Input Key TypeMK to 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

PIN Block Generation form with a Standard EMV PIN Block output format, an SK-ENC session key and a new PIN, above the Generate PIN Block button
emv-tools PIN Block Generation
  • Output PIN Block FormatStandard EMV PIN Block by default.
  • SK-ENC — The encryption session key from the previous tab.
  • New PIN — The value the script will set.

Button: Generate PIN Block.

MAC

MAC Calculation form with an SK-MAC key, the APDU header fields Class, INS, P1, P2, Lc and Le, an ARC, an application cryptogram and a payload, above the Generate MAC button
emv-tools MAC Calculation

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:

  • 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.

CAP Token Computation form with IPB, IAF, PAN plus sequence number, CID, ATC, application cryptogram and issuer application data fields above the Generate Token button
emv-tools CAP Token Computation

Inputs

  • 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.

Visa HCE Crypto Calculator with UDK, LUK Key, MSD and qVSDC tabs, the UDK form filled in with a master key, PAN and PAN sequence number, beside the activity log
emv-tools Visa HCE Crypto Calculator

LUK Key

LUK Key Generation form with a UDK, current year, current hours and an hourly counter above the Generate LUK button
emv-tools LUK Key Generation

The Limited-Use Key is bound to a point in time, which is what limits it:

  • 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

MSD Cryptogram form with a LUK_ATC value and an MSD device type selector above the Generate MSD Cryptogram button
emv-tools MSD Cryptogram

Magnetic Stripe Data mode — the legacy contactless path, where the phone presents a dynamic value in a magstripe-shaped message.

  • LUK_ATC — The limited-use key with its counter.
  • MSD Device Type — Drop-down.

qVSDC

qVSDC Cryptogram form with the LUK and the transaction fields amount, amount other, country code, TVR, currency code, transaction date, transaction type, unpredictable number, AIP, ATC and CVR
emv-tools qVSDC Cryptogram

The full contactless cryptogram. Each field is labelled with the EMV tag it comes from, so a capture can be transcribed straight in:

  • 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 8F matches 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.