Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/openssl/openssl.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2000-05-30 11:16:56 +0400
committerRichard Levitte <levitte@openssl.org>2000-05-30 11:16:56 +0400
commit6a1129837ab4b803202a910b707f776f39206705 (patch)
tree40837ba6741441cd5374951dc4742993c88d3306 /crypto/evp
parent20ca3d49e76dab44e1a418cb83024b4f77d2299e (diff)
Main trunk changes merged into BRANCH_engine. There were no
conflicts, which is a good thing. Propper tagging of merge point done.
Diffstat (limited to 'crypto/evp')
-rw-r--r--crypto/evp/Makefile.ssl549
-rw-r--r--crypto/evp/e_cbc_3d.c151
-rw-r--r--crypto/evp/e_cbc_bf.c106
-rw-r--r--crypto/evp/e_cbc_c.c107
-rw-r--r--crypto/evp/e_cbc_d.c106
-rw-r--r--crypto/evp/e_cbc_i.c119
-rw-r--r--crypto/evp/e_cbc_r2.c216
-rw-r--r--crypto/evp/e_cbc_r5.c108
-rw-r--r--crypto/evp/e_cfb_3d.c155
-rw-r--r--crypto/evp/e_cfb_bf.c108
-rw-r--r--crypto/evp/e_cfb_c.c109
-rw-r--r--crypto/evp/e_cfb_d.c110
-rw-r--r--crypto/evp/e_cfb_i.c109
-rw-r--r--crypto/evp/e_cfb_r2.c110
-rw-r--r--crypto/evp/e_cfb_r5.c110
-rw-r--r--crypto/evp/e_ecb_3d.c158
-rw-r--r--crypto/evp/e_ecb_bf.c109
-rw-r--r--crypto/evp/e_ecb_c.c110
-rw-r--r--crypto/evp/e_ecb_d.c118
-rw-r--r--crypto/evp/e_ecb_i.c121
-rw-r--r--crypto/evp/e_ecb_r2.c111
-rw-r--r--crypto/evp/e_ecb_r5.c111
-rw-r--r--crypto/evp/e_null.c12
-rw-r--r--crypto/evp/e_ofb_3d.c152
-rw-r--r--crypto/evp/e_ofb_bf.c109
-rw-r--r--crypto/evp/e_ofb_c.c110
-rw-r--r--crypto/evp/e_ofb_d.c107
-rw-r--r--crypto/evp/e_ofb_i.c109
-rw-r--r--crypto/evp/e_ofb_r2.c111
-rw-r--r--crypto/evp/e_ofb_r5.c111
-rw-r--r--crypto/evp/e_rc4.c22
-rw-r--r--crypto/evp/e_xcbc_d.c25
-rw-r--r--crypto/evp/evp.h98
-rw-r--r--crypto/evp/evp_enc.c120
-rw-r--r--crypto/evp/evp_err.c4
35 files changed, 307 insertions, 3894 deletions
diff --git a/crypto/evp/Makefile.ssl b/crypto/evp/Makefile.ssl
index 1150e88929..de43060eaf 100644
--- a/crypto/evp/Makefile.ssl
+++ b/crypto/evp/Makefile.ssl
@@ -23,14 +23,9 @@ APPS=
LIB=$(TOP)/libcrypto.a
LIBSRC= encode.c digest.c evp_enc.c evp_key.c \
- e_ecb_d.c e_cbc_d.c e_cfb_d.c e_ofb_d.c \
- e_ecb_i.c e_cbc_i.c e_cfb_i.c e_ofb_i.c \
- e_ecb_3d.c e_cbc_3d.c e_rc4.c names.c \
- e_cfb_3d.c e_ofb_3d.c e_xcbc_d.c \
- e_ecb_r2.c e_cbc_r2.c e_cfb_r2.c e_ofb_r2.c \
- e_ecb_bf.c e_cbc_bf.c e_cfb_bf.c e_ofb_bf.c \
- e_ecb_c.c e_cbc_c.c e_cfb_c.c e_ofb_c.c \
- e_ecb_r5.c e_cbc_r5.c e_cfb_r5.c e_ofb_r5.c \
+ e_des.c e_bf.c e_idea.c e_des3.c \
+ e_rc4.c names.c \
+ e_xcbc_d.c e_rc2.c e_cast.c e_rc5.c \
m_null.c m_md2.c m_md5.c m_sha.c m_sha1.c m_dss.c m_dss1.c m_mdc2.c \
m_ripemd.c \
p_open.c p_seal.c p_sign.c p_verify.c p_lib.c p_enc.c p_dec.c \
@@ -39,14 +34,9 @@ LIBSRC= encode.c digest.c evp_enc.c evp_key.c \
evp_pkey.c evp_pbe.c p5_crpt.c p5_crpt2.c
LIBOBJ= encode.o digest.o evp_enc.o evp_key.o \
- e_ecb_d.o e_cbc_d.o e_cfb_d.o e_ofb_d.o \
- e_ecb_i.o e_cbc_i.o e_cfb_i.o e_ofb_i.o \
- e_ecb_3d.o e_cbc_3d.o e_rc4.o names.o \
- e_cfb_3d.o e_ofb_3d.o e_xcbc_d.o \
- e_ecb_r2.o e_cbc_r2.o e_cfb_r2.o e_ofb_r2.o \
- e_ecb_bf.o e_cbc_bf.o e_cfb_bf.o e_ofb_bf.o \
- e_ecb_c.o e_cbc_c.o e_cfb_c.o e_ofb_c.o \
- e_ecb_r5.o e_cbc_r5.o e_cfb_r5.o e_ofb_r5.o \
+ e_des.o e_bf.o e_idea.o e_des3.o \
+ e_rc4.o names.o \
+ e_xcbc_d.o e_rc2.o e_cast.o e_rc5.o \
m_null.o m_md2.o m_md5.o m_sha.o m_sha1.o m_dss.o m_dss1.o m_mdc2.o \
m_ripemd.o \
p_open.o p_seal.o p_sign.o p_verify.o p_lib.o p_enc.o p_dec.o \
@@ -232,321 +222,81 @@ digest.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
digest.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
digest.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
digest.o: ../../include/openssl/stack.h ../cryptlib.h
-e_cbc_3d.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
-e_cbc_3d.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
-e_cbc_3d.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
-e_cbc_3d.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
-e_cbc_3d.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
-e_cbc_3d.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
-e_cbc_3d.o: ../../include/openssl/err.h ../../include/openssl/evp.h
-e_cbc_3d.o: ../../include/openssl/idea.h ../../include/openssl/md2.h
-e_cbc_3d.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
-e_cbc_3d.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
-e_cbc_3d.o: ../../include/openssl/opensslv.h ../../include/openssl/rc2.h
-e_cbc_3d.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
-e_cbc_3d.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
-e_cbc_3d.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
-e_cbc_3d.o: ../../include/openssl/stack.h ../cryptlib.h
-e_cbc_bf.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
-e_cbc_bf.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
-e_cbc_bf.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
-e_cbc_bf.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
-e_cbc_bf.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
-e_cbc_bf.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
-e_cbc_bf.o: ../../include/openssl/err.h ../../include/openssl/evp.h
-e_cbc_bf.o: ../../include/openssl/idea.h ../../include/openssl/md2.h
-e_cbc_bf.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
-e_cbc_bf.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
-e_cbc_bf.o: ../../include/openssl/opensslv.h ../../include/openssl/rc2.h
-e_cbc_bf.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
-e_cbc_bf.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
-e_cbc_bf.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
-e_cbc_bf.o: ../../include/openssl/stack.h ../cryptlib.h
-e_cbc_c.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
-e_cbc_c.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
-e_cbc_c.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
-e_cbc_c.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
-e_cbc_c.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
-e_cbc_c.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
-e_cbc_c.o: ../../include/openssl/err.h ../../include/openssl/evp.h
-e_cbc_c.o: ../../include/openssl/idea.h ../../include/openssl/md2.h
-e_cbc_c.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
-e_cbc_c.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
-e_cbc_c.o: ../../include/openssl/opensslv.h ../../include/openssl/rc2.h
-e_cbc_c.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
-e_cbc_c.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
-e_cbc_c.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
-e_cbc_c.o: ../../include/openssl/stack.h ../cryptlib.h
-e_cbc_d.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
-e_cbc_d.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
-e_cbc_d.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
-e_cbc_d.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
-e_cbc_d.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
-e_cbc_d.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
-e_cbc_d.o: ../../include/openssl/err.h ../../include/openssl/evp.h
-e_cbc_d.o: ../../include/openssl/idea.h ../../include/openssl/md2.h
-e_cbc_d.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
-e_cbc_d.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
-e_cbc_d.o: ../../include/openssl/opensslv.h ../../include/openssl/rc2.h
-e_cbc_d.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
-e_cbc_d.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
-e_cbc_d.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
-e_cbc_d.o: ../../include/openssl/stack.h ../cryptlib.h
-e_cbc_i.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
-e_cbc_i.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
-e_cbc_i.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
-e_cbc_i.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
-e_cbc_i.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
-e_cbc_i.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
-e_cbc_i.o: ../../include/openssl/err.h ../../include/openssl/evp.h
-e_cbc_i.o: ../../include/openssl/idea.h ../../include/openssl/md2.h
-e_cbc_i.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
-e_cbc_i.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
-e_cbc_i.o: ../../include/openssl/opensslv.h ../../include/openssl/rc2.h
-e_cbc_i.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
-e_cbc_i.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
-e_cbc_i.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
-e_cbc_i.o: ../../include/openssl/stack.h ../cryptlib.h
-e_cbc_r2.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
-e_cbc_r2.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
-e_cbc_r2.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
-e_cbc_r2.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
-e_cbc_r2.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
-e_cbc_r2.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
-e_cbc_r2.o: ../../include/openssl/err.h ../../include/openssl/evp.h
-e_cbc_r2.o: ../../include/openssl/idea.h ../../include/openssl/md2.h
-e_cbc_r2.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
-e_cbc_r2.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
-e_cbc_r2.o: ../../include/openssl/opensslv.h ../../include/openssl/rc2.h
-e_cbc_r2.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
-e_cbc_r2.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
-e_cbc_r2.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
-e_cbc_r2.o: ../../include/openssl/stack.h ../cryptlib.h
-e_cbc_r5.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
-e_cbc_r5.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
-e_cbc_r5.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
-e_cbc_r5.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
-e_cbc_r5.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
-e_cbc_r5.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
-e_cbc_r5.o: ../../include/openssl/err.h ../../include/openssl/evp.h
-e_cbc_r5.o: ../../include/openssl/idea.h ../../include/openssl/md2.h
-e_cbc_r5.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
-e_cbc_r5.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
-e_cbc_r5.o: ../../include/openssl/opensslv.h ../../include/openssl/rc2.h
-e_cbc_r5.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
-e_cbc_r5.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
-e_cbc_r5.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
-e_cbc_r5.o: ../../include/openssl/stack.h ../cryptlib.h
-e_cfb_3d.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
-e_cfb_3d.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
-e_cfb_3d.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
-e_cfb_3d.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
-e_cfb_3d.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
-e_cfb_3d.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
-e_cfb_3d.o: ../../include/openssl/err.h ../../include/openssl/evp.h
-e_cfb_3d.o: ../../include/openssl/idea.h ../../include/openssl/md2.h
-e_cfb_3d.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
-e_cfb_3d.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
-e_cfb_3d.o: ../../include/openssl/opensslv.h ../../include/openssl/rc2.h
-e_cfb_3d.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
-e_cfb_3d.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
-e_cfb_3d.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
-e_cfb_3d.o: ../../include/openssl/stack.h ../cryptlib.h
-e_cfb_bf.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
-e_cfb_bf.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
-e_cfb_bf.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
-e_cfb_bf.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
-e_cfb_bf.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
-e_cfb_bf.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
-e_cfb_bf.o: ../../include/openssl/err.h ../../include/openssl/evp.h
-e_cfb_bf.o: ../../include/openssl/idea.h ../../include/openssl/md2.h
-e_cfb_bf.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
-e_cfb_bf.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
-e_cfb_bf.o: ../../include/openssl/opensslv.h ../../include/openssl/rc2.h
-e_cfb_bf.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
-e_cfb_bf.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
-e_cfb_bf.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
-e_cfb_bf.o: ../../include/openssl/stack.h ../cryptlib.h
-e_cfb_c.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
-e_cfb_c.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
-e_cfb_c.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
-e_cfb_c.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
-e_cfb_c.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
-e_cfb_c.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
-e_cfb_c.o: ../../include/openssl/err.h ../../include/openssl/evp.h
-e_cfb_c.o: ../../include/openssl/idea.h ../../include/openssl/md2.h
-e_cfb_c.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
-e_cfb_c.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
-e_cfb_c.o: ../../include/openssl/opensslv.h ../../include/openssl/rc2.h
-e_cfb_c.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
-e_cfb_c.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
-e_cfb_c.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
-e_cfb_c.o: ../../include/openssl/stack.h ../cryptlib.h
-e_cfb_d.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
-e_cfb_d.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
-e_cfb_d.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
-e_cfb_d.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
-e_cfb_d.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
-e_cfb_d.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
-e_cfb_d.o: ../../include/openssl/err.h ../../include/openssl/evp.h
-e_cfb_d.o: ../../include/openssl/idea.h ../../include/openssl/md2.h
-e_cfb_d.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
-e_cfb_d.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
-e_cfb_d.o: ../../include/openssl/opensslv.h ../../include/openssl/rc2.h
-e_cfb_d.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
-e_cfb_d.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
-e_cfb_d.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
-e_cfb_d.o: ../../include/openssl/stack.h ../cryptlib.h
-e_cfb_i.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
-e_cfb_i.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
-e_cfb_i.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
-e_cfb_i.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
-e_cfb_i.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
-e_cfb_i.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
-e_cfb_i.o: ../../include/openssl/err.h ../../include/openssl/evp.h
-e_cfb_i.o: ../../include/openssl/idea.h ../../include/openssl/md2.h
-e_cfb_i.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
-e_cfb_i.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
-e_cfb_i.o: ../../include/openssl/opensslv.h ../../include/openssl/rc2.h
-e_cfb_i.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
-e_cfb_i.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
-e_cfb_i.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
-e_cfb_i.o: ../../include/openssl/stack.h ../cryptlib.h
-e_cfb_r2.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
-e_cfb_r2.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
-e_cfb_r2.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
-e_cfb_r2.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
-e_cfb_r2.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
-e_cfb_r2.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
-e_cfb_r2.o: ../../include/openssl/err.h ../../include/openssl/evp.h
-e_cfb_r2.o: ../../include/openssl/idea.h ../../include/openssl/md2.h
-e_cfb_r2.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
-e_cfb_r2.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
-e_cfb_r2.o: ../../include/openssl/opensslv.h ../../include/openssl/rc2.h
-e_cfb_r2.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
-e_cfb_r2.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
-e_cfb_r2.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
-e_cfb_r2.o: ../../include/openssl/stack.h ../cryptlib.h
-e_cfb_r5.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
-e_cfb_r5.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
-e_cfb_r5.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
-e_cfb_r5.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
-e_cfb_r5.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
-e_cfb_r5.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
-e_cfb_r5.o: ../../include/openssl/err.h ../../include/openssl/evp.h
-e_cfb_r5.o: ../../include/openssl/idea.h ../../include/openssl/md2.h
-e_cfb_r5.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
-e_cfb_r5.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
-e_cfb_r5.o: ../../include/openssl/opensslv.h ../../include/openssl/rc2.h
-e_cfb_r5.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
-e_cfb_r5.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
-e_cfb_r5.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
-e_cfb_r5.o: ../../include/openssl/stack.h ../cryptlib.h
-e_ecb_3d.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
-e_ecb_3d.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
-e_ecb_3d.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
-e_ecb_3d.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
-e_ecb_3d.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
-e_ecb_3d.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
-e_ecb_3d.o: ../../include/openssl/err.h ../../include/openssl/evp.h
-e_ecb_3d.o: ../../include/openssl/idea.h ../../include/openssl/md2.h
-e_ecb_3d.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
-e_ecb_3d.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
-e_ecb_3d.o: ../../include/openssl/opensslv.h ../../include/openssl/rc2.h
-e_ecb_3d.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
-e_ecb_3d.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
-e_ecb_3d.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
-e_ecb_3d.o: ../../include/openssl/stack.h ../cryptlib.h
-e_ecb_bf.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
-e_ecb_bf.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
-e_ecb_bf.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
-e_ecb_bf.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
-e_ecb_bf.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
-e_ecb_bf.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
-e_ecb_bf.o: ../../include/openssl/err.h ../../include/openssl/evp.h
-e_ecb_bf.o: ../../include/openssl/idea.h ../../include/openssl/md2.h
-e_ecb_bf.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
-e_ecb_bf.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
-e_ecb_bf.o: ../../include/openssl/opensslv.h ../../include/openssl/rc2.h
-e_ecb_bf.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
-e_ecb_bf.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
-e_ecb_bf.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
-e_ecb_bf.o: ../../include/openssl/stack.h ../cryptlib.h
-e_ecb_c.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
-e_ecb_c.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
-e_ecb_c.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
-e_ecb_c.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
-e_ecb_c.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
-e_ecb_c.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
-e_ecb_c.o: ../../include/openssl/err.h ../../include/openssl/evp.h
-e_ecb_c.o: ../../include/openssl/idea.h ../../include/openssl/md2.h
-e_ecb_c.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
-e_ecb_c.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
-e_ecb_c.o: ../../include/openssl/opensslv.h ../../include/openssl/rc2.h
-e_ecb_c.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
-e_ecb_c.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
-e_ecb_c.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
-e_ecb_c.o: ../../include/openssl/stack.h ../cryptlib.h
-e_ecb_d.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
-e_ecb_d.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
-e_ecb_d.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
-e_ecb_d.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
-e_ecb_d.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
-e_ecb_d.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
-e_ecb_d.o: ../../include/openssl/err.h ../../include/openssl/evp.h
-e_ecb_d.o: ../../include/openssl/idea.h ../../include/openssl/md2.h
-e_ecb_d.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
-e_ecb_d.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
-e_ecb_d.o: ../../include/openssl/opensslv.h ../../include/openssl/rc2.h
-e_ecb_d.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
-e_ecb_d.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
-e_ecb_d.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
-e_ecb_d.o: ../../include/openssl/stack.h ../cryptlib.h
-e_ecb_i.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
-e_ecb_i.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
-e_ecb_i.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
-e_ecb_i.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
-e_ecb_i.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
-e_ecb_i.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
-e_ecb_i.o: ../../include/openssl/err.h ../../include/openssl/evp.h
-e_ecb_i.o: ../../include/openssl/idea.h ../../include/openssl/md2.h
-e_ecb_i.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
-e_ecb_i.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
-e_ecb_i.o: ../../include/openssl/opensslv.h ../../include/openssl/rc2.h
-e_ecb_i.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
-e_ecb_i.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
-e_ecb_i.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
-e_ecb_i.o: ../../include/openssl/stack.h ../cryptlib.h
-e_ecb_r2.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
-e_ecb_r2.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
-e_ecb_r2.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
-e_ecb_r2.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
-e_ecb_r2.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
-e_ecb_r2.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
-e_ecb_r2.o: ../../include/openssl/err.h ../../include/openssl/evp.h
-e_ecb_r2.o: ../../include/openssl/idea.h ../../include/openssl/md2.h
-e_ecb_r2.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
-e_ecb_r2.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
-e_ecb_r2.o: ../../include/openssl/opensslv.h ../../include/openssl/rc2.h
-e_ecb_r2.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
-e_ecb_r2.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
-e_ecb_r2.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
-e_ecb_r2.o: ../../include/openssl/stack.h ../cryptlib.h
-e_ecb_r5.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
-e_ecb_r5.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
-e_ecb_r5.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
-e_ecb_r5.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
-e_ecb_r5.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
-e_ecb_r5.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
-e_ecb_r5.o: ../../include/openssl/err.h ../../include/openssl/evp.h
-e_ecb_r5.o: ../../include/openssl/idea.h ../../include/openssl/md2.h
-e_ecb_r5.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
-e_ecb_r5.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
-e_ecb_r5.o: ../../include/openssl/opensslv.h ../../include/openssl/rc2.h
-e_ecb_r5.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
-e_ecb_r5.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
-e_ecb_r5.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
-e_ecb_r5.o: ../../include/openssl/stack.h ../cryptlib.h
+e_bf.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
+e_bf.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
+e_bf.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
+e_bf.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
+e_bf.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
+e_bf.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
+e_bf.o: ../../include/openssl/err.h ../../include/openssl/evp.h
+e_bf.o: ../../include/openssl/idea.h ../../include/openssl/md2.h
+e_bf.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
+e_bf.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
+e_bf.o: ../../include/openssl/opensslv.h ../../include/openssl/rc2.h
+e_bf.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
+e_bf.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
+e_bf.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
+e_bf.o: ../../include/openssl/stack.h ../cryptlib.h evp_locl.h
+e_cast.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
+e_cast.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
+e_cast.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
+e_cast.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
+e_cast.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
+e_cast.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
+e_cast.o: ../../include/openssl/err.h ../../include/openssl/evp.h
+e_cast.o: ../../include/openssl/idea.h ../../include/openssl/md2.h
+e_cast.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
+e_cast.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
+e_cast.o: ../../include/openssl/opensslv.h ../../include/openssl/rc2.h
+e_cast.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
+e_cast.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
+e_cast.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
+e_cast.o: ../../include/openssl/stack.h ../cryptlib.h evp_locl.h
+e_des.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
+e_des.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
+e_des.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
+e_des.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
+e_des.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
+e_des.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
+e_des.o: ../../include/openssl/err.h ../../include/openssl/evp.h
+e_des.o: ../../include/openssl/idea.h ../../include/openssl/md2.h
+e_des.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
+e_des.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
+e_des.o: ../../include/openssl/opensslv.h ../../include/openssl/rc2.h
+e_des.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
+e_des.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
+e_des.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
+e_des.o: ../../include/openssl/stack.h ../cryptlib.h evp_locl.h
+e_des3.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
+e_des3.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
+e_des3.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
+e_des3.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
+e_des3.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
+e_des3.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
+e_des3.o: ../../include/openssl/err.h ../../include/openssl/evp.h
+e_des3.o: ../../include/openssl/idea.h ../../include/openssl/md2.h
+e_des3.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
+e_des3.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
+e_des3.o: ../../include/openssl/opensslv.h ../../include/openssl/rc2.h
+e_des3.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
+e_des3.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
+e_des3.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
+e_des3.o: ../../include/openssl/stack.h ../cryptlib.h evp_locl.h
+e_idea.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
+e_idea.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
+e_idea.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
+e_idea.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
+e_idea.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
+e_idea.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
+e_idea.o: ../../include/openssl/err.h ../../include/openssl/evp.h
+e_idea.o: ../../include/openssl/idea.h ../../include/openssl/md2.h
+e_idea.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
+e_idea.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
+e_idea.o: ../../include/openssl/opensslv.h ../../include/openssl/rc2.h
+e_idea.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
+e_idea.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
+e_idea.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
+e_idea.o: ../../include/openssl/stack.h ../cryptlib.h evp_locl.h
e_null.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
e_null.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
e_null.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
@@ -562,111 +312,21 @@ e_null.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
e_null.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
e_null.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
e_null.o: ../../include/openssl/stack.h ../cryptlib.h
-e_ofb_3d.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
-e_ofb_3d.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
-e_ofb_3d.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
-e_ofb_3d.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
-e_ofb_3d.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
-e_ofb_3d.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
-e_ofb_3d.o: ../../include/openssl/err.h ../../include/openssl/evp.h
-e_ofb_3d.o: ../../include/openssl/idea.h ../../include/openssl/md2.h
-e_ofb_3d.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
-e_ofb_3d.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
-e_ofb_3d.o: ../../include/openssl/opensslv.h ../../include/openssl/rc2.h
-e_ofb_3d.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
-e_ofb_3d.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
-e_ofb_3d.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
-e_ofb_3d.o: ../../include/openssl/stack.h ../cryptlib.h
-e_ofb_bf.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
-e_ofb_bf.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
-e_ofb_bf.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
-e_ofb_bf.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
-e_ofb_bf.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
-e_ofb_bf.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
-e_ofb_bf.o: ../../include/openssl/err.h ../../include/openssl/evp.h
-e_ofb_bf.o: ../../include/openssl/idea.h ../../include/openssl/md2.h
-e_ofb_bf.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
-e_ofb_bf.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
-e_ofb_bf.o: ../../include/openssl/opensslv.h ../../include/openssl/rc2.h
-e_ofb_bf.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
-e_ofb_bf.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
-e_ofb_bf.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
-e_ofb_bf.o: ../../include/openssl/stack.h ../cryptlib.h
-e_ofb_c.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
-e_ofb_c.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
-e_ofb_c.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
-e_ofb_c.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
-e_ofb_c.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
-e_ofb_c.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
-e_ofb_c.o: ../../include/openssl/err.h ../../include/openssl/evp.h
-e_ofb_c.o: ../../include/openssl/idea.h ../../include/openssl/md2.h
-e_ofb_c.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
-e_ofb_c.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
-e_ofb_c.o: ../../include/openssl/opensslv.h ../../include/openssl/rc2.h
-e_ofb_c.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
-e_ofb_c.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
-e_ofb_c.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
-e_ofb_c.o: ../../include/openssl/stack.h ../cryptlib.h
-e_ofb_d.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
-e_ofb_d.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
-e_ofb_d.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
-e_ofb_d.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
-e_ofb_d.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
-e_ofb_d.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
-e_ofb_d.o: ../../include/openssl/err.h ../../include/openssl/evp.h
-e_ofb_d.o: ../../include/openssl/idea.h ../../include/openssl/md2.h
-e_ofb_d.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
-e_ofb_d.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
-e_ofb_d.o: ../../include/openssl/opensslv.h ../../include/openssl/rc2.h
-e_ofb_d.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
-e_ofb_d.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
-e_ofb_d.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
-e_ofb_d.o: ../../include/openssl/stack.h ../cryptlib.h
-e_ofb_i.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
-e_ofb_i.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
-e_ofb_i.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
-e_ofb_i.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
-e_ofb_i.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
-e_ofb_i.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
-e_ofb_i.o: ../../include/openssl/err.h ../../include/openssl/evp.h
-e_ofb_i.o: ../../include/openssl/idea.h ../../include/openssl/md2.h
-e_ofb_i.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
-e_ofb_i.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
-e_ofb_i.o: ../../include/openssl/opensslv.h ../../include/openssl/rc2.h
-e_ofb_i.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
-e_ofb_i.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
-e_ofb_i.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
-e_ofb_i.o: ../../include/openssl/stack.h ../cryptlib.h
-e_ofb_r2.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
-e_ofb_r2.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
-e_ofb_r2.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
-e_ofb_r2.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
-e_ofb_r2.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
-e_ofb_r2.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
-e_ofb_r2.o: ../../include/openssl/err.h ../../include/openssl/evp.h
-e_ofb_r2.o: ../../include/openssl/idea.h ../../include/openssl/md2.h
-e_ofb_r2.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
-e_ofb_r2.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
-e_ofb_r2.o: ../../include/openssl/opensslv.h ../../include/openssl/rc2.h
-e_ofb_r2.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
-e_ofb_r2.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
-e_ofb_r2.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
-e_ofb_r2.o: ../../include/openssl/stack.h ../cryptlib.h
-e_ofb_r5.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
-e_ofb_r5.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
-e_ofb_r5.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
-e_ofb_r5.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
-e_ofb_r5.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
-e_ofb_r5.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
-e_ofb_r5.o: ../../include/openssl/err.h ../../include/openssl/evp.h
-e_ofb_r5.o: ../../include/openssl/idea.h ../../include/openssl/md2.h
-e_ofb_r5.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
-e_ofb_r5.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
-e_ofb_r5.o: ../../include/openssl/opensslv.h ../../include/openssl/rc2.h
-e_ofb_r5.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
-e_ofb_r5.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
-e_ofb_r5.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
-e_ofb_r5.o: ../../include/openssl/stack.h ../cryptlib.h
+e_rc2.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
+e_rc2.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
+e_rc2.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
+e_rc2.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
+e_rc2.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
+e_rc2.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
+e_rc2.o: ../../include/openssl/err.h ../../include/openssl/evp.h
+e_rc2.o: ../../include/openssl/idea.h ../../include/openssl/md2.h
+e_rc2.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
+e_rc2.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
+e_rc2.o: ../../include/openssl/opensslv.h ../../include/openssl/rc2.h
+e_rc2.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
+e_rc2.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
+e_rc2.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
+e_rc2.o: ../../include/openssl/stack.h ../cryptlib.h evp_locl.h
e_rc4.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
e_rc4.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
e_rc4.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
@@ -682,6 +342,21 @@ e_rc4.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
e_rc4.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
e_rc4.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
e_rc4.o: ../../include/openssl/stack.h ../cryptlib.h
+e_rc5.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
+e_rc5.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
+e_rc5.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
+e_rc5.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
+e_rc5.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
+e_rc5.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
+e_rc5.o: ../../include/openssl/err.h ../../include/openssl/evp.h
+e_rc5.o: ../../include/openssl/idea.h ../../include/openssl/md2.h
+e_rc5.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
+e_rc5.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
+e_rc5.o: ../../include/openssl/opensslv.h ../../include/openssl/rc2.h
+e_rc5.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
+e_rc5.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
+e_rc5.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
+e_rc5.o: ../../include/openssl/stack.h ../cryptlib.h evp_locl.h
e_xcbc_d.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
e_xcbc_d.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
e_xcbc_d.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
@@ -726,7 +401,7 @@ evp_enc.o: ../../include/openssl/opensslv.h ../../include/openssl/rc2.h
evp_enc.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
evp_enc.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
evp_enc.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
-evp_enc.o: ../../include/openssl/stack.h ../cryptlib.h
+evp_enc.o: ../../include/openssl/stack.h ../cryptlib.h evp_locl.h
evp_err.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
evp_err.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
evp_err.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h
diff --git a/crypto/evp/e_cbc_3d.c b/crypto/evp/e_cbc_3d.c
deleted file mode 100644
index 5d16b865c5..0000000000
--- a/crypto/evp/e_cbc_3d.c
+++ /dev/null
@@ -1,151 +0,0 @@
-/* crypto/evp/e_cbc_3d.c */
-/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
- * All rights reserved.
- *
- * This package is an SSL implementation written
- * by Eric Young (eay@cryptsoft.com).
- * The implementation was written so as to conform with Netscapes SSL.
- *
- * This library is free for commercial and non-commercial use as long as
- * the following conditions are aheared to. The following conditions
- * apply to all code found in this distribution, be it the RC4, RSA,
- * lhash, DES, etc., code; not just the SSL code. The SSL documentation
- * included with this distribution is covered by the same copyright terms
- * except that the holder is Tim Hudson (tjh@cryptsoft.com).
- *
- * Copyright remains Eric Young's, and as such any Copyright notices in
- * the code are not to be removed.
- * If this package is used in a product, Eric Young should be given attribution
- * as the author of the parts of the library used.
- * This can be in the form of a textual message at program startup or
- * in documentation (online or textual) provided with the package.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * "This product includes cryptographic software written by
- * Eric Young (eay@cryptsoft.com)"
- * The word 'cryptographic' can be left out if the rouines from the library
- * being used are not cryptographic related :-).
- * 4. If you include any Windows specific code (or a derivative thereof) from
- * the apps directory (application code) you must include an acknowledgement:
- * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
- *
- * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * The licence and distribution terms for any publically available version or
- * derivative of this code cannot be changed. i.e. this code cannot simply be
- * copied and put under another distribution licence
- * [including the GNU Public Licence.]
- */
-
-#ifndef NO_DES
-#include <stdio.h>
-#include "cryptlib.h"
-#include <openssl/evp.h>
-#include <openssl/objects.h>
-
-static void des_cbc_ede_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
- unsigned char *iv,int enc);
-static void des_cbc_ede3_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
- unsigned char *iv,int enc);
-static void des_cbc_ede_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
- unsigned char *in, unsigned int inl);
-static EVP_CIPHER d_cbc_ede_cipher2=
- {
- NID_des_ede_cbc,
- 8,16,8,
- des_cbc_ede_init_key,
- des_cbc_ede_cipher,
- NULL,
- sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+
- sizeof((((EVP_CIPHER_CTX *)NULL)->c.des_ede)),
- EVP_CIPHER_set_asn1_iv,
- EVP_CIPHER_get_asn1_iv,
- };
-
-static EVP_CIPHER d_cbc_ede_cipher3=
- {
- NID_des_ede3_cbc,
- 8,24,8,
- des_cbc_ede3_init_key,
- des_cbc_ede_cipher,
- NULL,
- sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+
- sizeof((((EVP_CIPHER_CTX *)NULL)->c.des_ede)),
- EVP_CIPHER_set_asn1_iv,
- EVP_CIPHER_get_asn1_iv,
- };
-
-EVP_CIPHER *EVP_des_ede_cbc(void)
- {
- return(&d_cbc_ede_cipher2);
- }
-
-EVP_CIPHER *EVP_des_ede3_cbc(void)
- {
- return(&d_cbc_ede_cipher3);
- }
-
-static void des_cbc_ede_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
- unsigned char *iv, int enc)
- {
- des_cblock *deskey = (des_cblock *)key;
-
- if (iv != NULL)
- memcpy(&(ctx->oiv[0]),iv,8);
- memcpy(&(ctx->iv[0]),&(ctx->oiv[0]),8);
-
- if (deskey != NULL)
- {
- des_set_key_unchecked(&deskey[0],ctx->c.des_ede.ks1);
- des_set_key_unchecked(&deskey[1],ctx->c.des_ede.ks2);
- memcpy( (char *)ctx->c.des_ede.ks3,
- (char *)ctx->c.des_ede.ks1,
- sizeof(ctx->c.des_ede.ks1));
- }
- }
-
-static void des_cbc_ede3_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
- unsigned char *iv, int enc)
- {
- des_cblock *deskey = (des_cblock *)key;
-
- if (iv != NULL)
- memcpy(&(ctx->oiv[0]),iv,8);
- memcpy(&(ctx->iv[0]),&(ctx->oiv[0]),8);
-
- if (deskey != NULL)
- {
- des_set_key_unchecked(&deskey[0],ctx->c.des_ede.ks1);
- des_set_key_unchecked(&deskey[1],ctx->c.des_ede.ks2);
- des_set_key_unchecked(&deskey[2],ctx->c.des_ede.ks3);
- }
- }
-
-static void des_cbc_ede_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
- unsigned char *in, unsigned int inl)
- {
- des_ede3_cbc_encrypt(in,out,inl, ctx->c.des_ede.ks1,
- ctx->c.des_ede.ks2,ctx->c.des_ede.ks3,
- (des_cblock *) &(ctx->iv[0]),
- ctx->encrypt);
- }
-#endif
diff --git a/crypto/evp/e_cbc_bf.c b/crypto/evp/e_cbc_bf.c
deleted file mode 100644
index 9bcba3c516..0000000000
--- a/crypto/evp/e_cbc_bf.c
+++ /dev/null
@@ -1,106 +0,0 @@
-/* crypto/evp/e_cbc_bf.c */
-/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
- * All rights reserved.
- *
- * This package is an SSL implementation written
- * by Eric Young (eay@cryptsoft.com).
- * The implementation was written so as to conform with Netscapes SSL.
- *
- * This library is free for commercial and non-commercial use as long as
- * the following conditions are aheared to. The following conditions
- * apply to all code found in this distribution, be it the RC4, RSA,
- * lhash, DES, etc., code; not just the SSL code. The SSL documentation
- * included with this distribution is covered by the same copyright terms
- * except that the holder is Tim Hudson (tjh@cryptsoft.com).
- *
- * Copyright remains Eric Young's, and as such any Copyright notices in
- * the code are not to be removed.
- * If this package is used in a product, Eric Young should be given attribution
- * as the author of the parts of the library used.
- * This can be in the form of a textual message at program startup or
- * in documentation (online or textual) provided with the package.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * "This product includes cryptographic software written by
- * Eric Young (eay@cryptsoft.com)"
- * The word 'cryptographic' can be left out if the rouines from the library
- * being used are not cryptographic related :-).
- * 4. If you include any Windows specific code (or a derivative thereof) from
- * the apps directory (application code) you must include an acknowledgement:
- * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
- *
- * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * The licence and distribution terms for any publically available version or
- * derivative of this code cannot be changed. i.e. this code cannot simply be
- * copied and put under another distribution licence
- * [including the GNU Public Licence.]
- */
-
-#ifndef NO_BF
-#include <stdio.h>
-#include "cryptlib.h"
-#include <openssl/evp.h>
-#include <openssl/objects.h>
-
-static void bf_cbc_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
- unsigned char *iv,int enc);
-static void bf_cbc_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
- unsigned char *in, unsigned int inl);
-static EVP_CIPHER bfish_cbc_cipher=
- {
- NID_bf_cbc,
- 8,EVP_BLOWFISH_KEY_SIZE,8,
- bf_cbc_init_key,
- bf_cbc_cipher,
- NULL,
- sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+
- sizeof((((EVP_CIPHER_CTX *)NULL)->c.bf_ks)),
- EVP_CIPHER_set_asn1_iv,
- EVP_CIPHER_get_asn1_iv,
- };
-
-EVP_CIPHER *EVP_bf_cbc(void)
- {
- return(&bfish_cbc_cipher);
- }
-
-static void bf_cbc_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
- unsigned char *iv, int enc)
- {
- if (iv != NULL)
- memcpy(&(ctx->oiv[0]),iv,8);
- memcpy(&(ctx->iv[0]),&(ctx->oiv[0]),8);
- if (key != NULL)
- BF_set_key(&(ctx->c.bf_ks),EVP_BLOWFISH_KEY_SIZE,key);
- }
-
-static void bf_cbc_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
- unsigned char *in, unsigned int inl)
- {
- BF_cbc_encrypt(
- in,out,(long)inl,
- &(ctx->c.bf_ks),&(ctx->iv[0]),
- ctx->encrypt);
- }
-
-#endif
diff --git a/crypto/evp/e_cbc_c.c b/crypto/evp/e_cbc_c.c
deleted file mode 100644
index 6845b0b44c..0000000000
--- a/crypto/evp/e_cbc_c.c
+++ /dev/null
@@ -1,107 +0,0 @@
-/* crypto/evp/e_cbc_c.c */
-/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
- * All rights reserved.
- *
- * This package is an SSL implementation written
- * by Eric Young (eay@cryptsoft.com).
- * The implementation was written so as to conform with Netscapes SSL.
- *
- * This library is free for commercial and non-commercial use as long as
- * the following conditions are aheared to. The following conditions
- * apply to all code found in this distribution, be it the RC4, RSA,
- * lhash, DES, etc., code; not just the SSL code. The SSL documentation
- * included with this distribution is covered by the same copyright terms
- * except that the holder is Tim Hudson (tjh@cryptsoft.com).
- *
- * Copyright remains Eric Young's, and as such any Copyright notices in
- * the code are not to be removed.
- * If this package is used in a product, Eric Young should be given attribution
- * as the author of the parts of the library used.
- * This can be in the form of a textual message at program startup or
- * in documentation (online or textual) provided with the package.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * "This product includes cryptographic software written by
- * Eric Young (eay@cryptsoft.com)"
- * The word 'cryptographic' can be left out if the rouines from the library
- * being used are not cryptographic related :-).
- * 4. If you include any Windows specific code (or a derivative thereof) from
- * the apps directory (application code) you must include an acknowledgement:
- * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
- *
- * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * The licence and distribution terms for any publically available version or
- * derivative of this code cannot be changed. i.e. this code cannot simply be
- * copied and put under another distribution licence
- * [including the GNU Public Licence.]
- */
-
-#ifndef NO_CAST
-
-#include <stdio.h>
-#include "cryptlib.h"
-#include <openssl/evp.h>
-#include <openssl/objects.h>
-
-static void cast_cbc_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
- unsigned char *iv,int enc);
-static void cast_cbc_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
- unsigned char *in, unsigned int inl);
-static EVP_CIPHER cast5_cbc_cipher=
- {
- NID_cast5_cbc,
- 8,EVP_CAST5_KEY_SIZE,8,
- cast_cbc_init_key,
- cast_cbc_cipher,
- NULL,
- sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+
- sizeof((((EVP_CIPHER_CTX *)NULL)->c.cast_ks)),
- EVP_CIPHER_set_asn1_iv,
- EVP_CIPHER_get_asn1_iv,
- };
-
-EVP_CIPHER *EVP_cast5_cbc(void)
- {
- return(&cast5_cbc_cipher);
- }
-
-static void cast_cbc_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
- unsigned char *iv, int enc)
- {
- if (iv != NULL)
- memcpy(&(ctx->oiv[0]),iv,8);
- memcpy(&(ctx->iv[0]),&(ctx->oiv[0]),8);
- if (key != NULL)
- CAST_set_key(&(ctx->c.cast_ks),EVP_CAST5_KEY_SIZE,key);
- }
-
-static void cast_cbc_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
- unsigned char *in, unsigned int inl)
- {
- CAST_cbc_encrypt(
- in,out,(long)inl,
- &(ctx->c.cast_ks),&(ctx->iv[0]),
- ctx->encrypt);
- }
-
-#endif
diff --git a/crypto/evp/e_cbc_d.c b/crypto/evp/e_cbc_d.c
deleted file mode 100644
index 5b4e5b8601..0000000000
--- a/crypto/evp/e_cbc_d.c
+++ /dev/null
@@ -1,106 +0,0 @@
-/* crypto/evp/e_cbc_d.c */
-/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
- * All rights reserved.
- *
- * This package is an SSL implementation written
- * by Eric Young (eay@cryptsoft.com).
- * The implementation was written so as to conform with Netscapes SSL.
- *
- * This library is free for commercial and non-commercial use as long as
- * the following conditions are aheared to. The following conditions
- * apply to all code found in this distribution, be it the RC4, RSA,
- * lhash, DES, etc., code; not just the SSL code. The SSL documentation
- * included with this distribution is covered by the same copyright terms
- * except that the holder is Tim Hudson (tjh@cryptsoft.com).
- *
- * Copyright remains Eric Young's, and as such any Copyright notices in
- * the code are not to be removed.
- * If this package is used in a product, Eric Young should be given attribution
- * as the author of the parts of the library used.
- * This can be in the form of a textual message at program startup or
- * in documentation (online or textual) provided with the package.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * "This product includes cryptographic software written by
- * Eric Young (eay@cryptsoft.com)"
- * The word 'cryptographic' can be left out if the rouines from the library
- * being used are not cryptographic related :-).
- * 4. If you include any Windows specific code (or a derivative thereof) from
- * the apps directory (application code) you must include an acknowledgement:
- * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
- *
- * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * The licence and distribution terms for any publically available version or
- * derivative of this code cannot be changed. i.e. this code cannot simply be
- * copied and put under another distribution licence
- * [including the GNU Public Licence.]
- */
-
-#ifndef NO_DES
-#include <stdio.h>
-#include "cryptlib.h"
-#include <openssl/evp.h>
-#include <openssl/objects.h>
-
-static void des_cbc_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
- unsigned char *iv,int enc);
-static void des_cbc_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
- unsigned char *in, unsigned int inl);
-static EVP_CIPHER d_cbc_cipher=
- {
- NID_des_cbc,
- 8,8,8,
- des_cbc_init_key,
- des_cbc_cipher,
- NULL,
- sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+
- sizeof((((EVP_CIPHER_CTX *)NULL)->c.des_ks)),
- EVP_CIPHER_set_asn1_iv,
- EVP_CIPHER_get_asn1_iv,
- };
-
-EVP_CIPHER *EVP_des_cbc(void)
- {
- return(&d_cbc_cipher);
- }
-
-static void des_cbc_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
- unsigned char *iv, int enc)
- {
- des_cblock *deskey = (des_cblock *)key;
-
- if (iv != NULL)
- memcpy(&(ctx->oiv[0]),iv,8);
- memcpy(&(ctx->iv[0]),&(ctx->oiv[0]),8);
- if (deskey != NULL)
- des_set_key_unchecked(deskey,ctx->c.des_ks);
- }
-
-static void des_cbc_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
- unsigned char *in, unsigned int inl)
- {
- des_ncbc_encrypt(in,out,inl,ctx->c.des_ks,
- (des_cblock *)&(ctx->iv[0]),
- ctx->encrypt);
- }
-#endif
diff --git a/crypto/evp/e_cbc_i.c b/crypto/evp/e_cbc_i.c
deleted file mode 100644
index 34b44aa21f..0000000000
--- a/crypto/evp/e_cbc_i.c
+++ /dev/null
@@ -1,119 +0,0 @@
-/* crypto/evp/e_cbc_i.c */
-/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
- * All rights reserved.
- *
- * This package is an SSL implementation written
- * by Eric Young (eay@cryptsoft.com).
- * The implementation was written so as to conform with Netscapes SSL.
- *
- * This library is free for commercial and non-commercial use as long as
- * the following conditions are aheared to. The following conditions
- * apply to all code found in this distribution, be it the RC4, RSA,
- * lhash, DES, etc., code; not just the SSL code. The SSL documentation
- * included with this distribution is covered by the same copyright terms
- * except that the holder is Tim Hudson (tjh@cryptsoft.com).
- *
- * Copyright remains Eric Young's, and as such any Copyright notices in
- * the code are not to be removed.
- * If this package is used in a product, Eric Young should be given attribution
- * as the author of the parts of the library used.
- * This can be in the form of a textual message at program startup or
- * in documentation (online or textual) provided with the package.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * "This product includes cryptographic software written by
- * Eric Young (eay@cryptsoft.com)"
- * The word 'cryptographic' can be left out if the rouines from the library
- * being used are not cryptographic related :-).
- * 4. If you include any Windows specific code (or a derivative thereof) from
- * the apps directory (application code) you must include an acknowledgement:
- * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
- *
- * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * The licence and distribution terms for any publically available version or
- * derivative of this code cannot be changed. i.e. this code cannot simply be
- * copied and put under another distribution licence
- * [including the GNU Public Licence.]
- */
-
-#ifndef NO_IDEA
-
-#include <stdio.h>
-#include "cryptlib.h"
-#include <openssl/evp.h>
-#include <openssl/objects.h>
-
-static void idea_cbc_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
- unsigned char *iv,int enc);
-static void idea_cbc_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
- unsigned char *in, unsigned int inl);
-static EVP_CIPHER i_cbc_cipher=
- {
- NID_idea_cbc,
- 8,16,8,
- idea_cbc_init_key,
- idea_cbc_cipher,
- NULL,
- sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+
- sizeof((((EVP_CIPHER_CTX *)NULL)->c.idea_ks)),
- EVP_CIPHER_set_asn1_iv,
- EVP_CIPHER_get_asn1_iv,
- };
-
-EVP_CIPHER *EVP_idea_cbc(void)
- {
- return(&i_cbc_cipher);
- }
-
-static void idea_cbc_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
- unsigned char *iv, int enc)
- {
- if (iv != NULL)
- memcpy(&(ctx->oiv[0]),iv,8);
- memcpy(&(ctx->iv[0]),&(ctx->oiv[0]),8);
- if (key != NULL)
- {
- if (enc)
- idea_set_encrypt_key(key,&(ctx->c.idea_ks));
- else
- {
- IDEA_KEY_SCHEDULE tmp;
-
- idea_set_encrypt_key(key,&tmp);
- idea_set_decrypt_key(&tmp,&(ctx->c.idea_ks));
- memset((unsigned char *)&tmp,0,
- sizeof(IDEA_KEY_SCHEDULE));
- }
- }
- }
-
-static void idea_cbc_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
- unsigned char *in, unsigned int inl)
- {
- idea_cbc_encrypt(
- in,out,(long)inl,
- &(ctx->c.idea_ks),&(ctx->iv[0]),
- ctx->encrypt);
- }
-
-#endif
diff --git a/crypto/evp/e_cbc_r2.c b/crypto/evp/e_cbc_r2.c
deleted file mode 100644
index 9dfada4ea6..0000000000
--- a/crypto/evp/e_cbc_r2.c
+++ /dev/null
@@ -1,216 +0,0 @@
-/* crypto/evp/e_cbc_r2.c */
-/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
- * All rights reserved.
- *
- * This package is an SSL implementation written
- * by Eric Young (eay@cryptsoft.com).
- * The implementation was written so as to conform with Netscapes SSL.
- *
- * This library is free for commercial and non-commercial use as long as
- * the following conditions are aheared to. The following conditions
- * apply to all code found in this distribution, be it the RC4, RSA,
- * lhash, DES, etc., code; not just the SSL code. The SSL documentation
- * included with this distribution is covered by the same copyright terms
- * except that the holder is Tim Hudson (tjh@cryptsoft.com).
- *
- * Copyright remains Eric Young's, and as such any Copyright notices in
- * the code are not to be removed.
- * If this package is used in a product, Eric Young should be given attribution
- * as the author of the parts of the library used.
- * This can be in the form of a textual message at program startup or
- * in documentation (online or textual) provided with the package.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * "This product includes cryptographic software written by
- * Eric Young (eay@cryptsoft.com)"
- * The word 'cryptographic' can be left out if the rouines from the library
- * being used are not cryptographic related :-).
- * 4. If you include any Windows specific code (or a derivative thereof) from
- * the apps directory (application code) you must include an acknowledgement:
- * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
- *
- * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * The licence and distribution terms for any publically available version or
- * derivative of this code cannot be changed. i.e. this code cannot simply be
- * copied and put under another distribution licence
- * [including the GNU Public Licence.]
- */
-
-#ifndef NO_RC2
-
-#include <stdio.h>
-#include "cryptlib.h"
-#include <openssl/evp.h>
-#include <openssl/objects.h>
-
-static void rc2_cbc_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
- unsigned char *iv,int enc);
-static void rc2_cbc_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
- unsigned char *in, unsigned int inl);
-static int rc2_meth_to_magic(const EVP_CIPHER *e);
-static EVP_CIPHER *rc2_magic_to_meth(int i);
-static int rc2_set_asn1_type_and_iv(EVP_CIPHER_CTX *c, ASN1_TYPE *type);
-static int rc2_get_asn1_type_and_iv(EVP_CIPHER_CTX *c, ASN1_TYPE *type);
-
-#define RC2_40_MAGIC 0xa0
-#define RC2_64_MAGIC 0x78
-#define RC2_128_MAGIC 0x3a
-
-static EVP_CIPHER r2_cbc_cipher=
- {
- NID_rc2_cbc,
- 8,EVP_RC2_KEY_SIZE,8,
- rc2_cbc_init_key,
- rc2_cbc_cipher,
- NULL,
- sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+
- sizeof((((EVP_CIPHER_CTX *)NULL)->c.rc2_ks)),
- rc2_set_asn1_type_and_iv,
- rc2_get_asn1_type_and_iv,
- };
-
-static EVP_CIPHER r2_64_cbc_cipher=
- {
- NID_rc2_64_cbc,
- 8,8 /* 64 bit */,8,
- rc2_cbc_init_key,
- rc2_cbc_cipher,
- NULL,
- sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+
- sizeof((((EVP_CIPHER_CTX *)NULL)->c.rc2_ks)),
- rc2_set_asn1_type_and_iv,
- rc2_get_asn1_type_and_iv,
- };
-
-static EVP_CIPHER r2_40_cbc_cipher=
- {
- NID_rc2_40_cbc,
- 8,5 /* 40 bit */,8,
- rc2_cbc_init_key,
- rc2_cbc_cipher,
- NULL,
- sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+
- sizeof((((EVP_CIPHER_CTX *)NULL)->c.rc2_ks)),
- rc2_set_asn1_type_and_iv,
- rc2_get_asn1_type_and_iv,
- };
-
-EVP_CIPHER *EVP_rc2_cbc(void)
- {
- return(&r2_cbc_cipher);
- }
-
-EVP_CIPHER *EVP_rc2_64_cbc(void)
- {
- return(&r2_64_cbc_cipher);
- }
-
-EVP_CIPHER *EVP_rc2_40_cbc(void)
- {
- return(&r2_40_cbc_cipher);
- }
-
-static void rc2_cbc_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
- unsigned char *iv, int enc)
- {
- if (iv != NULL)
- memcpy(&(ctx->oiv[0]),iv,8);
- memcpy(&(ctx->iv[0]),&(ctx->oiv[0]),8);
- if (key != NULL)
- RC2_set_key(&(ctx->c.rc2_ks),EVP_CIPHER_CTX_key_length(ctx),
- key,EVP_CIPHER_CTX_key_length(ctx)*8);
- }
-
-static void rc2_cbc_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
- unsigned char *in, unsigned int inl)
- {
- RC2_cbc_encrypt(
- in,out,(long)inl,
- &(ctx->c.rc2_ks),&(ctx->iv[0]),
- ctx->encrypt);
- }
-
-static int rc2_meth_to_magic(const EVP_CIPHER *e)
- {
- int i;
-
- i=EVP_CIPHER_key_length(e);
- if (i == 16) return(RC2_128_MAGIC);
- else if (i == 8) return(RC2_64_MAGIC);
- else if (i == 5) return(RC2_40_MAGIC);
- else return(0);
- }
-
-static EVP_CIPHER *rc2_magic_to_meth(int i)
- {
- if (i == RC2_128_MAGIC) return(EVP_rc2_cbc());
- else if (i == RC2_64_MAGIC) return(EVP_rc2_64_cbc());
- else if (i == RC2_40_MAGIC) return(EVP_rc2_40_cbc());
- else
- {
- EVPerr(EVP_F_RC2_MAGIC_TO_METH,EVP_R_UNSUPPORTED_KEY_SIZE);
- return(NULL);
- }
- }
-
-static int rc2_get_asn1_type_and_iv(EVP_CIPHER_CTX *c, ASN1_TYPE *type)
- {
- long num=0;
- int i=0,l;
- EVP_CIPHER *e;
-
- if (type != NULL)
- {
- l=EVP_CIPHER_CTX_iv_length(c);
- i=ASN1_TYPE_get_int_octetstring(type,&num,c->oiv,l);
- if (i != l)
- return(-1);
- else if (i > 0)
- memcpy(c->iv,c->oiv,l);
- e=rc2_magic_to_meth((int)num);
- if (e == NULL)
- return(-1);
- if (e != EVP_CIPHER_CTX_cipher(c))
- {
- EVP_CIPHER_CTX_cipher(c)=e;
- rc2_cbc_init_key(c,NULL,NULL,1);
- }
- }
- return(i);
- }
-
-static int rc2_set_asn1_type_and_iv(EVP_CIPHER_CTX *c, ASN1_TYPE *type)
- {
- long num;
- int i=0,j;
-
- if (type != NULL)
- {
- num=rc2_meth_to_magic(EVP_CIPHER_CTX_cipher(c));
- j=EVP_CIPHER_CTX_iv_length(c);
- i=ASN1_TYPE_set_int_octetstring(type,num,c->oiv,j);
- }
- return(i);
- }
-
-#endif
diff --git a/crypto/evp/e_cbc_r5.c b/crypto/evp/e_cbc_r5.c
deleted file mode 100644
index cea3fe333a..0000000000
--- a/crypto/evp/e_cbc_r5.c
+++ /dev/null
@@ -1,108 +0,0 @@
-/* crypto/evp/e_cbc_r5.c */
-/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
- * All rights reserved.
- *
- * This package is an SSL implementation written
- * by Eric Young (eay@cryptsoft.com).
- * The implementation was written so as to conform with Netscapes SSL.
- *
- * This library is free for commercial and non-commercial use as long as
- * the following conditions are aheared to. The following conditions
- * apply to all code found in this distribution, be it the RC4, RSA,
- * lhash, DES, etc., code; not just the SSL code. The SSL documentation
- * included with this distribution is covered by the same copyright terms
- * except that the holder is Tim Hudson (tjh@cryptsoft.com).
- *
- * Copyright remains Eric Young's, and as such any Copyright notices in
- * the code are not to be removed.
- * If this package is used in a product, Eric Young should be given attribution
- * as the author of the parts of the library used.
- * This can be in the form of a textual message at program startup or
- * in documentation (online or textual) provided with the package.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * "This product includes cryptographic software written by
- * Eric Young (eay@cryptsoft.com)"
- * The word 'cryptographic' can be left out if the rouines from the library
- * being used are not cryptographic related :-).
- * 4. If you include any Windows specific code (or a derivative thereof) from
- * the apps directory (application code) you must include an acknowledgement:
- * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
- *
- * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * The licence and distribution terms for any publically available version or
- * derivative of this code cannot be changed. i.e. this code cannot simply be
- * copied and put under another distribution licence
- * [including the GNU Public Licence.]
- */
-
-#ifndef NO_RC5
-
-#include <stdio.h>
-#include "cryptlib.h"
-#include <openssl/evp.h>
-#include <openssl/objects.h>
-
-static void r_32_12_16_cbc_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
- unsigned char *iv,int enc);
-static void r_32_12_16_cbc_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
- unsigned char *in, unsigned int inl);
-static EVP_CIPHER rc5_32_12_16_cbc_cipher=
- {
- NID_rc5_cbc,
- 8,EVP_RC5_32_12_16_KEY_SIZE,8,
- r_32_12_16_cbc_init_key,
- r_32_12_16_cbc_cipher,
- NULL,
- sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+
- sizeof((((EVP_CIPHER_CTX *)NULL)->c.rc5_ks)),
- NULL,
- NULL,
- };
-
-EVP_CIPHER *EVP_rc5_32_12_16_cbc(void)
- {
- return(&rc5_32_12_16_cbc_cipher);
- }
-
-static void r_32_12_16_cbc_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
- unsigned char *iv, int enc)
- {
- if (iv != NULL)
- memcpy(&(ctx->oiv[0]),iv,8);
- memcpy(&(ctx->iv[0]),&(ctx->oiv[0]),8);
- if (key != NULL)
- RC5_32_set_key(&(ctx->c.rc5_ks),EVP_RC5_32_12_16_KEY_SIZE,
- key,RC5_12_ROUNDS);
- }
-
-static void r_32_12_16_cbc_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
- unsigned char *in, unsigned int inl)
- {
- RC5_32_cbc_encrypt(
- in,out,(long)inl,
- &(ctx->c.rc5_ks),&(ctx->iv[0]),
- ctx->encrypt);
- }
-
-#endif
diff --git a/crypto/evp/e_cfb_3d.c b/crypto/evp/e_cfb_3d.c
deleted file mode 100644
index b364bd4e31..0000000000
--- a/crypto/evp/e_cfb_3d.c
+++ /dev/null
@@ -1,155 +0,0 @@
-/* crypto/evp/e_cfb_3d.c */
-/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
- * All rights reserved.
- *
- * This package is an SSL implementation written
- * by Eric Young (eay@cryptsoft.com).
- * The implementation was written so as to conform with Netscapes SSL.
- *
- * This library is free for commercial and non-commercial use as long as
- * the following conditions are aheared to. The following conditions
- * apply to all code found in this distribution, be it the RC4, RSA,
- * lhash, DES, etc., code; not just the SSL code. The SSL documentation
- * included with this distribution is covered by the same copyright terms
- * except that the holder is Tim Hudson (tjh@cryptsoft.com).
- *
- * Copyright remains Eric Young's, and as such any Copyright notices in
- * the code are not to be removed.
- * If this package is used in a product, Eric Young should be given attribution
- * as the author of the parts of the library used.
- * This can be in the form of a textual message at program startup or
- * in documentation (online or textual) provided with the package.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * "This product includes cryptographic software written by
- * Eric Young (eay@cryptsoft.com)"
- * The word 'cryptographic' can be left out if the rouines from the library
- * being used are not cryptographic related :-).
- * 4. If you include any Windows specific code (or a derivative thereof) from
- * the apps directory (application code) you must include an acknowledgement:
- * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
- *
- * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * The licence and distribution terms for any publically available version or
- * derivative of this code cannot be changed. i.e. this code cannot simply be
- * copied and put under another distribution licence
- * [including the GNU Public Licence.]
- */
-
-#ifndef NO_DES
-#include <stdio.h>
-#include "cryptlib.h"
-#include <openssl/evp.h>
-#include <openssl/objects.h>
-
-static void des_ede_cfb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
- unsigned char *iv,int enc);
-static void des_ede3_cfb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
- unsigned char *iv,int enc);
-static void des_ede_cfb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
- unsigned char *in, unsigned int inl);
-static EVP_CIPHER d_ede_cfb_cipher2=
- {
- NID_des_ede_cfb64,
- 1,16,8,
- des_ede_cfb_init_key,
- des_ede_cfb_cipher,
- NULL,
- sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+
- sizeof((((EVP_CIPHER_CTX *)NULL)->c.des_ede)),
- EVP_CIPHER_set_asn1_iv,
- EVP_CIPHER_get_asn1_iv,
- };
-
-static EVP_CIPHER d_ede3_cfb_cipher3=
- {
- NID_des_ede3_cfb64,
- 1,24,8,
- des_ede3_cfb_init_key,
- des_ede_cfb_cipher,
- NULL,
- sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+
- sizeof((((EVP_CIPHER_CTX *)NULL)->c.des_ede)),
- EVP_CIPHER_set_asn1_iv,
- EVP_CIPHER_get_asn1_iv,
- };
-
-EVP_CIPHER *EVP_des_ede_cfb(void)
- {
- return(&d_ede_cfb_cipher2);
- }
-
-EVP_CIPHER *EVP_des_ede3_cfb(void)
- {
- return(&d_ede3_cfb_cipher3);
- }
-
-static void des_ede_cfb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
- unsigned char *iv, int enc)
- {
- des_cblock *deskey = (des_cblock *)key;
-
- ctx->num=0;
-
- if (iv != NULL)
- memcpy(&(ctx->oiv[0]),iv,8);
- memcpy(&(ctx->iv[0]),&(ctx->oiv[0]),8);
- if (deskey != NULL)
- {
- des_set_key_unchecked(&deskey[0],ctx->c.des_ede.ks1);
- des_set_key_unchecked(&deskey[1],ctx->c.des_ede.ks2);
- memcpy( (char *)ctx->c.des_ede.ks3,
- (char *)ctx->c.des_ede.ks1,
- sizeof(ctx->c.des_ede.ks1));
- }
- }
-
-static void des_ede3_cfb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
- unsigned char *iv, int enc)
- {
- des_cblock *deskey = (des_cblock *)key;
-
- ctx->num=0;
-
- if (iv != NULL)
- memcpy(&(ctx->oiv[0]),iv,8);
- memcpy(&(ctx->iv[0]),&(ctx->oiv[0]),8);
- if (deskey != NULL)
- {
- des_set_key_unchecked(&deskey[0],ctx->c.des_ede.ks1);
- des_set_key_unchecked(&deskey[1],ctx->c.des_ede.ks2);
- des_set_key_unchecked(&deskey[2],ctx->c.des_ede.ks3);
- }
- }
-
-static void des_ede_cfb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
- unsigned char *in, unsigned int inl)
- {
- des_ede3_cfb64_encrypt(in,out,(long)inl,
- ctx->c.des_ede.ks1,
- ctx->c.des_ede.ks2,
- ctx->c.des_ede.ks3,
- (des_cblock*)&(ctx->iv[0]),
- &ctx->num,ctx->encrypt);
- }
-#endif
diff --git a/crypto/evp/e_cfb_bf.c b/crypto/evp/e_cfb_bf.c
deleted file mode 100644
index 63e1e624ea..0000000000
--- a/crypto/evp/e_cfb_bf.c
+++ /dev/null
@@ -1,108 +0,0 @@
-/* crypto/evp/e_cfb_bf.c */
-/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
- * All rights reserved.
- *
- * This package is an SSL implementation written
- * by Eric Young (eay@cryptsoft.com).
- * The implementation was written so as to conform with Netscapes SSL.
- *
- * This library is free for commercial and non-commercial use as long as
- * the following conditions are aheared to. The following conditions
- * apply to all code found in this distribution, be it the RC4, RSA,
- * lhash, DES, etc., code; not just the SSL code. The SSL documentation
- * included with this distribution is covered by the same copyright terms
- * except that the holder is Tim Hudson (tjh@cryptsoft.com).
- *
- * Copyright remains Eric Young's, and as such any Copyright notices in
- * the code are not to be removed.
- * If this package is used in a product, Eric Young should be given attribution
- * as the author of the parts of the library used.
- * This can be in the form of a textual message at program startup or
- * in documentation (online or textual) provided with the package.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * "This product includes cryptographic software written by
- * Eric Young (eay@cryptsoft.com)"
- * The word 'cryptographic' can be left out if the rouines from the library
- * being used are not cryptographic related :-).
- * 4. If you include any Windows specific code (or a derivative thereof) from
- * the apps directory (application code) you must include an acknowledgement:
- * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
- *
- * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * The licence and distribution terms for any publically available version or
- * derivative of this code cannot be changed. i.e. this code cannot simply be
- * copied and put under another distribution licence
- * [including the GNU Public Licence.]
- */
-
-#ifndef NO_BF
-#include <stdio.h>
-#include "cryptlib.h"
-#include <openssl/evp.h>
-#include <openssl/objects.h>
-
-static void bf_cfb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
- unsigned char *iv,int enc);
-static void bf_cfb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
- unsigned char *in, unsigned int inl);
-static EVP_CIPHER bfish_cfb_cipher=
- {
- NID_bf_cfb64,
- 1,EVP_BLOWFISH_KEY_SIZE,8,
- bf_cfb_init_key,
- bf_cfb_cipher,
- NULL,
- sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+
- sizeof((((EVP_CIPHER_CTX *)NULL)->c.bf_ks)),
- EVP_CIPHER_set_asn1_iv,
- EVP_CIPHER_get_asn1_iv,
- };
-
-EVP_CIPHER *EVP_bf_cfb(void)
- {
- return(&bfish_cfb_cipher);
- }
-
-static void bf_cfb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
- unsigned char *iv, int enc)
- {
- ctx->num=0;
-
- if (iv != NULL)
- memcpy(&(ctx->oiv[0]),iv,8);
- memcpy(&(ctx->iv[0]),&(ctx->oiv[0]),8);
- if (key != NULL)
- BF_set_key(&(ctx->c.bf_ks),EVP_BLOWFISH_KEY_SIZE,key);
- }
-
-static void bf_cfb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
- unsigned char *in, unsigned int inl)
- {
- BF_cfb64_encrypt(
- in,out,
- (long)inl, &(ctx->c.bf_ks),
- &(ctx->iv[0]),
- &ctx->num,ctx->encrypt);
- }
-#endif
diff --git a/crypto/evp/e_cfb_c.c b/crypto/evp/e_cfb_c.c
deleted file mode 100644
index f04bac034b..0000000000
--- a/crypto/evp/e_cfb_c.c
+++ /dev/null
@@ -1,109 +0,0 @@
-/* crypto/evp/e_cfb_c.c */
-/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
- * All rights reserved.
- *
- * This package is an SSL implementation written
- * by Eric Young (eay@cryptsoft.com).
- * The implementation was written so as to conform with Netscapes SSL.
- *
- * This library is free for commercial and non-commercial use as long as
- * the following conditions are aheared to. The following conditions
- * apply to all code found in this distribution, be it the RC4, RSA,
- * lhash, DES, etc., code; not just the SSL code. The SSL documentation
- * included with this distribution is covered by the same copyright terms
- * except that the holder is Tim Hudson (tjh@cryptsoft.com).
- *
- * Copyright remains Eric Young's, and as such any Copyright notices in
- * the code are not to be removed.
- * If this package is used in a product, Eric Young should be given attribution
- * as the author of the parts of the library used.
- * This can be in the form of a textual message at program startup or
- * in documentation (online or textual) provided with the package.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * "This product includes cryptographic software written by
- * Eric Young (eay@cryptsoft.com)"
- * The word 'cryptographic' can be left out if the rouines from the library
- * being used are not cryptographic related :-).
- * 4. If you include any Windows specific code (or a derivative thereof) from
- * the apps directory (application code) you must include an acknowledgement:
- * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
- *
- * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * The licence and distribution terms for any publically available version or
- * derivative of this code cannot be changed. i.e. this code cannot simply be
- * copied and put under another distribution licence
- * [including the GNU Public Licence.]
- */
-
-#ifndef NO_CAST
-
-#include <stdio.h>
-#include "cryptlib.h"
-#include <openssl/evp.h>
-#include <openssl/objects.h>
-
-static void cast_cfb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
- unsigned char *iv,int enc);
-static void cast_cfb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
- unsigned char *in, unsigned int inl);
-static EVP_CIPHER cast5_cfb_cipher=
- {
- NID_cast5_cfb64,
- 1,EVP_CAST5_KEY_SIZE,8,
- cast_cfb_init_key,
- cast_cfb_cipher,
- NULL,
- sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+
- sizeof((((EVP_CIPHER_CTX *)NULL)->c.cast_ks)),
- EVP_CIPHER_set_asn1_iv,
- EVP_CIPHER_get_asn1_iv,
- };
-
-EVP_CIPHER *EVP_cast5_cfb(void)
- {
- return(&cast5_cfb_cipher);
- }
-
-static void cast_cfb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
- unsigned char *iv, int enc)
- {
- ctx->num=0;
-
- if (iv != NULL)
- memcpy(&(ctx->oiv[0]),iv,8);
- memcpy(&(ctx->iv[0]),&(ctx->oiv[0]),8);
- if (key != NULL)
- CAST_set_key(&(ctx->c.cast_ks),EVP_CAST5_KEY_SIZE,key);
- }
-
-static void cast_cfb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
- unsigned char *in, unsigned int inl)
- {
- CAST_cfb64_encrypt(
- in,out,
- (long)inl, &(ctx->c.cast_ks),
- &(ctx->iv[0]),
- &ctx->num,ctx->encrypt);
- }
-#endif
diff --git a/crypto/evp/e_cfb_d.c b/crypto/evp/e_cfb_d.c
deleted file mode 100644
index 9e1714bd15..0000000000
--- a/crypto/evp/e_cfb_d.c
+++ /dev/null
@@ -1,110 +0,0 @@
-/* crypto/evp/e_cfb_d.c */
-/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
- * All rights reserved.
- *
- * This package is an SSL implementation written
- * by Eric Young (eay@cryptsoft.com).
- * The implementation was written so as to conform with Netscapes SSL.
- *
- * This library is free for commercial and non-commercial use as long as
- * the following conditions are aheared to. The following conditions
- * apply to all code found in this distribution, be it the RC4, RSA,
- * lhash, DES, etc., code; not just the SSL code. The SSL documentation
- * included with this distribution is covered by the same copyright terms
- * except that the holder is Tim Hudson (tjh@cryptsoft.com).
- *
- * Copyright remains Eric Young's, and as such any Copyright notices in
- * the code are not to be removed.
- * If this package is used in a product, Eric Young should be given attribution
- * as the author of the parts of the library used.
- * This can be in the form of a textual message at program startup or
- * in documentation (online or textual) provided with the package.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * "This product includes cryptographic software written by
- * Eric Young (eay@cryptsoft.com)"
- * The word 'cryptographic' can be left out if the rouines from the library
- * being used are not cryptographic related :-).
- * 4. If you include any Windows specific code (or a derivative thereof) from
- * the apps directory (application code) you must include an acknowledgement:
- * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
- *
- * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * The licence and distribution terms for any publically available version or
- * derivative of this code cannot be changed. i.e. this code cannot simply be
- * copied and put under another distribution licence
- * [including the GNU Public Licence.]
- */
-
-#include <stdio.h>
-#include "cryptlib.h"
-#include <openssl/evp.h>
-#include <openssl/objects.h>
-
-#ifndef NO_DES
-static void des_cfb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
- unsigned char *iv,int enc);
-static void des_cfb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
- unsigned char *in, unsigned int inl);
-static EVP_CIPHER d_cfb_cipher=
- {
- NID_des_cfb64,
- 1,8,8,
- des_cfb_init_key,
- des_cfb_cipher,
- NULL,
- sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+
- sizeof((((EVP_CIPHER_CTX *)NULL)->c.des_ks)),
- EVP_CIPHER_set_asn1_iv,
- EVP_CIPHER_get_asn1_iv,
- };
-
-EVP_CIPHER *EVP_des_cfb(void)
- {
- return(&d_cfb_cipher);
- }
-
-static void des_cfb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
- unsigned char *iv, int enc)
- {
- des_cblock *deskey = (des_cblock *)key;
-
- ctx->num=0;
-
- if (iv != NULL)
- memcpy(&(ctx->oiv[0]),iv,8);
- memcpy(&(ctx->iv[0]),&(ctx->oiv[0]),8);
- if (deskey != NULL)
- des_set_key_unchecked(deskey,ctx->c.des_ks);
- }
-
-static void des_cfb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
- unsigned char *in, unsigned int inl)
- {
- des_cfb64_encrypt(
- in,out,
- (long)inl, ctx->c.des_ks,
- (des_cblock *)&(ctx->iv[0]),
- &ctx->num,ctx->encrypt);
- }
-#endif
diff --git a/crypto/evp/e_cfb_i.c b/crypto/evp/e_cfb_i.c
deleted file mode 100644
index 31c76c6dac..0000000000
--- a/crypto/evp/e_cfb_i.c
+++ /dev/null
@@ -1,109 +0,0 @@
-/* crypto/evp/e_cfb_i.c */
-/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
- * All rights reserved.
- *
- * This package is an SSL implementation written
- * by Eric Young (eay@cryptsoft.com).
- * The implementation was written so as to conform with Netscapes SSL.
- *
- * This library is free for commercial and non-commercial use as long as
- * the following conditions are aheared to. The following conditions
- * apply to all code found in this distribution, be it the RC4, RSA,
- * lhash, DES, etc., code; not just the SSL code. The SSL documentation
- * included with this distribution is covered by the same copyright terms
- * except that the holder is Tim Hudson (tjh@cryptsoft.com).
- *
- * Copyright remains Eric Young's, and as such any Copyright notices in
- * the code are not to be removed.
- * If this package is used in a product, Eric Young should be given attribution
- * as the author of the parts of the library used.
- * This can be in the form of a textual message at program startup or
- * in documentation (online or textual) provided with the package.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * "This product includes cryptographic software written by
- * Eric Young (eay@cryptsoft.com)"
- * The word 'cryptographic' can be left out if the rouines from the library
- * being used are not cryptographic related :-).
- * 4. If you include any Windows specific code (or a derivative thereof) from
- * the apps directory (application code) you must include an acknowledgement:
- * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
- *
- * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * The licence and distribution terms for any publically available version or
- * derivative of this code cannot be changed. i.e. this code cannot simply be
- * copied and put under another distribution licence
- * [including the GNU Public Licence.]
- */
-
-#ifndef NO_IDEA
-
-#include <stdio.h>
-#include "cryptlib.h"
-#include <openssl/evp.h>
-#include <openssl/objects.h>
-
-static void idea_cfb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
- unsigned char *iv,int enc);
-static void idea_cfb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
- unsigned char *in, unsigned int inl);
-static EVP_CIPHER i_cfb_cipher=
- {
- NID_idea_cfb64,
- 1,IDEA_KEY_LENGTH,IDEA_BLOCK,
- idea_cfb_init_key,
- idea_cfb_cipher,
- NULL,
- sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+
- sizeof((((EVP_CIPHER_CTX *)NULL)->c.idea_ks)),
- EVP_CIPHER_set_asn1_iv,
- EVP_CIPHER_get_asn1_iv,
- };
-
-EVP_CIPHER *EVP_idea_cfb(void)
- {
- return(&i_cfb_cipher);
- }
-
-static void idea_cfb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
- unsigned char *iv, int enc)
- {
- ctx->num=0;
-
- if (iv != NULL)
- memcpy(&(ctx->oiv[0]),iv,8);
- memcpy(&(ctx->iv[0]),&(ctx->oiv[0]),8);
- if (key != NULL)
- idea_set_encrypt_key(key,&(ctx->c.idea_ks));
- }
-
-static void idea_cfb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
- unsigned char *in, unsigned int inl)
- {
- idea_cfb64_encrypt(
- in,out,(long)inl,
- &(ctx->c.idea_ks),&(ctx->iv[0]),
- &ctx->num,ctx->encrypt);
- }
-
-#endif
diff --git a/crypto/evp/e_cfb_r2.c b/crypto/evp/e_cfb_r2.c
deleted file mode 100644
index 32dd77eb7c..0000000000
--- a/crypto/evp/e_cfb_r2.c
+++ /dev/null
@@ -1,110 +0,0 @@
-/* crypto/evp/e_cfb_r2.c */
-/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
- * All rights reserved.
- *
- * This package is an SSL implementation written
- * by Eric Young (eay@cryptsoft.com).
- * The implementation was written so as to conform with Netscapes SSL.
- *
- * This library is free for commercial and non-commercial use as long as
- * the following conditions are aheared to. The following conditions
- * apply to all code found in this distribution, be it the RC4, RSA,
- * lhash, DES, etc., code; not just the SSL code. The SSL documentation
- * included with this distribution is covered by the same copyright terms
- * except that the holder is Tim Hudson (tjh@cryptsoft.com).
- *
- * Copyright remains Eric Young's, and as such any Copyright notices in
- * the code are not to be removed.
- * If this package is used in a product, Eric Young should be given attribution
- * as the author of the parts of the library used.
- * This can be in the form of a textual message at program startup or
- * in documentation (online or textual) provided with the package.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * "This product includes cryptographic software written by
- * Eric Young (eay@cryptsoft.com)"
- * The word 'cryptographic' can be left out if the rouines from the library
- * being used are not cryptographic related :-).
- * 4. If you include any Windows specific code (or a derivative thereof) from
- * the apps directory (application code) you must include an acknowledgement:
- * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
- *
- * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * The licence and distribution terms for any publically available version or
- * derivative of this code cannot be changed. i.e. this code cannot simply be
- * copied and put under another distribution licence
- * [including the GNU Public Licence.]
- */
-
-#ifndef NO_RC2
-
-#include <stdio.h>
-#include "cryptlib.h"
-#include <openssl/evp.h>
-#include <openssl/objects.h>
-
-static void rc2_cfb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
- unsigned char *iv,int enc);
-static void rc2_cfb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
- unsigned char *in, unsigned int inl);
-static EVP_CIPHER r2_cfb_cipher=
- {
- NID_rc2_cfb64,
- 1,EVP_RC2_KEY_SIZE,8,
- rc2_cfb_init_key,
- rc2_cfb_cipher,
- NULL,
- sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+
- sizeof((((EVP_CIPHER_CTX *)NULL)->c.rc2_ks)),
- EVP_CIPHER_set_asn1_iv,
- EVP_CIPHER_get_asn1_iv,
- };
-
-EVP_CIPHER *EVP_rc2_cfb(void)
- {
- return(&r2_cfb_cipher);
- }
-
-static void rc2_cfb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
- unsigned char *iv, int enc)
- {
- ctx->num=0;
-
- if (iv != NULL)
- memcpy(&(ctx->oiv[0]),iv,8);
- memcpy(&(ctx->iv[0]),&(ctx->oiv[0]),8);
- if (key != NULL)
- RC2_set_key(&(ctx->c.rc2_ks),EVP_CIPHER_CTX_key_length(ctx),
- key,EVP_CIPHER_CTX_key_length(ctx)*8);
- }
-
-static void rc2_cfb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
- unsigned char *in, unsigned int inl)
- {
- RC2_cfb64_encrypt(
- in,out,
- (long)inl, &(ctx->c.rc2_ks),
- &(ctx->iv[0]),
- &ctx->num,ctx->encrypt);
- }
-#endif
diff --git a/crypto/evp/e_cfb_r5.c b/crypto/evp/e_cfb_r5.c
deleted file mode 100644
index 8e79728946..0000000000
--- a/crypto/evp/e_cfb_r5.c
+++ /dev/null
@@ -1,110 +0,0 @@
-/* crypto/evp/e_cfb_r5.c */
-/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
- * All rights reserved.
- *
- * This package is an SSL implementation written
- * by Eric Young (eay@cryptsoft.com).
- * The implementation was written so as to conform with Netscapes SSL.
- *
- * This library is free for commercial and non-commercial use as long as
- * the following conditions are aheared to. The following conditions
- * apply to all code found in this distribution, be it the RC4, RSA,
- * lhash, DES, etc., code; not just the SSL code. The SSL documentation
- * included with this distribution is covered by the same copyright terms
- * except that the holder is Tim Hudson (tjh@cryptsoft.com).
- *
- * Copyright remains Eric Young's, and as such any Copyright notices in
- * the code are not to be removed.
- * If this package is used in a product, Eric Young should be given attribution
- * as the author of the parts of the library used.
- * This can be in the form of a textual message at program startup or
- * in documentation (online or textual) provided with the package.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * "This product includes cryptographic software written by
- * Eric Young (eay@cryptsoft.com)"
- * The word 'cryptographic' can be left out if the rouines from the library
- * being used are not cryptographic related :-).
- * 4. If you include any Windows specific code (or a derivative thereof) from
- * the apps directory (application code) you must include an acknowledgement:
- * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
- *
- * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * The licence and distribution terms for any publically available version or
- * derivative of this code cannot be changed. i.e. this code cannot simply be
- * copied and put under another distribution licence
- * [including the GNU Public Licence.]
- */
-
-#ifndef NO_RC5
-
-#include <stdio.h>
-#include "cryptlib.h"
-#include <openssl/evp.h>
-#include <openssl/objects.h>
-
-static void rc5_32_12_16_cfb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
- unsigned char *iv,int enc);
-static void rc5_32_12_16_cfb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
- unsigned char *in, unsigned int inl);
-static EVP_CIPHER rc5_cfb_cipher=
- {
- NID_rc5_cfb64,
- 1,EVP_RC5_32_12_16_KEY_SIZE,8,
- rc5_32_12_16_cfb_init_key,
- rc5_32_12_16_cfb_cipher,
- NULL,
- sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+
- sizeof((((EVP_CIPHER_CTX *)NULL)->c.rc5_ks)),
- EVP_CIPHER_set_asn1_iv,
- EVP_CIPHER_get_asn1_iv,
- };
-
-EVP_CIPHER *EVP_rc5_32_12_16_cfb(void)
- {
- return(&rc5_cfb_cipher);
- }
-
-static void rc5_32_12_16_cfb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
- unsigned char *iv, int enc)
- {
- ctx->num=0;
-
- if (iv != NULL)
- memcpy(&(ctx->oiv[0]),iv,8);
- memcpy(&(ctx->iv[0]),&(ctx->oiv[0]),8);
- if (key != NULL)
- RC5_32_set_key(&(ctx->c.rc5_ks),EVP_RC5_32_12_16_KEY_SIZE,key,
- RC5_12_ROUNDS);
- }
-
-static void rc5_32_12_16_cfb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
- unsigned char *in, unsigned int inl)
- {
- RC5_32_cfb64_encrypt(
- in,out,
- (long)inl, &(ctx->c.rc5_ks),
- &(ctx->iv[0]),
- &ctx->num,ctx->encrypt);
- }
-#endif
diff --git a/crypto/evp/e_ecb_3d.c b/crypto/evp/e_ecb_3d.c
deleted file mode 100644
index 806e971d36..0000000000
--- a/crypto/evp/e_ecb_3d.c
+++ /dev/null
@@ -1,158 +0,0 @@
-/* crypto/evp/e_ecb_3d.c */
-/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
- * All rights reserved.
- *
- * This package is an SSL implementation written
- * by Eric Young (eay@cryptsoft.com).
- * The implementation was written so as to conform with Netscapes SSL.
- *
- * This library is free for commercial and non-commercial use as long as
- * the following conditions are aheared to. The following conditions
- * apply to all code found in this distribution, be it the RC4, RSA,
- * lhash, DES, etc., code; not just the SSL code. The SSL documentation
- * included with this distribution is covered by the same copyright terms
- * except that the holder is Tim Hudson (tjh@cryptsoft.com).
- *
- * Copyright remains Eric Young's, and as such any Copyright notices in
- * the code are not to be removed.
- * If this package is used in a product, Eric Young should be given attribution
- * as the author of the parts of the library used.
- * This can be in the form of a textual message at program startup or
- * in documentation (online or textual) provided with the package.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * "This product includes cryptographic software written by
- * Eric Young (eay@cryptsoft.com)"
- * The word 'cryptographic' can be left out if the rouines from the library
- * being used are not cryptographic related :-).
- * 4. If you include any Windows specific code (or a derivative thereof) from
- * the apps directory (application code) you must include an acknowledgement:
- * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
- *
- * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * The licence and distribution terms for any publically available version or
- * derivative of this code cannot be changed. i.e. this code cannot simply be
- * copied and put under another distribution licence
- * [including the GNU Public Licence.]
- */
-
-#ifndef NO_DES
-#include <stdio.h>
-#include "cryptlib.h"
-#include <openssl/evp.h>
-#include <openssl/objects.h>
-
-static void des_ede_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
- unsigned char *iv,int enc);
-static void des_ede3_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
- unsigned char *iv,int enc);
-static void des_ede_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
- unsigned char *in, unsigned int inl);
-static EVP_CIPHER d_ede_cipher2=
- {
- NID_des_ede,
- 8,16,0,
- des_ede_init_key,
- des_ede_cipher,
- NULL,
- sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+
- sizeof((((EVP_CIPHER_CTX *)NULL)->c.des_ede)),
- NULL,
- NULL,
- };
-
-static EVP_CIPHER d_ede3_cipher3=
- {
- NID_des_ede3,
- 8,24,0,
- des_ede3_init_key,
- des_ede_cipher,
- NULL,
- sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+
- sizeof((((EVP_CIPHER_CTX *)NULL)->c.des_ede)),
- NULL,
- };
-
-EVP_CIPHER *EVP_des_ede(void)
- {
- return(&d_ede_cipher2);
- }
-
-EVP_CIPHER *EVP_des_ede3(void)
- {
- return(&d_ede3_cipher3);
- }
-
-static void des_ede_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
- unsigned char *iv, int enc)
- {
- des_cblock *deskey = (des_cblock *)key;
-
- if (deskey != NULL)
- {
- des_set_key_unchecked(&deskey[0],ctx->c.des_ede.ks1);
- des_set_key_unchecked(&deskey[1],ctx->c.des_ede.ks2);
- memcpy( (char *)ctx->c.des_ede.ks3,
- (char *)ctx->c.des_ede.ks1,
- sizeof(ctx->c.des_ede.ks1));
- }
- }
-
-static void des_ede3_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
- unsigned char *iv, int enc)
- {
- des_cblock *deskey = (des_cblock *)key;
-
- if (deskey != NULL)
- {
- des_set_key_unchecked(&deskey[0],ctx->c.des_ede.ks1);
- des_set_key_unchecked(&deskey[1],ctx->c.des_ede.ks2);
- des_set_key_unchecked(&deskey[2],ctx->c.des_ede.ks3);
- }
- }
-
-static void des_ede_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
- unsigned char *in, unsigned int inl)
- {
- unsigned int i;
- des_cblock *output /* = (des_cblock *)out */;
- des_cblock *input /* = (des_cblock *)in */;
-
- if (inl < 8) return;
- inl-=8;
- for (i=0; i<=inl; i+=8)
- {
- output = (des_cblock *)(out + i);
- input = (des_cblock *)(in + i);
-
- des_ecb3_encrypt(input,output,
- ctx->c.des_ede.ks1,
- ctx->c.des_ede.ks2,
- ctx->c.des_ede.ks3,
- ctx->encrypt);
-
- /* output++; */
- /* input++; */
- }
- }
-#endif
diff --git a/crypto/evp/e_ecb_bf.c b/crypto/evp/e_ecb_bf.c
deleted file mode 100644
index 334736d253..0000000000
--- a/crypto/evp/e_ecb_bf.c
+++ /dev/null
@@ -1,109 +0,0 @@
-/* crypto/evp/e_ecb_bf.c */
-/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
- * All rights reserved.
- *
- * This package is an SSL implementation written
- * by Eric Young (eay@cryptsoft.com).
- * The implementation was written so as to conform with Netscapes SSL.
- *
- * This library is free for commercial and non-commercial use as long as
- * the following conditions are aheared to. The following conditions
- * apply to all code found in this distribution, be it the RC4, RSA,
- * lhash, DES, etc., code; not just the SSL code. The SSL documentation
- * included with this distribution is covered by the same copyright terms
- * except that the holder is Tim Hudson (tjh@cryptsoft.com).
- *
- * Copyright remains Eric Young's, and as such any Copyright notices in
- * the code are not to be removed.
- * If this package is used in a product, Eric Young should be given attribution
- * as the author of the parts of the library used.
- * This can be in the form of a textual message at program startup or
- * in documentation (online or textual) provided with the package.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * "This product includes cryptographic software written by
- * Eric Young (eay@cryptsoft.com)"
- * The word 'cryptographic' can be left out if the rouines from the library
- * being used are not cryptographic related :-).
- * 4. If you include any Windows specific code (or a derivative thereof) from
- * the apps directory (application code) you must include an acknowledgement:
- * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
- *
- * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * The licence and distribution terms for any publically available version or
- * derivative of this code cannot be changed. i.e. this code cannot simply be
- * copied and put under another distribution licence
- * [including the GNU Public Licence.]
- */
-
-#ifndef NO_BF
-#include <stdio.h>
-#include "cryptlib.h"
-#include <openssl/evp.h>
-#include <openssl/objects.h>
-
-static void bf_ecb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
- unsigned char *iv,int enc);
-static void bf_ecb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
- unsigned char *in, unsigned int inl);
-static EVP_CIPHER bfish_ecb_cipher=
- {
- NID_bf_ecb,
- 8,EVP_BLOWFISH_KEY_SIZE,0,
- bf_ecb_init_key,
- bf_ecb_cipher,
- NULL,
- sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+
- sizeof((((EVP_CIPHER_CTX *)NULL)->c.bf_ks)),
- NULL,
- NULL,
- };
-
-EVP_CIPHER *EVP_bf_ecb(void)
- {
- return(&bfish_ecb_cipher);
- }
-
-static void bf_ecb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
- unsigned char *iv, int enc)
- {
- if (key != NULL)
- BF_set_key(&(ctx->c.bf_ks),EVP_BLOWFISH_KEY_SIZE,key);
- }
-
-static void bf_ecb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
- unsigned char *in, unsigned int inl)
- {
- unsigned int i;
-
- if (inl < 8) return;
- inl-=8;
- for (i=0; i<=inl; i+=8)
- {
- BF_ecb_encrypt(
- &(in[i]),&(out[i]),
- &(ctx->c.bf_ks),ctx->encrypt);
- }
- }
-
-#endif
diff --git a/crypto/evp/e_ecb_c.c b/crypto/evp/e_ecb_c.c
deleted file mode 100644
index ad14e203cb..0000000000
--- a/crypto/evp/e_ecb_c.c
+++ /dev/null
@@ -1,110 +0,0 @@
-/* crypto/evp/e_ecb_c.c */
-/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
- * All rights reserved.
- *
- * This package is an SSL implementation written
- * by Eric Young (eay@cryptsoft.com).
- * The implementation was written so as to conform with Netscapes SSL.
- *
- * This library is free for commercial and non-commercial use as long as
- * the following conditions are aheared to. The following conditions
- * apply to all code found in this distribution, be it the RC4, RSA,
- * lhash, DES, etc., code; not just the SSL code. The SSL documentation
- * included with this distribution is covered by the same copyright terms
- * except that the holder is Tim Hudson (tjh@cryptsoft.com).
- *
- * Copyright remains Eric Young's, and as such any Copyright notices in
- * the code are not to be removed.
- * If this package is used in a product, Eric Young should be given attribution
- * as the author of the parts of the library used.
- * This can be in the form of a textual message at program startup or
- * in documentation (online or textual) provided with the package.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * "This product includes cryptographic software written by
- * Eric Young (eay@cryptsoft.com)"
- * The word 'cryptographic' can be left out if the rouines from the library
- * being used are not cryptographic related :-).
- * 4. If you include any Windows specific code (or a derivative thereof) from
- * the apps directory (application code) you must include an acknowledgement:
- * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
- *
- * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * The licence and distribution terms for any publically available version or
- * derivative of this code cannot be changed. i.e. this code cannot simply be
- * copied and put under another distribution licence
- * [including the GNU Public Licence.]
- */
-
-#ifndef NO_CAST
-
-#include <stdio.h>
-#include "cryptlib.h"
-#include <openssl/evp.h>
-#include <openssl/objects.h>
-
-static void cast_ecb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
- unsigned char *iv,int enc);
-static void cast_ecb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
- unsigned char *in, unsigned int inl);
-static EVP_CIPHER cast5_ecb_cipher=
- {
- NID_cast5_ecb,
- 8,EVP_CAST5_KEY_SIZE,0,
- cast_ecb_init_key,
- cast_ecb_cipher,
- NULL,
- sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+
- sizeof((((EVP_CIPHER_CTX *)NULL)->c.cast_ks)),
- NULL,
- NULL,
- };
-
-EVP_CIPHER *EVP_cast5_ecb(void)
- {
- return(&cast5_ecb_cipher);
- }
-
-static void cast_ecb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
- unsigned char *iv, int enc)
- {
- if (key != NULL)
- CAST_set_key(&(ctx->c.cast_ks),EVP_CAST5_KEY_SIZE,key);
- }
-
-static void cast_ecb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
- unsigned char *in, unsigned int inl)
- {
- unsigned int i;
-
- if (inl < 8) return;
- inl-=8;
- for (i=0; i<=inl; i+=8)
- {
- CAST_ecb_encrypt(
- &(in[i]),&(out[i]),
- &(ctx->c.cast_ks),ctx->encrypt);
- }
- }
-
-#endif
diff --git a/crypto/evp/e_ecb_d.c b/crypto/evp/e_ecb_d.c
deleted file mode 100644
index c11bef55ef..0000000000
--- a/crypto/evp/e_ecb_d.c
+++ /dev/null
@@ -1,118 +0,0 @@
-/* crypto/evp/e_ecb_d.c */
-/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
- * All rights reserved.
- *
- * This package is an SSL implementation written
- * by Eric Young (eay@cryptsoft.com).
- * The implementation was written so as to conform with Netscapes SSL.
- *
- * This library is free for commercial and non-commercial use as long as
- * the following conditions are aheared to. The following conditions
- * apply to all code found in this distribution, be it the RC4, RSA,
- * lhash, DES, etc., code; not just the SSL code. The SSL documentation
- * included with this distribution is covered by the same copyright terms
- * except that the holder is Tim Hudson (tjh@cryptsoft.com).
- *
- * Copyright remains Eric Young's, and as such any Copyright notices in
- * the code are not to be removed.
- * If this package is used in a product, Eric Young should be given attribution
- * as the author of the parts of the library used.
- * This can be in the form of a textual message at program startup or
- * in documentation (online or textual) provided with the package.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * "This product includes cryptographic software written by
- * Eric Young (eay@cryptsoft.com)"
- * The word 'cryptographic' can be left out if the rouines from the library
- * being used are not cryptographic related :-).
- * 4. If you include any Windows specific code (or a derivative thereof) from
- * the apps directory (application code) you must include an acknowledgement:
- * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
- *
- * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * The licence and distribution terms for any publically available version or
- * derivative of this code cannot be changed. i.e. this code cannot simply be
- * copied and put under another distribution licence
- * [including the GNU Public Licence.]
- */
-
-#ifndef NO_DES
-#include <stdio.h>
-#include "cryptlib.h"
-#include <openssl/evp.h>
-#include <openssl/objects.h>
-
-static void des_ecb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
- unsigned char *iv,int enc);
-static void des_ecb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
- unsigned char *in, unsigned int inl);
-static EVP_CIPHER d_ecb_cipher=
- {
- NID_des_ecb,
- 8,8,0,
- des_ecb_init_key,
- des_ecb_cipher,
- NULL,
- sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+
- sizeof((((EVP_CIPHER_CTX *)NULL)->c.des_ks)),
- NULL,
- NULL,
- };
-
-EVP_CIPHER *EVP_des_ecb(void)
- {
- return(&d_ecb_cipher);
- }
-
-static void des_ecb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
- unsigned char *iv, int enc)
- {
- des_cblock *deskey = (des_cblock *)key;
-
- if (deskey != NULL)
- des_set_key_unchecked(deskey,ctx->c.des_ks);
- }
-
-static void des_ecb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
- unsigned char *in, unsigned int inl)
- {
- unsigned int i;
- des_cblock *output /* = (des_cblock *)out */;
- des_cblock *input /* = (des_cblock *)in */;
-
- if (inl < 8) return;
- inl-=8;
- for (i=0; i<=inl; i+=8)
- {
- /* Either this ... */
- output = (des_cblock *)(out + i);
- input = (des_cblock *)(in + i);
-
- des_ecb_encrypt(input,output,ctx->c.des_ks,ctx->encrypt);
-
- /* ... or this. */
- /* output++; */
- /* input++; */
- }
- }
-#endif
diff --git a/crypto/evp/e_ecb_i.c b/crypto/evp/e_ecb_i.c
deleted file mode 100644
index 50a3da1bba..0000000000
--- a/crypto/evp/e_ecb_i.c
+++ /dev/null
@@ -1,121 +0,0 @@
-/* crypto/evp/e_ecb_i.c */
-/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
- * All rights reserved.
- *
- * This package is an SSL implementation written
- * by Eric Young (eay@cryptsoft.com).
- * The implementation was written so as to conform with Netscapes SSL.
- *
- * This library is free for commercial and non-commercial use as long as
- * the following conditions are aheared to. The following conditions
- * apply to all code found in this distribution, be it the RC4, RSA,
- * lhash, DES, etc., code; not just the SSL code. The SSL documentation
- * included with this distribution is covered by the same copyright terms
- * except that the holder is Tim Hudson (tjh@cryptsoft.com).
- *
- * Copyright remains Eric Young's, and as such any Copyright notices in
- * the code are not to be removed.
- * If this package is used in a product, Eric Young should be given attribution
- * as the author of the parts of the library used.
- * This can be in the form of a textual message at program startup or
- * in documentation (online or textual) provided with the package.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * "This product includes cryptographic software written by
- * Eric Young (eay@cryptsoft.com)"
- * The word 'cryptographic' can be left out if the rouines from the library
- * being used are not cryptographic related :-).
- * 4. If you include any Windows specific code (or a derivative thereof) from
- * the apps directory (application code) you must include an acknowledgement:
- * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
- *
- * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * The licence and distribution terms for any publically available version or
- * derivative of this code cannot be changed. i.e. this code cannot simply be
- * copied and put under another distribution licence
- * [including the GNU Public Licence.]
- */
-
-#ifndef NO_IDEA
-
-#include <stdio.h>
-#include "cryptlib.h"
-#include <openssl/evp.h>
-#include <openssl/objects.h>
-
-static void idea_ecb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
- unsigned char *iv,int enc);
-static void idea_ecb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
- unsigned char *in, unsigned int inl);
-static EVP_CIPHER i_ecb_cipher=
- {
- NID_idea_ecb,
- 8,16,0,
- idea_ecb_init_key,
- idea_ecb_cipher,
- NULL,
- sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+
- sizeof((((EVP_CIPHER_CTX *)NULL)->c.idea_ks)),
- NULL,
- NULL,
- };
-
-EVP_CIPHER *EVP_idea_ecb(void)
- {
- return(&i_ecb_cipher);
- }
-
-static void idea_ecb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
- unsigned char *iv, int enc)
- {
- if (key != NULL)
- {
- if (enc)
- idea_set_encrypt_key(key,&(ctx->c.idea_ks));
- else
- {
- IDEA_KEY_SCHEDULE tmp;
-
- idea_set_encrypt_key(key,&tmp);
- idea_set_decrypt_key(&tmp, &(ctx->c.idea_ks));
- memset((unsigned char *)&tmp,0,
- sizeof(IDEA_KEY_SCHEDULE));
- }
- }
- }
-
-static void idea_ecb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
- unsigned char *in, unsigned int inl)
- {
- unsigned int i;
-
- if (inl < 8) return;
- inl-=8;
- for (i=0; i<=inl; i+=8)
- {
- idea_ecb_encrypt(
- &(in[i]),&(out[i]),&(ctx->c.idea_ks));
- }
- }
-
-#endif
diff --git a/crypto/evp/e_ecb_r2.c b/crypto/evp/e_ecb_r2.c
deleted file mode 100644
index 3c2330130d..0000000000
--- a/crypto/evp/e_ecb_r2.c
+++ /dev/null
@@ -1,111 +0,0 @@
-/* crypto/evp/e_ecb_r2.c */
-/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
- * All rights reserved.
- *
- * This package is an SSL implementation written
- * by Eric Young (eay@cryptsoft.com).
- * The implementation was written so as to conform with Netscapes SSL.
- *
- * This library is free for commercial and non-commercial use as long as
- * the following conditions are aheared to. The following conditions
- * apply to all code found in this distribution, be it the RC4, RSA,
- * lhash, DES, etc., code; not just the SSL code. The SSL documentation
- * included with this distribution is covered by the same copyright terms
- * except that the holder is Tim Hudson (tjh@cryptsoft.com).
- *
- * Copyright remains Eric Young's, and as such any Copyright notices in
- * the code are not to be removed.
- * If this package is used in a product, Eric Young should be given attribution
- * as the author of the parts of the library used.
- * This can be in the form of a textual message at program startup or
- * in documentation (online or textual) provided with the package.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * "This product includes cryptographic software written by
- * Eric Young (eay@cryptsoft.com)"
- * The word 'cryptographic' can be left out if the rouines from the library
- * being used are not cryptographic related :-).
- * 4. If you include any Windows specific code (or a derivative thereof) from
- * the apps directory (application code) you must include an acknowledgement:
- * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
- *
- * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * The licence and distribution terms for any publically available version or
- * derivative of this code cannot be changed. i.e. this code cannot simply be
- * copied and put under another distribution licence
- * [including the GNU Public Licence.]
- */
-
-#ifndef NO_RC2
-
-#include <stdio.h>
-#include "cryptlib.h"
-#include <openssl/evp.h>
-#include <openssl/objects.h>
-
-static void rc2_ecb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
- unsigned char *iv,int enc);
-static void rc2_ecb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
- unsigned char *in, unsigned int inl);
-static EVP_CIPHER r2_ecb_cipher=
- {
- NID_rc2_ecb,
- 8,EVP_RC2_KEY_SIZE,0,
- rc2_ecb_init_key,
- rc2_ecb_cipher,
- NULL,
- sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+
- sizeof((((EVP_CIPHER_CTX *)NULL)->c.rc2_ks)),
- NULL,
- NULL,
- };
-
-EVP_CIPHER *EVP_rc2_ecb(void)
- {
- return(&r2_ecb_cipher);
- }
-
-static void rc2_ecb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
- unsigned char *iv, int enc)
- {
- if (key != NULL)
- RC2_set_key(&(ctx->c.rc2_ks),EVP_CIPHER_CTX_key_length(ctx),
- key,EVP_CIPHER_CTX_key_length(ctx)*8);
- }
-
-static void rc2_ecb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
- unsigned char *in, unsigned int inl)
- {
- unsigned int i;
-
- if (inl < 8) return;
- inl-=8;
- for (i=0; i<=inl; i+=8)
- {
- RC2_ecb_encrypt(
- &(in[i]),&(out[i]),
- &(ctx->c.rc2_ks),ctx->encrypt);
- }
- }
-
-#endif
diff --git a/crypto/evp/e_ecb_r5.c b/crypto/evp/e_ecb_r5.c
deleted file mode 100644
index ef43ce34bf..0000000000
--- a/crypto/evp/e_ecb_r5.c
+++ /dev/null
@@ -1,111 +0,0 @@
-/* crypto/evp/e_ecb_r5.c */
-/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
- * All rights reserved.
- *
- * This package is an SSL implementation written
- * by Eric Young (eay@cryptsoft.com).
- * The implementation was written so as to conform with Netscapes SSL.
- *
- * This library is free for commercial and non-commercial use as long as
- * the following conditions are aheared to. The following conditions
- * apply to all code found in this distribution, be it the RC4, RSA,
- * lhash, DES, etc., code; not just the SSL code. The SSL documentation
- * included with this distribution is covered by the same copyright terms
- * except that the holder is Tim Hudson (tjh@cryptsoft.com).
- *
- * Copyright remains Eric Young's, and as such any Copyright notices in
- * the code are not to be removed.
- * If this package is used in a product, Eric Young should be given attribution
- * as the author of the parts of the library used.
- * This can be in the form of a textual message at program startup or
- * in documentation (online or textual) provided with the package.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * "This product includes cryptographic software written by
- * Eric Young (eay@cryptsoft.com)"
- * The word 'cryptographic' can be left out if the rouines from the library
- * being used are not cryptographic related :-).
- * 4. If you include any Windows specific code (or a derivative thereof) from
- * the apps directory (application code) you must include an acknowledgement:
- * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
- *
- * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * The licence and distribution terms for any publically available version or
- * derivative of this code cannot be changed. i.e. this code cannot simply be
- * copied and put under another distribution licence
- * [including the GNU Public Licence.]
- */
-
-#ifndef NO_RC5
-
-#include <stdio.h>
-#include "cryptlib.h"
-#include <openssl/evp.h>
-#include <openssl/objects.h>
-
-static void rc5_32_12_16_ecb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
- unsigned char *iv,int enc);
-static void rc5_32_12_16_ecb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
- unsigned char *in, unsigned int inl);
-static EVP_CIPHER rc5_ecb_cipher=
- {
- NID_rc5_ecb,
- 8,EVP_RC5_32_12_16_KEY_SIZE,0,
- rc5_32_12_16_ecb_init_key,
- rc5_32_12_16_ecb_cipher,
- NULL,
- sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+
- sizeof((((EVP_CIPHER_CTX *)NULL)->c.rc5_ks)),
- NULL,
- NULL,
- };
-
-EVP_CIPHER *EVP_rc5_32_12_16_ecb(void)
- {
- return(&rc5_ecb_cipher);
- }
-
-static void rc5_32_12_16_ecb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
- unsigned char *iv, int enc)
- {
- if (key != NULL)
- RC5_32_set_key(&(ctx->c.rc5_ks),EVP_RC5_32_12_16_KEY_SIZE,key,
- RC5_12_ROUNDS);
- }
-
-static void rc5_32_12_16_ecb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
- unsigned char *in, unsigned int inl)
- {
- unsigned int i;
-
- if (inl < 8) return;
- inl-=8;
- for (i=0; i<=inl; i+=8)
- {
- RC5_32_ecb_encrypt(
- &(in[i]),&(out[i]),
- &(ctx->c.rc5_ks),ctx->encrypt);
- }
- }
-
-#endif
diff --git a/crypto/evp/e_null.c b/crypto/evp/e_null.c
index 0a62c10aa9..d507337df6 100644
--- a/crypto/evp/e_null.c
+++ b/crypto/evp/e_null.c
@@ -61,20 +61,22 @@
#include <openssl/evp.h>
#include <openssl/objects.h>
-static void null_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
+static int null_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
unsigned char *iv,int enc);
-static void null_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
+static int null_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
unsigned char *in, unsigned int inl);
static EVP_CIPHER n_cipher=
{
NID_undef,
1,0,0,
+ 0,
null_init_key,
null_cipher,
NULL,
0,
NULL,
NULL,
+ NULL
};
EVP_CIPHER *EVP_enc_null(void)
@@ -82,16 +84,18 @@ EVP_CIPHER *EVP_enc_null(void)
return(&n_cipher);
}
-static void null_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
+static int null_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
unsigned char *iv, int enc)
{
memset(&(ctx->c),0,sizeof(ctx->c));
+ return 1;
}
-static void null_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
+static int null_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
unsigned char *in, unsigned int inl)
{
if (in != out)
memcpy((char *)out,(char *)in,(int)inl);
+ return 1;
}
diff --git a/crypto/evp/e_ofb_3d.c b/crypto/evp/e_ofb_3d.c
deleted file mode 100644
index d1a33e2ecd..0000000000
--- a/crypto/evp/e_ofb_3d.c
+++ /dev/null
@@ -1,152 +0,0 @@
-/* crypto/evp/e_ofb_3d.c */
-/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
- * All rights reserved.
- *
- * This package is an SSL implementation written
- * by Eric Young (eay@cryptsoft.com).
- * The implementation was written so as to conform with Netscapes SSL.
- *
- * This library is free for commercial and non-commercial use as long as
- * the following conditions are aheared to. The following conditions
- * apply to all code found in this distribution, be it the RC4, RSA,
- * lhash, DES, etc., code; not just the SSL code. The SSL documentation
- * included with this distribution is covered by the same copyright terms
- * except that the holder is Tim Hudson (tjh@cryptsoft.com).
- *
- * Copyright remains Eric Young's, and as such any Copyright notices in
- * the code are not to be removed.
- * If this package is used in a product, Eric Young should be given attribution
- * as the author of the parts of the library used.
- * This can be in the form of a textual message at program startup or
- * in documentation (online or textual) provided with the package.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * "This product includes cryptographic software written by
- * Eric Young (eay@cryptsoft.com)"
- * The word 'cryptographic' can be left out if the rouines from the library
- * being used are not cryptographic related :-).
- * 4. If you include any Windows specific code (or a derivative thereof) from
- * the apps directory (application code) you must include an acknowledgement:
- * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
- *
- * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * The licence and distribution terms for any publically available version or
- * derivative of this code cannot be changed. i.e. this code cannot simply be
- * copied and put under another distribution licence
- * [including the GNU Public Licence.]
- */
-
-#ifndef NO_DES
-#include <stdio.h>
-#include "cryptlib.h"
-#include <openssl/evp.h>
-#include <openssl/objects.h>
-
-static void des_ede_ofb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
- unsigned char *iv,int enc);
-static void des_ede3_ofb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
- unsigned char *iv,int enc);
-static void des_ede_ofb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
- unsigned char *in, unsigned int inl);
-static EVP_CIPHER d_ede_ofb_cipher2=
- {
- NID_des_ede_ofb64,
- 1,16,8,
- des_ede_ofb_init_key,
- des_ede_ofb_cipher,
- NULL,
- sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+
- sizeof((((EVP_CIPHER_CTX *)NULL)->c.des_ede)),
- EVP_CIPHER_set_asn1_iv,
- EVP_CIPHER_get_asn1_iv,
- };
-
-static EVP_CIPHER d_ede3_ofb_cipher3=
- {
- NID_des_ede3_ofb64,
- 1,24,8,
- des_ede3_ofb_init_key,
- des_ede_ofb_cipher,
- NULL,
- sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+
- sizeof((((EVP_CIPHER_CTX *)NULL)->c.des_ede)),
- EVP_CIPHER_set_asn1_iv,
- EVP_CIPHER_get_asn1_iv,
- };
-
-EVP_CIPHER *EVP_des_ede_ofb(void)
- {
- return(&d_ede_ofb_cipher2);
- }
-
-EVP_CIPHER *EVP_des_ede3_ofb(void)
- {
- return(&d_ede3_ofb_cipher3);
- }
-
-static void des_ede_ofb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
- unsigned char *iv, int enc)
- {
- des_cblock *deskey = (des_cblock *)key;
-
- ctx->num=0;
-
- if (iv != NULL)
- memcpy(&(ctx->oiv[0]),iv,8);
- memcpy(&(ctx->iv[0]),&(ctx->oiv[0]),8);
- if (deskey != NULL)
- {
- des_set_key_unchecked(&deskey[0],ctx->c.des_ede.ks1);
- des_set_key_unchecked(&deskey[1],ctx->c.des_ede.ks2);
- memcpy( (char *)ctx->c.des_ede.ks3,
- (char *)ctx->c.des_ede.ks1,
- sizeof(ctx->c.des_ede.ks1));
- }
- }
-
-static void des_ede3_ofb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
- unsigned char *iv, int enc)
- {
- des_cblock *deskey = (des_cblock *)key;
-
- ctx->num=0;
-
- if (iv != NULL)
- memcpy(&(ctx->oiv[0]),iv,8);
- memcpy(&(ctx->iv[0]),&(ctx->oiv[0]),8);
- if (deskey != NULL)
- {
- des_set_key_unchecked(&deskey[0],ctx->c.des_ede.ks1);
- des_set_key_unchecked(&deskey[1],ctx->c.des_ede.ks2);
- des_set_key_unchecked(&deskey[2],ctx->c.des_ede.ks3);
- }
- }
-
-static void des_ede_ofb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
- unsigned char *in, unsigned int inl)
- {
- des_ede3_ofb64_encrypt(in,out,inl,ctx->c.des_ede.ks1,
- ctx->c.des_ede.ks2, ctx->c.des_ede.ks3,
- (des_cblock *)&(ctx->iv[0]),&ctx->num);
- }
-#endif
diff --git a/crypto/evp/e_ofb_bf.c b/crypto/evp/e_ofb_bf.c
deleted file mode 100644
index c82154b549..0000000000
--- a/crypto/evp/e_ofb_bf.c
+++ /dev/null
@@ -1,109 +0,0 @@
-/* crypto/evp/e_ofb_bf.c */
-/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
- * All rights reserved.
- *
- * This package is an SSL implementation written
- * by Eric Young (eay@cryptsoft.com).
- * The implementation was written so as to conform with Netscapes SSL.
- *
- * This library is free for commercial and non-commercial use as long as
- * the following conditions are aheared to. The following conditions
- * apply to all code found in this distribution, be it the RC4, RSA,
- * lhash, DES, etc., code; not just the SSL code. The SSL documentation
- * included with this distribution is covered by the same copyright terms
- * except that the holder is Tim Hudson (tjh@cryptsoft.com).
- *
- * Copyright remains Eric Young's, and as such any Copyright notices in
- * the code are not to be removed.
- * If this package is used in a product, Eric Young should be given attribution
- * as the author of the parts of the library used.
- * This can be in the form of a textual message at program startup or
- * in documentation (online or textual) provided with the package.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * "This product includes cryptographic software written by
- * Eric Young (eay@cryptsoft.com)"
- * The word 'cryptographic' can be left out if the rouines from the library
- * being used are not cryptographic related :-).
- * 4. If you include any Windows specific code (or a derivative thereof) from
- * the apps directory (application code) you must include an acknowledgement:
- * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
- *
- * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * The licence and distribution terms for any publically available version or
- * derivative of this code cannot be changed. i.e. this code cannot simply be
- * copied and put under another distribution licence
- * [including the GNU Public Licence.]
- */
-
-#ifndef NO_BF
-#include <stdio.h>
-#include "cryptlib.h"
-#include <openssl/evp.h>
-#include <openssl/objects.h>
-
-static void bf_ofb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
- unsigned char *iv,int enc);
-static void bf_ofb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
- unsigned char *in, unsigned int inl);
-static EVP_CIPHER bfish_ofb_cipher=
- {
- NID_bf_ofb64,
- 1,EVP_BLOWFISH_KEY_SIZE,8,
- bf_ofb_init_key,
- bf_ofb_cipher,
- NULL,
- sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+
- sizeof((((EVP_CIPHER_CTX *)NULL)->c.bf_ks)),
- EVP_CIPHER_set_asn1_iv,
- EVP_CIPHER_get_asn1_iv,
- };
-
-EVP_CIPHER *EVP_bf_ofb(void)
- {
- return(&bfish_ofb_cipher);
- }
-
-static void bf_ofb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
- unsigned char *iv, int enc)
- {
- ctx->num=0;
-
- if (iv != NULL)
- memcpy(&(ctx->oiv[0]),iv,8);
- memcpy(&(ctx->iv[0]),&(ctx->oiv[0]),8);
- if (key != NULL)
- BF_set_key(&(ctx->c.bf_ks),EVP_BLOWFISH_KEY_SIZE,key);
- }
-
-static void bf_ofb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
- unsigned char *in, unsigned int inl)
- {
- BF_ofb64_encrypt(
- in,out,
- (long)inl, &(ctx->c.bf_ks),
- &(ctx->iv[0]),
- &ctx->num);
- }
-
-#endif
diff --git a/crypto/evp/e_ofb_c.c b/crypto/evp/e_ofb_c.c
deleted file mode 100644
index 971043de4c..0000000000
--- a/crypto/evp/e_ofb_c.c
+++ /dev/null
@@ -1,110 +0,0 @@
-/* crypto/evp/e_ofb_c.c */
-/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
- * All rights reserved.
- *
- * This package is an SSL implementation written
- * by Eric Young (eay@cryptsoft.com).
- * The implementation was written so as to conform with Netscapes SSL.
- *
- * This library is free for commercial and non-commercial use as long as
- * the following conditions are aheared to. The following conditions
- * apply to all code found in this distribution, be it the RC4, RSA,
- * lhash, DES, etc., code; not just the SSL code. The SSL documentation
- * included with this distribution is covered by the same copyright terms
- * except that the holder is Tim Hudson (tjh@cryptsoft.com).
- *
- * Copyright remains Eric Young's, and as such any Copyright notices in
- * the code are not to be removed.
- * If this package is used in a product, Eric Young should be given attribution
- * as the author of the parts of the library used.
- * This can be in the form of a textual message at program startup or
- * in documentation (online or textual) provided with the package.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * "This product includes cryptographic software written by
- * Eric Young (eay@cryptsoft.com)"
- * The word 'cryptographic' can be left out if the rouines from the library
- * being used are not cryptographic related :-).
- * 4. If you include any Windows specific code (or a derivative thereof) from
- * the apps directory (application code) you must include an acknowledgement:
- * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
- *
- * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * The licence and distribution terms for any publically available version or
- * derivative of this code cannot be changed. i.e. this code cannot simply be
- * copied and put under another distribution licence
- * [including the GNU Public Licence.]
- */
-
-#ifndef NO_CAST
-
-#include <stdio.h>
-#include "cryptlib.h"
-#include <openssl/evp.h>
-#include <openssl/objects.h>
-
-static void cast_ofb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
- unsigned char *iv,int enc);
-static void cast_ofb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
- unsigned char *in, unsigned int inl);
-static EVP_CIPHER cast5_ofb_cipher=
- {
- NID_cast5_ofb64,
- 1,EVP_CAST5_KEY_SIZE,8,
- cast_ofb_init_key,
- cast_ofb_cipher,
- NULL,
- sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+
- sizeof((((EVP_CIPHER_CTX *)NULL)->c.cast_ks)),
- EVP_CIPHER_set_asn1_iv,
- EVP_CIPHER_get_asn1_iv,
- };
-
-EVP_CIPHER *EVP_cast5_ofb(void)
- {
- return(&cast5_ofb_cipher);
- }
-
-static void cast_ofb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
- unsigned char *iv, int enc)
- {
- ctx->num=0;
-
- if (iv != NULL)
- memcpy(&(ctx->oiv[0]),iv,8);
- memcpy(&(ctx->iv[0]),&(ctx->oiv[0]),8);
- if (key != NULL)
- CAST_set_key(&(ctx->c.cast_ks),EVP_CAST5_KEY_SIZE,key);
- }
-
-static void cast_ofb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
- unsigned char *in, unsigned int inl)
- {
- CAST_ofb64_encrypt(
- in,out,
- (long)inl, &(ctx->c.cast_ks),
- &(ctx->iv[0]),
- &ctx->num);
- }
-
-#endif
diff --git a/crypto/evp/e_ofb_d.c b/crypto/evp/e_ofb_d.c
deleted file mode 100644
index d51ce230f4..0000000000
--- a/crypto/evp/e_ofb_d.c
+++ /dev/null
@@ -1,107 +0,0 @@
-/* crypto/evp/e_ofb_d.c */
-/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
- * All rights reserved.
- *
- * This package is an SSL implementation written
- * by Eric Young (eay@cryptsoft.com).
- * The implementation was written so as to conform with Netscapes SSL.
- *
- * This library is free for commercial and non-commercial use as long as
- * the following conditions are aheared to. The following conditions
- * apply to all code found in this distribution, be it the RC4, RSA,
- * lhash, DES, etc., code; not just the SSL code. The SSL documentation
- * included with this distribution is covered by the same copyright terms
- * except that the holder is Tim Hudson (tjh@cryptsoft.com).
- *
- * Copyright remains Eric Young's, and as such any Copyright notices in
- * the code are not to be removed.
- * If this package is used in a product, Eric Young should be given attribution
- * as the author of the parts of the library used.
- * This can be in the form of a textual message at program startup or
- * in documentation (online or textual) provided with the package.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * "This product includes cryptographic software written by
- * Eric Young (eay@cryptsoft.com)"
- * The word 'cryptographic' can be left out if the rouines from the library
- * being used are not cryptographic related :-).
- * 4. If you include any Windows specific code (or a derivative thereof) from
- * the apps directory (application code) you must include an acknowledgement:
- * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
- *
- * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * The licence and distribution terms for any publically available version or
- * derivative of this code cannot be changed. i.e. this code cannot simply be
- * copied and put under another distribution licence
- * [including the GNU Public Licence.]
- */
-
-#ifndef NO_DES
-#include <stdio.h>
-#include "cryptlib.h"
-#include <openssl/evp.h>
-#include <openssl/objects.h>
-
-static void des_ofb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
- unsigned char *iv,int enc);
-static void des_ofb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
- unsigned char *in, unsigned int inl);
-static EVP_CIPHER d_ofb_cipher=
- {
- NID_des_ofb64,
- 1,8,8,
- des_ofb_init_key,
- des_ofb_cipher,
- NULL,
- sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+
- sizeof((((EVP_CIPHER_CTX *)NULL)->c.des_ks)),
- EVP_CIPHER_set_asn1_iv,
- EVP_CIPHER_get_asn1_iv,
- };
-
-EVP_CIPHER *EVP_des_ofb(void)
- {
- return(&d_ofb_cipher);
- }
-
-static void des_ofb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
- unsigned char *iv, int enc)
- {
- des_cblock *deskey = (des_cblock *)key;
-
- ctx->num=0;
-
- if (iv != NULL)
- memcpy(&(ctx->oiv[0]),iv,8);
- memcpy(&(ctx->iv[0]),&(ctx->oiv[0]),8);
- if (deskey != NULL)
- des_set_key_unchecked(deskey,ctx->c.des_ks);
- }
-
-static void des_ofb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
- unsigned char *in, unsigned int inl)
- {
- des_ofb64_encrypt(in,out,inl,ctx->c.des_ks,
- (des_cblock *)&(ctx->iv[0]),&ctx->num);
- }
-#endif
diff --git a/crypto/evp/e_ofb_i.c b/crypto/evp/e_ofb_i.c
deleted file mode 100644
index 389206ef36..0000000000
--- a/crypto/evp/e_ofb_i.c
+++ /dev/null
@@ -1,109 +0,0 @@
-/* crypto/evp/e_ofb_i.c */
-/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
- * All rights reserved.
- *
- * This package is an SSL implementation written
- * by Eric Young (eay@cryptsoft.com).
- * The implementation was written so as to conform with Netscapes SSL.
- *
- * This library is free for commercial and non-commercial use as long as
- * the following conditions are aheared to. The following conditions
- * apply to all code found in this distribution, be it the RC4, RSA,
- * lhash, DES, etc., code; not just the SSL code. The SSL documentation
- * included with this distribution is covered by the same copyright terms
- * except that the holder is Tim Hudson (tjh@cryptsoft.com).
- *
- * Copyright remains Eric Young's, and as such any Copyright notices in
- * the code are not to be removed.
- * If this package is used in a product, Eric Young should be given attribution
- * as the author of the parts of the library used.
- * This can be in the form of a textual message at program startup or
- * in documentation (online or textual) provided with the package.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * "This product includes cryptographic software written by
- * Eric Young (eay@cryptsoft.com)"
- * The word 'cryptographic' can be left out if the rouines from the library
- * being used are not cryptographic related :-).
- * 4. If you include any Windows specific code (or a derivative thereof) from
- * the apps directory (application code) you must include an acknowledgement:
- * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
- *
- * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * The licence and distribution terms for any publically available version or
- * derivative of this code cannot be changed. i.e. this code cannot simply be
- * copied and put under another distribution licence
- * [including the GNU Public Licence.]
- */
-
-#ifndef NO_IDEA
-
-#include <stdio.h>
-#include "cryptlib.h"
-#include <openssl/evp.h>
-#include <openssl/objects.h>
-
-static void idea_ofb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
- unsigned char *iv,int enc);
-static void idea_ofb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
- unsigned char *in, unsigned int inl);
-static EVP_CIPHER i_ofb_cipher=
- {
- NID_idea_ofb64,
- 1,IDEA_KEY_LENGTH,IDEA_BLOCK,
- idea_ofb_init_key,
- idea_ofb_cipher,
- NULL,
- sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+
- sizeof((((EVP_CIPHER_CTX *)NULL)->c.idea_ks)),
- EVP_CIPHER_set_asn1_iv,
- EVP_CIPHER_get_asn1_iv,
- };
-
-EVP_CIPHER *EVP_idea_ofb(void)
- {
- return(&i_ofb_cipher);
- }
-
-static void idea_ofb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
- unsigned char *iv, int enc)
- {
- ctx->num=0;
-
- if (iv != NULL)
- memcpy(&(ctx->oiv[0]),iv,8);
- memcpy(&(ctx->iv[0]),&(ctx->oiv[0]),8);
- if (key != NULL)
- idea_set_encrypt_key(key,&(ctx->c.idea_ks));
- }
-
-static void idea_ofb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
- unsigned char *in, unsigned int inl)
- {
- idea_ofb64_encrypt(
- in,out,(long)inl,
- &(ctx->c.idea_ks),&(ctx->iv[0]),
- &ctx->num);
- }
-
-#endif
diff --git a/crypto/evp/e_ofb_r2.c b/crypto/evp/e_ofb_r2.c
deleted file mode 100644
index 60ae3d4507..0000000000
--- a/crypto/evp/e_ofb_r2.c
+++ /dev/null
@@ -1,111 +0,0 @@
-/* crypto/evp/e_ofb_r2.c */
-/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
- * All rights reserved.
- *
- * This package is an SSL implementation written
- * by Eric Young (eay@cryptsoft.com).
- * The implementation was written so as to conform with Netscapes SSL.
- *
- * This library is free for commercial and non-commercial use as long as
- * the following conditions are aheared to. The following conditions
- * apply to all code found in this distribution, be it the RC4, RSA,
- * lhash, DES, etc., code; not just the SSL code. The SSL documentation
- * included with this distribution is covered by the same copyright terms
- * except that the holder is Tim Hudson (tjh@cryptsoft.com).
- *
- * Copyright remains Eric Young's, and as such any Copyright notices in
- * the code are not to be removed.
- * If this package is used in a product, Eric Young should be given attribution
- * as the author of the parts of the library used.
- * This can be in the form of a textual message at program startup or
- * in documentation (online or textual) provided with the package.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * "This product includes cryptographic software written by
- * Eric Young (eay@cryptsoft.com)"
- * The word 'cryptographic' can be left out if the rouines from the library
- * being used are not cryptographic related :-).
- * 4. If you include any Windows specific code (or a derivative thereof) from
- * the apps directory (application code) you must include an acknowledgement:
- * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
- *
- * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * The licence and distribution terms for any publically available version or
- * derivative of this code cannot be changed. i.e. this code cannot simply be
- * copied and put under another distribution licence
- * [including the GNU Public Licence.]
- */
-
-#ifndef NO_RC2
-
-#include <stdio.h>
-#include "cryptlib.h"
-#include <openssl/evp.h>
-#include <openssl/objects.h>
-
-static void rc2_ofb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
- unsigned char *iv,int enc);
-static void rc2_ofb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
- unsigned char *in, unsigned int inl);
-static EVP_CIPHER r2_ofb_cipher=
- {
- NID_rc2_ofb64,
- 1,EVP_RC2_KEY_SIZE,8,
- rc2_ofb_init_key,
- rc2_ofb_cipher,
- NULL,
- sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+
- sizeof((((EVP_CIPHER_CTX *)NULL)->c.rc2_ks)),
- EVP_CIPHER_set_asn1_iv,
- EVP_CIPHER_get_asn1_iv,
- };
-
-EVP_CIPHER *EVP_rc2_ofb(void)
- {
- return(&r2_ofb_cipher);
- }
-
-static void rc2_ofb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
- unsigned char *iv, int enc)
- {
- ctx->num=0;
-
- if (iv != NULL)
- memcpy(&(ctx->oiv[0]),iv,8);
- memcpy(&(ctx->iv[0]),&(ctx->oiv[0]),8);
- if (key != NULL)
- RC2_set_key(&(ctx->c.rc2_ks),EVP_CIPHER_CTX_key_length(ctx),
- key,EVP_CIPHER_CTX_key_length(ctx)*8);
- }
-
-static void rc2_ofb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
- unsigned char *in, unsigned int inl)
- {
- RC2_ofb64_encrypt(
- in,out,
- (long)inl, &(ctx->c.rc2_ks),
- &(ctx->iv[0]),
- &ctx->num);
- }
-
-#endif
diff --git a/crypto/evp/e_ofb_r5.c b/crypto/evp/e_ofb_r5.c
deleted file mode 100644
index 30136824eb..0000000000
--- a/crypto/evp/e_ofb_r5.c
+++ /dev/null
@@ -1,111 +0,0 @@
-/* crypto/evp/e_ofb_r5.c */
-/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
- * All rights reserved.
- *
- * This package is an SSL implementation written
- * by Eric Young (eay@cryptsoft.com).
- * The implementation was written so as to conform with Netscapes SSL.
- *
- * This library is free for commercial and non-commercial use as long as
- * the following conditions are aheared to. The following conditions
- * apply to all code found in this distribution, be it the RC4, RSA,
- * lhash, DES, etc., code; not just the SSL code. The SSL documentation
- * included with this distribution is covered by the same copyright terms
- * except that the holder is Tim Hudson (tjh@cryptsoft.com).
- *
- * Copyright remains Eric Young's, and as such any Copyright notices in
- * the code are not to be removed.
- * If this package is used in a product, Eric Young should be given attribution
- * as the author of the parts of the library used.
- * This can be in the form of a textual message at program startup or
- * in documentation (online or textual) provided with the package.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * "This product includes cryptographic software written by
- * Eric Young (eay@cryptsoft.com)"
- * The word 'cryptographic' can be left out if the rouines from the library
- * being used are not cryptographic related :-).
- * 4. If you include any Windows specific code (or a derivative thereof) from
- * the apps directory (application code) you must include an acknowledgement:
- * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
- *
- * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * The licence and distribution terms for any publically available version or
- * derivative of this code cannot be changed. i.e. this code cannot simply be
- * copied and put under another distribution licence
- * [including the GNU Public Licence.]
- */
-
-#ifndef NO_RC5
-
-#include <stdio.h>
-#include "cryptlib.h"
-#include <openssl/evp.h>
-#include <openssl/objects.h>
-
-static void rc5_32_12_16_ofb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
- unsigned char *iv,int enc);
-static void rc5_32_12_16_ofb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
- unsigned char *in, unsigned int inl);
-static EVP_CIPHER rc5_ofb_cipher=
- {
- NID_rc5_ofb64,
- 1,EVP_RC5_32_12_16_KEY_SIZE,8,
- rc5_32_12_16_ofb_init_key,
- rc5_32_12_16_ofb_cipher,
- NULL,
- sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+
- sizeof((((EVP_CIPHER_CTX *)NULL)->c.rc5_ks)),
- EVP_CIPHER_set_asn1_iv,
- EVP_CIPHER_get_asn1_iv,
- };
-
-EVP_CIPHER *EVP_rc5_32_12_16_ofb(void)
- {
- return(&rc5_ofb_cipher);
- }
-
-static void rc5_32_12_16_ofb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
- unsigned char *iv, int enc)
- {
- ctx->num=0;
-
- if (iv != NULL)
- memcpy(&(ctx->oiv[0]),iv,8);
- memcpy(&(ctx->iv[0]),&(ctx->oiv[0]),8);
- if (key != NULL)
- RC5_32_set_key(&(ctx->c.rc5_ks),EVP_RC5_32_12_16_KEY_SIZE,key,
- RC5_12_ROUNDS);
- }
-
-static void rc5_32_12_16_ofb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
- unsigned char *in, unsigned int inl)
- {
- RC5_32_ofb64_encrypt(
- in,out,
- (long)inl, &(ctx->c.rc5_ks),
- &(ctx->iv[0]),
- &ctx->num);
- }
-
-#endif
diff --git a/crypto/evp/e_rc4.c b/crypto/evp/e_rc4.c
index c7e58a75cc..42839aef6b 100644
--- a/crypto/evp/e_rc4.c
+++ b/crypto/evp/e_rc4.c
@@ -63,14 +63,15 @@
#include <openssl/evp.h>
#include <openssl/objects.h>
-static void rc4_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
+static int rc4_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
unsigned char *iv,int enc);
-static void rc4_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
+static int rc4_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
unsigned char *in, unsigned int inl);
static EVP_CIPHER r4_cipher=
{
NID_rc4,
1,EVP_RC4_KEY_SIZE,0,
+ EVP_CIPH_VARIABLE_LENGTH,
rc4_init_key,
rc4_cipher,
NULL,
@@ -78,14 +79,22 @@ static EVP_CIPHER r4_cipher=
sizeof((((EVP_CIPHER_CTX *)NULL)->c.rc4)),
NULL,
NULL,
+ NULL
};
static EVP_CIPHER r4_40_cipher=
{
NID_rc4_40,
1,5 /* 40 bit */,0,
+ EVP_CIPH_VARIABLE_LENGTH,
rc4_init_key,
rc4_cipher,
+ NULL,
+ sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+
+ sizeof((((EVP_CIPHER_CTX *)NULL)->c.rc4)),
+ NULL,
+ NULL,
+ NULL
};
EVP_CIPHER *EVP_rc4(void)
@@ -98,18 +107,19 @@ EVP_CIPHER *EVP_rc4_40(void)
return(&r4_40_cipher);
}
-static void rc4_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
+static int rc4_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
unsigned char *iv, int enc)
{
- if (key != NULL)
- memcpy(&(ctx->c.rc4.key[0]),key,EVP_CIPHER_CTX_key_length(ctx));
+ memcpy(&(ctx->c.rc4.key[0]),key,EVP_CIPHER_CTX_key_length(ctx));
RC4_set_key(&(ctx->c.rc4.ks),EVP_CIPHER_CTX_key_length(ctx),
ctx->c.rc4.key);
+ return 1;
}
-static void rc4_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
+static int rc4_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
unsigned char *in, unsigned int inl)
{
RC4(&(ctx->c.rc4.ks),inl,in,out);
+ return 1;
}
#endif
diff --git a/crypto/evp/e_xcbc_d.c b/crypto/evp/e_xcbc_d.c
index 7568fad4ff..e5dcdebe16 100644
--- a/crypto/evp/e_xcbc_d.c
+++ b/crypto/evp/e_xcbc_d.c
@@ -62,14 +62,15 @@
#include <openssl/evp.h>
#include <openssl/objects.h>
-static void desx_cbc_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
+static int desx_cbc_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
unsigned char *iv,int enc);
-static void desx_cbc_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
+static int desx_cbc_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
unsigned char *in, unsigned int inl);
static EVP_CIPHER d_xcbc_cipher=
{
NID_desx_cbc,
8,24,8,
+ EVP_CIPH_CBC_MODE,
desx_cbc_init_key,
desx_cbc_cipher,
NULL,
@@ -77,6 +78,7 @@ static EVP_CIPHER d_xcbc_cipher=
sizeof((((EVP_CIPHER_CTX *)NULL)->c.desx_cbc)),
EVP_CIPHER_set_asn1_iv,
EVP_CIPHER_get_asn1_iv,
+ NULL
};
EVP_CIPHER *EVP_desx_cbc(void)
@@ -84,23 +86,19 @@ EVP_CIPHER *EVP_desx_cbc(void)
return(&d_xcbc_cipher);
}
-static void desx_cbc_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
+static int desx_cbc_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
unsigned char *iv, int enc)
{
des_cblock *deskey = (des_cblock *)key;
- if (iv != NULL)
- memcpy(&(ctx->oiv[0]),iv,8);
- memcpy(&(ctx->iv[0]),&(ctx->oiv[0]),8);
- if (deskey != NULL)
- {
- des_set_key_unchecked(deskey,ctx->c.desx_cbc.ks);
- memcpy(&(ctx->c.desx_cbc.inw[0]),&(key[8]),8);
- memcpy(&(ctx->c.desx_cbc.outw[0]),&(key[16]),8);
- }
+ des_set_key_unchecked(deskey,ctx->c.desx_cbc.ks);
+ memcpy(&(ctx->c.desx_cbc.inw[0]),&(key[8]),8);
+ memcpy(&(ctx->c.desx_cbc.outw[0]),&(key[16]),8);
+
+ return 1;
}
-static void desx_cbc_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
+static int desx_cbc_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
unsigned char *in, unsigned int inl)
{
des_xcbc_encrypt(in,out,inl,ctx->c.desx_cbc.ks,
@@ -108,5 +106,6 @@ static void desx_cbc_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
&ctx->c.desx_cbc.inw,
&ctx->c.desx_cbc.outw,
ctx->encrypt);
+ return 1;
}
#endif
diff --git a/crypto/evp/evp.h b/crypto/evp/evp.h
index c0f982afb1..abb1490b81 100644
--- a/crypto/evp/evp.h
+++ b/crypto/evp/evp.h
@@ -318,21 +318,55 @@ typedef struct env_md_ctx_st
} md;
} EVP_MD_CTX;
-typedef struct evp_cipher_st
+typedef struct evp_cipher_st EVP_CIPHER;
+typedef struct evp_cipher_ctx_st EVP_CIPHER_CTX;
+
+struct evp_cipher_st
{
int nid;
int block_size;
- int key_len;
+ int key_len; /* Default value for variable length ciphers */
int iv_len;
- void (*init)(); /* init for encryption */
- void (*do_cipher)(); /* encrypt data */
- void (*cleanup)(); /* used by cipher method */
+ unsigned long flags; /* Various flags */
+ int (*init)(EVP_CIPHER_CTX *, unsigned char *, unsigned char *, int); /* init key */
+ int (*do_cipher)(EVP_CIPHER_CTX *, unsigned char *, unsigned char *, unsigned int);/* encrypt/decrypt data */
+ int (*cleanup)(EVP_CIPHER_CTX *); /* cleanup ctx */
int ctx_size; /* how big the ctx needs to be */
- /* int set_asn1_parameters(EVP_CIPHER_CTX,ASN1_TYPE *); */
- int (*set_asn1_parameters)(); /* Populate a ASN1_TYPE with parameters */
- /* int get_asn1_parameters(EVP_CIPHER_CTX,ASN1_TYPE *); */
- int (*get_asn1_parameters)(); /* Get parameters from a ASN1_TYPE */
- } EVP_CIPHER;
+ int (*set_asn1_parameters)(EVP_CIPHER_CTX *, ASN1_TYPE *); /* Populate a ASN1_TYPE with parameters */
+ int (*get_asn1_parameters)(EVP_CIPHER_CTX *, ASN1_TYPE *); /* Get parameters from a ASN1_TYPE */
+ int (*ctrl)(EVP_CIPHER_CTX *, int type, int arg, void *ptr); /* Miscellaneous operations */
+ void *app_data; /* Application data */
+ };
+
+/* Values for cipher flags */
+
+/* Modes for ciphers */
+
+#define EVP_CIPH_STREAM_CIPHER 0x0
+#define EVP_CIPH_ECB_MODE 0x1
+#define EVP_CIPH_CBC_MODE 0x2
+#define EVP_CIPH_CFB_MODE 0x3
+#define EVP_CIPH_OFB_MODE 0x4
+#define EVP_CIPH_MODE 0x7
+/* Set if variable length cipher */
+#define EVP_CIPH_VARIABLE_LENGTH 0x8
+/* Set if the iv handling should be done by the cipher itself */
+#define EVP_CIPH_CUSTOM_IV 0x10
+/* Set if the cipher's init() function should be called if key is NULL */
+#define EVP_CIPH_ALWAYS_CALL_INIT 0x20
+/* Call ctrl() to init cipher parameters */
+#define EVP_CIPH_CTRL_INIT 0x40
+/* Don't use standard key length function */
+#define EVP_CIPH_CUSTOM_KEY_LENGTH 0x80
+
+/* ctrl() values */
+
+#define EVP_CTRL_INIT 0x0
+#define EVP_CTRL_SET_KEY_LENGTH 0x1
+#define EVP_CTRL_GET_RC2_KEY_BITS 0x2
+#define EVP_CTRL_SET_RC2_KEY_BITS 0x3
+#define EVP_CTRL_GET_RC5_ROUNDS 0x4
+#define EVP_CTRL_SET_RC5_ROUNDS 0x5
typedef struct evp_cipher_info_st
{
@@ -340,7 +374,7 @@ typedef struct evp_cipher_info_st
unsigned char iv[EVP_MAX_IV_LENGTH];
} EVP_CIPHER_INFO;
-typedef struct evp_cipher_ctx_st
+struct evp_cipher_ctx_st
{
const EVP_CIPHER *cipher;
int encrypt; /* encrypt or decrypt */
@@ -351,7 +385,8 @@ typedef struct evp_cipher_ctx_st
unsigned char buf[EVP_MAX_IV_LENGTH]; /* saved partial block */
int num; /* used by cfb/ofb mode */
- char *app_data; /* application stuff */
+ void *app_data; /* application stuff */
+ int key_len; /* May change for variable length cipher */
union {
#ifndef NO_RC4
struct
@@ -379,10 +414,16 @@ typedef struct evp_cipher_ctx_st
IDEA_KEY_SCHEDULE idea_ks;/* key schedule */
#endif
#ifndef NO_RC2
- RC2_KEY rc2_ks;/* key schedule */
+ struct {
+ int key_bits; /* effective key bits */
+ RC2_KEY ks;/* key schedule */
+ } rc2;
#endif
#ifndef NO_RC5
- RC5_32_KEY rc5_ks;/* key schedule */
+ struct {
+ int rounds; /* number of rounds */
+ RC5_32_KEY ks;/* key schedule */
+ } rc5;
#endif
#ifndef NO_BF
BF_KEY bf_ks;/* key schedule */
@@ -391,7 +432,7 @@ typedef struct evp_cipher_ctx_st
CAST_KEY cast_ks;/* key schedule */
#endif
} c;
- } EVP_CIPHER_CTX;
+ };
typedef struct evp_Encode_Ctx_st
{
@@ -438,15 +479,19 @@ typedef int (EVP_PBE_KEYGEN)(EVP_CIPHER_CTX *ctx, const char *pass, int passlen,
#define EVP_CIPHER_block_size(e) ((e)->block_size)
#define EVP_CIPHER_key_length(e) ((e)->key_len)
#define EVP_CIPHER_iv_length(e) ((e)->iv_len)
+#define EVP_CIPHER_flags(e) ((e)->flags)
+#define EVP_CIPHER_mode(e) ((e)->flags) & EVP_CIPH_MODE)
#define EVP_CIPHER_CTX_cipher(e) ((e)->cipher)
#define EVP_CIPHER_CTX_nid(e) ((e)->cipher->nid)
#define EVP_CIPHER_CTX_block_size(e) ((e)->cipher->block_size)
-#define EVP_CIPHER_CTX_key_length(e) ((e)->cipher->key_len)
+#define EVP_CIPHER_CTX_key_length(e) ((e)->key_len)
#define EVP_CIPHER_CTX_iv_length(e) ((e)->cipher->iv_len)
#define EVP_CIPHER_CTX_get_app_data(e) ((e)->app_data)
#define EVP_CIPHER_CTX_set_app_data(e,d) ((e)->app_data=(char *)(d))
#define EVP_CIPHER_CTX_type(c) EVP_CIPHER_type(EVP_CIPHER_CTX_cipher(c))
+#define EVP_CIPHER_CTX_flags(e) ((e)->cipher->flags)
+#define EVP_CIPHER_CTX_mode(e) ((e)->cipher->flags & EVP_CIPH_MODE)
#define EVP_ENCODE_LENGTH(l) (((l+2)/3*4)+(l/48+1)*2+80)
#define EVP_DECODE_LENGTH(l) ((l+3)/4*3+80)
@@ -494,21 +539,21 @@ int EVP_BytesToKey(const EVP_CIPHER *type,EVP_MD *md,unsigned char *salt,
unsigned char *data, int datal, int count,
unsigned char *key,unsigned char *iv);
-void EVP_EncryptInit(EVP_CIPHER_CTX *ctx,const EVP_CIPHER *type,
+int EVP_EncryptInit(EVP_CIPHER_CTX *ctx,const EVP_CIPHER *type,
unsigned char *key, unsigned char *iv);
-void EVP_EncryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out,
+int EVP_EncryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out,
int *outl, unsigned char *in, int inl);
-void EVP_EncryptFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl);
+int EVP_EncryptFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl);
-void EVP_DecryptInit(EVP_CIPHER_CTX *ctx,const EVP_CIPHER *type,
+int EVP_DecryptInit(EVP_CIPHER_CTX *ctx,const EVP_CIPHER *type,
unsigned char *key, unsigned char *iv);
-void EVP_DecryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out,
+int EVP_DecryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out,
int *outl, unsigned char *in, int inl);
int EVP_DecryptFinal(EVP_CIPHER_CTX *ctx, unsigned char *outm, int *outl);
-void EVP_CipherInit(EVP_CIPHER_CTX *ctx,const EVP_CIPHER *type,
+int EVP_CipherInit(EVP_CIPHER_CTX *ctx,const EVP_CIPHER *type,
unsigned char *key,unsigned char *iv,int enc);
-void EVP_CipherUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out,
+int EVP_CipherUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out,
int *outl, unsigned char *in, int inl);
int EVP_CipherFinal(EVP_CIPHER_CTX *ctx, unsigned char *outm, int *outl);
@@ -542,7 +587,8 @@ int EVP_DecodeBlock(unsigned char *t, const unsigned char *f, int n);
void ERR_load_EVP_strings(void );
void EVP_CIPHER_CTX_init(EVP_CIPHER_CTX *a);
-void EVP_CIPHER_CTX_cleanup(EVP_CIPHER_CTX *a);
+int EVP_CIPHER_CTX_cleanup(EVP_CIPHER_CTX *a);
+int EVP_CIPHER_CTX_set_key_length(EVP_CIPHER_CTX *x, int keylen);
#ifdef HEADER_BIO_H
BIO_METHOD *BIO_f_md(void);
@@ -691,6 +737,8 @@ void EVP_PBE_cleanup(void);
/* Function codes. */
#define EVP_F_D2I_PKEY 100
+#define EVP_F_EVP_CIPHERINIT 123
+#define EVP_F_EVP_CIPHER_CTX_SET_KEY_LENGTH 122
#define EVP_F_EVP_DECRYPTFINAL 101
#define EVP_F_EVP_MD_CTX_COPY 110
#define EVP_F_EVP_OPENINIT 102
@@ -725,9 +773,11 @@ void EVP_PBE_cleanup(void);
#define EVP_R_EXPECTING_A_DH_KEY 128
#define EVP_R_EXPECTING_A_DSA_KEY 129
#define EVP_R_INPUT_NOT_INITIALIZED 111
+#define EVP_R_INVALID_KEY_LENGTH 130
#define EVP_R_IV_TOO_LARGE 102
#define EVP_R_KEYGEN_FAILURE 120
#define EVP_R_MISSING_PARAMETERS 103
+#define EVP_R_NO_CIPHER_SET 131
#define EVP_R_NO_DSA_PARAMETERS 116
#define EVP_R_NO_SIGN_FUNCTION_CONFIGURED 104
#define EVP_R_NO_VERIFY_FUNCTION_CONFIGURED 105
diff --git a/crypto/evp/evp_enc.c b/crypto/evp/evp_enc.c
index 5299a65b6a..4bf3a565a7 100644
--- a/crypto/evp/evp_enc.c
+++ b/crypto/evp/evp_enc.c
@@ -59,6 +59,8 @@
#include <stdio.h>
#include "cryptlib.h"
#include <openssl/evp.h>
+#include <openssl/err.h>
+#include "evp_locl.h"
const char *EVP_version="EVP" OPENSSL_VERSION_PTEXT;
@@ -68,55 +70,78 @@ void EVP_CIPHER_CTX_init(EVP_CIPHER_CTX *ctx)
/* ctx->cipher=NULL; */
}
-void EVP_CipherInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *data,
+int EVP_CipherInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher,
unsigned char *key, unsigned char *iv, int enc)
{
- if (enc)
- EVP_EncryptInit(ctx,data,key,iv);
- else
- EVP_DecryptInit(ctx,data,key,iv);
+ if(enc) enc = 1;
+ if (cipher) {
+ ctx->cipher=cipher;
+ ctx->key_len = cipher->key_len;
+ } else if(!ctx->cipher) {
+ EVPerr(EVP_F_EVP_CIPHERINIT, EVP_R_NO_CIPHER_SET);
+ return 0;
+ }
+ if(!(EVP_CIPHER_CTX_flags(ctx) & EVP_CIPH_CUSTOM_IV)) {
+ switch(EVP_CIPHER_CTX_mode(ctx)) {
+
+ case EVP_CIPH_STREAM_CIPHER:
+ case EVP_CIPH_ECB_MODE:
+ break;
+
+ case EVP_CIPH_CFB_MODE:
+ case EVP_CIPH_OFB_MODE:
+
+ ctx->num = 0;
+
+ case EVP_CIPH_CBC_MODE:
+
+ if(iv) memcpy(ctx->oiv, iv, EVP_CIPHER_CTX_iv_length(ctx));
+ memcpy(ctx->iv, ctx->oiv, EVP_CIPHER_CTX_iv_length(ctx));
+ break;
+
+ default:
+ return 0;
+ break;
+ }
+ }
+
+ if(key || (ctx->cipher->flags & EVP_CIPH_ALWAYS_CALL_INIT)) {
+ if(!ctx->cipher->init(ctx,key,iv,enc)) return 0;
+ }
+ ctx->encrypt=enc;
+ ctx->buf_len=0;
+ return 1;
}
-void EVP_CipherUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl,
+int EVP_CipherUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl,
unsigned char *in, int inl)
{
if (ctx->encrypt)
- EVP_EncryptUpdate(ctx,out,outl,in,inl);
- else EVP_DecryptUpdate(ctx,out,outl,in,inl);
+ return EVP_EncryptUpdate(ctx,out,outl,in,inl);
+ else return EVP_DecryptUpdate(ctx,out,outl,in,inl);
}
int EVP_CipherFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl)
{
if (ctx->encrypt)
- {
- EVP_EncryptFinal(ctx,out,outl);
- return(1);
- }
+ return EVP_EncryptFinal(ctx,out,outl);
else return(EVP_DecryptFinal(ctx,out,outl));
}
-void EVP_EncryptInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher,
+int EVP_EncryptInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher,
unsigned char *key, unsigned char *iv)
{
- if (cipher != NULL)
- ctx->cipher=cipher;
- ctx->cipher->init(ctx,key,iv,1);
- ctx->encrypt=1;
- ctx->buf_len=0;
+ return EVP_CipherInit(ctx, cipher, key, iv, 1);
}
-void EVP_DecryptInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher,
+int EVP_DecryptInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher,
unsigned char *key, unsigned char *iv)
{
- if (cipher != NULL)
- ctx->cipher=cipher;
- ctx->cipher->init(ctx,key,iv,0);
- ctx->encrypt=0;
- ctx->buf_len=0;
+ return EVP_CipherInit(ctx, cipher, key, iv, 0);
}
-void EVP_EncryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl,
+int EVP_EncryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl,
unsigned char *in, int inl)
{
int i,j,bl;
@@ -124,20 +149,20 @@ void EVP_EncryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl,
i=ctx->buf_len;
bl=ctx->cipher->block_size;
*outl=0;
- if ((inl == 0) && (i != bl)) return;
+ if ((inl == 0) && (i != bl)) return 1;
if (i != 0)
{
if (i+inl < bl)
{
memcpy(&(ctx->buf[i]),in,inl);
ctx->buf_len+=inl;
- return;
+ return 1;
}
else
{
j=bl-i;
if (j != 0) memcpy(&(ctx->buf[i]),in,j);
- ctx->cipher->do_cipher(ctx,out,ctx->buf,bl);
+ if(!ctx->cipher->do_cipher(ctx,out,ctx->buf,bl)) return 0;
inl-=j;
in+=j;
out+=bl;
@@ -148,16 +173,17 @@ void EVP_EncryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl,
inl-=i;
if (inl > 0)
{
- ctx->cipher->do_cipher(ctx,out,in,inl);
+ if(!ctx->cipher->do_cipher(ctx,out,in,inl)) return 0;
*outl+=inl;
}
if (i != 0)
memcpy(ctx->buf,&(in[inl]),i);
ctx->buf_len=i;
+ return 1;
}
-void EVP_EncryptFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl)
+int EVP_EncryptFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl)
{
int i,n,b,bl;
@@ -165,24 +191,25 @@ void EVP_EncryptFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl)
if (b == 1)
{
*outl=0;
- return;
+ return 1;
}
bl=ctx->buf_len;
n=b-bl;
for (i=bl; i<b; i++)
ctx->buf[i]=n;
- ctx->cipher->do_cipher(ctx,out,ctx->buf,b);
+ if(!ctx->cipher->do_cipher(ctx,out,ctx->buf,b)) return 0;
*outl=b;
+ return 1;
}
-void EVP_DecryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl,
+int EVP_DecryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl,
unsigned char *in, int inl)
{
int b,bl,n;
int keep_last=0;
*outl=0;
- if (inl == 0) return;
+ if (inl == 0) return 1;
b=ctx->cipher->block_size;
if (b > 1)
@@ -197,13 +224,13 @@ void EVP_DecryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl,
memcpy(&(ctx->buf[bl]),in,inl);
ctx->buf_len=b;
*outl=0;
- return;
+ return 1;
}
keep_last=1;
inl-=b; /* don't do the last block */
}
}
- EVP_EncryptUpdate(ctx,out,outl,in,inl);
+ if(!EVP_EncryptUpdate(ctx,out,outl,in,inl)) return 0;
/* if we have 'decrypted' a multiple of block size, make sure
* we have a copy of this last block */
@@ -218,6 +245,7 @@ void EVP_DecryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl,
#endif
ctx->buf_len=b;
}
+ return 1;
}
int EVP_DecryptFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl)
@@ -234,7 +262,7 @@ int EVP_DecryptFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl)
EVPerr(EVP_F_EVP_DECRYPTFINAL,EVP_R_WRONG_FINAL_BLOCK_LENGTH);
return(0);
}
- EVP_EncryptUpdate(ctx,ctx->buf,&n,ctx->buf,0);
+ if(!EVP_EncryptUpdate(ctx,ctx->buf,&n,ctx->buf,0)) return 0;
if (n != b)
return(0);
n=ctx->buf[b-1];
@@ -261,10 +289,24 @@ int EVP_DecryptFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl)
return(1);
}
-void EVP_CIPHER_CTX_cleanup(EVP_CIPHER_CTX *c)
+int EVP_CIPHER_CTX_cleanup(EVP_CIPHER_CTX *c)
{
if ((c->cipher != NULL) && (c->cipher->cleanup != NULL))
- c->cipher->cleanup(c);
+ {
+ if(!c->cipher->cleanup(c)) return 0;
+ }
memset(c,0,sizeof(EVP_CIPHER_CTX));
+ return 1;
}
+int EVP_CIPHER_CTX_set_key_length(EVP_CIPHER_CTX *c, int keylen)
+ {
+ if(c->key_len == keylen) return 1;
+ if((keylen > 0) && (c->cipher->flags & EVP_CIPH_VARIABLE_LENGTH))
+ {
+ c->key_len = keylen;
+ return 1;
+ }
+ EVPerr(EVP_F_EVP_CIPHER_CTX_SET_KEY_LENGTH,EVP_R_INVALID_KEY_LENGTH);
+ return 0;
+ }
diff --git a/crypto/evp/evp_err.c b/crypto/evp/evp_err.c
index fc149cbb1a..d48d9442b2 100644
--- a/crypto/evp/evp_err.c
+++ b/crypto/evp/evp_err.c
@@ -67,6 +67,8 @@
static ERR_STRING_DATA EVP_str_functs[]=
{
{ERR_PACK(0,EVP_F_D2I_PKEY,0), "D2I_PKEY"},
+{ERR_PACK(0,EVP_F_EVP_CIPHERINIT,0), "EVP_CipherInit"},
+{ERR_PACK(0,EVP_F_EVP_CIPHER_CTX_SET_KEY_LENGTH,0), "EVP_CIPHER_CTX_set_key_length"},
{ERR_PACK(0,EVP_F_EVP_DECRYPTFINAL,0), "EVP_DecryptFinal"},
{ERR_PACK(0,EVP_F_EVP_MD_CTX_COPY,0), "EVP_MD_CTX_copy"},
{ERR_PACK(0,EVP_F_EVP_OPENINIT,0), "EVP_OpenInit"},
@@ -104,9 +106,11 @@ static ERR_STRING_DATA EVP_str_reasons[]=
{EVP_R_EXPECTING_A_DH_KEY ,"expecting a dh key"},
{EVP_R_EXPECTING_A_DSA_KEY ,"expecting a dsa key"},
{EVP_R_INPUT_NOT_INITIALIZED ,"input not initialized"},
+{EVP_R_INVALID_KEY_LENGTH ,"invalid key length"},
{EVP_R_IV_TOO_LARGE ,"iv too large"},
{EVP_R_KEYGEN_FAILURE ,"keygen failure"},
{EVP_R_MISSING_PARAMETERS ,"missing parameters"},
+{EVP_R_NO_CIPHER_SET ,"no cipher set"},
{EVP_R_NO_DSA_PARAMETERS ,"no dsa parameters"},
{EVP_R_NO_SIGN_FUNCTION_CONFIGURED ,"no sign function configured"},
{EVP_R_NO_VERIFY_FUNCTION_CONFIGURED ,"no verify function configured"},