QuickCrypt Library C++ Interface

CDES::CheckKeyParityBits

static bool CheckKeyParityBits( const unsigned char* pKey );

Return Value

Returns true if each byte of the key has an odd number of  "1"s.

Parameters

pKey

    [in] Pointer to the secret key. 

Remarks

 

Call this member function to check key parity bits.

 

Note. A DES key consists of 64 binary digits ("0"s or "1"s) of which 56 bits are randomly generated and used directly by the algorithm. The other 8 bits, which are not used by the algorithm, may be used for error detection. The 8 error detecting bits are set to make the parity of each 8-bit byte of the key odd, i.e., there is an odd number of "1"s in each 8-bit byte.

 

CDES Overview   |   Class Members   |   Useful Links

 

See Also    CDES::CorrectKeyParityBits


 

 

Send Feedback to SlavaSoft Inc. Tell a friend about QuickCrypt Library