/*
* These routines check and fix parity of encryption keys for the DES
* algorithm.
*
* They are a replacement for routines in key_parity.c, that don't require
* the table building that they do.
*
* Mark Eichin -- Cygnus Support
*/
#include "des_int.h"
/*
* des_fixup_key_parity: Forces odd parity per byte; parity is bits
* 8,16,...64 in des order, implies 0, 8, 16, ...
* vax order.
*/
void
{
int i;
for (i=0; i<sizeof(mit_des_cblock); i++)
{
key[i] &= 0xfe;
}
return;
}
/*
* des_check_key_parity: returns true iff key has the correct des parity.
* See des_fix_key_parity for the definition of
* correct des parity.
*/
int
{
int i;
for (i=0; i<sizeof(mit_des_cblock); i++)
{
{
return 0;
}
}
return(1);
}