summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2001-10-24 21:21:12 +0000
committerRichard Levitte <levitte@openssl.org>2001-10-24 21:21:12 +0000
commitc2e4f17c1a0d4d5115c6ede9492de1615fe392ac (patch)
tree14dda5edeaebac01b4baa3aa026c40a784a44266
parent979689aa5cfa100ccbc1f25064e9398be4b7b05c (diff)
Due to an increasing number of clashes between modern OpenSSL and
libdes (which is still used out there) or other des implementations, the OpenSSL DES functions are renamed to begin with DES_ instead of des_. Compatibility routines are provided and declared by including openssl/des_old.h. Those declarations are the same as were in des.h when the OpenSSL project started, which is exactly how libdes looked at that time, and hopefully still looks today. The compatibility functions will be removed in some future release, at the latest in version 1.0.
-rw-r--r--CHANGES13
-rw-r--r--apps/Makefile.ssl83
-rw-r--r--apps/passwd.c2
-rw-r--r--apps/speed.c18
-rw-r--r--apps/version.c2
-rw-r--r--crypto/crypto-lib.com2
-rw-r--r--crypto/des/Makefile.ssl6
-rw-r--r--crypto/des/asm/des-586.pl14
-rw-r--r--crypto/des/asm/des686.pl10
-rw-r--r--crypto/des/asm/desboth.pl8
-rw-r--r--crypto/des/cbc3_enc.c40
-rw-r--r--crypto/des/cbc_cksm.c8
-rw-r--r--crypto/des/cfb64ede.c18
-rw-r--r--crypto/des/cfb64enc.c10
-rw-r--r--crypto/des/cfb_enc.c8
-rw-r--r--crypto/des/des.c68
-rw-r--r--crypto/des/des.h252
-rw-r--r--crypto/des/des_enc.c42
-rw-r--r--crypto/des/des_locl.h2
-rw-r--r--crypto/des/des_old.c245
-rw-r--r--crypto/des/des_old.h236
-rw-r--r--crypto/des/des_opts.c204
-rw-r--r--crypto/des/destest.c144
-rw-r--r--crypto/des/ecb3_enc.c10
-rw-r--r--crypto/des/ecb_enc.c8
-rw-r--r--crypto/des/ede_cbcm_enc.c22
-rw-r--r--crypto/des/enc_read.c28
-rw-r--r--crypto/des/enc_writ.c16
-rw-r--r--crypto/des/fcrypt.c25
-rw-r--r--crypto/des/fcrypt_b.c2
-rw-r--r--crypto/des/ncbc_enc.c20
-rw-r--r--crypto/des/ofb64ede.c18
-rw-r--r--crypto/des/ofb64enc.c8
-rw-r--r--crypto/des/ofb_enc.c8
-rw-r--r--crypto/des/pcbc_enc.c10
-rw-r--r--crypto/des/qud_cksm.c4
-rw-r--r--crypto/des/rand_key.c12
-rw-r--r--crypto/des/read2pwd.c17
-rw-r--r--crypto/des/rpc_enc.c10
-rw-r--r--crypto/des/rpw.c2
-rw-r--r--crypto/des/set_key.c34
-rw-r--r--crypto/des/speed.c48
-rw-r--r--crypto/des/str2key.c32
-rw-r--r--crypto/des/xcbc_enc.c20
-rw-r--r--crypto/evp/e_des.c18
-rw-r--r--crypto/evp/e_des3.c34
-rw-r--r--crypto/evp/e_xcbc_d.c14
-rw-r--r--crypto/install.com2
-rw-r--r--crypto/mdc2/mdc2.h2
-rw-r--r--crypto/mdc2/mdc2dgst.c14
-rw-r--r--crypto/symhacks.h39
-rw-r--r--crypto/ui/ui_compat.c8
-rw-r--r--crypto/ui/ui_compat.h4
-rw-r--r--doc/crypto/des.pod297
-rwxr-xr-xmakevms.com2
-rw-r--r--test/Makefile.ssl5
-rwxr-xr-xutil/libeay.num171
-rwxr-xr-xutil/mkdef.pl2
58 files changed, 1490 insertions, 911 deletions
diff --git a/CHANGES b/CHANGES
index 4ff8e00b44..755efead7d 100644
--- a/CHANGES
+++ b/CHANGES
@@ -12,6 +12,19 @@
*) applies to 0.9.6a/0.9.6b/0.9.6c and 0.9.7
+) applies to 0.9.7 only
+ +) Change all functions with names starting with des_ to be starting
+ with DES_ instead. This because there are increasing clashes with
+ libdes and other des libraries that are currently used by other
+ projects. The old libdes interface is provided, as well as crypt(),
+ if openssl/des_old.h is included. Note that crypt() is no longer
+ declared in openssl/des.h.
+
+ NOTE: This is a major break of an old API into a new one. Software
+ authors are encouraged to switch to the DES_ style functions. Some
+ time in the future, des_old.h and the libdes compatibility functions
+ will be completely removed.
+ [Richard Levitte]
+
*) Fix SSL handshake functions and SSL_clear() such that SSL_clear()
never resets s->method to s->ctx->method when called from within
one of the SSL handshake functions.
diff --git a/apps/Makefile.ssl b/apps/Makefile.ssl
index 42d8ea85f9..4476a73ca8 100644
--- a/apps/Makefile.ssl
+++ b/apps/Makefile.ssl
@@ -468,18 +468,19 @@ openssl.o: openssl.c progs.h s_apps.h
passwd.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
passwd.o: ../include/openssl/bn.h ../include/openssl/buffer.h
passwd.o: ../include/openssl/conf.h ../include/openssl/crypto.h
-passwd.o: ../include/openssl/des.h ../include/openssl/dh.h
-passwd.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
-passwd.o: ../include/openssl/err.h ../include/openssl/evp.h
-passwd.o: ../include/openssl/lhash.h ../include/openssl/md5.h
-passwd.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
-passwd.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
-passwd.o: ../include/openssl/ossl_typ.h ../include/openssl/pkcs7.h
-passwd.o: ../include/openssl/rand.h ../include/openssl/rsa.h
-passwd.o: ../include/openssl/safestack.h ../include/openssl/sha.h
-passwd.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
-passwd.o: ../include/openssl/txt_db.h ../include/openssl/x509.h
-passwd.o: ../include/openssl/x509_vfy.h apps.h passwd.c
+passwd.o: ../include/openssl/des.h ../include/openssl/des_old.h
+passwd.o: ../include/openssl/dh.h ../include/openssl/dsa.h
+passwd.o: ../include/openssl/e_os2.h ../include/openssl/err.h
+passwd.o: ../include/openssl/evp.h ../include/openssl/lhash.h
+passwd.o: ../include/openssl/md5.h ../include/openssl/obj_mac.h
+passwd.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
+passwd.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
+passwd.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h
+passwd.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
+passwd.o: ../include/openssl/sha.h ../include/openssl/stack.h
+passwd.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h
+passwd.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h
+passwd.o: passwd.c
pkcs12.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
pkcs12.o: ../include/openssl/bn.h ../include/openssl/buffer.h
pkcs12.o: ../include/openssl/conf.h ../include/openssl/crypto.h
@@ -710,23 +711,23 @@ speed.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
speed.o: ../include/openssl/blowfish.h ../include/openssl/bn.h
speed.o: ../include/openssl/buffer.h ../include/openssl/cast.h
speed.o: ../include/openssl/conf.h ../include/openssl/crypto.h
-speed.o: ../include/openssl/des.h ../include/openssl/dh.h
-speed.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
-speed.o: ../include/openssl/err.h ../include/openssl/evp.h
-speed.o: ../include/openssl/hmac.h ../include/openssl/idea.h
-speed.o: ../include/openssl/lhash.h ../include/openssl/md2.h
-speed.o: ../include/openssl/md4.h ../include/openssl/md5.h
-speed.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h
-speed.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
-speed.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
-speed.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h
-speed.o: ../include/openssl/rc2.h ../include/openssl/rc4.h
-speed.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h
-speed.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
-speed.o: ../include/openssl/sha.h ../include/openssl/stack.h
-speed.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h
-speed.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h speed.c
-speed.o: testdsa.h testrsa.h
+speed.o: ../include/openssl/des.h ../include/openssl/des_old.h
+speed.o: ../include/openssl/dh.h ../include/openssl/dsa.h
+speed.o: ../include/openssl/e_os2.h ../include/openssl/err.h
+speed.o: ../include/openssl/evp.h ../include/openssl/hmac.h
+speed.o: ../include/openssl/idea.h ../include/openssl/lhash.h
+speed.o: ../include/openssl/md2.h ../include/openssl/md4.h
+speed.o: ../include/openssl/md5.h ../include/openssl/mdc2.h
+speed.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
+speed.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
+speed.o: ../include/openssl/ossl_typ.h ../include/openssl/pkcs7.h
+speed.o: ../include/openssl/rand.h ../include/openssl/rc2.h
+speed.o: ../include/openssl/rc4.h ../include/openssl/rc5.h
+speed.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h
+speed.o: ../include/openssl/safestack.h ../include/openssl/sha.h
+speed.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
+speed.o: ../include/openssl/txt_db.h ../include/openssl/x509.h
+speed.o: ../include/openssl/x509_vfy.h apps.h speed.c testdsa.h testrsa.h
spkac.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
spkac.o: ../include/openssl/bn.h ../include/openssl/buffer.h
spkac.o: ../include/openssl/conf.h ../include/openssl/crypto.h
@@ -760,18 +761,18 @@ version.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
version.o: ../include/openssl/blowfish.h ../include/openssl/bn.h
version.o: ../include/openssl/buffer.h ../include/openssl/conf.h
version.o: ../include/openssl/crypto.h ../include/openssl/des.h
-version.o: ../include/openssl/dh.h ../include/openssl/dsa.h
-version.o: ../include/openssl/e_os2.h ../include/openssl/evp.h
-version.o: ../include/openssl/idea.h ../include/openssl/lhash.h
-version.o: ../include/openssl/md2.h ../include/openssl/obj_mac.h
-version.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
-version.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
-version.o: ../include/openssl/pkcs7.h ../include/openssl/rc4.h
-version.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
-version.o: ../include/openssl/sha.h ../include/openssl/stack.h
-version.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h
-version.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h apps.h
-version.o: version.c
+version.o: ../include/openssl/des_old.h ../include/openssl/dh.h
+version.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
+version.o: ../include/openssl/evp.h ../include/openssl/idea.h
+version.o: ../include/openssl/lhash.h ../include/openssl/md2.h
+version.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
+version.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
+version.o: ../include/openssl/ossl_typ.h ../include/openssl/pkcs7.h
+version.o: ../include/openssl/rc4.h ../include/openssl/rsa.h
+version.o: ../include/openssl/safestack.h ../include/openssl/sha.h
+version.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
+version.o: ../include/openssl/txt_db.h ../include/openssl/x509.h
+version.o: ../include/openssl/x509_vfy.h apps.h version.c
x509.o: ../e_os.h ../include/openssl/asn1.h ../include/openssl/bio.h
x509.o: ../include/openssl/bn.h ../include/openssl/buffer.h
x509.o: ../include/openssl/conf.h ../include/openssl/crypto.h
diff --git a/apps/passwd.c b/apps/passwd.c
index bb395c35a1..d3fa228bdb 100644
--- a/apps/passwd.c
+++ b/apps/passwd.c
@@ -16,7 +16,7 @@
#include <openssl/evp.h>
#include <openssl/rand.h>
#ifndef OPENSSL_NO_DES
-# include <openssl/des.h>
+# include <openssl/des_old.h>
#endif
#ifndef NO_MD5CRYPT_1
# include <openssl/evp.h>
diff --git a/apps/speed.c b/apps/speed.c
index 363ec65b0c..b5e4e0e90a 100644
--- a/apps/speed.c
+++ b/apps/speed.c
@@ -129,7 +129,7 @@
#endif
#ifndef OPENSSL_NO_DES
-#include <openssl/des.h>
+#include <openssl/des_old.h>
#endif
#ifndef OPENSSL_NO_MD2
#include <openssl/md2.h>
@@ -377,11 +377,13 @@ int MAIN(int argc, char **argv)
0x34,0x56,0x78,0x9a,0xbc,0xde,0xf0,0x12};
unsigned char iv[8];
#ifndef OPENSSL_NO_DES
- des_cblock *buf_as_des_cblock = NULL;
+ DES_cblock *buf_as_des_cblock = NULL;
static des_cblock key ={0x12,0x34,0x56,0x78,0x9a,0xbc,0xde,0xf0};
static des_cblock key2={0x34,0x56,0x78,0x9a,0xbc,0xde,0xf0,0x12};
static des_cblock key3={0x56,0x78,0x9a,0xbc,0xde,0xf0,0x12,0x34};
- des_key_schedule sch,sch2,sch3;
+ DES_key_schedule sch;
+ DES_key_schedule sch2;
+ DES_key_schedule sch3;
#endif
#define D_MD2 0
#define D_MDC2 1
@@ -804,9 +806,9 @@ int MAIN(int argc, char **argv)
#endif
#ifndef OPENSSL_NO_DES
- des_set_key_unchecked(&key,&sch);
- des_set_key_unchecked(&key2,&sch2);
- des_set_key_unchecked(&key3,&sch3);
+ DES_set_key_unchecked(&key,&sch);
+ DES_set_key_unchecked(&key2,&sch2);
+ DES_set_key_unchecked(&key3,&sch3);
#endif
#ifndef OPENSSL_NO_IDEA
idea_set_encrypt_key(key16,&idea_ks);
@@ -1088,7 +1090,7 @@ int MAIN(int argc, char **argv)
print_message(names[D_CBC_DES],c[D_CBC_DES][j],lengths[j]);
Time_F(START,usertime);
for (count=0,run=1; COND(c[D_CBC_DES][j]); count++)
- des_ncbc_encrypt(buf,buf,lengths[j],&sch,
+ DES_ncbc_encrypt(buf,buf,lengths[j],&sch,
&iv,DES_ENCRYPT);
d=Time_F(STOP,usertime);
BIO_printf(bio_err,"%ld %s's in %.2fs\n",
@@ -1104,7 +1106,7 @@ int MAIN(int argc, char **argv)
print_message(names[D_EDE3_DES],c[D_EDE3_DES][j],lengths[j]);
Time_F(START,usertime);
for (count=0,run=1; COND(c[D_EDE3_DES][j]); count++)
- des_ede3_cbc_encrypt(buf,buf,lengths[j],
+ DES_ede3_cbc_encrypt(buf,buf,lengths[j],
&sch,&sch2,&sch3,
&iv,DES_ENCRYPT);
d=Time_F(STOP,usertime);
diff --git a/apps/version.c b/apps/version.c
index 8956b7da9b..656b96278b 100644
--- a/apps/version.c
+++ b/apps/version.c
@@ -117,7 +117,7 @@
#include <openssl/crypto.h>
#include <openssl/md2.h>
#include <openssl/rc4.h>
-#include <openssl/des.h>
+#include <openssl/des_old.h>
#include <openssl/idea.h>
#include <openssl/blowfish.h>
diff --git a/crypto/crypto-lib.com b/crypto/crypto-lib.com
index 9428055708..b4d80f77fd 100644
--- a/crypto/crypto-lib.com
+++ b/crypto/crypto-lib.com
@@ -187,7 +187,7 @@ $ LIB_DES = "set_key,ecb_enc,cbc_enc,"+ -
"enc_read,enc_writ,ofb64enc,"+ -
"ofb_enc,str2key,pcbc_enc,qud_cksm,rand_key,"+ -
"des_enc,fcrypt_b,"+ -
- "fcrypt,xcbc_enc,rpc_enc,cbc_cksm,ede_cbcm_enc"
+ "fcrypt,xcbc_enc,rpc_enc,cbc_cksm,ede_cbcm_enc,des_old"
$ LIB_RC2 = "rc2_ecb,rc2_skey,rc2_cbc,rc2cfb64,rc2ofb64"
$ LIB_RC4 = "rc4_skey,rc4_enc"
$ LIB_RC5 = "rc5_skey,rc5_ecb,rc5_enc,rc5cfb64,rc5ofb64"
diff --git a/crypto/des/Makefile.ssl b/crypto/des/Makefile.ssl
index 68fd3c4cbc..60d4d1b45b 100644
--- a/crypto/des/Makefile.ssl
+++ b/crypto/des/Makefile.ssl
@@ -34,7 +34,7 @@ LIBSRC= cbc_cksm.c cbc_enc.c cfb64enc.c cfb_enc.c \
qud_cksm.c rand_key.c rpc_enc.c set_key.c \
des_enc.c fcrypt_b.c \
xcbc_enc.c \
- str2key.c cfb64ede.c ofb64ede.c ede_cbcm_enc.c
+ str2key.c cfb64ede.c ofb64ede.c ede_cbcm_enc.c des_old.o
LIBOBJ= set_key.o ecb_enc.o cbc_enc.o \
ecb3_enc.o cfb64enc.o cfb64ede.o cfb_enc.o ofb64ede.o \
@@ -42,11 +42,11 @@ LIBOBJ= set_key.o ecb_enc.o cbc_enc.o \
ofb_enc.o str2key.o pcbc_enc.o qud_cksm.o rand_key.o \
${DES_ENC} \
fcrypt.o xcbc_enc.o rpc_enc.o cbc_cksm.o \
- ede_cbcm_enc.o
+ ede_cbcm_enc.o des_old.o
SRC= $(LIBSRC)
-EXHEADER= des.h
+EXHEADER= des.h des_old.h
HEADER= des_locl.h rpc_des.h spr.h des_ver.h $(EXHEADER)
ALL= $(GENERAL) $(SRC) $(HEADER)
diff --git a/crypto/des/asm/des-586.pl b/crypto/des/asm/des-586.pl
index c890766bc9..28b877a167 100644
--- a/crypto/des/asm/des-586.pl
+++ b/crypto/des/asm/des-586.pl
@@ -20,16 +20,16 @@ $L="edi";
$R="esi";
&external_label("des_SPtrans");
-&des_encrypt("des_encrypt1",1);
-&des_encrypt("des_encrypt2",0);
-&des_encrypt3("des_encrypt3",1);
-&des_encrypt3("des_decrypt3",0);
-&cbc("des_ncbc_encrypt","des_encrypt1","des_encrypt1",0,4,5,3,5,-1);
-&cbc("des_ede3_cbc_encrypt","des_encrypt3","des_decrypt3",0,6,7,3,4,5);
+&DES_encrypt("DES_encrypt1",1);
+&DES_encrypt("DES_encrypt2",0);
+&DES_encrypt3("DES_encrypt3",1);
+&DES_encrypt3("DES_decrypt3",0);
+&cbc("DES_ncbc_encrypt","DES_encrypt1","DES_encrypt1",0,4,5,3,5,-1);
+&cbc("DES_ede3_cbc_encrypt","DES_encrypt3","DES_decrypt3",0,6,7,3,4,5);
&asm_finish();
-sub des_encrypt
+sub DES_encrypt
{
local($name,$do_ip)=@_;
diff --git a/crypto/des/asm/des686.pl b/crypto/des/asm/des686.pl
index 84c3e85438..f6dbab3315 100644
--- a/crypto/des/asm/des686.pl
+++ b/crypto/des/asm/des686.pl
@@ -46,15 +46,15 @@ EOF
$L="edi";
$R="esi";
-&des_encrypt("des_encrypt1",1);
-&des_encrypt("des_encrypt2",0);
+&DES_encrypt("DES_encrypt1",1);
+&DES_encrypt("DES_encrypt2",0);
-&des_encrypt3("des_encrypt3",1);
-&des_encrypt3("des_decrypt3",0);
+&DES_encrypt3("DES_encrypt3",1);
+&DES_encrypt3("DES_decrypt3",0);
&file_end();
-sub des_encrypt
+sub DES_encrypt
{
local($name,$do_ip)=@_;
diff --git a/crypto/des/asm/desboth.pl b/crypto/des/asm/desboth.pl
index d5106414db..eec00886e4 100644
--- a/crypto/des/asm/desboth.pl
+++ b/crypto/des/asm/desboth.pl
@@ -3,7 +3,7 @@
$L="edi";
$R="esi";
-sub des_encrypt3
+sub DES_encrypt3
{
local($name,$enc)=@_;
@@ -47,15 +47,15 @@ sub des_encrypt3
&mov(&swtmp(2), (DWC(($enc)?"1":"0")));
&mov(&swtmp(1), "eax");
&mov(&swtmp(0), "ebx");
- &call("des_encrypt2");
+ &call("DES_encrypt2");
&mov(&swtmp(2), (DWC(($enc)?"0":"1")));
&mov(&swtmp(1), "edi");
&mov(&swtmp(0), "ebx");
- &call("des_encrypt2");
+ &call("DES_encrypt2");
&mov(&swtmp(2), (DWC(($enc)?"1":"0")));
&mov(&swtmp(1), "esi");
&mov(&swtmp(0), "ebx");
- &call("des_encrypt2");
+ &call("DES_encrypt2");
&stack_pop(3);
&mov($L,&DWP(0,"ebx","",0));
diff --git a/crypto/des/cbc3_enc.c b/crypto/des/cbc3_enc.c
index c7cc7c1706..b5db4e14f7 100644
--- a/crypto/des/cbc3_enc.c
+++ b/crypto/des/cbc3_enc.c
@@ -59,41 +59,41 @@
#include "des_locl.h"
/* HAS BUGS! DON'T USE - this is only present for use in des.c */
-void des_3cbc_encrypt(des_cblock *input, des_cblock *output, long length,
- des_key_schedule ks1, des_key_schedule ks2, des_cblock *iv1,
- des_cblock *iv2, int enc)
+void DES_3cbc_encrypt(DES_cblock *input, DES_cblock *output, long length,
+ DES_key_schedule ks1, DES_key_schedule ks2, DES_cblock *iv1,
+ DES_cblock *iv2, int enc)
{
int off=((int)length-1)/8;
long l8=((length+7)/8)*8;
- des_cblock niv1,niv2;
+ DES_cblock niv1,niv2;
if (enc == DES_ENCRYPT)
{
- des_cbc_encrypt((unsigned char*)input,
+ DES_cbc_encrypt((unsigned char*)input,
(unsigned char*)output,length,&ks1,iv1,enc);
- if (length >= sizeof(des_cblock))
- memcpy(niv1,output[off],sizeof(des_cblock));
- des_cbc_encrypt((unsigned char*)output,
+ if (length >= sizeof(DES_cblock))
+ memcpy(niv1,output[off],sizeof(DES_cblock));
+ DES_cbc_encrypt((unsigned char*)output,
(unsigned char*)output,l8,&ks2,iv1,!enc);
- des_cbc_encrypt((unsigned char*)output,
+ DES_cbc_encrypt((unsigned char*)output,
(unsigned char*)output,l8,&ks1,iv2,enc);
- if (length >= sizeof(des_cblock))
- memcpy(niv2,output[off],sizeof(des_cblock));
+ if (length >= sizeof(DES_cblock))
+ memcpy(niv2,output[off],sizeof(DES_cblock));
}
else
{
- if (length >= sizeof(des_cblock))
- memcpy(niv2,input[off],sizeof(des_cblock));
- des_cbc_encrypt((unsigned char*)input,
+ if (length >= sizeof(DES_cblock))
+ memcpy(niv2,input[off],sizeof(DES_cblock));
+ DES_cbc_encrypt((unsigned char*)input,
(unsigned char*)output,l8,&ks1,iv2,enc);
- des_cbc_encrypt((unsigned char*)output,
+ DES_cbc_encrypt((unsigned char*)output,
(unsigned char*)output,l8,&ks2,iv1,!enc);
- if (length >= sizeof(des_cblock))
- memcpy(niv1,output[off],sizeof(des_cblock));
- des_cbc_encrypt((unsigned char*)output,
+ if (length >= sizeof(DES_cblock))
+ memcpy(niv1,output[off],sizeof(DES_cblock));
+ DES_cbc_encrypt((unsigned char*)output,
(unsigned char*)output,length,&ks1,iv1,enc);
}
- memcpy(*iv1,niv1,sizeof(des_cblock));
- memcpy(*iv2,niv2,sizeof(des_cblock));
+ memcpy(*iv1,niv1,sizeof(DES_cblock));
+ memcpy(*iv2,niv2,sizeof(DES_cblock));
}
diff --git a/crypto/des/cbc_cksm.c b/crypto/des/cbc_cksm.c
index 69efc56b16..6c5305b99d 100644
--- a/crypto/des/cbc_cksm.c
+++ b/crypto/des/cbc_cksm.c
@@ -58,9 +58,9 @@
#include "des_locl.h"
-DES_LONG des_cbc_cksum(const unsigned char *in, des_cblock *output,
- long length, des_key_schedule *schedule,
- const_des_cblock *ivec)
+DES_LONG DES_cbc_cksum(const unsigned char *in, DES_cblock *output,
+ long length, DES_key_schedule *schedule,
+ const_DES_cblock *ivec)
{
register DES_LONG tout0,tout1,tin0,tin1;
register long l=length;
@@ -82,7 +82,7 @@ DES_LONG des_cbc_cksum(const unsigned char *in, des_cblock *output,
tin0^=tout0; tin[0]=tin0;
tin1^=tout1; tin[1]=tin1;
- des_encrypt1((DES_LONG *)tin,schedule,DES_ENCRYPT);
+ DES_encrypt1((DES_LONG *)tin,schedule,DES_ENCRYPT);
/* fix 15/10/91 eay - thanks to keithr@sco.COM */
tout0=tin[0];
tout1=tin[1];
diff --git a/crypto/des/cfb64ede.c b/crypto/des/cfb64ede.c
index f9d13ef90a..60c1aa08db 100644
--- a/crypto/des/cfb64ede.c
+++ b/crypto/des/cfb64ede.c
@@ -63,10 +63,10 @@
* 64bit block we have used is contained in *num;
*/
-void des_ede3_cfb64_encrypt(const unsigned char *in, unsigned char *out,
- long length, des_key_schedule *ks1,
- des_key_schedule *ks2, des_key_schedule *ks3,
- des_cblock *ivec, int *num, int enc)
+void DES_ede3_cfb64_encrypt(const unsigned char *in, unsigned char *out,
+ long length, DES_key_schedule *ks1,
+ DES_key_schedule *ks2, DES_key_schedule *ks3,
+ DES_cblock *ivec, int *num, int enc)
{
register DES_LONG v0,v1;
register long l=length;
@@ -86,7 +86,7 @@ void des_ede3_cfb64_encrypt(const unsigned char *in, unsigned char *out,
ti[0]=v0;
ti[1]=v1;
- des_encrypt3(ti,ks1,ks2,ks3);
+ DES_encrypt3(ti,ks1,ks2,ks3);
v0=ti[0];
v1=ti[1];
@@ -112,7 +112,7 @@ void des_ede3_cfb64_encrypt(const unsigned char *in, unsigned char *out,
ti[0]=v0;
ti[1]=v1;
- des_encrypt3(ti,ks1,ks2,ks3);
+ DES_encrypt3(ti,ks1,ks2,ks3);
v0=ti[0];
v1=ti[1];
@@ -133,10 +133,10 @@ void des_ede3_cfb64_encrypt(const unsigned char *in, unsigned char *out,
}
#ifdef undef /* MACRO */
-void des_ede2_cfb64_encrypt(unsigned char *in, unsigned char *out, long length,
- des_key_schedule ks1, des_key_schedule ks2, des_cblock (*ivec),
+void DES_ede2_cfb64_encrypt(unsigned char *in, unsigned char *out, long length,
+ DES_key_schedule ks1, DES_key_schedule ks2, DES_cblock (*ivec),
int *num, int enc)
{
- des_ede3_cfb64_encrypt(in,out,length,ks1,ks2,ks1,ivec,num,enc);
+ DES_ede3_cfb64_encrypt(in,out,length,ks1,ks2,ks1,ivec,num,enc);
}
#endif
diff --git a/crypto/des/cfb64enc.c b/crypto/des/cfb64enc.c
index 6061fb2e11..5ec8683e40 100644