Data Encryption Standard Made With Key Sizes of 14 Bits

Cipher
Today I would like to share you the power of cryptography.

I made this software 2011 in Eindhoven, Netherlands (country of cryptography) where I was having my exchange studies at the time.

The software is about the Data Encryption Standard or DES, however you like to call it.

DES With 14 Bits

Data Encryption Standard is the old queen of cryptography, which eventually got caught for being too easy to solve. There is a great article in Wikipedia about the topic and how it has influenced modern cryptography.

What I did was kinda experiment if I could code this thing together with some tweaking to the original Standard. DES was created to encrypt with key sizes of 56 bits and block sizes of 64 bits doing 16 rounds of crypting in total.

To learn the standard and the basics of cryptography, I chose to do it with key sizes of 14 bits and block sizes of 16 bits doing 2 rounds of crypting in total. I actually succeeded on this and did a little software with Python to prove it.

Mathematics

Here are the mathematics from my version of the Data Encryption Standard.

Permutations

Calculations

We choose a sub key K’ of 12 bits

Calculations of F(R, K’) as R = 1011 0110

We choose a key K of 16 bits

And calculate the two keys K1 and K2

We choose an input I of 15 bits (e.g. the ASCI-coding of the characters ‘v’ and ‘b’)

And encrypt I using the DESHI-algorithm where we use the given IP and the calculated K1, K2 and IP-1.

Software

Program is made with Python version 3.2. The program can probably be run if the system has 3.0 or newer version of Python, but only tested with 3.2. The latest version can be downloaded from: http://www.python.org/download/. The program can be used in Linux or Windows as long as there is Python installed into the system.

Here are some screenshots with the same examples as used in the earlier handwritten DES encryption.

Key and Message

After clicking the encrypt button.
Cipher

After clicking the decrypt button
Decrypted

Usage

This was just an experiment if I could learn DES and some cryptography, this software should not be used in real life situations. The method I used actually made DES weaker against attacks because I did it with less bits than the usual version. I hope maybe someone may find this information useful and maybe learn some cryptography. In my opinion it’s a really complex world and so much different from traditional software development, because of the mathematics that are included.

Source Code

Here is the source code for this software. To run the software, just copy/paste the code into .py file and run it.