ISO8583 payments MAC Calculator

Calculate message Retail MAC (Message Authentication Code)

MAC key [DES: 16 hex 3DES: 32 hex]

Input Data to apply MAC/hash to:

[for binary data, convert it to hex and select the Hex option below]

Select Algorythm

Select Data Input type.

How MAC {Message Authentication Code} Calculation works works

Let us start with this input data: 01234567890123450123456789012345

We will take the same value as the key: 01234567890123450123456789012345

We will take the setting of encryption as triple DES: 3DES

And the finish block will also be encrypted triple DES:3DES

Triple DES needs 3 keys, so up to 48 hex characters. We only provided 32 hex characters, 16 bytes double-key, the most used scenario

The first key is the first 8 bytes, first 16 hex characters(0-16);

The second key is the next 8 bytes, next 16 hex characters(16-32);

The third key is the first 8 bytes, first 16 hex characters(32-48 or 0-16) because we do not have a triple-length key;

k1:0123456789012345

k2:0123456789012345

k3:0123456789012345

We split the entire input data into blocks of 8 byes, or 16 hex characters

block:0123456789012345

We xor this block with the previous block. If this is the first block, we xor it with a block of all -zeroes

xor:0123456789012345

We perform a DES encryption of the block above with the first key. If 3DES is selected, we perform 3DES with the 3 keys

des:D5D16164F4B82E0F

Next block of 8 bytes:

block:0123456789012345

XOR with the previous block (CBC mode)

xor:D4F224037DB90D4A

And then again 3DES or DES. Given that this is the last block, the algorithm of the finishing selection will be applied.

des:04D62E1385AAF220

We are out of data to encrypt, so this is the resulting MAC

MAC:04D62E1385AAF220

  Related

Recent Articles on Iso8583

Choose the product you need

ISO8583 Converter REST-api

Convert ISO8583 to rest-api JSON XML SQL &more

ISO8583 Interface Connector

Integrate ISO8583 card schemes and hosts

ISO20022 SWIFT MT MX Converter

Convert and integrate ISO20022 SWIFT MX with MT , ISO8583

ISO8583 Builder Parser Connector

Most simple solution to build and parse ISO8583 messages

ISO8583 Switch Router

ISO8583 or REST-api Switch Router Bin Amount

Card Payments Authorization

Pre-screen, pre-authorize and Authorize cards and ledger

POS Card Acquirer & Aggregator

Acquiring and Aggregating from POS and other devices

Cards Generator Issuing Host

Generate and export card data for cards issuing and test

ISO8583 Simulator

ISO8583 HISO98 HISO87 simulator

ISO20022 Simulator

ISO20022 & SWIFT simulator

POS Simulator

POS protocols simulator

Mobile Banking Simulator

Mobile Banking Testing Simulator

QR Payments Connector

EMV QR Payments Interface Connector

Micropayments Connector

Micropayments Acquiring Connector & Router

ISO8583 Alerts Notifications

Detect Anomalies, Alerts & Notifications

Clearing & Settlement

Generate Convert Import

Request a Quote

Get a free quote, Ask for details
Get help

Documentation

Read Documentation and Start guides

Online Tools

Online Tools Overview