Force odd parity.
authorBen Laurie <ben@openssl.org>
Sat, 31 Jan 2004 16:39:59 +0000 (16:39 +0000)
committerBen Laurie <ben@openssl.org>
Sat, 31 Jan 2004 16:39:59 +0000 (16:39 +0000)
fips/des/fips_desmovs.c

index b3727a958f595581007c4b3ec2d6cfeec2de7413..79b99915ee8e17e6c44b2dfc61aab93dda02eb55 100644 (file)
@@ -348,6 +348,9 @@ void do_mct(char *amode,
            memcpy(&akey[2*8],akey,8);
        if(numkeys < 2)
            memcpy(&akey[8],akey,8);
+       DES_set_odd_parity((DES_cblock *)akey);
+       DES_set_odd_parity((DES_cblock *)(akey+8));
+       DES_set_odd_parity((DES_cblock *)(akey+16));
        memcpy(ivec,ctx.iv,8);
 
        /* pointless exercise - the final text doesn't depend on the