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:
@@ -97,7 +97,7 @@ des_cblock (*key);
|
|||||||
return(1);
|
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 D.W. Davies
|
||||||
* %A W.L. Price
|
* %A W.L. Price
|
||||||
* %T Security for Computer Networks
|
* %T Security for Computer Networks
|
||||||
@@ -106,13 +106,18 @@ des_cblock (*key);
|
|||||||
* Many thanks to smb@ulysses.att.com (Steven Bellovin) for the reference
|
* Many thanks to smb@ulysses.att.com (Steven Bellovin) for the reference
|
||||||
* (and actual cblock values).
|
* (and actual cblock values).
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/* The corrected values are from FIPS 74:
|
||||||
|
* http://www.itl.nist.gov/fipspubs/fip74.htm
|
||||||
|
*/
|
||||||
|
|
||||||
#define NUM_WEAK_KEY 16
|
#define NUM_WEAK_KEY 16
|
||||||
static des_cblock weak_keys[NUM_WEAK_KEY]={
|
static des_cblock weak_keys[NUM_WEAK_KEY]={
|
||||||
/* weak keys */
|
/* weak keys */
|
||||||
{0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01},
|
{0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01},
|
||||||
{0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE},
|
{0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE},
|
||||||
{0x1F,0x1F,0x1F,0x1F,0xE0,0xE0,0xE0,0xE0},
|
{0x1F,0x1F,0x1F,0x1F,0x0E,0x0E,0x0E,0x0E},
|
||||||
{0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0},
|
{0xE0,0xE0,0xE0,0xE0,0xF1,0xF1,0xF1,0xF1},
|
||||||
/* semi-weak keys */
|
/* semi-weak keys */
|
||||||
{0x01,0xFE,0x01,0xFE,0x01,0xFE,0x01,0xFE},
|
{0x01,0xFE,0x01,0xFE,0x01,0xFE,0x01,0xFE},
|
||||||
{0xFE,0x01,0xFE,0x01,0xFE,0x01,0xFE,0x01},
|
{0xFE,0x01,0xFE,0x01,0xFE,0x01,0xFE,0x01},
|
||||||
|
Reference in New Issue
Block a user