Thanks - we have concensus: Re: DES key parity bits. What is the correct story?



Thank You.

1. I think we pretty well have consensus on the core matters.

2. Even a "doubt" I had about exactly where the parity bits were
has been made clear.

3. I know exactly where there are now:
a. I have checked the simple implementation that I got from,
"mastering algorithms with c". It does indeed select the
correct 56 bits according to that DES key bit selection table

static const int DesTransform[56] = {
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,
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
};
and it clearly identifies the parity bits by not using them
in this 56 bit set (see: 8, 16, 24 .. are not used).
Although the implementation has the start 64 bits in an array
numbered as usual from 0 - 63. The selection code
carefully accounts for the difference in cell numbering
between the normal c language array and that selection
table, which refers to the same data from 1 - 64.
So the code carefully ignores cells (7, 15, 23, ..) in the
array holding the starting 64-bit key data.
So all seems in order.
b, I also trialed a "test-DES idea" that Prof Rivest posted
at some point in time. Without taking any
time to fully understand all of the principles
behind the test system.
(Possible did not include parity checks).

// des test
/* Start: 94 74 B8 E8 C7 3B CA 7D
http://people.csail.mit.edu/rivest/Destest.txt
Expected: 1B 1A 2D DB 4C 64 24 38
*/







"ping pong" <mosescuadro@xxxxxxxx> wrote in message news:4d71fc15$0$22468$afc38c87@xxxxxxxxxxxxxxxxxxxxxxx
1. Do you "have to" set the parity bits after generating a random 64 bit value for the DES key?
2. Or can the key be used leaving the parity bits 7, 15, 23, ... , 63
in that randomly selected state.
3. Or can you even set them to anything you like.

Obviously if someone in the key distribution network is going to check these parity bits
the the answer is 1.

But what I am asking is:
When analysis of the cipher is performed which of the cases 1 - 3 is normally assumed?



.