correct weak keys and update comment

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@9694 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Assar Westerlund
2001-02-16 15:26:37 +00:00
parent 347ad39acd
commit 81997ac2c8

View File

@@ -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},