# Extracting a 3DES key from an IBM 4758

## Part 3: What are DES and 3DES ?

The first of these web pages explained how the IBM 4758 cryptoprocessor provided a secure way of doing encryption. The second explained about how FPGAs provide programmable hardware.

In the next part we'll cover how to program an FPGA to deal with DES and then move on to the attack on the IBM 4758. First, though it will be useful to understand just a little bit about how the DES and 3DES encryption algorithms work.

The Data Encryption Standard (DES) was created in the early 1970s. It processes input data that is 64 bits wide, encrypting these values using a 56 bit key.

The basic layout of the cipher is as shown in the graphic above. The data is split into two 32 bit halves and the left half is XORd with a non-linear function of the right half mediated by the key value. E is an expansion permutation, P a simple permutation and the key has its own permuation from round to round. The full DES function involves 16 such stages plus an initial and final permutation. The details can be found in most cryptographic textbooks, or you can read the FIPS standard 1 .

Although DES was just about secure in the 1970s, it now uses keys that are susceptible to "brute-force" attacks. Triple DES (also a standard as ANSI X5.92) uses three DES operations to provide significantly more security. It uses two keys and performs an encryption with Key1, a decryption with Key2 and then an further encryption with Key1. Hence for legacy applications it can set Key1 to the same as Key2 and Triple DES will fall back to merely acting as if it were DES.

Since Triple DES uses two keys, the effective key length is 112 bits. This is a lot more secure. If you could break DES by brute-force in one second (which is very far from being the case) then it would take 2.285 billion years to break Triple DES.

1 "Data Encryption Standard" FIPS 46 http://csrc.nist.gov/publications/fips/fips46-3/fips46-3.pdf

Back to main page