[net.crypt] review of DES algorithm

don@allegra.UUCP (Don Mitchell) (08/21/85)

Several people have asked me question about DES.  Here is a brief
review of what it does.

The heart of it is a hashing function that hashes 32 bits.  The 16
stages of DES (which encrypts a 64 bit block) are just "hash the right
32 bits and xor them with the left", then "hash the left 32 bits and
xor them with the right", etc.

The hash function has three components, E boxes, S boxes, and P boxes.

In the E box stage, the 32 bit input is expanded to 48 bits by taking
groups of four bits and just copying two of them to get a pattern of
six.  Just a table lookup.  This 48 bit quantity is xor'ed with 48 bits
of the key then.  (48 bits selected in a complex way from the 56 bit
key.)

Eight S boxes map this 48 bits into 32.  Each S box takes 6 bits and
spits out four.  It's just a table lookup again, 64 numbers from 0 to
15 index by the six input bits.  This is the nonlinear part.

Finally, the 32 bits coming out of the S boxes are shuffled around,
permuted by the P box.  Thus successive stages of hashing diffuses (P
box) and confuses (S box).  I don't now why the E box step is used, but
stages of P and S boxes is called an SP network.