From: Richard Levitte Date: Thu, 25 Oct 2001 06:46:22 +0000 (+0000) Subject: Remove DES_random_seed() but retain des_random_seed() for now. Change X-Git-Tag: OpenSSL_0_9_6c~26^2~95 X-Git-Url: https://git.openssl.org/?p=openssl.git;a=commitdiff_plain;h=ce15d5a9dc663399ee2cfdb27d33b27faeba2a52;ds=sidebyside Remove DES_random_seed() but retain des_random_seed() for now. Change the docs to reflect this change and correct libeay.num. --- diff --git a/crypto/des/Makefile.ssl b/crypto/des/Makefile.ssl index 9e7d1dbe29..c1c9aaec7f 100644 --- a/crypto/des/Makefile.ssl +++ b/crypto/des/Makefile.ssl @@ -153,6 +153,9 @@ cfb_enc.o: ../../include/openssl/des.h ../../include/openssl/e_os2.h cfb_enc.o: ../../include/openssl/opensslconf.h cfb_enc.c des_locl.h des_enc.o: ../../include/openssl/des.h ../../include/openssl/e_os2.h des_enc.o: ../../include/openssl/opensslconf.h des_enc.c des_locl.h ncbc_enc.c +des_old.o: ../../include/openssl/des.h ../../include/openssl/des_old.h +des_old.o: ../../include/openssl/e_os2.h ../../include/openssl/opensslconf.h +des_old.o: ../../include/openssl/symhacks.h des_old.c ecb3_enc.o: ../../include/openssl/des.h ../../include/openssl/e_os2.h ecb3_enc.o: ../../include/openssl/opensslconf.h des_locl.h ecb3_enc.c ecb_enc.o: ../../include/openssl/des.h ../../include/openssl/e_os2.h diff --git a/crypto/des/des.h b/crypto/des/des.h index 68fd355c79..cc95af823b 100644 --- a/crypto/des/des.h +++ b/crypto/des/des.h @@ -198,7 +198,6 @@ void DES_pcbc_encrypt(const unsigned char *input,unsigned char *output, int enc); DES_LONG DES_quad_cksum(const unsigned char *input,DES_cblock output[], long length,int out_count,DES_cblock *seed); -void DES_random_seed(DES_cblock *key); int DES_random_key(DES_cblock *ret); void DES_set_odd_parity(DES_cblock *key); int DES_check_key_parity(const_DES_cblock *key); diff --git a/crypto/des/des_old.c b/crypto/des/des_old.c index 3de404600a..d4f701f540 100644 --- a/crypto/des/des_old.c +++ b/crypto/des/des_old.c @@ -217,7 +217,7 @@ DES_LONG des_quad_cksum(des_cblock *input,des_cblock *output, } void des_random_seed(des_cblock key) { - DES_random_seed((DES_cblock *)key); + RAND_seed(key, sizeof(des_cblock)); } void des_random_key(des_cblock ret) { diff --git a/crypto/des/rand_key.c b/crypto/des/rand_key.c index a617969f70..2398165568 100644 --- a/crypto/des/rand_key.c +++ b/crypto/des/rand_key.c @@ -56,11 +56,6 @@ #include #include -void DES_random_seed(DES_cblock *key) - { - RAND_seed(key, sizeof(DES_cblock)); - } - int DES_random_key(DES_cblock *ret) { do diff --git a/doc/crypto/des.pod b/doc/crypto/des.pod index 23f59b670e..1cf48f65b9 100644 --- a/doc/crypto/des.pod +++ b/doc/crypto/des.pod @@ -122,11 +122,9 @@ each byte is the parity bit. The key schedule is an expanded form of the key; it is used to speed the encryption process. DES_random_key() generates a random key. The PRNG must be seeded -prior to using this function (see L; for backward -compatibility the function DES_random_seed() is available as well). -If the PRNG could not generate a secure key, 0 is returned. In -earlier versions of the library, DES_random_key() did not generate -secure keys. +prior to using this function (see L). If the PRNG +could not generate a secure key, 0 is returned. In earlier versions +of the library, DES_random_key() did not generate secure keys. Before a DES key can be used, it must be converted into the architecture dependent I via the @@ -348,9 +346,13 @@ crypt(3), L, L, L =head1 HISTORY -In OpenSSL 0.9.7, All des_ functions were renamed to DES_ to avoid +In OpenSSL 0.9.7, all des_ functions were renamed to DES_ to avoid clashes with older versions of libdes. Compatibility des_ functions -are provided for a short while, as well as crypt(). +are provided for a short while, as well as crypt(). des_random_seed() +is were not kept as DES_ variants. This will happen to other functions +as well if they are deemed redundant (des_random_seed() just calls +RAND_seed() and is present for backward compatibility only), buggy or +already scheduled for removal. des_cbc_cksum(), des_cbc_encrypt(), des_ecb_encrypt(), des_is_weak_key(), des_key_sched(), des_pcbc_encrypt(), diff --git a/util/libeay.num b/util/libeay.num index ac05c2aefc..91634d8179 100755 --- a/util/libeay.num +++ b/util/libeay.num @@ -793,11 +793,12 @@ DES_options 799 EXIST::FUNCTION:DES DES_pcbc_encrypt 800 EXIST::FUNCTION:DES DES_quad_cksum 801 EXIST::FUNCTION:DES DES_random_key 802 EXIST::FUNCTION:DES -DES_random_seed 803 EXIST::FUNCTION:DES -DES_read_2passwords 804 NOEXIST::FUNCTION: -DES_read_password 805 NOEXIST::FUNCTION: -DES_read_pw 806 NOEXIST::FUNCTION: -DES_read_pw_string 807 NOEXIST::FUNCTION: +des_random_seed 803 EXIST:!VMS,!WIN16:FUNCTION:DES +odes_random_seed 803 EXIST:VMS,WIN16:FUNCTION:DES +des_read_2passwords 804 EXIST::FUNCTION:DES +des_read_password 805 EXIST::FUNCTION:DES +des_read_pw 806 EXIST::FUNCTION: +des_read_pw_string 807 EXIST::FUNCTION: DES_set_key 808 EXIST::FUNCTION:DES DES_set_odd_parity 809 EXIST::FUNCTION:DES DES_string_to_2keys 810 EXIST::FUNCTION:DES @@ -2726,53 +2727,47 @@ des_enc_read 3163 EXIST:!VMS,!WIN16:FUNCTION:DES odes_enc_read 3163 EXIST:VMS,WIN16:FUNCTION:DES des_decrypt3 3164 EXIST:!VMS,!WIN16:FUNCTION:DES odes_decrypt3 3164 EXIST:VMS,WIN16:FUNCTION:DES -des_read_password 3165 EXIST::FUNCTION:DES -des_string_to_2keys 3166 EXIST:!VMS,!WIN16:FUNCTION:DES -odes_string_to_2keys 3166 EXIST:VMS,WIN16:FUNCTION:DES -des_ede3_cbc_encrypt 3167 EXIST:!VMS,!WIN16:FUNCTION:DES -odes_ede3_cbc_encrypt 3167 EXIST:VMS,WIN16:FUNCTION:DES -des_cbc_cksum 3168 EXIST:!VMS,!WIN16:FUNCTION:DES -odes_cbc_cksum 3168 EXIST:VMS,WIN16:FUNCTION:DES -des_ede3_cfb64_encrypt 3169 EXIST:!VMS,!WIN16:FUNCTION:DES -odes_ede3_cfb64_encrypt 3169 EXIST:VMS,WIN16:FUNCTION:DES -des_string_to_key 3170 EXIST:!VMS,!WIN16:FUNCTION:DES -odes_string_to_key 3170 EXIST:VMS,WIN16:FUNCTION:DES -des_set_odd_parity 3171 EXIST:!VMS,!WIN16:FUNCTION:DES -odes_set_odd_parity 3171 EXIST:VMS,WIN16:FUNCTION:DES -des_fcrypt 3172 EXIST:!VMS,!WIN16:FUNCTION:DES -odes_fcrypt 3172 EXIST:VMS,WIN16:FUNCTION:DES -des_ecb3_encrypt 3173 EXIST:!VMS,!WIN16:FUNCTION:DES -odes_ecb3_encrypt 3173 EXIST:VMS,WIN16:FUNCTION:DES -des_read_pw_string 3174 EXIST::FUNCTION: -des_cbc_encrypt 3175 EXIST:!VMS,!WIN16:FUNCTION:DES -odes_cbc_encrypt 3175 EXIST:VMS,WIN16:FUNCTION:DES -des_cfb_encrypt 3176 EXIST:!VMS,!WIN16:FUNCTION:DES -odes_cfb_encrypt 3176 EXIST:VMS,WIN16:FUNCTION:DES -des_quad_cksum 3177 EXIST:!VMS,!WIN16:FUNCTION:DES -odes_quad_cksum 3177 EXIST:VMS,WIN16:FUNCTION:DES -des_read_2passwords 3178 EXIST::FUNCTION:DES -des_encrypt2 3179 EXIST:!VMS,!WIN16:FUNCTION:DES -odes_encrypt2 3179 EXIST:VMS,WIN16:FUNCTION:DES -des_encrypt3 3180 EXIST:!VMS,!WIN16:FUNCTION:DES -odes_encrypt3 3180 EXIST:VMS,WIN16:FUNCTION:DES -des_ede3_ofb64_encrypt 3181 EXIST:!VMS,!WIN16:FUNCTION:DES -odes_ede3_ofb64_encrypt 3181 EXIST:VMS,WIN16:FUNCTION:DES -des_enc_write 3182 EXIST:!VMS,!WIN16:FUNCTION:DES -odes_enc_write 3182 EXIST:VMS,WIN16:FUNCTION:DES -des_ncbc_encrypt 3183 EXIST:!VMS,!WIN16:FUNCTION:DES -odes_ncbc_encrypt 3183 EXIST:VMS,WIN16:FUNCTION:DES -des_pcbc_encrypt 3184 EXIST:!VMS,!WIN16:FUNCTION:DES -odes_pcbc_encrypt 3184 EXIST:VMS,WIN16:FUNCTION:DES -des_set_key 3185 EXIST:!VMS,!WIN16:FUNCTION:DES -odes_set_key 3185 EXIST:VMS,WIN16:FUNCTION:DES -des_random_seed 3186 EXIST:!VMS,!WIN16:FUNCTION:DES -odes_random_seed 3186 EXIST:VMS,WIN16:FUNCTION:DES -des_cfb64_encrypt 3187 EXIST:!VMS,!WIN16:FUNCTION:DES -odes_cfb64_encrypt 3187 EXIST:VMS,WIN16:FUNCTION:DES -des_ofb_encrypt 3188 EXIST:!VMS,!WIN16:FUNCTION:DES -odes_ofb_encrypt 3188 EXIST:VMS,WIN16:FUNCTION:DES -des_read_pw 3189 EXIST::FUNCTION: -des_xcbc_encrypt 3190 EXIST:!VMS,!WIN16:FUNCTION:DES -odes_xcbc_encrypt 3190 EXIST:VMS,WIN16:FUNCTION:DES -des_ecb_encrypt 3191 EXIST:!VMS,!WIN16:FUNCTION:DES -odes_ecb_encrypt 3191 EXIST:VMS,WIN16:FUNCTION:DES +des_string_to_2keys 3165 EXIST:!VMS,!WIN16:FUNCTION:DES +odes_string_to_2keys 3165 EXIST:VMS,WIN16:FUNCTION:DES +des_ede3_cbc_encrypt 3166 EXIST:!VMS,!WIN16:FUNCTION:DES +odes_ede3_cbc_encrypt 3166 EXIST:VMS,WIN16:FUNCTION:DES +des_cbc_cksum 3167 EXIST:!VMS,!WIN16:FUNCTION:DES +odes_cbc_cksum 3167 EXIST:VMS,WIN16:FUNCTION:DES +des_ede3_cfb64_encrypt 3168 EXIST:!VMS,!WIN16:FUNCTION:DES +odes_ede3_cfb64_encrypt 3168 EXIST:VMS,WIN16:FUNCTION:DES +des_string_to_key 3169 EXIST:!VMS,!WIN16:FUNCTION:DES +odes_string_to_key 3169 EXIST:VMS,WIN16:FUNCTION:DES +des_set_odd_parity 3170 EXIST:!VMS,!WIN16:FUNCTION:DES +odes_set_odd_parity 3170 EXIST:VMS,WIN16:FUNCTION:DES +des_fcrypt 3171 EXIST:!VMS,!WIN16:FUNCTION:DES +odes_fcrypt 3171 EXIST:VMS,WIN16:FUNCTION:DES +des_ecb3_encrypt 3172 EXIST:!VMS,!WIN16:FUNCTION:DES +odes_ecb3_encrypt 3172 EXIST:VMS,WIN16:FUNCTION:DES +des_cbc_encrypt 3173 EXIST:!VMS,!WIN16:FUNCTION:DES +odes_cbc_encrypt 3173 EXIST:VMS,WIN16:FUNCTION:DES +des_cfb_encrypt 3174 EXIST:!VMS,!WIN16:FUNCTION:DES +odes_cfb_encrypt 3174 EXIST:VMS,WIN16:FUNCTION:DES +des_quad_cksum 3175 EXIST:!VMS,!WIN16:FUNCTION:DES +odes_quad_cksum 3175 EXIST:VMS,WIN16:FUNCTION:DES +des_encrypt2 3176 EXIST:!VMS,!WIN16:FUNCTION:DES +odes_encrypt2 3176 EXIST:VMS,WIN16:FUNCTION:DES +des_encrypt3 3177 EXIST:!VMS,!WIN16:FUNCTION:DES +odes_encrypt3 3177 EXIST:VMS,WIN16:FUNCTION:DES +des_ede3_ofb64_encrypt 3178 EXIST:!VMS,!WIN16:FUNCTION:DES +odes_ede3_ofb64_encrypt 3178 EXIST:VMS,WIN16:FUNCTION:DES +des_enc_write 3179 EXIST:!VMS,!WIN16:FUNCTION:DES +odes_enc_write 3179 EXIST:VMS,WIN16:FUNCTION:DES +des_ncbc_encrypt 3180 EXIST:!VMS,!WIN16:FUNCTION:DES +odes_ncbc_encrypt 3180 EXIST:VMS,WIN16:FUNCTION:DES +des_pcbc_encrypt 3181 EXIST:!VMS,!WIN16:FUNCTION:DES +odes_pcbc_encrypt 3181 EXIST:VMS,WIN16:FUNCTION:DES +des_set_key 3182 EXIST:!VMS,!WIN16:FUNCTION:DES +odes_set_key 3182 EXIST:VMS,WIN16:FUNCTION:DES +des_cfb64_encrypt 3183 EXIST:!VMS,!WIN16:FUNCTION:DES +odes_cfb64_encrypt 3183 EXIST:VMS,WIN16:FUNCTION:DES +des_ofb_encrypt 3184 EXIST:!VMS,!WIN16:FUNCTION:DES +odes_ofb_encrypt 3184 EXIST:VMS,WIN16:FUNCTION:DES +des_xcbc_encrypt 3185 EXIST:!VMS,!WIN16:FUNCTION:DES +odes_xcbc_encrypt 3185 EXIST:VMS,WIN16:FUNCTION:DES +des_ecb_encrypt 3186 EXIST:!VMS,!WIN16:FUNCTION:DES +odes_ecb_encrypt 3186 EXIST:VMS,WIN16:FUNCTION:DES