summaryrefslogtreecommitdiff
path: root/crypto/des/des.h
diff options
context:
space:
mode:
authorBodo Möller <bodo@openssl.org>1999-12-03 20:24:21 +0000
committerBodo Möller <bodo@openssl.org>1999-12-03 20:24:21 +0000
commitcddfe788fbbc4726fcf9892963df3f3e823eb233 (patch)
treefe129b6f8b162a2053634fdfb62d17d9dad17a10 /crypto/des/des.h
parent21131f00d7ffcdac99334ce5704366c1cdd06fc4 (diff)
downloadopenssl-new-cddfe788fbbc4726fcf9892963df3f3e823eb233.tar.gz
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.h')
-rw-r--r--crypto/des/des.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/crypto/des/des.h b/crypto/des/des.h
index 67f90aaf17..b492002435 100644
--- a/crypto/des/des.h
+++ b/crypto/des/des.h
@@ -193,8 +193,13 @@ int des_read_2passwords(des_cblock *key1,des_cblock *key2,
int des_read_pw_string(char *buf,int length,const char *prompt,int verify);
void des_set_odd_parity(des_cblock *key);
int des_is_weak_key(const_des_cblock *key);
+/* des_set_key (= set_key = des_key_sched = key_sched) calls
+ * des_set_key_checked if global variable des_check_key is set,
+ * des_set_key_unchecked otherwise. */
int des_set_key(const_des_cblock *key,des_key_schedule schedule);
int des_key_sched(const_des_cblock *key,des_key_schedule schedule);
+int des_set_key_checked(const_des_cblock *key,des_key_schedule schedule);
+void des_set_key_unchecked(const_des_cblock *key,des_key_schedule schedule);
void des_string_to_key(const char *str,des_cblock *key);
void des_string_to_2keys(const char *str,des_cblock *key1,des_cblock *key2);
void des_cfb64_encrypt(const unsigned char *in,unsigned char *out,long length,