diff --git a/lib/des/set_key.c b/lib/des/set_key.c index ad41ff35a..a6f307efe 100644 --- a/lib/des/set_key.c +++ b/lib/des/set_key.c @@ -97,7 +97,7 @@ des_cblock (*key); return(1); } -/* Weak and semi week keys as take from +/* Weak and semi week keys were originally as take from * %A D.W. Davies * %A W.L. Price * %T Security for Computer Networks @@ -106,13 +106,18 @@ des_cblock (*key); * Many thanks to smb@ulysses.att.com (Steven Bellovin) for the reference * (and actual cblock values). */ + +/* The corrected values are from FIPS 74: + * http://www.itl.nist.gov/fipspubs/fip74.htm + */ + #define NUM_WEAK_KEY 16 static des_cblock weak_keys[NUM_WEAK_KEY]={ /* weak keys */ {0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01}, {0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE}, - {0x1F,0x1F,0x1F,0x1F,0xE0,0xE0,0xE0,0xE0}, - {0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0}, + {0x1F,0x1F,0x1F,0x1F,0x0E,0x0E,0x0E,0x0E}, + {0xE0,0xE0,0xE0,0xE0,0xF1,0xF1,0xF1,0xF1}, /* semi-weak keys */ {0x01,0xFE,0x01,0xFE,0x01,0xFE,0x01,0xFE}, {0xFE,0x01,0xFE,0x01,0xFE,0x01,0xFE,0x01},