MAC Calculator
Compute ISO 9797-1 Message Authentication Codes using DES/3DES — supports Algorithm 1 (CBC-MAC), Algorithm 2 (with ISO padding), and Algorithm 3 (Retail MAC used in EMV/payment systems).
Use test data only. All calculations run locally in your browser — PayProbe never sees, transmits, or stores your PAN, CVV, keys, PINs, or cryptographic inputs. How we handle data →
Input data
Algorithm overview
Algorithm 1 (CBC-MAC): Data must be block-aligned. Single DES CBC chain using the left 8 bytes of the key. No padding.
Algorithm 2 (CBC-MAC + ISO padding): Same as Algorithm 1 but ISO padding (0x80 00…) is applied first.
Algorithm 3 (Retail MAC): All blocks except the last use single DES (K1). The final block uses Triple-DES with the full key. Standard for EMV/payment systems.
ISO padding: Append 0x80 then 0x00 bytes to reach the next 8-byte boundary.