ISO8583 payments MAC Calculator

Calculate message Retail MAC (Message Authentication Code)

MAC key (8 or 16 bytes, represented as 16 or 32 hex digits):

Data to apply MAC to:

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

Data format is: Hex Ascii

Algorithm used: DES 3DES

Finish operation: DES 3DES

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

Recent Articles on Iso8583


Choose the product you need



ISO8583 Converter

Convert ISO8583 to JSON XML SQL


ISO8583 Interface

ISO8583 Interface Handler


ISO20022 Converter

Convert ISO20022 to ISO8583 ...


ISO8583 Builder

Build ISO8583 from scratch


ISO8583 Switch

ISO8583 Router by criteria


ISO8583 Authorization

Authorize cards and ledger


Payments Acquirer

Acquiring host from devices


Cards Issuing

Generate and issue cards


ISO8583 Simulator

ISO8583 HISO98 HISO87 simulator


ISO20022 Simulator

ISO20022 & SWIFT simulator


POS Simulator

POS protocols simulator


Web Api Simulator

Web API tester Performance

 

Get a free quote, Ask for details
Get help

Contact us

Try the software yourself
Download

Download software

Read Documentation and Start guides

Documentation

Online Tools Overview

Online Tools