⚡
usefultools.dev
AAV

SPA AAV Calculator (Mastercard SPA)

NOUVEAU

SPA AAV calculator: build a Mastercard 3-D Secure 1.0 AAV from merchant name, PAN and sequence number with the CVC2 or HMAC-SHA-1 MAC method.

Fonctionne à 100 % dans votre navigateur — vos données ne sont jamais envoyées ni stockées sur nos serveurs.

Cet outil n'est pas encore entièrement traduit : une partie du texte est encore en anglais. L'outil lui-même fonctionne de la même façon dans toutes les langues.

0 none (attempts) · 1 password · 2 secret key / chip

Calculations run locally in your browser. Use test card numbers and test keys only. This builds the original SPA (3-D Secure 1.0) AAV, not the newer SPA2 format.

⚡

Exemples rapides

Des entrées typiques et les résultats produits par cet outil.

CVC2
CVC2 · keys 0011…/8899…
jHyn+7YFi1EUAREAAAAvBDkAAAA=
CVC2
CVC2 · control byte 86
hnyn+7YFi1EUAREAAAAvBlcAAAA=
HMAC
HMAC · key 0011…EEFF
jHyn+7YFi1EUAREAAAAv6yf8f6s=
Merchant
"SPA Merchant, Inc."
Name hash 7CA7FBB6058B5114
📖

Présentation

In Mastercard SecureCode (3-D Secure 1.0) the issuer ACS returns an Accountholder Authentication Value (AAV) built with the Secure Payment Application (SPA) algorithm. The 20-byte AAV holds a control byte, a hash of the merchant name, the ACS identifier, the authentication method, a BIN key identifier, a transaction sequence number and a MAC, and travels Base64-encoded as 28 characters.

This calculator builds the AAV with either MAC method. The CVC2 method reuses the CVC2 algorithm with two DES keys: the PAN, the last four decimal digits of the sequence number, the authentication method and the last two decimal digits of the control byte form the input. The HMAC method takes HMAC-SHA-1 over the padded PAN and the first 15 AAV bytes. The defaults reproduce the published SPA examples.

Pourquoi utiliser cet outil ?

  • Generate AAVs for 3-D Secure 1.0 test cases
  • Check an ACS or authorization AAV verification
  • See the merchant hash and MAC input
  • Runs locally — use test keys only
⭐

Fonctionnalités

🔑

CVC2 or HMAC

Both SPA MAC methods: DES key pair or 16–24-byte HMAC-SHA-1 key.

#️⃣

Merchant name hash

Edits the name as the SPA rules require and takes the first 8 bytes of SHA-1.

🧾

Hex and Base64

Returns the 20-byte AAV in hex and as the 28-character Base64 value.

✅

Published vectors

Reproduces the three published SPA examples byte for byte.

🛠️

Mode d'emploi

1

Pick the MAC method

CVC2 MAC or HMAC-SHA-1 MAC.

2

Fill the AAV fields

Merchant name, PAN, control byte, ACS id, method, BIN key id, sequence number.

3

Enter the keys

Key A and Key B, or the HMAC key.

4

Build AAV

Copy the Base64 value or the hex bytes.

🤔

Questions fréquentes