⚡
usefultools.dev
MAC

MAC Calculator (ISO/IEC 9797-1)

NOUVEAU

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

Alg 3 · pad 2
1234567890ABCDEF · key 0123…3210
912476C111DB4238
Alg 3 · pad 1
1234567890ABCDEF · key 0123…3210
479EF7C1ECFE64AC
Alg 1 · pad 2
1234567890ABCDEF · key 0123…3210
925B1737EF681AD3
Alg 1 · DES
FIPS 113 text · key 0123…CDEF
F1D30F6849312CA4
📖

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

1

Choose algorithm and padding

Most payment messages use algorithm 3.

2

Enter the key

Check its KCV in the result.

3

Enter the data

Hex or UTF-8 text.

4

Calculate MAC

Copy the 8-byte or 4-byte value.

🤔

Questions fréquentes