svn rev #23090: trunk/src/lib/crypto/openssl/ aes/ arcfour/ des/ enc_provider/ ...
tsitkova@MIT.EDU
tsitkova at MIT.EDU
Thu Oct 29 17:36:48 EDT 2009
http://src.mit.edu/fisheye/changelog/krb5/?cs=23090
Commit By: tsitkova
Log Message:
Corrected Copyrights and some minor reorganization in openssl impl.
Changed Files:
U trunk/src/lib/crypto/openssl/aes/Makefile.in
D trunk/src/lib/crypto/openssl/aes/aes-gen.c
D trunk/src/lib/crypto/openssl/aes/aes.h
U trunk/src/lib/crypto/openssl/aes/aes_s2k.c
D trunk/src/lib/crypto/openssl/aes/aescpp.h
D trunk/src/lib/crypto/openssl/aes/aescrypt.c
D trunk/src/lib/crypto/openssl/aes/aeskey.c
D trunk/src/lib/crypto/openssl/aes/aesopt.h
D trunk/src/lib/crypto/openssl/aes/aestab.c
U trunk/src/lib/crypto/openssl/aes/deps
D trunk/src/lib/crypto/openssl/aes/uitypes.h
U trunk/src/lib/crypto/openssl/arcfour/arcfour_aead.c
U trunk/src/lib/crypto/openssl/des/Makefile.in
D trunk/src/lib/crypto/openssl/des/afsstring2key.c
D trunk/src/lib/crypto/openssl/des/d3_aead.c
D trunk/src/lib/crypto/openssl/des/d3_cbc.c
D trunk/src/lib/crypto/openssl/des/d3_kysched.c
U trunk/src/lib/crypto/openssl/des/deps
U trunk/src/lib/crypto/openssl/des/des_int.h
A trunk/src/lib/crypto/openssl/des/des_oldapis.c
D trunk/src/lib/crypto/openssl/des/f_aead.c
D trunk/src/lib/crypto/openssl/des/f_cbc.c
D trunk/src/lib/crypto/openssl/des/f_cksum.c
U trunk/src/lib/crypto/openssl/des/f_parity.c
D trunk/src/lib/crypto/openssl/des/f_sched.c
D trunk/src/lib/crypto/openssl/des/key_sched.c
U trunk/src/lib/crypto/openssl/des/string2key.c
U trunk/src/lib/crypto/openssl/enc_provider/aes.c
U trunk/src/lib/crypto/openssl/enc_provider/deps
U trunk/src/lib/crypto/openssl/enc_provider/des.c
U trunk/src/lib/crypto/openssl/enc_provider/des3.c
U trunk/src/lib/crypto/openssl/enc_provider/rc4.c
U trunk/src/lib/crypto/openssl/hmac.c
U trunk/src/lib/crypto/openssl/md4/md4.c
U trunk/src/lib/crypto/openssl/md5/md5.c
U trunk/src/lib/crypto/openssl/md5/rsa-md5.h
U trunk/src/lib/crypto/openssl/pbkdf2.c
U trunk/src/lib/crypto/openssl/sha1/shs.c
Modified: trunk/src/lib/crypto/openssl/aes/Makefile.in
===================================================================
--- trunk/src/lib/crypto/openssl/aes/Makefile.in 2009-10-29 18:46:52 UTC (rev 23089)
+++ trunk/src/lib/crypto/openssl/aes/Makefile.in 2009-10-29 21:36:47 UTC (rev 23090)
@@ -13,27 +13,14 @@
PROG_RPATH=$(KRB5_LIBDIR)
STLIBOBJS=\
- aescrypt.o \
- aestab.o \
- aeskey.o \
aes_s2k.o
OBJS=\
- $(OUTPRE)aescrypt.$(OBJEXT) \
- $(OUTPRE)aestab.$(OBJEXT) \
- $(OUTPRE)aeskey.$(OBJEXT) \
$(OUTPRE)aes_s2k.$(OBJEXT)
SRCS=\
- $(srcdir)/aescrypt.c \
- $(srcdir)/aestab.c \
- $(srcdir)/aeskey.c \
$(srcdir)/aes_s2k.c
-GEN_OBJS=\
- $(OUTPRE)aescrypt.$(OBJEXT) \
- $(OUTPRE)aestab.$(OBJEXT) \
- $(OUTPRE)aeskey.$(OBJEXT)
##DOS##LIBOBJS = $(OBJS)
Modified: trunk/src/lib/crypto/openssl/aes/aes_s2k.c
===================================================================
--- trunk/src/lib/crypto/openssl/aes/aes_s2k.c 2009-10-29 18:46:52 UTC (rev 23089)
+++ trunk/src/lib/crypto/openssl/aes/aes_s2k.c 2009-10-29 21:36:47 UTC (rev 23090)
@@ -1,7 +1,7 @@
/*
* lib/crypto/openssl/aes/aes_s2k.c
*
- * Copyright 2003 by the Massachusetts Institute of Technology.
+ * Copyright 2003, 2009 by the Massachusetts Institute of Technology.
* All Rights Reserved.
*
* Export of this software from the United States of America may
Modified: trunk/src/lib/crypto/openssl/aes/deps
===================================================================
--- trunk/src/lib/crypto/openssl/aes/deps 2009-10-29 18:46:52 UTC (rev 23089)
+++ trunk/src/lib/crypto/openssl/aes/deps 2009-10-29 21:36:47 UTC (rev 23090)
@@ -1,16 +1,6 @@
#
# Generated makefile dependencies follow.
#
-aescrypt.so aescrypt.po $(OUTPRE)aescrypt.$(OBJEXT): \
- $(BUILDTOP)/include/autoconf.h $(srcdir)/aes.h \
- $(srcdir)/aescrypt.c $(srcdir)/aesopt.h \
- $(srcdir)/uitypes.h
-aestab.so aestab.po $(OUTPRE)aestab.$(OBJEXT): $(BUILDTOP)/include/autoconf.h \
- $(srcdir)/aes.h $(srcdir)/aesopt.h \
- $(srcdir)/aestab.c $(srcdir)/uitypes.h
-aeskey.so aeskey.po $(OUTPRE)aeskey.$(OBJEXT): $(BUILDTOP)/include/autoconf.h \
- $(srcdir)/aes.h $(srcdir)/aeskey.c \
- $(srcdir)/aesopt.h $(srcdir)/uitypes.h
aes_s2k.so aes_s2k.po $(OUTPRE)aes_s2k.$(OBJEXT): $(BUILDTOP)/include/autoconf.h \
$(BUILDTOP)/include/krb5/krb5.h $(BUILDTOP)/include/osconf.h \
$(BUILDTOP)/include/profile.h $(COM_ERR_DEPS) $(SRCTOP)/include/k5-buf.h \
Modified: trunk/src/lib/crypto/openssl/arcfour/arcfour_aead.c
===================================================================
--- trunk/src/lib/crypto/openssl/arcfour/arcfour_aead.c 2009-10-29 18:46:52 UTC (rev 23089)
+++ trunk/src/lib/crypto/openssl/arcfour/arcfour_aead.c 2009-10-29 21:36:47 UTC (rev 23090)
@@ -1,7 +1,7 @@
/*
* lib/crypto/arcfour/arcfour_aead.c
*
- * Copyright 2008 by the Massachusetts Institute of Technology.
+ * Copyright 2008, 2009 by the Massachusetts Institute of Technology.
* All Rights Reserved.
*
* Export of this software from the United States of America may
Modified: trunk/src/lib/crypto/openssl/des/Makefile.in
===================================================================
--- trunk/src/lib/crypto/openssl/des/Makefile.in 2009-10-29 18:46:52 UTC (rev 23089)
+++ trunk/src/lib/crypto/openssl/des/Makefile.in 2009-10-29 21:36:47 UTC (rev 23090)
@@ -14,54 +14,24 @@
PROG_RPATH=$(KRB5_LIBDIR)
-STLIBOBJS=\
- afsstring2key.o \
- d3_cbc.o \
- d3_aead.o \
- d3_kysched.o \
- f_aead.o \
- f_cbc.o \
- f_cksum.o \
+STLIBOBJS= des_oldapis.o \
f_parity.o \
- f_sched.o \
- key_sched.o \
string2key.o \
weak_key.o
-OBJS= $(OUTPRE)afsstring2key.$(OBJEXT) \
- $(OUTPRE)d3_cbc.$(OBJEXT) \
- $(OUTPRE)d3_aead.$(OBJEXT) \
- $(OUTPRE)d3_kysched.$(OBJEXT) \
- $(OUTPRE)f_aead.$(OBJEXT) \
- $(OUTPRE)f_cbc.$(OBJEXT) \
- $(OUTPRE)f_cksum.$(OBJEXT) \
- $(OUTPRE)f_parity.$(OBJEXT) \
- $(OUTPRE)f_sched.$(OBJEXT) \
- $(OUTPRE)key_sched.$(OBJEXT) \
+OBJS= $(OUTPRE)f_parity.$(OBJEXT) \
+ $(OUTPRE)des_oldapis.$(OBJEXT) \
$(OUTPRE)string2key.$(OBJEXT) \
$(OUTPRE)weak_key.$(OBJEXT)
-SRCS= $(srcdir)/afsstring2key.c \
- $(srcdir)/d3_cbc.c \
- $(srcdir)/d3_aead.c \
- $(srcdir)/d3_kysched.c \
- $(srcdir)/f_aead.c \
- $(srcdir)/f_cbc.c \
- $(srcdir)/f_cksum.c \
- $(srcdir)/f_parity.c \
- $(srcdir)/f_sched.c \
- $(srcdir)/key_sched.c \
+SRCS= $(srcdir)/f_parity.c \
+ $(srcdir)/des_oldapis.c \
$(srcdir)/weak_key.c \
$(srcdir)/string2key.c
##DOS##LIBOBJS = $(OBJS)
-TOBJS = $(OUTPRE)key_sched.$(OBJEXT) $(OUTPRE)f_sched.$(OBJEXT) \
- $(OUTPRE)f_cbc.$(OBJEXT) \
- $(OUTPRE)f_cksum.$(OBJEXT)
-
-
all-unix:: all-libobjs
check-unix::
Modified: trunk/src/lib/crypto/openssl/des/deps
===================================================================
--- trunk/src/lib/crypto/openssl/des/deps 2009-10-29 18:46:52 UTC (rev 23089)
+++ trunk/src/lib/crypto/openssl/des/deps 2009-10-29 21:36:47 UTC (rev 23090)
@@ -1,85 +1,6 @@
#
# Generated makefile dependencies follow.
#
-afsstring2key.so afsstring2key.po $(OUTPRE)afsstring2key.$(OBJEXT): \
- $(BUILDTOP)/include/autoconf.h $(BUILDTOP)/include/krb5/krb5.h \
- $(BUILDTOP)/include/osconf.h $(BUILDTOP)/include/profile.h \
- $(COM_ERR_DEPS) $(SRCTOP)/include/k5-buf.h $(SRCTOP)/include/k5-err.h \
- $(SRCTOP)/include/k5-gmt_mktime.h $(SRCTOP)/include/k5-int-pkinit.h \
- $(SRCTOP)/include/k5-int.h $(SRCTOP)/include/k5-platform.h \
- $(SRCTOP)/include/k5-plugin.h $(SRCTOP)/include/k5-thread.h \
- $(SRCTOP)/include/krb5.h $(SRCTOP)/include/krb5/authdata_plugin.h \
- $(SRCTOP)/include/krb5/locate_plugin.h $(SRCTOP)/include/krb5/preauth_plugin.h \
- $(SRCTOP)/include/port-sockets.h $(SRCTOP)/include/socket-utils.h \
- $(srcdir)/afsstring2key.c $(srcdir)/des_int.h
-d3_cbc.so d3_cbc.po $(OUTPRE)d3_cbc.$(OBJEXT): $(BUILDTOP)/include/autoconf.h \
- $(BUILDTOP)/include/krb5/krb5.h $(BUILDTOP)/include/osconf.h \
- $(BUILDTOP)/include/profile.h $(COM_ERR_DEPS) $(SRCTOP)/include/k5-buf.h \
- $(SRCTOP)/include/k5-err.h $(SRCTOP)/include/k5-gmt_mktime.h \
- $(SRCTOP)/include/k5-int-pkinit.h $(SRCTOP)/include/k5-int.h \
- $(SRCTOP)/include/k5-platform.h $(SRCTOP)/include/k5-plugin.h \
- $(SRCTOP)/include/k5-thread.h $(SRCTOP)/include/krb5.h \
- $(SRCTOP)/include/krb5/authdata_plugin.h $(SRCTOP)/include/krb5/locate_plugin.h \
- $(SRCTOP)/include/krb5/preauth_plugin.h $(SRCTOP)/include/port-sockets.h \
- $(SRCTOP)/include/socket-utils.h $(srcdir)/d3_cbc.c \
- $(srcdir)/des_int.h
-d3_aead.so d3_aead.po $(OUTPRE)d3_aead.$(OBJEXT): $(BUILDTOP)/include/autoconf.h \
- $(BUILDTOP)/include/krb5/krb5.h $(BUILDTOP)/include/osconf.h \
- $(BUILDTOP)/include/profile.h $(COM_ERR_DEPS) $(SRCTOP)/include/k5-buf.h \
- $(SRCTOP)/include/k5-err.h $(SRCTOP)/include/k5-gmt_mktime.h \
- $(SRCTOP)/include/k5-int-pkinit.h $(SRCTOP)/include/k5-int.h \
- $(SRCTOP)/include/k5-platform.h $(SRCTOP)/include/k5-plugin.h \
- $(SRCTOP)/include/k5-thread.h $(SRCTOP)/include/krb5.h \
- $(SRCTOP)/include/krb5/authdata_plugin.h $(SRCTOP)/include/krb5/locate_plugin.h \
- $(SRCTOP)/include/krb5/preauth_plugin.h $(SRCTOP)/include/port-sockets.h \
- $(SRCTOP)/include/socket-utils.h $(srcdir)/d3_aead.c \
- $(srcdir)/des_int.h \
- $(srcdir)/../../krb/aead.h $(srcdir)/../../krb/cksumtypes.h
-d3_kysched.so d3_kysched.po $(OUTPRE)d3_kysched.$(OBJEXT): \
- $(BUILDTOP)/include/autoconf.h $(BUILDTOP)/include/krb5/krb5.h \
- $(BUILDTOP)/include/osconf.h $(BUILDTOP)/include/profile.h \
- $(COM_ERR_DEPS) $(SRCTOP)/include/k5-buf.h $(SRCTOP)/include/k5-err.h \
- $(SRCTOP)/include/k5-gmt_mktime.h $(SRCTOP)/include/k5-int-pkinit.h \
- $(SRCTOP)/include/k5-int.h $(SRCTOP)/include/k5-platform.h \
- $(SRCTOP)/include/k5-plugin.h $(SRCTOP)/include/k5-thread.h \
- $(SRCTOP)/include/krb5.h $(SRCTOP)/include/krb5/authdata_plugin.h \
- $(SRCTOP)/include/krb5/locate_plugin.h $(SRCTOP)/include/krb5/preauth_plugin.h \
- $(SRCTOP)/include/port-sockets.h $(SRCTOP)/include/socket-utils.h \
- $(srcdir)/d3_kysched.c $(srcdir)/des_int.h
-f_aead.so f_aead.po $(OUTPRE)f_aead.$(OBJEXT): $(BUILDTOP)/include/autoconf.h \
- $(BUILDTOP)/include/krb5/krb5.h $(BUILDTOP)/include/osconf.h \
- $(BUILDTOP)/include/profile.h $(COM_ERR_DEPS) $(SRCTOP)/include/k5-buf.h \
- $(SRCTOP)/include/k5-err.h $(SRCTOP)/include/k5-gmt_mktime.h \
- $(SRCTOP)/include/k5-int-pkinit.h $(SRCTOP)/include/k5-int.h \
- $(SRCTOP)/include/k5-platform.h $(SRCTOP)/include/k5-plugin.h \
- $(SRCTOP)/include/k5-thread.h $(SRCTOP)/include/krb5.h \
- $(SRCTOP)/include/krb5/authdata_plugin.h $(SRCTOP)/include/krb5/locate_plugin.h \
- $(SRCTOP)/include/krb5/preauth_plugin.h $(SRCTOP)/include/port-sockets.h \
- $(SRCTOP)/include/socket-utils.h $(srcdir)/des_int.h \
- $(srcdir)/f_aead.c \
- $(srcdir)/../../krb/aead.h $(srcdir)/../../krb/cksumtypes.h
-f_cbc.so f_cbc.po $(OUTPRE)f_cbc.$(OBJEXT): $(BUILDTOP)/include/autoconf.h \
- $(BUILDTOP)/include/krb5/krb5.h $(BUILDTOP)/include/osconf.h \
- $(BUILDTOP)/include/profile.h $(COM_ERR_DEPS) $(SRCTOP)/include/k5-buf.h \
- $(SRCTOP)/include/k5-err.h $(SRCTOP)/include/k5-gmt_mktime.h \
- $(SRCTOP)/include/k5-int-pkinit.h $(SRCTOP)/include/k5-int.h \
- $(SRCTOP)/include/k5-platform.h $(SRCTOP)/include/k5-plugin.h \
- $(SRCTOP)/include/k5-thread.h $(SRCTOP)/include/krb5.h \
- $(SRCTOP)/include/krb5/authdata_plugin.h $(SRCTOP)/include/krb5/locate_plugin.h \
- $(SRCTOP)/include/krb5/preauth_plugin.h $(SRCTOP)/include/port-sockets.h \
- $(SRCTOP)/include/socket-utils.h $(srcdir)/des_int.h \
- $(srcdir)/f_cbc.c
-f_cksum.so f_cksum.po $(OUTPRE)f_cksum.$(OBJEXT): $(BUILDTOP)/include/autoconf.h \
- $(BUILDTOP)/include/krb5/krb5.h $(BUILDTOP)/include/osconf.h \
- $(BUILDTOP)/include/profile.h $(COM_ERR_DEPS) $(SRCTOP)/include/k5-buf.h \
- $(SRCTOP)/include/k5-err.h $(SRCTOP)/include/k5-gmt_mktime.h \
- $(SRCTOP)/include/k5-int-pkinit.h $(SRCTOP)/include/k5-int.h \
- $(SRCTOP)/include/k5-platform.h $(SRCTOP)/include/k5-plugin.h \
- $(SRCTOP)/include/k5-thread.h $(SRCTOP)/include/krb5.h \
- $(SRCTOP)/include/krb5/authdata_plugin.h $(SRCTOP)/include/krb5/locate_plugin.h \
- $(SRCTOP)/include/krb5/preauth_plugin.h $(SRCTOP)/include/port-sockets.h \
- $(SRCTOP)/include/socket-utils.h $(srcdir)/des_int.h \
- $(srcdir)/f_cksum.c
f_parity.so f_parity.po $(OUTPRE)f_parity.$(OBJEXT): \
$(BUILDTOP)/include/autoconf.h $(BUILDTOP)/include/krb5/krb5.h \
$(BUILDTOP)/include/osconf.h $(BUILDTOP)/include/profile.h \
@@ -91,7 +12,7 @@
$(SRCTOP)/include/krb5/locate_plugin.h $(SRCTOP)/include/krb5/preauth_plugin.h \
$(SRCTOP)/include/port-sockets.h $(SRCTOP)/include/socket-utils.h \
$(srcdir)/des_int.h $(srcdir)/f_parity.c
-f_sched.so f_sched.po $(OUTPRE)f_sched.$(OBJEXT): $(BUILDTOP)/include/autoconf.h \
+des_oldapis.so des_oldapis.po $(OUTPRE)des_oldapis.$(OBJEXT): $(BUILDTOP)/include/autoconf.h \
$(BUILDTOP)/include/krb5/krb5.h $(BUILDTOP)/include/osconf.h \
$(BUILDTOP)/include/profile.h $(COM_ERR_DEPS) $(SRCTOP)/include/k5-buf.h \
$(SRCTOP)/include/k5-err.h $(SRCTOP)/include/k5-gmt_mktime.h \
@@ -101,18 +22,7 @@
$(SRCTOP)/include/krb5/authdata_plugin.h $(SRCTOP)/include/krb5/locate_plugin.h \
$(SRCTOP)/include/krb5/preauth_plugin.h $(SRCTOP)/include/port-sockets.h \
$(SRCTOP)/include/socket-utils.h $(srcdir)/des_int.h \
- $(srcdir)/f_sched.c
-key_sched.so key_sched.po $(OUTPRE)key_sched.$(OBJEXT): \
- $(BUILDTOP)/include/autoconf.h $(BUILDTOP)/include/krb5/krb5.h \
- $(BUILDTOP)/include/osconf.h $(BUILDTOP)/include/profile.h \
- $(COM_ERR_DEPS) $(SRCTOP)/include/k5-buf.h $(SRCTOP)/include/k5-err.h \
- $(SRCTOP)/include/k5-gmt_mktime.h $(SRCTOP)/include/k5-int-pkinit.h \
- $(SRCTOP)/include/k5-int.h $(SRCTOP)/include/k5-platform.h \
- $(SRCTOP)/include/k5-plugin.h $(SRCTOP)/include/k5-thread.h \
- $(SRCTOP)/include/krb5.h $(SRCTOP)/include/krb5/authdata_plugin.h \
- $(SRCTOP)/include/krb5/locate_plugin.h $(SRCTOP)/include/krb5/preauth_plugin.h \
- $(SRCTOP)/include/port-sockets.h $(SRCTOP)/include/socket-utils.h \
- $(srcdir)/des_int.h $(srcdir)/key_sched.c
+ $(srcdir)/des_oldapis.c
weak_key.so weak_key.po $(OUTPRE)weak_key.$(OBJEXT): \
$(BUILDTOP)/include/autoconf.h $(BUILDTOP)/include/krb5/krb5.h \
$(BUILDTOP)/include/osconf.h $(BUILDTOP)/include/profile.h \
@@ -135,13 +45,3 @@
$(SRCTOP)/include/krb5/locate_plugin.h $(SRCTOP)/include/krb5/preauth_plugin.h \
$(SRCTOP)/include/port-sockets.h $(SRCTOP)/include/socket-utils.h \
$(srcdir)/des_int.h $(srcdir)/string2key.c
-destest.so destest.po $(OUTPRE)destest.$(OBJEXT): $(BUILDTOP)/include/autoconf.h \
- $(BUILDTOP)/include/krb5/krb5.h $(BUILDTOP)/include/osconf.h \
- $(BUILDTOP)/include/profile.h $(COM_ERR_DEPS) $(SRCTOP)/include/k5-buf.h \
- $(SRCTOP)/include/k5-err.h $(SRCTOP)/include/k5-gmt_mktime.h \
- $(SRCTOP)/include/k5-int-pkinit.h $(SRCTOP)/include/k5-int.h \
- $(SRCTOP)/include/k5-platform.h $(SRCTOP)/include/k5-plugin.h \
- $(SRCTOP)/include/k5-thread.h $(SRCTOP)/include/krb5.h \
- $(SRCTOP)/include/krb5/authdata_plugin.h $(SRCTOP)/include/krb5/locate_plugin.h \
- $(SRCTOP)/include/krb5/preauth_plugin.h $(SRCTOP)/include/port-sockets.h \
- $(SRCTOP)/include/socket-utils.h des_int.h destest.c
Modified: trunk/src/lib/crypto/openssl/des/des_int.h
===================================================================
--- trunk/src/lib/crypto/openssl/des/des_int.h 2009-10-29 18:46:52 UTC (rev 23089)
+++ trunk/src/lib/crypto/openssl/des/des_int.h 2009-10-29 21:36:47 UTC (rev 23090)
@@ -1,7 +1,7 @@
/*
* lib/crypto/des/des_int.h
*
- * Copyright 1987, 1988, 1990, 2002 by the Massachusetts Institute of
+ * Copyright 1987, 1988, 1990, 2002, 2009 by the Massachusetts Institute of
* Technology. All Rights Reserved.
*
* Export of this software from the United States of America may
@@ -153,65 +153,13 @@
* End "mit-des.h"
*/
-/* afsstring2key.c */
-extern krb5_error_code mit_afs_string_to_key
- (krb5_keyblock *keyblock,
- const krb5_data *data,
- const krb5_data *salt);
-extern char *mit_afs_crypt
- (const char *pw, const char *salt, char *iobuf);
-
-/* f_cksum.c */
-extern unsigned long mit_des_cbc_cksum
- (const krb5_octet *, krb5_octet *, unsigned long ,
- const mit_des_key_schedule, const krb5_octet *);
-
-/* f_ecb.c */
-extern int mit_des_ecb_encrypt
- (const mit_des_cblock *, mit_des_cblock *, mit_des_key_schedule , int );
-
-/* f_cbc.c */
-extern int mit_des_cbc_encrypt (const mit_des_cblock *in,
- mit_des_cblock *out,
- unsigned long length,
- const mit_des_key_schedule schedule,
- const mit_des_cblock ivec, int enc);
-
#define mit_des_zeroblock krb5int_c_mit_des_zeroblock
extern const mit_des_cblock mit_des_zeroblock;
-/* fin_rndkey.c */
-extern krb5_error_code mit_des_finish_random_key
- ( const krb5_encrypt_block *,
- krb5_pointer *);
-
-/* finish_key.c */
-extern krb5_error_code mit_des_finish_key
- ( krb5_encrypt_block *);
-
-/* init_rkey.c */
-extern krb5_error_code mit_des_init_random_key
- ( const krb5_encrypt_block *,
- const krb5_keyblock *,
- krb5_pointer *);
-
/* key_parity.c */
extern void mit_des_fixup_key_parity (mit_des_cblock );
extern int mit_des_check_key_parity (mit_des_cblock );
-/* key_sched.c */
-extern int mit_des_key_sched
- (mit_des_cblock , mit_des_key_schedule );
-
-/* process_ky.c */
-extern krb5_error_code mit_des_process_key
- ( krb5_encrypt_block *, const krb5_keyblock *);
-
-/* random_key.c */
-extern krb5_error_code mit_des_random_key
- ( const krb5_encrypt_block *, krb5_pointer ,
- krb5_keyblock **);
-
/* string2key.c */
extern krb5_error_code mit_des_string_to_key
( const krb5_encrypt_block *,
@@ -222,18 +170,6 @@
/* weak_key.c */
extern int mit_des_is_weak_key (mit_des_cblock );
-/* cmb_keys.c */
-krb5_error_code mit_des_combine_subkeys
- (const krb5_keyblock *, const krb5_keyblock *,
- krb5_keyblock **);
-
-/* f_pcbc.c */
-int mit_des_pcbc_encrypt ();
-
-/* f_sched.c */
-int mit_des_make_key_sched(mit_des_cblock, mit_des_key_schedule);
-
-
/* misc.c */
extern void swap_bits (char *);
extern unsigned long long_swap_bits (unsigned long );
@@ -249,129 +185,4 @@
/* XXX depends on FILE being a #define! */
extern void test_set (FILE *, const char *, int, const char *, int);
#endif
-
-/* d3_ecb.c */
-extern int mit_des3_ecb_encrypt
- (const mit_des_cblock *in,
- mit_des_cblock *out,
- mit_des_key_schedule sched1,
- mit_des_key_schedule sched2,
- mit_des_key_schedule sched3,
- int enc);
-
-/* d3_cbc.c */
-extern int mit_des3_cbc_encrypt
- (const mit_des_cblock *in,
- mit_des_cblock *out,
- unsigned long length,
- const mit_des_key_schedule ks1,
- const mit_des_key_schedule ks2,
- const mit_des_key_schedule ks3,
- const mit_des_cblock ivec,
- int enc);
-
-void
-krb5int_des3_cbc_encrypt(const mit_des_cblock *in,
- mit_des_cblock *out,
- unsigned long length,
- const mit_des_key_schedule ks1,
- const mit_des_key_schedule ks2,
- const mit_des_key_schedule ks3,
- const mit_des_cblock ivec);
-void
-krb5int_des3_cbc_decrypt(const mit_des_cblock *in,
- mit_des_cblock *out,
- unsigned long length,
- const mit_des_key_schedule ks1,
- const mit_des_key_schedule ks2,
- const mit_des_key_schedule ks3,
- const mit_des_cblock ivec);
-
-void
-krb5int_des3_cbc_encrypt_iov(krb5_crypto_iov *data,
- unsigned long num_data,
- const mit_des_key_schedule ks1,
- const mit_des_key_schedule ks2,
- const mit_des_key_schedule ks3,
- mit_des_cblock ivec);
-
-void
-krb5int_des3_cbc_decrypt_iov(krb5_crypto_iov *data,
- unsigned long num_data,
- const mit_des_key_schedule ks1,
- const mit_des_key_schedule ks2,
- const mit_des_key_schedule ks3,
- mit_des_cblock ivec);
-
-#define mit_des3_cbc_encrypt(in,out,length,ks1,ks2,ks3,ivec,enc) \
- ((enc ? krb5int_des3_cbc_encrypt : krb5int_des3_cbc_decrypt) \
- (in, out, length, ks1, ks2, ks3, ivec), 0)
-
-void
-krb5int_des_cbc_encrypt(const mit_des_cblock *in,
- mit_des_cblock *out,
- unsigned long length,
- const mit_des_key_schedule schedule,
- const mit_des_cblock ivec);
-void
-krb5int_des_cbc_decrypt(const mit_des_cblock *in,
- mit_des_cblock *out,
- unsigned long length,
- const mit_des_key_schedule schedule,
- const mit_des_cblock ivec);
-
-#define mit_des_cbc_encrypt(in,out,length,schedule,ivec,enc) \
- ((enc ? krb5int_des_cbc_encrypt : krb5int_des_cbc_decrypt) \
- (in, out, length, schedule, ivec), 0)
-
-void
-krb5int_des_cbc_encrypt_iov(krb5_crypto_iov *data,
- unsigned long num_data,
- const mit_des_key_schedule schedule,
- mit_des_cblock ivec);
-
-void
-krb5int_des_cbc_decrypt_iov(krb5_crypto_iov *data,
- unsigned long num_data,
- const mit_des_key_schedule schedule,
- mit_des_cblock ivec);
-
-/* d3_procky.c */
-extern krb5_error_code mit_des3_process_key
- (krb5_encrypt_block * eblock,
- const krb5_keyblock * keyblock);
-
-/* d3_kysched.c */
-extern int mit_des3_key_sched
- (mit_des3_cblock key,
- mit_des3_key_schedule schedule);
-
-/* d3_str2ky.c */
-extern krb5_error_code mit_des3_string_to_key
- (const krb5_encrypt_block * eblock,
- krb5_keyblock * keyblock,
- const krb5_data * data,
- const krb5_data * salt);
-
-/* u_nfold.c */
-extern krb5_error_code mit_des_n_fold
- (const krb5_octet * input,
- const size_t in_len,
- krb5_octet * output,
- const size_t out_len);
-
-/* u_rn_key.c */
-extern int mit_des_is_weak_keyblock
- (krb5_keyblock *keyblock);
-
-extern void mit_des_fixup_keyblock_parity
- (krb5_keyblock *keyblock);
-
-extern krb5_error_code mit_des_set_random_generator_seed
- (const krb5_data * seed,
- krb5_pointer random_state);
-
-extern krb5_error_code mit_des_set_random_sequence_number
- (const krb5_data * sequence,
- krb5_pointer random_state);
#endif /*DES_INTERNAL_DEFS*/
Copied: trunk/src/lib/crypto/openssl/des/des_oldapis.c (from rev 23088, trunk/src/lib/crypto/openssl/des/f_cksum.c)
===================================================================
--- trunk/src/lib/crypto/openssl/des/des_oldapis.c (rev 0)
+++ trunk/src/lib/crypto/openssl/des/des_oldapis.c 2009-10-29 21:36:47 UTC (rev 23090)
@@ -0,0 +1,56 @@
+/*
+ * lib/crypto/openssl/des/des_oldapis.c
+ *
+ * Copyright (C) 2009 by the Massachusetts Institute of Technology.
+ * All rights reserved.
+ *
+ * Export of this software from the United States of America may
+ * require a specific license from the United States Government.
+ * It is the responsibility of any person or organization contemplating
+ * export to obtain such a license before exporting.
+ *
+ * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
+ * distribute this software and its documentation for any purpose and
+ * without fee is hereby granted, provided that the above copyright
+ * notice appear in all copies and that both that copyright notice and
+ * this permission notice appear in supporting documentation, and that
+ * the name of M.I.T. not be used in advertising or publicity pertaining
+ * to distribution of the software without specific, written prior
+ * permission. Furthermore if you modify this software you must label
+ * your software as modified software and not distribute it in such a
+ * fashion that it might be confused with the original M.I.T. software.
+ * M.I.T. makes no representations about the suitability of
+ * this software for any purpose. It is provided "as is" without express
+ * or implied warranty.
+ *
+ */
+
+#include "k5-int.h"
+#include "des_int.h"
+#include <ctype.h>
+
+const mit_des_cblock mit_des_zeroblock /* = all zero */;
+
+unsigned long
+mit_des_cbc_cksum(const krb5_octet *in, krb5_octet *out,
+ unsigned long length, const mit_des_key_schedule schedule,
+ const krb5_octet *ivec)
+{
+ /* Unsupported operation */
+ return KRB5_CRYPTO_INTERNAL;
+}
+
+krb5_error_code
+mit_afs_string_to_key (krb5_keyblock *keyblock, const krb5_data *data,
+ const krb5_data *salt)
+{
+ return KRB5_CRYPTO_INTERNAL;
+}
+
+int
+mit_des_key_sched(mit_des_cblock k, mit_des_key_schedule schedule)
+{
+ /* Unsupported operation */
+ return KRB5_CRYPTO_INTERNAL;
+}
+
Added: svn:mergeinfo
+
Modified: trunk/src/lib/crypto/openssl/des/f_parity.c
===================================================================
--- trunk/src/lib/crypto/openssl/des/f_parity.c 2009-10-29 18:46:52 UTC (rev 23089)
+++ trunk/src/lib/crypto/openssl/des/f_parity.c 2009-10-29 21:36:47 UTC (rev 23090)
@@ -3,6 +3,25 @@
*
* Copyright (C) 2009 by the Massachusetts Institute of Technology.
* All rights reserved.
+ *
+ * Export of this software from the United States of America may
+ * require a specific license from the United States Government.
+ * It is the responsibility of any person or organization contemplating
+ * export to obtain such a license before exporting.
+ *
+ * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
+ * distribute this software and its documentation for any purpose and
+ * without fee is hereby granted, provided that the above copyright
+ * notice appear in all copies and that both that copyright notice and
+ * this permission notice appear in supporting documentation, and that
+ * the name of M.I.T. not be used in advertising or publicity pertaining
+ * to distribution of the software without specific, written prior
+ * permission. Furthermore if you modify this software you must label
+ * your software as modified software and not distribute it in such a
+ * fashion that it might be confused with the original M.I.T. software.
+ * M.I.T. makes no representations about the suitability of
+ * this software for any purpose. It is provided "as is" without express
+ * or implied warranty.
*/
#include "des_int.h"
Modified: trunk/src/lib/crypto/openssl/des/string2key.c
===================================================================
--- trunk/src/lib/crypto/openssl/des/string2key.c 2009-10-29 18:46:52 UTC (rev 23089)
+++ trunk/src/lib/crypto/openssl/des/string2key.c 2009-10-29 21:36:47 UTC (rev 23090)
@@ -1,10 +1,27 @@
/*
* lib/crypto/openssl/des/string2key.c
*
- * Copyright 2009 by the Massachusetts Institute
- * of Technology.
- * All Rights Reserved.
+ * Copyright (C) 2009 by the Massachusetts Institute of Technology.
+ * All rights reserved.
*
+ * Export of this software from the United States of America may
+ * require a specific license from the United States Government.
+ * It is the responsibility of any person or organization contemplating
+ * export to obtain such a license before exporting.
+ *
+ * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
+ * distribute this software and its documentation for any purpose and
+ * without fee is hereby granted, provided that the above copyright
+ * notice appear in all copies and that both that copyright notice and
+ * this permission notice appear in supporting documentation, and that
+ * the name of M.I.T. not be used in advertising or publicity pertaining
+ * to distribution of the software without specific, written prior
+ * permission. Furthermore if you modify this software you must label
+ * your software as modified software and not distribute it in such a
+ * fashion that it might be confused with the original M.I.T. software.
+ * M.I.T. makes no representations about the suitability of
+ * this software for any purpose. It is provided "as is" without express
+ * or implied warranty.
*/
#include "des_int.h"
Modified: trunk/src/lib/crypto/openssl/enc_provider/aes.c
===================================================================
--- trunk/src/lib/crypto/openssl/enc_provider/aes.c 2009-10-29 18:46:52 UTC (rev 23089)
+++ trunk/src/lib/crypto/openssl/enc_provider/aes.c 2009-10-29 21:36:47 UTC (rev 23090)
@@ -27,7 +27,6 @@
#include "k5-int.h"
#include "enc_provider.h"
#include "rand2key.h"
-#include "aes.h"
#include "aead.h"
#include "hash_provider/hash_provider.h"
#include <openssl/evp.h>
@@ -54,6 +53,7 @@
cts_decr_iov(krb5_key key, const krb5_data *ivec,
krb5_crypto_iov *data, size_t num_data, size_t dlen);
+#define BLOCK_SIZE 16
#define NUM_BITS 8
#define IV_CTS_BUF_SIZE 16 /* 16 - hardcoded in CRYPTO_cts128_en/decrypt */
@@ -73,26 +73,19 @@
const krb5_data *input, krb5_data *output)
{
int ret = 0, tmp_len = 0;
- unsigned char *key_buf = NULL;
unsigned char *tmp_buf = NULL;
EVP_CIPHER_CTX ciph_ctx;
- key_buf = OPENSSL_malloc(key->keyblock.length);
- if (!key_buf)
- return ENOMEM;
-
tmp_len = input->length;
tmp_buf = OPENSSL_malloc(input->length);
if (!tmp_buf){
- OPENSSL_free(key_buf);
return ENOMEM;
}
- memcpy(key_buf, key->keyblock.contents, key->keyblock.length);
EVP_CIPHER_CTX_init(&ciph_ctx);
ret = EVP_EncryptInit_ex(&ciph_ctx, map_mode(key->keyblock.length),
- NULL, key_buf, (ivec) ? (unsigned char*)ivec->data : NULL);
+ NULL, key->keyblock.contents, (ivec) ? (unsigned char*)ivec->data : NULL);
if (ret == 1){
EVP_CIPHER_CTX_set_padding(&ciph_ctx,0);
@@ -112,9 +105,7 @@
ret = KRB5_CRYPTO_INTERNAL;
}
- memset(key_buf, 0, key->keyblock.length);
memset(tmp_buf, 0, input->length);
- OPENSSL_free(key_buf);
OPENSSL_free(tmp_buf);
return ret;
@@ -125,26 +116,19 @@
const krb5_data *input, krb5_data *output)
{
int ret = 0, tmp_len = 0;
- unsigned char *key_buf = NULL;
unsigned char *tmp_buf = NULL;
EVP_CIPHER_CTX ciph_ctx;
- key_buf = OPENSSL_malloc(key->keyblock.length);
- if (!key_buf)
- return ENOMEM;
-
tmp_len = input->length;
tmp_buf = OPENSSL_malloc(input->length);
if (!tmp_buf){
- OPENSSL_free(key_buf);
return ENOMEM;
}
- memcpy(key_buf, key->keyblock.contents, key->keyblock.length);
EVP_CIPHER_CTX_init(&ciph_ctx);
ret = EVP_DecryptInit_ex(&ciph_ctx, map_mode(key->keyblock.length),
- NULL, key_buf, (ivec) ? (unsigned char*)ivec->data : NULL);
+ NULL, key->keyblock.contents, (ivec) ? (unsigned char*)ivec->data : NULL);
if (ret == 1) {
EVP_CIPHER_CTX_set_padding(&ciph_ctx,0);
ret = EVP_EncryptUpdate(&ciph_ctx, tmp_buf, &tmp_len,
@@ -164,9 +148,7 @@
ret = KRB5_CRYPTO_INTERNAL;
}
- memset(key_buf, 0, key->keyblock.length);
memset(tmp_buf, 0, input->length);
- OPENSSL_free(key_buf);
OPENSSL_free(tmp_buf);
return ret;
Modified: trunk/src/lib/crypto/openssl/enc_provider/deps
===================================================================
--- trunk/src/lib/crypto/openssl/enc_provider/deps 2009-10-29 18:46:52 UTC (rev 23089)
+++ trunk/src/lib/crypto/openssl/enc_provider/deps 2009-10-29 21:36:47 UTC (rev 23090)
@@ -35,8 +35,8 @@
$(SRCTOP)/include/k5-thread.h $(SRCTOP)/include/krb5.h \
$(SRCTOP)/include/krb5/authdata_plugin.h $(SRCTOP)/include/krb5/locate_plugin.h \
$(SRCTOP)/include/krb5/preauth_plugin.h $(SRCTOP)/include/port-sockets.h \
- $(SRCTOP)/include/socket-utils.h $(srcdir)/../aes/aes.h \
- $(srcdir)/../aes/uitypes.h $(srcdir)/aes.c \
+ $(SRCTOP)/include/socket-utils.h \
+ $(srcdir)/aes.c \
$(srcdir)/enc_provider.h \
$(srcdir)/../../krb/aead.h $(srcdir)/../../krb/cksumtypes.h \
$(srcdir)/../../krb/rand2key/rand2key.h
Modified: trunk/src/lib/crypto/openssl/enc_provider/des.c
===================================================================
--- trunk/src/lib/crypto/openssl/enc_provider/des.c 2009-10-29 18:46:52 UTC (rev 23089)
+++ trunk/src/lib/crypto/openssl/enc_provider/des.c 2009-10-29 21:36:47 UTC (rev 23090)
@@ -1,6 +1,54 @@
/* lib/crypto/openssl/enc_provider/des.c
+ *
+ * Copyright (C) 2009 by the Massachusetts Institute of Technology.
+ * All rights reserved.
+ *
+ * Export of this software from the United States of America may
+ * require a specific license from the United States Government.
+ * It is the responsibility of any person or organization contemplating
+ * export to obtain such a license before exporting.
+ *
+ * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
+ * distribute this software and its documentation for any purpose and
+ * without fee is hereby granted, provided that the above copyright
+ * notice appear in all copies and that both that copyright notice and
+ * this permission notice appear in supporting documentation, and that
+ * the name of M.I.T. not be used in advertising or publicity pertaining
+ * to distribution of the software without specific, written prior
+ * permission. Furthermore if you modify this software you must label
+ * your software as modified software and not distribute it in such a
+ * fashion that it might be confused with the original M.I.T. software.
+ * M.I.T. makes no representations about the suitability of
+ * this software for any purpose. It is provided "as is" without express
+ * or implied warranty.
*/
+/*
+ * Copyright (C) 1998 by the FundsXpress, INC.
+ *
+ * All rights reserved.
+ *
+ * Export of this software from the United States of America may require
+ * a specific license from the United States Government. It is the
+ * responsibility of any person or organization contemplating export to
+ * obtain such a license before exporting.
+ *
+ * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
+ * distribute this software and its documentation for any purpose and
+ * without fee is hereby granted, provided that the above copyright
+ * notice appear in all copies and that both that copyright notice and
+ * this permission notice appear in supporting documentation, and that
+ * the name of FundsXpress. not be used in advertising or publicity pertaining
+ * to distribution of the software without specific, written prior
+ * permission. FundsXpress makes no representations about the suitability of
+ * this software for any purpose. It is provided "as is" without express
+ * or implied warranty.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ */
+
#include "k5-int.h"
#include <aead.h>
#include <rand2key.h>
@@ -55,7 +103,6 @@
{
int ret = 0, tmp_len = 0;
unsigned int tmp_buf_len = 0;
- unsigned char *keybuf = NULL;
unsigned char *tmp_buf = NULL;
EVP_CIPHER_CTX ciph_ctx;
@@ -63,9 +110,6 @@
if (ret)
return ret;
- keybuf=key->keyblock.contents;
- keybuf[key->keyblock.length] = '\0';
-
tmp_buf_len = output->length*2;
tmp_buf=OPENSSL_malloc(tmp_buf_len);
if (!tmp_buf)
@@ -74,7 +118,7 @@
EVP_CIPHER_CTX_init(&ciph_ctx);
- ret = EVP_EncryptInit_ex(&ciph_ctx, EVP_des_cbc(), NULL, keybuf,
+ ret = EVP_EncryptInit_ex(&ciph_ctx, EVP_des_cbc(), NULL, key->keyblock.contents,
(ivec) ? (unsigned char*)ivec->data : NULL);
if (ret) {
EVP_CIPHER_CTX_set_padding(&ciph_ctx,0);
@@ -108,7 +152,6 @@
{
/* key->keyblock.enctype was checked by the caller */
int ret = 0, tmp_len = 0;
- unsigned char *keybuf = NULL;
unsigned char *tmp_buf;
EVP_CIPHER_CTX ciph_ctx;
@@ -116,8 +159,6 @@
if (ret)
return ret;
- keybuf=key->keyblock.contents;
- keybuf[key->keyblock.length] = '\0';
tmp_buf=OPENSSL_malloc(output->length);
if (!tmp_buf)
@@ -126,7 +167,7 @@
EVP_CIPHER_CTX_init(&ciph_ctx);
- ret = EVP_DecryptInit_ex(&ciph_ctx, EVP_des_cbc(), NULL, keybuf,
+ ret = EVP_DecryptInit_ex(&ciph_ctx, EVP_des_cbc(), NULL, key->keyblock.contents,
(ivec) ? (unsigned char*)ivec->data : NULL);
if (ret) {
EVP_CIPHER_CTX_set_padding(&ciph_ctx,0);
@@ -160,7 +201,6 @@
int ret = 0, tmp_len = MIT_DES_BLOCK_LENGTH;
int oblock_len = MIT_DES_BLOCK_LENGTH * num_data;
unsigned char *iblock = NULL, *oblock = NULL;
- unsigned char *keybuf = NULL ;
struct iov_block_state input_pos, output_pos;
EVP_CIPHER_CTX ciph_ctx;
@@ -176,8 +216,6 @@
IOV_BLOCK_STATE_INIT(&input_pos);
IOV_BLOCK_STATE_INIT(&output_pos);
- keybuf=key->keyblock.contents;
- keybuf[key->keyblock.length] = '\0';
ret = validate_iov(key, ivec, data, num_data);
if (ret)
@@ -188,7 +226,7 @@
EVP_CIPHER_CTX_init(&ciph_ctx);
ret = EVP_EncryptInit_ex(&ciph_ctx, EVP_des_cbc(), NULL,
- keybuf, (ivec && ivec->data) ? (unsigned char*)ivec->data : NULL);
+ key->keyblock.contents, (ivec && ivec->data) ? (unsigned char*)ivec->data : NULL);
if (!ret){
EVP_CIPHER_CTX_cleanup(&ciph_ctx);
OPENSSL_free(iblock);
@@ -238,7 +276,6 @@
int tmp_len = MIT_DES_BLOCK_LENGTH;
int oblock_len = MIT_DES_BLOCK_LENGTH*num_data;
unsigned char *iblock = NULL, *oblock = NULL;
- unsigned char *keybuf = NULL;
struct iov_block_state input_pos, output_pos;
EVP_CIPHER_CTX ciph_ctx;
@@ -254,9 +291,6 @@
IOV_BLOCK_STATE_INIT(&input_pos);
IOV_BLOCK_STATE_INIT(&output_pos);
- keybuf=key->keyblock.contents;
- keybuf[key->keyblock.length] = '\0';
-
ret = validate_iov(key, ivec, data, num_data);
if (ret)
return ret;
@@ -266,7 +300,7 @@
EVP_CIPHER_CTX_init(&ciph_ctx);
ret = EVP_DecryptInit_ex(&ciph_ctx, EVP_des_cbc(), NULL,
- keybuf, (ivec) ? (unsigned char*)ivec->data : NULL);
+ key->keyblock.contents, (ivec) ? (unsigned char*)ivec->data : NULL);
if (!ret){
EVP_CIPHER_CTX_cleanup(&ciph_ctx);
OPENSSL_free(iblock);
Modified: trunk/src/lib/crypto/openssl/enc_provider/des3.c
===================================================================
--- trunk/src/lib/crypto/openssl/enc_provider/des3.c 2009-10-29 18:46:52 UTC (rev 23089)
+++ trunk/src/lib/crypto/openssl/enc_provider/des3.c 2009-10-29 21:36:47 UTC (rev 23090)
@@ -1,5 +1,52 @@
/* lib/crypto/openssl/enc_provider/des3.c
+ *
+ * Copyright (C) 2009 by the Massachusetts Institute of Technology.
+ * All rights reserved.
+ *
+ * Export of this software from the United States of America may
+ * require a specific license from the United States Government.
+ * It is the responsibility of any person or organization contemplating
+ * export to obtain such a license before exporting.
+ *
+ * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
+ * distribute this software and its documentation for any purpose and
+ * without fee is hereby granted, provided that the above copyright
+ * notice appear in all copies and that both that copyright notice and
+ * this permission notice appear in supporting documentation, and that
+ * the name of M.I.T. not be used in advertising or publicity pertaining
+ * to distribution of the software without specific, written prior
+ * permission. Furthermore if you modify this software you must label
+ * your software as modified software and not distribute it in such a
+ * fashion that it might be confused with the original M.I.T. software.
+ * M.I.T. makes no representations about the suitability of
+ * this software for any purpose. It is provided "as is" without express
+ * or implied warranty.
*/
+/*
+ * Copyright (C) 1998 by the FundsXpress, INC.
+ *
+ * All rights reserved.
+ *
+ * Export of this software from the United States of America may require
+ * a specific license from the United States Government. It is the
+ * responsibility of any person or organization contemplating export to
+ * obtain such a license before exporting.
+ *
+ * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
+ * distribute this software and its documentation for any purpose and
+ * without fee is hereby granted, provided that the above copyright
+ * notice appear in all copies and that both that copyright notice and
+ * this permission notice appear in supporting documentation, and that
+ * the name of FundsXpress. not be used in advertising or publicity pertaining
+ * to distribution of the software without specific, written prior
+ * permission. FundsXpress makes no representations about the suitability of
+ * this software for any purpose. It is provided "as is" without express
+ * or implied warranty.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ */
#include "k5-int.h"
#include "des_int.h"
@@ -56,7 +103,6 @@
{
int ret = 0, tmp_len = 0;
unsigned int tmp_buf_len = 0;
- unsigned char *keybuf = NULL;
unsigned char *tmp_buf = NULL;
EVP_CIPHER_CTX ciph_ctx;
@@ -64,9 +110,6 @@
if (ret)
return ret;
- keybuf=key->keyblock.contents;
- keybuf[key->keyblock.length] = '\0';
-
tmp_buf_len = output->length * 2;
tmp_buf = OPENSSL_malloc(tmp_buf_len);
if (!tmp_buf)
@@ -74,7 +117,7 @@
EVP_CIPHER_CTX_init(&ciph_ctx);
- ret = EVP_EncryptInit_ex(&ciph_ctx, EVP_des_ede3_cbc(), NULL, keybuf,
+ ret = EVP_EncryptInit_ex(&ciph_ctx, EVP_des_ede3_cbc(), NULL, key->keyblock.contents,
(ivec) ? (unsigned char*)ivec->data : NULL);
if (ret) {
EVP_CIPHER_CTX_set_padding(&ciph_ctx,0);
@@ -109,7 +152,6 @@
{
int ret = 0, tmp_len = 0;
unsigned int tmp_buf_len = 0;
- unsigned char *keybuf = NULL;
unsigned char *tmp_buf = NULL;
EVP_CIPHER_CTX ciph_ctx;
@@ -117,8 +159,6 @@
if (ret)
return ret;
- keybuf=key->keyblock.contents;
- keybuf[key->keyblock.length] = '\0';
tmp_buf_len = output->length;
tmp_buf=OPENSSL_malloc(tmp_buf_len);
@@ -127,7 +167,7 @@
EVP_CIPHER_CTX_init(&ciph_ctx);
- ret = EVP_DecryptInit_ex(&ciph_ctx, EVP_des_ede3_cbc(), NULL, keybuf,
+ ret = EVP_DecryptInit_ex(&ciph_ctx, EVP_des_ede3_cbc(), NULL, key->keyblock.contents,
(ivec) ? (unsigned char*)ivec->data: NULL);
if (ret) {
EVP_CIPHER_CTX_set_padding(&ciph_ctx,0);
@@ -165,7 +205,6 @@
int tmp_len = MIT_DES_BLOCK_LENGTH;
int oblock_len = MIT_DES_BLOCK_LENGTH*num_data;
unsigned char *iblock = NULL, *oblock = NULL;
- unsigned char *keybuf = NULL;
struct iov_block_state input_pos, output_pos;
EVP_CIPHER_CTX ciph_ctx;
@@ -185,15 +224,12 @@
IOV_BLOCK_STATE_INIT(&input_pos);
IOV_BLOCK_STATE_INIT(&output_pos);
- keybuf=key->keyblock.contents;
- keybuf[key->keyblock.length] = '\0';
-
memset(oblock, 0, oblock_len);
EVP_CIPHER_CTX_init(&ciph_ctx);
ret = EVP_EncryptInit_ex(&ciph_ctx, EVP_des_ede3_cbc(), NULL,
- keybuf, (ivec) ? (unsigned char*)ivec->data : NULL);
+ key->keyblock.contents, (ivec) ? (unsigned char*)ivec->data : NULL);
if (!ret){
EVP_CIPHER_CTX_cleanup(&ciph_ctx);
OPENSSL_free(iblock);
@@ -248,7 +284,6 @@
int tmp_len = MIT_DES_BLOCK_LENGTH;
int oblock_len = MIT_DES_BLOCK_LENGTH * num_data;
unsigned char *iblock = NULL, *oblock = NULL;
- unsigned char *keybuf = NULL ;
struct iov_block_state input_pos, output_pos;
EVP_CIPHER_CTX ciph_ctx;
@@ -268,15 +303,12 @@
IOV_BLOCK_STATE_INIT(&input_pos);
IOV_BLOCK_STATE_INIT(&output_pos);
- keybuf=key->keyblock.contents;
- keybuf[key->keyblock.length] = '\0';
-
memset(oblock, 0, oblock_len);
EVP_CIPHER_CTX_init(&ciph_ctx);
ret = EVP_DecryptInit_ex(&ciph_ctx, EVP_des_ede3_cbc(), NULL,
- keybuf, (ivec) ? (unsigned char*)ivec->data : NULL);
+ key->keyblock.contents, (ivec) ? (unsigned char*)ivec->data : NULL);
if (!ret){
EVP_CIPHER_CTX_cleanup(&ciph_ctx);
OPENSSL_free(iblock);
Modified: trunk/src/lib/crypto/openssl/enc_provider/rc4.c
===================================================================
--- trunk/src/lib/crypto/openssl/enc_provider/rc4.c 2009-10-29 18:46:52 UTC (rev 23089)
+++ trunk/src/lib/crypto/openssl/enc_provider/rc4.c 2009-10-29 21:36:47 UTC (rev 23090)
@@ -1,8 +1,39 @@
/* lib/crypto/openssl/enc_provider/rc4.c
*
* #include STD_DISCLAIMER
+ *
+ * Copyright (C) 2009 by the Massachusetts Institute of Technology.
+ * All rights reserved.
+ *
+ * Export of this software from the United States of America may
+ * require a specific license from the United States Government.
+ * It is the responsibility of any person or organization contemplating
+ * export to obtain such a license before exporting.
+ *
+ * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
+ * distribute this software and its documentation for any purpose and
+ * without fee is hereby granted, provided that the above copyright
+ * notice appear in all copies and that both that copyright notice and
+ * this permission notice appear in supporting documentation, and that
+ * the name of M.I.T. not be used in advertising or publicity pertaining
+ * to distribution of the software without specific, written prior
+ * permission. Furthermore if you modify this software you must label
+ * your software as modified software and not distribute it in such a
+ * fashion that it might be confused with the original M.I.T. software.
+ * M.I.T. makes no representations about the suitability of
+ * this software for any purpose. It is provided "as is" without express
+ * or implied warranty.
*/
+/* arcfour.c
+ *
+ * Copyright (c) 2000 by Computer Science Laboratory,
+ * Rensselaer Polytechnic Institute
+ *
+ * #include STD_DISCLAIMER
+ */
+
+
#include "k5-int.h"
#include <aead.h>
#include <rand2key.h>
@@ -33,7 +64,6 @@
const krb5_data *input, krb5_data *output)
{
int ret = 0, tmp_len = 0;
- unsigned char *keybuf = NULL;
unsigned char *tmp_buf = NULL;
EVP_CIPHER_CTX ciph_ctx;
@@ -43,12 +73,9 @@
if (input->length != output->length)
return(KRB5_BAD_MSIZE);
- keybuf=key->keyblock.contents;
- keybuf[key->keyblock.length] = '\0';
-
EVP_CIPHER_CTX_init(&ciph_ctx);
- ret = EVP_EncryptInit_ex(&ciph_ctx, EVP_rc4(), NULL, keybuf, NULL);
+ ret = EVP_EncryptInit_ex(&ciph_ctx, EVP_rc4(), NULL, key->keyblock.contents, NULL);
if (ret) {
tmp_buf=(unsigned char *)output->data;
ret = EVP_EncryptUpdate(&ciph_ctx, tmp_buf, &tmp_len,
@@ -79,17 +106,14 @@
{
size_t i;
int ret = 0, tmp_len = 0;
- unsigned char *keybuf = NULL ;
unsigned char *tmp_buf = NULL;
krb5_crypto_iov *iov = NULL;
EVP_CIPHER_CTX ciph_ctx;
- keybuf=key->keyblock.contents;
- keybuf[key->keyblock.length] = '\0';
EVP_CIPHER_CTX_init(&ciph_ctx);
- ret = EVP_EncryptInit_ex(&ciph_ctx, EVP_rc4(), NULL, keybuf, NULL);
+ ret = EVP_EncryptInit_ex(&ciph_ctx, EVP_rc4(), NULL, key->keyblock.contents, NULL);
if (!ret){
EVP_CIPHER_CTX_cleanup(&ciph_ctx);
return KRB5_CRYPTO_INTERNAL;
Modified: trunk/src/lib/crypto/openssl/hmac.c
===================================================================
--- trunk/src/lib/crypto/openssl/hmac.c 2009-10-29 18:46:52 UTC (rev 23089)
+++ trunk/src/lib/crypto/openssl/hmac.c 2009-10-29 21:36:47 UTC (rev 23090)
@@ -1,6 +1,55 @@
/* lib/crypto/openssl/hmac.c
+ *
+ * Copyright (C) 2009 by the Massachusetts Institute of Technology.
+ * All rights reserved.
+ *
+ * Export of this software from the United States of America may
+ * require a specific license from the United States Government.
+ * It is the responsibility of any person or organization contemplating
+ * export to obtain such a license before exporting.
+ *
+ * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
+ * distribute this software and its documentation for any purpose and
+ * without fee is hereby granted, provided that the above copyright
+ * notice appear in all copies and that both that copyright notice and
+ * this permission notice appear in supporting documentation, and that
+ * the name of M.I.T. not be used in advertising or publicity pertaining
+ * to distribution of the software without specific, written prior
+ * permission. Furthermore if you modify this software you must label
+ * your software as modified software and not distribute it in such a
+ * fashion that it might be confused with the original M.I.T. software.
+ * M.I.T. makes no representations about the suitability of
+ * this software for any purpose. It is provided "as is" without express
+ * or implied warranty.
*/
+/*
+ * Copyright (C) 1998 by the FundsXpress, INC.
+ *
+ * All rights reserved.
+ *
+ * Export of this software from the United States of America may require
+ * a specific license from the United States Government. It is the
+ * responsibility of any person or organization contemplating export to
+ * obtain such a license before exporting.
+ *
+ * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
+ * distribute this software and its documentation for any purpose and
+ * without fee is hereby granted, provided that the above copyright
+ * notice appear in all copies and that both that copyright notice and
+ * this permission notice appear in supporting documentation, and that
+ * the name of FundsXpress. not be used in advertising or publicity pertaining
+ * to distribution of the software without specific, written prior
+ * permission. FundsXpress makes no representations about the suitability of
+ * this software for any purpose. It is provided "as is" without express
+ * or implied warranty.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ */
+
+
#include "k5-int.h"
#include "aead.h"
#include <openssl/hmac.h>
Modified: trunk/src/lib/crypto/openssl/md4/md4.c
===================================================================
--- trunk/src/lib/crypto/openssl/md4/md4.c 2009-10-29 18:46:52 UTC (rev 23089)
+++ trunk/src/lib/crypto/openssl/md4/md4.c 2009-10-29 21:36:47 UTC (rev 23090)
@@ -1,5 +1,27 @@
/*
* lib/crypto/openssl/md4/md4.c
+ *
+ * Copyright (C) 2009 by the Massachusetts Institute of Technology.
+ * All rights reserved.
+ *
+ * Export of this software from the United States of America may
+ * require a specific license from the United States Government.
+ * It is the responsibility of any person or organization contemplating
+ * export to obtain such a license before exporting.
+ *
+ * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
+ * distribute this software and its documentation for any purpose and
+ * without fee is hereby granted, provided that the above copyright
+ * notice appear in all copies and that both that copyright notice and
+ * this permission notice appear in supporting documentation, and that
+ * the name of M.I.T. not be used in advertising or publicity pertaining
+ * to distribution of the software without specific, written prior
+ * permission. Furthermore if you modify this software you must label
+ * your software as modified software and not distribute it in such a
+ * fashion that it might be confused with the original M.I.T. software.
+ * M.I.T. makes no representations about the suitability of
+ * this software for any purpose. It is provided "as is" without express
+ * or implied warranty.
*/
#include "k5-int.h"
Modified: trunk/src/lib/crypto/openssl/md5/md5.c
===================================================================
--- trunk/src/lib/crypto/openssl/md5/md5.c 2009-10-29 18:46:52 UTC (rev 23089)
+++ trunk/src/lib/crypto/openssl/md5/md5.c 2009-10-29 21:36:47 UTC (rev 23090)
@@ -1,3 +1,27 @@
+/* lib/crypto/openssl/md5/md5.c
+ *
+ * Copyright (C) 2009 by the Massachusetts Institute of Technology.
+ * All rights reserved.
+ *
+ * Export of this software from the United States of America may
+ * require a specific license from the United States Government.
+ * It is the responsibility of any person or organization contemplating
+ * export to obtain such a license before exporting.
+ *
+ * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
+ * distribute this software and its documentation for any purpose and
+ * without fee is hereby granted, provided that the above copyright
+ * notice appear in all copies and that both that copyright notice and
+ * this permission notice appear in supporting documentation, and that
+ * the name of M.I.T. not be used in advertising or publicity pertaining
+ * to distribution of the software without specific, written prior
+ * permission. Furthermore if you modify this software you must label
+ * your software as modified software and not distribute it in such a
+ * fashion that it might be confused with the original M.I.T. software.
+ * M.I.T. makes no representations about the suitability of
+ * this software for any purpose. It is provided "as is" without express
+ * or implied warranty.
+ */
#include "k5-int.h"
#include "rsa-md5.h"
Modified: trunk/src/lib/crypto/openssl/md5/rsa-md5.h
===================================================================
--- trunk/src/lib/crypto/openssl/md5/rsa-md5.h 2009-10-29 18:46:52 UTC (rev 23089)
+++ trunk/src/lib/crypto/openssl/md5/rsa-md5.h 2009-10-29 21:36:47 UTC (rev 23090)
@@ -1,4 +1,68 @@
+/* lib/crypto/openssl/md5/rsa-md5.h
+ *
+ * Copyright (C) 2009 by the Massachusetts Institute of Technology.
+ * All rights reserved.
+ *
+ * Export of this software from the United States of America may
+ * require a specific license from the United States Government.
+ * It is the responsibility of any person or organization contemplating
+ * export to obtain such a license before exporting.
+ *
+ * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
+ * distribute this software and its documentation for any purpose and
+ * without fee is hereby granted, provided that the above copyright
+ * notice appear in all copies and that both that copyright notice and
+ * this permission notice appear in supporting documentation, and that
+ * the name of M.I.T. not be used in advertising or publicity pertaining
+ * to distribution of the software without specific, written prior
+ * permission. Furthermore if you modify this software you must label
+ * your software as modified software and not distribute it in such a
+ * fashion that it might be confused with the original M.I.T. software.
+ * M.I.T. makes no representations about the suitability of
+ * this software for any purpose. It is provided "as is" without express
+ * or implied warranty.
+ */
+/*
+ ***********************************************************************
+ ** md5.h -- header file for implementation of MD5 **
+ ** RSA Data Security, Inc. MD5 Message-Digest Algorithm **
+ ** Created: 2/17/90 RLR **
+ ** Revised: 12/27/90 SRD,AJ,BSK,JT Reference C version **
+ ** Revised (for MD5): RLR 4/27/91 **
+ ** -- G modified to have y&~z instead of y&z **
+ ** -- FF, GG, HH modified to add in last register done **
+ ** -- Access pattern: round 2 works mod 5, round 3 works mod 3 **
+ ** -- distinct additive constant for each step **
+ ** -- round 4 added, working mod 7 **
+ ***********************************************************************
+ */
+
+/*
+ ***********************************************************************
+ ** Copyright (C) 1990, RSA Data Security, Inc. All rights reserved. **
+ ** **
+ ** License to copy and use this software is granted provided that **
+ ** it is identified as the "RSA Data Security, Inc. MD5 Message- **
+ ** Digest Algorithm" in all material mentioning or referencing this **
+ ** software or this function. **
+ ** **
+ ** License is also granted to make and use derivative works **
+ ** provided that such works are identified as "derived from the RSA **
+ ** Data Security, Inc. MD5 Message-Digest Algorithm" in all **
+ ** material mentioning or referencing the derived work. **
+ ** **
+ ** RSA Data Security, Inc. makes no representations concerning **
+ ** either the merchantability of this software or the suitability **
+ ** of this software for any particular purpose. It is provided "as **
+ ** is" without express or implied warranty of any kind. **
+ ** **
+ ** These notices must be retained in any copies of any part of this **
+ ** documentation and/or software. **
+ ***********************************************************************
+ */
+
+
#ifndef KRB5_RSA_MD5__
#define KRB5_RSA_MD5__
Modified: trunk/src/lib/crypto/openssl/pbkdf2.c
===================================================================
--- trunk/src/lib/crypto/openssl/pbkdf2.c 2009-10-29 18:46:52 UTC (rev 23089)
+++ trunk/src/lib/crypto/openssl/pbkdf2.c 2009-10-29 21:36:47 UTC (rev 23090)
@@ -1,7 +1,7 @@
/*
* lib/crypto/openssl/pbkdf2.c
*
- * Copyright 2002, 2008 by the Massachusetts Institute of Technology.
+ * Copyright 2002, 2008, 2009 by the Massachusetts Institute of Technology.
* All Rights Reserved.
*
* Export of this software from the United States of America may
Modified: trunk/src/lib/crypto/openssl/sha1/shs.c
===================================================================
--- trunk/src/lib/crypto/openssl/sha1/shs.c 2009-10-29 18:46:52 UTC (rev 23089)
+++ trunk/src/lib/crypto/openssl/sha1/shs.c 2009-10-29 21:36:47 UTC (rev 23090)
@@ -1,3 +1,28 @@
+/* lib/crypto/openssl/sha1/shs.c
+ *
+ * Copyright (C) 2009 by the Massachusetts Institute of Technology.
+ * All rights reserved.
+ *
+ * Export of this software from the United States of America may
+ * require a specific license from the United States Government.
+ * It is the responsibility of any person or organization contemplating
+ * export to obtain such a license before exporting.
+ *
+ * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
+ * distribute this software and its documentation for any purpose and
+ * without fee is hereby granted, provided that the above copyright
+ * notice appear in all copies and that both that copyright notice and
+ * this permission notice appear in supporting documentation, and that
+ * the name of M.I.T. not be used in advertising or publicity pertaining
+ * to distribution of the software without specific, written prior
+ * permission. Furthermore if you modify this software you must label
+ * your software as modified software and not distribute it in such a
+ * fashion that it might be confused with the original M.I.T. software.
+ * M.I.T. makes no representations about the suitability of
+ * this software for any purpose. It is provided "as is" without express
+ * or implied warranty.
+ */
+
#include "shs.h"
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
Property changes on: trunk/src/lib/crypto/openssl/des/des_oldapis.c
___________________________________________________________________
More information about the cvs-krb5
mailing list