DES and Triple DES for payments Calculator - ISO8583 standard

Encrypt or Decrypt DES and 3DES

To calculate DES/3DES you need the following data:

Enter the data block to encrypt (16 hex characters, 8 bytes):

Enter the Key
(DES: 16 hex characters, 8 bytes)
(3DES: 32 hex characters, 16 bytes):

Select DES or triple DES


 

How DES {Data Encryption Standard} works

In this example we explain DES encryption for a 16 byte block of data (1234567890000000), with a 16 byte key (0123456789ABCDEF).

First, we permutate the key. This is done by taking the key's binary value, and applying a series of permutations of its bits. Example: 1110001010011011110010000101111111011100001101110100011000110000 is the key, and one permutation is of 9. The first 9 bits are cut from the head and go to the end, like this. 0011011110010000101111111011100001101110100011000110000111000101 This is done a number of times, based on an array of permutations.

Next step is to do apply a similar procedure to the data block. We split the data's binary value into two blocks. We shift the bits of each half a number of times, based on an array of shifts. Then we calculate the result block First, we permutate the key. This is done by taking the keys's binary value, and applying a series of permutations of its bits. Example: 1110001010011011110010000101111111011100001101110100011000110000 is the key, and one permutation is of 9. The first 9 bits are cut from the head and go to the end, like this. 0011011110010000101111111011100001101110100011000110000111000101 This is done a number of times, based on an array of permutations.

Next step is to do apply a series of shifts on the binary data. We split the data's binary value into two blocks.

We shift the bits of each half a number of times to the left, based on an array of shifts.

Then, we calculate the result block by permutating the resulted shifted blocks from above, based on an array of permutations. Not really simple, but it really scrambles the key information. We obtain a really nice and scrambled binary key array.

The data block suffers a similar procedure. We split the binary value in two arrays of bits, left and right. We start scrambling the right part of the data by permutating its bits based on an array of permutations. Then we apply a binary XOR of this data with the scrambled key obtained above.

This is when we start really encrypting the data. We take the result above and split it into groups of 6. For each group, we take the first and 6th bit and calculate the value, name it Row. The middle bits are used to calculate another value, Column.

Using a matrix with rows and columns, we select a value. By concatenating all the binary arrays of these obtained values , we get a nice and big binary array which has nothing to do with the original data any more. Just to make sure it is all very messy, we permutate the obtained result a couple of times, based on a predefined table of permutations.

The new value of the right half is now very messy, and as a final action, we perform a binary XOR between the left part and the permutated result. This is the final value of the right half. The left half will be the previous value of the right half.

We apply this procedure 17 times, to get it all very messy, and to be sure, we concatenate the left and right halves, permutate their bits based on another permutations array, and we have the final value of the encrypted block.

According to wiki documentation on [ Data Encryption Standard ],these days, a brute force attack can break this encryption in about 22 hours by trying out all possible combinations. The real limitation of this algorithm is really the length of the key, otherwise it is as messy as the most twisted mind can think of.

Anyway, since it can be broken so easily, Triple DES steps in to help. It uses a double or triple length key and, in simple words, it encrypts the block with the first part, decrypts with the second, and encrypts again with the first.

Contact    

Iso8583 - articles


ISO8583 Converter

ISO8583 Message Converter to XML SQL CSV interface specification mapping


ISO8583 Converter creating an XML,  SQL and CSV object from an incoming TCP/IP ISO8583 binary message, and then sending it to a HTTP host as ...
ISO8583 Switch

PCI compliant with neapay switch


PCI compliant with neapay switch Steps and procedure: Configuration parameters to acheive service PCI DSS compliance   ...
Products

Trace configuration in neaPay Simulator, Converter, Switch, Authorization and Cards Issuer


Trace configuration in neaPay Simulator, Converter, Switch, Authorization and Cards Issuer ...
ISO8583 Simulator

Add extra custom fields to the ISO8583 simulator


Adding extra, custom fields to the ISO8583 simulator in 3 simple steps is as easy as running the tests: Edit the spreadsheet and save it; Edit th ...
ISO8583 Switch

Deploy the Payments Switch Router in a test environment


Deploy then neaPay Payments switch router to easily route transactions based on BIN/prefix, amount, merchant, originating or destination insytitution, ...
ISO8583 Simulator

Regression Testing in 1 click with instant Analytics and CSV report


The neaPay Payments simulator is designed from the start to follow the life of a project, and therefore, after all testing has been completed, we need ...
ISO8583 Simulator

Run One, Run Scenario, Run All, Run Load in the neaPay ISO8583 Simulator - Use guide


neapay ISO8583 simualtor is designed to Support your project in all stages and has 4 modes are available: RunOne - runs only the selected Test Case; R ...
ISO8583 Simulator

How the fingerprint reader works in the ISO8583 payments simulator


Step by step guide to enable and disable fingerprint reading, enrollment and verification with the neapay Simulator is pretty straight forward and ass ...
ISO8583 Simulator

Connect the neaPay ISO8583 Acquirer simulator to your own host or Issuer


Everything is working fine in the test mode, with an Acquirer and a bank host both simulated by neaPay. You want to connect your Acquirer simulator to ...
ISO8583 Simulator

Altering test cases in Excel for the ISO8583 simulator


When you need to customize your own test case, you need to follow some simple steps all the time.In order to obtain this, you need to alter test data ...
ISO8583 Simulator

Sample Recommended design for an Acquirer test cases suite, Scenarios and Regression


A test suit is composed of different scenarios which follow in a functional (or another) way in order to cover the full, or as much as possible, of th ...
ISO8583 Converter

Deploy the neaPay ISO8583 Payments converter in a test environment


When you receive a delivery from neaPay for an iso8583 convertor, you will get 1 zip file.  This step by step guide will guide you through ...

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