diff options
author | Bodo Möller <bodo@openssl.org> | 1999-12-03 23:24:21 +0300 |
---|---|---|
committer | Bodo Möller <bodo@openssl.org> | 1999-12-03 23:24:21 +0300 |
commit | cddfe788fbbc4726fcf9892963df3f3e823eb233 (patch) | |
tree | fe129b6f8b162a2053634fdfb62d17d9dad17a10 /crypto/des/des.c | |
parent | 21131f00d7ffcdac99334ce5704366c1cdd06fc4 (diff) |
Add functions des_set_key_checked, des_set_key_unchecked.
Never use des_set_key (it depends on the global variable des_check_key),
but usually des_set_key_unchecked.
Only destest.c bothered to look at the return values of des_set_key,
but it did not set des_check_key -- if it had done so,
most checks would have failed because of wrong parity and
because of weak keys.
Diffstat (limited to 'crypto/des/des.c')
-rw-r--r-- | crypto/des/des.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crypto/des/des.c b/crypto/des/des.c index 206e3777a7..5cd337301a 100644 --- a/crypto/des/des.c +++ b/crypto/des/des.c @@ -425,7 +425,7 @@ void doencryption(void) else k2[i-8]=k; } - des_set_key(&k2,ks2); + des_set_key_unchecked(&k2,ks2); memset(k2,0,sizeof(k2)); } else if (longk || flag3) @@ -433,7 +433,7 @@ void doencryption(void) if (flag3) { des_string_to_2keys(key,&kk,&k2); - des_set_key(&k2,ks2); + des_set_key_unchecked(&k2,ks2); memset(k2,0,sizeof(k2)); } else @@ -455,7 +455,7 @@ void doencryption(void) kk[i]=key[i]|0x80; } - des_set_key(&kk,ks); + des_set_key_unchecked(&kk,ks); memset(key,0,sizeof(key)); memset(kk,0,sizeof(kk)); /* woops - A bug that does not showup under unix :-( */ |