← Back to the tool

Payments · Under the hood

Illustrative CAVV generator

What each button in the tool actually computes, step by step — with the real formulas.

Why this tool is labeled differently from the others

The PIN block, CVV, and ARQC tools on this site all implement real, standardized, publicly documented algorithms — ISO 9564, the two-block CVV construction, EMV's Option A key derivation — and the DES/3DES core behind them is verified against an official FIPS test vector. CAVV generation has no equivalent to point to: EMV 3DS explicitly leaves it issuer- and network-proprietary, and Visa, Mastercard, and others have never published theirs. This tool can only show a representative construction built from the same kind of ingredients — never claim to reproduce the real thing.

A representative MAC over the fields a real CAVV would plausibly cover
function illustrativeCavv(panLast12, atc, amountCents, eci, authKey) {
  const data = (panLast12 + atc + amountCents + eci).padEnd(32, "0");
  const { k1, k2, k3 } = keyHalves(authKey);
  return bigIntToHex(tdesCbcMac(hexToBlocks(data), k1, k2, k3), 8);
}

Chosen because it reuses the same 3DES-CBC-MAC building block the ARQC tool uses for its own cryptogram — structurally similar to how payment MACs tend to be built, not a claim about what any specific network actually does.

What the ECI comparison is meant to show

"Compute frictionless & challenge CAVVs" runs the identical function twice, changing only the ECI value (05 vs. 06) — the same one-field-changes-everything property the CVV tool demonstrates with its service code. Whatever the real algorithm actually is, any sound construction needs this property: an attacker who captured one valid CAVV should learn nothing useful about any other.

Why the tampered-amount demo matters more than the CAVV itself

The actual point of a CAVV isn't the specific digits — it's that the issuer can recompute the same value from the transaction it actually authorized and catch a mismatch. Changing the demo amount by a single cent and recomputing shows that property directly, independent of exactly which construction sits underneath it.

Now try it

Back to Illustrative CAVV generator →

See the shape of CAVV generation — PAN, ATC, amount, and ECI feeding a MAC-style construction — clearly labeled as representative, since no card network has ever published its real, proprietary algorithm.