DES: left "circular shift" of key bits



Hello all,

In conjunction to reading Applied Cryptography 2nd Ed., I'm also using Cryptool as a
learning aid. In learning modern encryption algorithms I figured I'd start with the
DES, my logic being that it will give me a good foundation for learning the rest of
the algorithms.

However, I do have a question about the "circular shift" of the key after it has been
reduced to 48 bits and then split into two 28 bit halves.

Cryptool has some animated illustrations of some of the classic ciphers, and also for
DES.

This is what it shows for the first 'R' and 'L' half of the 28 bits before and after
the left circular shift, on the first round of the 16, which would make it a 1 bit
shift.

(I have aligned the shift for simplicity)

For the 'R' half:

1 0 1 1 1 1 1
1 0 0 1 1 0 0
0 1 1 1 1 0 0
1 1 1 1 0 0 0

0 1 1 1 1 1 1
0 0 1 1 0 0 0
1 1 1 1 0 0 1
1 1 1 0 0 0 1

And for the 'L' half:

1 0 1 1 1 1 0
0 0 1 0 0 0 0
1 0 1 0 0 0 1
1 0 0 1 1 0 0

0 1 1 1 1 0 0
0 1 0 0 0 0 1
0 1 0 0 0 1 1
0 0 1 1 0 0 1

As I can see, all the columns have moved to the left by 1 bit. But as you can see,
the left-most column (before the shift) doest not correspond to the right-most
column, after the shift. Dealing only with the Right half, since this is the
left-most column before the shift:

1
1
0
1

Shouldn't this now be the right most column after the shift?

If you don't mind a bit of conjecture: As I was speculating, watching the shift of
the Right half, my first impression was that it may have worked something like this.

1 0 1 1 1 1 1
1 0 0 1 1 0 0
0 1 1 1 1 0 0
1 1 1 1 0 0 0

| ^
|_________|


to illustrate further:

0 1 1 1 1 1
0 0 1 1 0 0
1 1 1 1 0 0
1 1 1 0 0 0

| ^
|_1101____|


0 1 1 1 1 1
0 0 1 1 0 0
1 1 1 1 0 0
1 1 1 0 0 0

| ^
|____1101_|


0 1 1 1 1 1 1
0 0 1 1 0 0 0
1 1 1 1 0 0 1
1 1 1 0 0 0 1

| ^
|_________|

In other words, the left most column move in a left "circular" sequential fashion,
like a train, and is then shoved 'up into' the right-most column.

But a quick look at what happens to the left half (above) shows this not to be the
case. Is this an error in the illustration of the program, or am I missing something?

Thanks
.



Relevant Pages