On Thu, Jul 31, 2014 at 5:10 PM, Laurent Broussy <[email protected]> wrote:
> Hi, > > > > Like describe in the FIPS 46-3 a DES key must have it heavy bit as parity > bit. I try to encipher with a key without no correct parity bits and with > this key where I put the correct parity bits the same message using > openssl. I obtain two different enciphered messages. My answers are : > > > > 1 Is-it normal that OpenSSL can use a DES key with no > correct parity bits ? > Yes. You can get the correctness of parity bits checked prior to encryption in many ways. 1. If you intend to use EVP interface, compile crypto library with EVP_CHECK_DES_KEY to strictly check for correct parity and strength. 2. If you are directly preparing the key schedule, use DES_set_key_checked instead of DES_set_key or DES_set_key_unchecked. You can also set the library global variable DES_check_key to 1 and use DES_set_key. > > 2 Why the result with the two different key is not the > same (normally only 56 bits are used and are the same in the two keys) > Encrypt wouldn't check the parity or expand 56 bits to 64 bits. It assumes, this check is already done and expects 8 byte key. > > Thank you for your response. > > > > Regards. > > > > L. Broussy >
