Tools

    ARQC verifier and calculator

    Shows each derivation step and tests common input variations when an ARQC does not match.

    • Runs in your browser
    • No sign-up

    Input

    Option B card key, EMV common session key, Method 2 padding, ARPC method 2. Option B only differs from Option A for PANs longer than 16 digits.
    Amount, other amount, terminal country, TVR, currency, date, type, UN, AIP, ATC, IAD/CVR, concatenated per the CVN template.
    Is the data already padded?
    ARQC generated: AD2EC3522E88CDED

    Result

    ARQC (generated)
    AD2EC3522E88CDED
    The data the MAC covers
    data000000001000000000000008400000000000098000000000000825000100padding8000

    Labelled in the EMV Book 2 recommended order, which Visa CVN 10 and 18 follow; check other versions against their own layout. The MAC runs over 4 blocks of 8 bytes:

    Block 10000000010000000
    Block 20000000840000000
    Block 30000098000000000
    Block 40008250001008000
    Derivation trace (7 steps)
    IMK0123456789ABCDEFFEDCBA9876543210KCV 08D7B4
    Y = Option B with a PAN of 16 digits or fewer = Option A: rightmost 16 digits of PAN ‖ PSN0000000000000200
    UDK = TDES(IMK, Y) ‖ TDES(IMK, Y ⊕ FF…), odd parity: EMV Option B13FD323701FBFEE07C49DF575D9B1A62KCV BB9805
    Session key = EMV CSK(UDK, ATC)506B8DED1F5BCE86B10B3333497DE380ATC 0001 · KCV 67CFC5
    Transaction data00000000100000000000000840000000000009800000000000082500010030 bytes
    Padded: ISO 9797-1 Method 2 (80 then zeros)0000000010000000000000084000000000000980000000000008250001008000
    ARQC = Retail-MAC(SK, padded)AD2EC3522E88CDED

    Every intermediate value is shown so you can find which input is wrong. Runs in your browser. Test keys only.

    Cryptogram still not matching after every variation? IDNTEQ’s EMV team can find the cause. EMV transaction troubleshooting

    About this tool

    Runs in your browser. This page loads no analytics or third-party scripts and does not send what you type.

    Verify or generate an ARQC with the derivation trace visible: IMK → UDK → session key, KCVs at each stage, the assembled and padded data block, and the computed cryptogram. On a mismatch the tool re-runs the computation with common mistakes and reports any variant that matches.

    Derivation trace

    Debugging a cryptogram mismatch means finding which input is wrong, so the tool shows every intermediate value: the UDK derived from the IMK (EMV master key derivation), the session key (the EMV Common Session Key, or none where the card key is used directly), the transaction data, the padded data block (ISO 9797-1 Method 2, or Method 1 zero padding) and the Retail-MAC output.

    Two profiles are preset and reproduce published examples: Visa CVN 18 (Option B card key, EMV Common Session Key, Method 2 padding, ARPC method 2; AWS ARQC example and the pyemv VisaCVN18 example, ARPC 76503F48; CVN 22 uses the same derivation with different transaction data) and Visa CVN 10 (Option A card key used directly, zero padding, ARPC method 1; AWS example). Option B only differs from Option A for PANs longer than 16 digits. Mastercard CVN 14 and 15 also use the EMV Common Session Key, so they can be computed with that setting and the transaction data the Mastercard profile defines; there is no Mastercard preset and no Mastercard example has been checked. Mastercard CVN 12 and 13 use a Mastercard-specific session key derivation that includes the unpredictable number; it is not supported.

    Checks on a mismatch

    When your expected ARQC does not match, the tool re-runs the computation with a set of common mistakes (the other session-key method, the other padding method, already-padded data, byte-swapped ATC) and reports any variant that reproduces the expected value. A matching variant points to a likely cause; it does not prove it.

    If no variant matches, check the data-element order, the key value and the PAN/PSN against the profile and the test data.

    Published examples and input conventions

    Load a published example to see the published value next to the tool’s result. Transaction data can be entered raw (the tool pads it) or already padded (used as is). The ARPC is computed over the ARQC to verify when one is given, as the issuer would answer the ARQC it received.

    Spec references

    • EMV 4.4 Book 2 §8.1 (Application Cryptogram)
    • EMV Book 2 Annex A1.3 (Session Key derivation)
    • EMV Book 2 Annex A1.4 (Option A / Option B)
    • EMV Book 2 §8.2 (ARPC methods 1 and 2)
    • EMV Book 3 Annex C10 (Card Status Update)
    • ISO 9797-1 (MAC Algorithm 3)

    Verified against

    Specifications
    • EMV 4.4 Book 2 §8.1 and Annex A1.3 (Application Cryptogram, Common Session Key)
    • EMV 4.4 Book 2 Annex A1.4 (card key derivation, Option A and Option B)
    • EMV 4.4 Book 2 §8.2 (ARPC methods 1 and 2)
    • ISO/IEC 9797-1 MAC algorithm 3, padding methods 1 and 2
    Published examples in the tests
    Other checks in the tests
    • Option A card key and common session key against an OpenSSL TDES construction
    • Mismatch diagnosis: wrong padding, wrong session-key method, swapped ATC, already-padded data
    Inputs
    IMK or UDK (16 bytes), PAN 1–19 digits, PSN, ATC, transaction data raw or already padded, optional ARQC and ARC/CSU.
    Not covered
    Mastercard CVN 12/13 session keys are not supported; no Mastercard example has been checked. Transaction data must be assembled in the order the CVN requires.
    Last reviewed