Posts Tagged ‘DES’

DES: S-Tables

Crypts, Descriptions | Posted by attriel June 4th, 2008

The 6-bits from RK(i) are then further mixed RK(i,0)RK(i,5) and RK(i,1..4), which provides a 4-bit response

The first and last bits define which ROW, and the middle 4-bits define the COLUMN

S(1)

RC 0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 1010 1011 1100 1101 1110 1111

00

01

10

11

Full listings after the break

Read the rest of this entry »

DES: Key (K) Manipulations

Crypts, Descriptions | Posted by attriel April 24th, 2008

In order to encrypt our data, we start with a 64-bit key (KEY). This key is, actually, only 56 bits, with every 8th bit for parity.

From this 64-bit KEY we need to define two 24-bit blocks (C and D)

C(0)
57 49 41 33 25 17 9
1 58 50 42 34 26 18
10 2 59 51 43 35 27
19 11 3 60 52 44 36

D(0)
63 55 47 39 31 23 15
7 62 54 46 38 30 22
14 6 61 53 45 37 29
21 13 5 28 20 12 4

From here, each C/D 1..16 are generated by Left Rotating the previous C/D according to the following table:
1 1
2 1
3 2
4 2
5 2
6 2
7 2
8 2
9 1
10 2
11 2
12 2
13 2
14 2
15 2
16 1

Thus C(1) is LR(1) C(0), D(15) is LR(2) D(14), etc

We then catenate C and D (making it one longer block), and can now define our K with the following 56-to-48 bit conversion table

K(1)

14 17 11 24 1 5
3 28 15 6 21 10
23 19 12 4 26 8
16 7 27 20 13 2
41 52 31 37 47 55
30 40 51 45 33 48
44 49 39 56 34 53
46 42 50 36 29 32

DES: Initial Permutation

Crypts, Descriptions | Posted by attriel April 24th, 2008

DES operates on 64-bit blocks of data, equivalent to 8-characters.

The first step in a DES encryption is to munge the initial block to create two new datablocks

L(0)
58 50 42 34 26 18 10 2
60 52 44 36 28 20 12 4
62 54 46 38 30 22 14 6
64 56 48 40 32 24 16 8

R(0)
57 49 41 33 25 17 9 1
59 51 43 35 27 19 11 3
61 53 45 37 29 21 13 5
63 55 47 39 31 23 15 7

Data Encryption Standard (DES) pt 0

Crypts, Descriptions | Posted by attriel April 20th, 2008

I had gone through DES before, but in the end it’s such a LARGE process that the description was huge. The example was going to go on for days, or be virtually useless.

So, now I’m redoing it in a series of posts, with the intent that the smaller chunkiness will permit semi-reasonable walkthrough.

I can still foresee some issues herein, but they may be less insurmountable