MAC Calculator (ISO/IEC 9797-1)
NOUVEAUCalculate an ISO/IEC 9797-1 MAC with algorithm 1 (CBC-MAC) or algorithm 3 (retail MAC) and padding method 1 or 2, showing 8-byte and 4-byte results.
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.
Runs entirely in your browser. Use test keys only — never paste production keys into a web page.
Exemples rapides
Des entrées typiques et les résultats produits par cet outil.
Présentation
ISO/IEC 9797-1 defines the block-cipher MACs used all over card payments. Algorithm 3, the "retail MAC", protects ISO 8583 messages and is the core of EMV application cryptograms and issuer scripts. Algorithm 1 is the plain CBC-MAC found in older standards such as FIPS 113.
This MAC calculator runs both algorithms with DES. Algorithm 1 takes an 8-byte DES key or a 16/24-byte Triple DES key; algorithm 3 takes a 16-byte key split into K and K′. Choose padding method 1 (zeros) or method 2 (80 then zeros), enter hex or text data, and see the padded data, the full 8-byte MAC and the 4-byte truncation most messages carry.
Pourquoi utiliser cet outil ?
- Check ISO 8583 message MACs during host testing
- See the padded data before it is MACed
- Full 8-byte MAC and 4-byte truncation
- Runs in your browser — use test keys only
Fonctionnalités
Algorithm 1
CBC-MAC with single DES or Triple DES on every block.
Algorithm 3
Retail MAC: single DES chain, final block with K′ then K.
Padding 1 and 2
Zero padding or 80 00… padding, shown block by block.
Truncation
Leftmost 4 bytes shown next to the full MAC.
Mode d'emploi
Choose algorithm and padding
Most payment messages use algorithm 3.
Enter the key
Check its KCV in the result.
Enter the data
Hex or UTF-8 text.
Calculate MAC
Copy the 8-byte or 4-byte value.