summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortedu <>2014-04-21 02:44:28 +0000
committertedu <>2014-04-21 02:44:28 +0000
commitf46c697a11680ae5d3ab06393f0bfe2ed1841168 (patch)
tree98bf652749a50fd1fd8b3611d645d93d5162e61d
parent95e3894333d0ad24d4efff2ff5857bccabc5d691 (diff)
downloadopenbsd-f46c697a11680ae5d3ab06393f0bfe2ed1841168.tar.gz
openbsd-f46c697a11680ae5d3ab06393f0bfe2ed1841168.tar.bz2
openbsd-f46c697a11680ae5d3ab06393f0bfe2ed1841168.zip
clean up files we don't need
-rw-r--r--src/lib/libcrypto/des/DES.pm19
-rw-r--r--src/lib/libcrypto/des/DES.xs268
-rw-r--r--src/lib/libcrypto/des/FILES052
-rw-r--r--src/lib/libcrypto/des/INSTALL69
-rw-r--r--src/lib/libcrypto/des/KERBEROS41
-rw-r--r--src/lib/libcrypto/des/des.pod217
-rw-r--r--src/lib/libcrypto/des/makefile.bc50
-rw-r--r--src/lib/libcrypto/des/rpw.c99
-rw-r--r--src/lib/libcrypto/des/speed.c313
-rw-r--r--src/lib/libcrypto/des/t/test27
-rw-r--r--src/lib/libcrypto/des/times/486-50.sol16
-rw-r--r--src/lib/libcrypto/des/times/586-100.lnx20
-rw-r--r--src/lib/libcrypto/des/times/686-200.fre18
-rw-r--r--src/lib/libcrypto/des/times/aix.cc26
-rw-r--r--src/lib/libcrypto/des/times/alpha.cc18
-rw-r--r--src/lib/libcrypto/des/times/hpux.cc17
-rw-r--r--src/lib/libcrypto/des/times/sparc.gcc17
-rw-r--r--src/lib/libcrypto/des/times/usparc.cc31
-rw-r--r--src/lib/libcrypto/des/typemap34
-rw-r--r--src/lib/libssl/src/crypto/des/DES.pm19
-rw-r--r--src/lib/libssl/src/crypto/des/DES.xs268
-rw-r--r--src/lib/libssl/src/crypto/des/FILES052
-rw-r--r--src/lib/libssl/src/crypto/des/INSTALL69
-rw-r--r--src/lib/libssl/src/crypto/des/KERBEROS41
-rw-r--r--src/lib/libssl/src/crypto/des/des.pod217
-rw-r--r--src/lib/libssl/src/crypto/des/makefile.bc50
-rw-r--r--src/lib/libssl/src/crypto/des/rpw.c99
-rw-r--r--src/lib/libssl/src/crypto/des/speed.c313
-rw-r--r--src/lib/libssl/src/crypto/des/t/test27
-rw-r--r--src/lib/libssl/src/crypto/des/times/486-50.sol16
-rw-r--r--src/lib/libssl/src/crypto/des/times/586-100.lnx20
-rw-r--r--src/lib/libssl/src/crypto/des/times/686-200.fre18
-rw-r--r--src/lib/libssl/src/crypto/des/times/aix.cc26
-rw-r--r--src/lib/libssl/src/crypto/des/times/alpha.cc18
-rw-r--r--src/lib/libssl/src/crypto/des/times/hpux.cc17
-rw-r--r--src/lib/libssl/src/crypto/des/times/sparc.gcc17
-rw-r--r--src/lib/libssl/src/crypto/des/times/usparc.cc31
-rw-r--r--src/lib/libssl/src/crypto/des/typemap34
38 files changed, 0 insertions, 2704 deletions
diff --git a/src/lib/libcrypto/des/DES.pm b/src/lib/libcrypto/des/DES.pm
deleted file mode 100644
index 6a175b6ca4..0000000000
--- a/src/lib/libcrypto/des/DES.pm
+++ /dev/null
@@ -1,19 +0,0 @@
1package DES;
2
3require Exporter;
4require DynaLoader;
5@ISA = qw(Exporter DynaLoader);
6# Items to export into callers namespace by default
7# (move infrequently used names to @EXPORT_OK below)
8@EXPORT = qw(
9);
10# Other items we are prepared to export if requested
11@EXPORT_OK = qw(
12crypt
13);
14
15# Preloaded methods go here. Autoload methods go after __END__, and are
16# processed by the autosplit program.
17bootstrap DES;
181;
19__END__
diff --git a/src/lib/libcrypto/des/DES.xs b/src/lib/libcrypto/des/DES.xs
deleted file mode 100644
index b8050b9edf..0000000000
--- a/src/lib/libcrypto/des/DES.xs
+++ /dev/null
@@ -1,268 +0,0 @@
1#include "EXTERN.h"
2#include "perl.h"
3#include "XSUB.h"
4#include "des.h"
5
6#define deschar char
7static STRLEN len;
8
9static int
10not_here(s)
11char *s;
12{
13 croak("%s not implemented on this architecture", s);
14 return -1;
15}
16
17MODULE = DES PACKAGE = DES PREFIX = des_
18
19char *
20des_crypt(buf,salt)
21 char * buf
22 char * salt
23
24void
25des_set_odd_parity(key)
26 des_cblock * key
27PPCODE:
28 {
29 SV *s;
30
31 s=sv_newmortal();
32 sv_setpvn(s,(char *)key,8);
33 des_set_odd_parity((des_cblock *)SvPV(s,na));
34 PUSHs(s);
35 }
36
37int
38des_is_weak_key(key)
39 des_cblock * key
40
41des_key_schedule
42des_set_key(key)
43 des_cblock * key
44CODE:
45 des_set_key(key,RETVAL);
46OUTPUT:
47RETVAL
48
49des_cblock
50des_ecb_encrypt(input,ks,encrypt)
51 des_cblock * input
52 des_key_schedule * ks
53 int encrypt
54CODE:
55 des_ecb_encrypt(input,&RETVAL,*ks,encrypt);
56OUTPUT:
57RETVAL
58
59void
60des_cbc_encrypt(input,ks,ivec,encrypt)
61 char * input
62 des_key_schedule * ks
63 des_cblock * ivec
64 int encrypt
65PPCODE:
66 {
67 SV *s;
68 STRLEN len,l;
69 char *c;
70
71 l=SvCUR(ST(0));
72 len=((((unsigned long)l)+7)/8)*8;
73 s=sv_newmortal();
74 sv_setpvn(s,"",0);
75 SvGROW(s,len);
76 SvCUR_set(s,len);
77 c=(char *)SvPV(s,na);
78 des_cbc_encrypt((des_cblock *)input,(des_cblock *)c,
79 l,*ks,ivec,encrypt);
80 sv_setpvn(ST(2),(char *)c[len-8],8);
81 PUSHs(s);
82 }
83
84void
85des_cbc3_encrypt(input,ks1,ks2,ivec1,ivec2,encrypt)
86 char * input
87 des_key_schedule * ks1
88 des_key_schedule * ks2
89 des_cblock * ivec1
90 des_cblock * ivec2
91 int encrypt
92PPCODE:
93 {
94 SV *s;
95 STRLEN len,l;
96
97 l=SvCUR(ST(0));
98 len=((((unsigned long)l)+7)/8)*8;
99 s=sv_newmortal();
100 sv_setpvn(s,"",0);
101 SvGROW(s,len);
102 SvCUR_set(s,len);
103 des_3cbc_encrypt((des_cblock *)input,(des_cblock *)SvPV(s,na),
104 l,*ks1,*ks2,ivec1,ivec2,encrypt);
105 sv_setpvn(ST(3),(char *)ivec1,8);
106 sv_setpvn(ST(4),(char *)ivec2,8);
107 PUSHs(s);
108 }
109
110void
111des_cbc_cksum(input,ks,ivec)
112 char * input
113 des_key_schedule * ks
114 des_cblock * ivec
115PPCODE:
116 {
117 SV *s1,*s2;
118 STRLEN len,l;
119 des_cblock c;
120 unsigned long i1,i2;
121
122 s1=sv_newmortal();
123 s2=sv_newmortal();
124 l=SvCUR(ST(0));
125 des_cbc_cksum((des_cblock *)input,(des_cblock *)c,
126 l,*ks,ivec);
127 i1=c[4]|(c[5]<<8)|(c[6]<<16)|(c[7]<<24);
128 i2=c[0]|(c[1]<<8)|(c[2]<<16)|(c[3]<<24);
129 sv_setiv(s1,i1);
130 sv_setiv(s2,i2);
131 sv_setpvn(ST(2),(char *)c,8);
132 PUSHs(s1);
133 PUSHs(s2);
134 }
135
136void
137des_cfb_encrypt(input,numbits,ks,ivec,encrypt)
138 char * input
139 int numbits
140 des_key_schedule * ks
141 des_cblock * ivec
142 int encrypt
143PPCODE:
144 {
145 SV *s;
146 STRLEN len;
147 char *c;
148
149 len=SvCUR(ST(0));
150 s=sv_newmortal();
151 sv_setpvn(s,"",0);
152 SvGROW(s,len);
153 SvCUR_set(s,len);
154 c=(char *)SvPV(s,na);
155 des_cfb_encrypt((unsigned char *)input,(unsigned char *)c,
156 (int)numbits,(long)len,*ks,ivec,encrypt);
157 sv_setpvn(ST(3),(char *)ivec,8);
158 PUSHs(s);
159 }
160
161des_cblock *
162des_ecb3_encrypt(input,ks1,ks2,encrypt)
163 des_cblock * input
164 des_key_schedule * ks1
165 des_key_schedule * ks2
166 int encrypt
167CODE:
168 {
169 des_cblock c;
170
171 des_ecb3_encrypt((des_cblock *)input,(des_cblock *)&c,
172 *ks1,*ks2,encrypt);
173 RETVAL= &c;
174 }
175OUTPUT:
176RETVAL
177
178void
179des_ofb_encrypt(input,numbits,ks,ivec)
180 unsigned char * input
181 int numbits
182 des_key_schedule * ks
183 des_cblock * ivec
184PPCODE:
185 {
186 SV *s;
187 STRLEN len,l;
188 unsigned char *c;
189
190 len=SvCUR(ST(0));
191 s=sv_newmortal();
192 sv_setpvn(s,"",0);
193 SvGROW(s,len);
194 SvCUR_set(s,len);
195 c=(unsigned char *)SvPV(s,na);
196 des_ofb_encrypt((unsigned char *)input,(unsigned char *)c,
197 numbits,len,*ks,ivec);
198 sv_setpvn(ST(3),(char *)ivec,8);
199 PUSHs(s);
200 }
201
202void
203des_pcbc_encrypt(input,ks,ivec,encrypt)
204 char * input
205 des_key_schedule * ks
206 des_cblock * ivec
207 int encrypt
208PPCODE:
209 {
210 SV *s;
211 STRLEN len,l;
212 char *c;
213
214 l=SvCUR(ST(0));
215 len=((((unsigned long)l)+7)/8)*8;
216 s=sv_newmortal();
217 sv_setpvn(s,"",0);
218 SvGROW(s,len);
219 SvCUR_set(s,len);
220 c=(char *)SvPV(s,na);
221 des_pcbc_encrypt((des_cblock *)input,(des_cblock *)c,
222 l,*ks,ivec,encrypt);
223 sv_setpvn(ST(2),(char *)c[len-8],8);
224 PUSHs(s);
225 }
226
227des_cblock *
228des_random_key()
229CODE:
230 {
231 des_cblock c;
232
233 des_random_key(c);
234 RETVAL=&c;
235 }
236OUTPUT:
237RETVAL
238
239des_cblock *
240des_string_to_key(str)
241char * str
242CODE:
243 {
244 des_cblock c;
245
246 des_string_to_key(str,&c);
247 RETVAL=&c;
248 }
249OUTPUT:
250RETVAL
251
252void
253des_string_to_2keys(str)
254char * str
255PPCODE:
256 {
257 des_cblock c1,c2;
258 SV *s1,*s2;
259
260 des_string_to_2keys(str,&c1,&c2);
261 EXTEND(sp,2);
262 s1=sv_newmortal();
263 sv_setpvn(s1,(char *)c1,8);
264 s2=sv_newmortal();
265 sv_setpvn(s2,(char *)c2,8);
266 PUSHs(s1);
267 PUSHs(s2);
268 }
diff --git a/src/lib/libcrypto/des/FILES0 b/src/lib/libcrypto/des/FILES0
index 4c7ea2de7a..2e8211ad2a 100644
--- a/src/lib/libcrypto/des/FILES0
+++ b/src/lib/libcrypto/des/FILES0
@@ -1,31 +1,10 @@
1/* General stuff */ 1/* General stuff */
2COPYRIGHT - Copyright info. 2COPYRIGHT - Copyright info.
3MODES.DES - A description of the features of the different modes of DES.
4FILES - This file. 3FILES - This file.
5INSTALL - How to make things compile.
6Imakefile - For use with kerberos.
7README - What this package is. 4README - What this package is.
8VERSION - Which version this is and what was changed. 5VERSION - Which version this is and what was changed.
9KERBEROS - Kerberos version 4 notes.
10Makefile.PL - An old makefile to build with perl5, not current.
11Makefile.ssl - The SSLeay makefile
12Makefile.uni - The normal unix makefile.
13GNUmakefile - The makefile for use with glibc.
14makefile.bc - A Borland C makefile
15times - Some outputs from 'speed' on some machines.
16vms.com - For use when compiling under VMS
17
18/* My SunOS des(1) replacement */
19des.c - des(1) source code.
20des.man - des(1) manual.
21
22/* Testing and timing programs. */
23destest.c - Source for libdes.a test program.
24speed.c - Source for libdes.a timing program.
25rpw.c - Source for libdes.a testing password reading routines.
26 6
27/* libdes.a source code */ 7/* libdes.a source code */
28des_crypt.man - libdes.a manual page.
29des.h - Public libdes.a header file. 8des.h - Public libdes.a header file.
30ecb_enc.c - des_ecb_encrypt() source, this contains the basic DES code. 9ecb_enc.c - des_ecb_encrypt() source, this contains the basic DES code.
31ecb3_enc.c - des_ecb3_encrypt() source. 10ecb3_enc.c - des_ecb3_encrypt() source.
@@ -62,35 +41,4 @@ des_ver.h - header file for the external definition of the
62 version string. 41 version string.
63des.doc - SSLeay documentation for the library. 42des.doc - SSLeay documentation for the library.
64 43
65/* The perl scripts - you can ignore these files they are only
66 * included for the curious */
67des.pl - des in perl anyone? des_set_key and des_ecb_encrypt
68 both done in a perl library.
69testdes.pl - Testing program for des.pl
70doIP - Perl script used to develop IP xor/shift code.
71doPC1 - Perl script used to develop PC1 xor/shift code.
72doPC2 - Generates sk.h.
73PC1 - Output of doPC1 should be the same as output from PC1.
74PC2 - used in development of doPC2.
75shifts.pl - Perl library used by my perl scripts.
76
77/* I started making a perl5 dynamic library for libdes
78 * but did not fully finish, these files are part of that effort. */
79DES.pm
80DES.pod
81DES.xs
82t
83typemap
84
85/* The following are for use with sun RPC implementaions. */
86rpc_des.h
87rpc_enc.c
88
89/* The following are contibuted by Mark Murray <mark@grondar.za>. They
90 * are not normally built into libdes due to machine specific routines
91 * contained in them. They are for use in the most recent incarnation of
92 * export kerberos v 4 (eBones). */
93supp.c
94new_rkey.c
95
96 44
diff --git a/src/lib/libcrypto/des/INSTALL b/src/lib/libcrypto/des/INSTALL
deleted file mode 100644
index 8aebdfe110..0000000000
--- a/src/lib/libcrypto/des/INSTALL
+++ /dev/null
@@ -1,69 +0,0 @@
1Check the CC and CFLAGS lines in the makefile
2
3If your C library does not support the times(3) function, change the
4#define TIMES to
5#undef TIMES in speed.c
6If it does, check the HZ value for the times(3) function.
7If your system does not define CLK_TCK it will be assumed to
8be 100.0.
9
10If possible use gcc v 2.7.?
11Turn on the maximum optimising (normally '-O3 -fomit-frame-pointer' for gcc)
12In recent times, some system compilers give better performace.
13
14type 'make'
15
16run './destest' to check things are ok.
17run './rpw' to check the tty code for reading passwords works.
18run './speed' to see how fast those optimisations make the library run :-)
19run './des_opts' to determin the best compile time options.
20
21The output from des_opts should be put in the makefile options and des_enc.c
22should be rebuilt. For 64 bit computers, do not use the DES_PTR option.
23For the DEC Alpha, edit des.h and change DES_LONG to 'unsigned int'
24and then you can use the 'DES_PTR' option.
25
26The file options.txt has the options listed for best speed on quite a
27few systems. Look and the options (UNROLL, PTR, RISC2 etc) and then
28turn on the relevant option in the Makefile.
29
30There are some special Makefile targets that make life easier.
31make cc - standard cc build
32make gcc - standard gcc build
33make x86-elf - x86 assembler (elf), linux-elf.
34make x86-out - x86 assembler (a.out), FreeBSD
35make x86-solaris- x86 assembler
36make x86-bsdi - x86 assembler (a.out with primative assembler).
37
38If at all possible use the assembler (for Windows NT/95, use
39asm/win32.obj to link with). The x86 assembler is very very fast.
40
41A make install will by default install
42libdes.a in /usr/local/lib/libdes.a
43des in /usr/local/bin/des
44des_crypt.man in /usr/local/man/man3/des_crypt.3
45des.man in /usr/local/man/man1/des.1
46des.h in /usr/include/des.h
47
48des(1) should be compatible with sunOS's but I have been unable to
49test it.
50
51These routines should compile on MSDOS, most 32bit and 64bit version
52of Unix (BSD and SYSV) and VMS, without modification.
53The only problems should be #include files that are in the wrong places.
54
55These routines can be compiled under MSDOS.
56I have successfully encrypted files using des(1) under MSDOS and then
57decrypted the files on a SparcStation.
58I have been able to compile and test the routines with
59Microsoft C v 5.1 and Turbo C v 2.0.
60The code in this library is in no way optimised for the 16bit
61operation of MSDOS.
62
63When building for glibc, ignore all of the above and just unpack into
64glibc-1.??/des and then gmake as per normal.
65
66As a final note on performace. Certain CPUs like sparcs and Alpha often give
67a %10 speed difference depending on the link order. It is rather anoying
68when one program reports 'x' DES encrypts a second and another reports
69'x*0.9' the speed.
diff --git a/src/lib/libcrypto/des/KERBEROS b/src/lib/libcrypto/des/KERBEROS
deleted file mode 100644
index f401b10014..0000000000
--- a/src/lib/libcrypto/des/KERBEROS
+++ /dev/null
@@ -1,41 +0,0 @@
1 [ This is an old file, I don't know if it is true anymore
2 but I will leave the file here - eay 21/11/95 ]
3
4To use this library with Bones (kerberos without DES):
51) Get my modified Bones - eBones. It can be found on
6 gondwana.ecr.mu.oz.au (128.250.1.63) /pub/athena/eBones-p9.tar.Z
7 and
8 nic.funet.fi (128.214.6.100) /pub/unix/security/Kerberos/eBones-p9.tar.Z
9
102) Unpack this library in src/lib/des, makeing sure it is version
11 3.00 or greater (libdes.tar.93-10-07.Z). This versions differences
12 from the version in comp.sources.misc volume 29 patchlevel2.
13 The primarily difference is that it should compile under kerberos :-).
14 It can be found at.
15 ftp.psy.uq.oz.au (130.102.32.1) /pub/DES/libdes.tar.93-10-07.Z
16
17Now do a normal kerberos build and things should work.
18
19One problem I found when I was build on my local sun.
20---
21For sunOS 4.1.1 apply the following patch to src/util/ss/make_commands.c
22
23*** make_commands.c.orig Fri Jul 3 04:18:35 1987
24--- make_commands.c Wed May 20 08:47:42 1992
25***************
26*** 98,104 ****
27 if (!rename(o_file, z_file)) {
28 if (!vfork()) {
29 chdir("/tmp");
30! execl("/bin/ld", "ld", "-o", o_file+5, "-s", "-r", "-n",
31 z_file+5, 0);
32 perror("/bin/ld");
33 _exit(1);
34--- 98,104 ----
35 if (!rename(o_file, z_file)) {
36 if (!vfork()) {
37 chdir("/tmp");
38! execl("/bin/ld", "ld", "-o", o_file+5, "-s", "-r",
39 z_file+5, 0);
40 perror("/bin/ld");
41 _exit(1);
diff --git a/src/lib/libcrypto/des/des.pod b/src/lib/libcrypto/des/des.pod
deleted file mode 100644
index bf479e83d2..0000000000
--- a/src/lib/libcrypto/des/des.pod
+++ /dev/null
@@ -1,217 +0,0 @@
1=pod
2
3=head1 NAME
4
5des - encrypt or decrypt data using Data Encryption Standard
6
7=head1 SYNOPSIS
8
9B<des>
10(
11B<-e>
12|
13B<-E>
14) | (
15B<-d>
16|
17B<-D>
18) | (
19B<->[B<cC>][B<ckname>]
20) |
21[
22B<-b3hfs>
23] [
24B<-k>
25I<key>
26]
27] [
28B<-u>[I<uuname>]
29[
30I<input-file>
31[
32I<output-file>
33] ]
34
35=head1 NOTE
36
37This page describes the B<des> stand-alone program, not the B<openssl des>
38command.
39
40=head1 DESCRIPTION
41
42B<des>
43encrypts and decrypts data using the
44Data Encryption Standard algorithm.
45One of
46B<-e>, B<-E>
47(for encrypt) or
48B<-d>, B<-D>
49(for decrypt) must be specified.
50It is also possible to use
51B<-c>
52or
53B<-C>
54in conjunction or instead of the a encrypt/decrypt option to generate
55a 16 character hexadecimal checksum, generated via the
56I<des_cbc_cksum>.
57
58Two standard encryption modes are supported by the
59B<des>
60program, Cipher Block Chaining (the default) and Electronic Code Book
61(specified with
62B<-b>).
63
64The key used for the DES
65algorithm is obtained by prompting the user unless the
66B<-k>
67I<key>
68option is given.
69If the key is an argument to the
70B<des>
71command, it is potentially visible to users executing
72ps(1)
73or a derivative. To minimise this possibility,
74B<des>
75takes care to destroy the key argument immediately upon entry.
76If your shell keeps a history file be careful to make sure it is not
77world readable.
78
79Since this program attempts to maintain compatibility with sunOS's
80des(1) command, there are 2 different methods used to convert the user
81supplied key to a des key.
82Whenever and one or more of
83B<-E>, B<-D>, B<-C>
84or
85B<-3>
86options are used, the key conversion procedure will not be compatible
87with the sunOS des(1) version but will use all the user supplied
88character to generate the des key.
89B<des>
90command reads from standard input unless
91I<input-file>
92is specified and writes to standard output unless
93I<output-file>
94is given.
95
96=head1 OPTIONS
97
98=over 4
99
100=item B<-b>
101
102Select ECB
103(eight bytes at a time) encryption mode.
104
105=item B<-3>
106
107Encrypt using triple encryption.
108By default triple cbc encryption is used but if the
109B<-b>
110option is used then triple ECB encryption is performed.
111If the key is less than 8 characters long, the flag has no effect.
112
113=item B<-e>
114
115Encrypt data using an 8 byte key in a manner compatible with sunOS
116des(1).
117
118=item B<-E>
119
120Encrypt data using a key of nearly unlimited length (1024 bytes).
121This will product a more secure encryption.
122
123=item B<-d>
124
125Decrypt data that was encrypted with the B<-e> option.
126
127=item B<-D>
128
129Decrypt data that was encrypted with the B<-E> option.
130
131=item B<-c>
132
133Generate a 16 character hexadecimal cbc checksum and output this to
134stderr.
135If a filename was specified after the
136B<-c>
137option, the checksum is output to that file.
138The checksum is generated using a key generated in a sunOS compatible
139manner.
140
141=item B<-C>
142
143A cbc checksum is generated in the same manner as described for the
144B<-c>
145option but the DES key is generated in the same manner as used for the
146B<-E>
147and
148B<-D>
149options
150
151=item B<-f>
152
153Does nothing - allowed for compatibility with sunOS des(1) command.
154
155=item B<-s>
156
157Does nothing - allowed for compatibility with sunOS des(1) command.
158
159=item B<-k> I<key>
160
161Use the encryption
162I<key>
163specified.
164
165=item B<-h>
166
167The
168I<key>
169is assumed to be a 16 character hexadecimal number.
170If the
171B<-3>
172option is used the key is assumed to be a 32 character hexadecimal
173number.
174
175=item B<-u>
176
177This flag is used to read and write uuencoded files. If decrypting,
178the input file is assumed to contain uuencoded, DES encrypted data.
179If encrypting, the characters following the B<-u> are used as the name of
180the uuencoded file to embed in the begin line of the uuencoded
181output. If there is no name specified after the B<-u>, the name text.des
182will be embedded in the header.
183
184=head1 SEE ALSO
185
186ps(1),
187L<des_crypt(3)|des_crypt(3)>
188
189=head1 BUGS
190
191The problem with using the
192B<-e>
193option is the short key length.
194It would be better to use a real 56-bit key rather than an
195ASCII-based 56-bit pattern. Knowing that the key was derived from ASCII
196radically reduces the time necessary for a brute-force cryptographic attack.
197My attempt to remove this problem is to add an alternative text-key to
198DES-key function. This alternative function (accessed via
199B<-E>, B<-D>, B<-S>
200and
201B<-3>)
202uses DES to help generate the key.
203
204Be carefully when using the B<-u> option. Doing B<des -ud> I<filename> will
205not decrypt filename (the B<-u> option will gobble the B<-d> option).
206
207The VMS operating system operates in a world where files are always a
208multiple of 512 bytes. This causes problems when encrypted data is
209send from Unix to VMS since a 88 byte file will suddenly be padded
210with 424 null bytes. To get around this problem, use the B<-u> option
211to uuencode the data before it is send to the VMS system.
212
213=head1 AUTHOR
214
215Eric Young (eay@cryptsoft.com)
216
217=cut
diff --git a/src/lib/libcrypto/des/makefile.bc b/src/lib/libcrypto/des/makefile.bc
deleted file mode 100644
index 1fe6d4915a..0000000000
--- a/src/lib/libcrypto/des/makefile.bc
+++ /dev/null
@@ -1,50 +0,0 @@
1#
2# Origional BC Makefile from Teun <Teun.Nijssen@kub.nl>
3#
4#
5CC = bcc
6TLIB = tlib /0 /C
7# note: the -3 flag produces code for 386, 486, Pentium etc; omit it for 286s
8OPTIMIZE= -3 -O2
9#WINDOWS= -W
10CFLAGS = -c -ml -d $(OPTIMIZE) $(WINDOWS) -DMSDOS
11LFLAGS = -ml $(WINDOWS)
12
13.c.obj:
14 $(CC) $(CFLAGS) $*.c
15
16.obj.exe:
17 $(CC) $(LFLAGS) -e$*.exe $*.obj libdes.lib
18
19all: $(LIB) destest.exe rpw.exe des.exe speed.exe
20
21# "make clean": use a directory containing only libdes .exe and .obj files...
22clean:
23 del *.exe
24 del *.obj
25 del libdes.lib
26 del libdes.rsp
27
28OBJS= cbc_cksm.obj cbc_enc.obj ecb_enc.obj pcbc_enc.obj \
29 qud_cksm.obj rand_key.obj set_key.obj str2key.obj \
30 enc_read.obj enc_writ.obj fcrypt.obj cfb_enc.obj \
31 ecb3_enc.obj ofb_enc.obj cbc3_enc.obj read_pwd.obj\
32 cfb64enc.obj ofb64enc.obj ede_enc.obj cfb64ede.obj\
33 ofb64ede.obj supp.obj
34
35LIB= libdes.lib
36
37$(LIB): $(OBJS)
38 del $(LIB)
39 makersp "+%s &\n" &&|
40 $(OBJS)
41| >libdes.rsp
42 $(TLIB) libdes.lib @libdes.rsp,nul
43 del libdes.rsp
44
45destest.exe: destest.obj libdes.lib
46rpw.exe: rpw.obj libdes.lib
47speed.exe: speed.obj libdes.lib
48des.exe: des.obj libdes.lib
49
50
diff --git a/src/lib/libcrypto/des/rpw.c b/src/lib/libcrypto/des/rpw.c
deleted file mode 100644
index 8a9473c4f9..0000000000
--- a/src/lib/libcrypto/des/rpw.c
+++ /dev/null
@@ -1,99 +0,0 @@
1/* crypto/des/rpw.c */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved.
4 *
5 * This package is an SSL implementation written
6 * by Eric Young (eay@cryptsoft.com).
7 * The implementation was written so as to conform with Netscapes SSL.
8 *
9 * This library is free for commercial and non-commercial use as long as
10 * the following conditions are aheared to. The following conditions
11 * apply to all code found in this distribution, be it the RC4, RSA,
12 * lhash, DES, etc., code; not just the SSL code. The SSL documentation
13 * included with this distribution is covered by the same copyright terms
14 * except that the holder is Tim Hudson (tjh@cryptsoft.com).
15 *
16 * Copyright remains Eric Young's, and as such any Copyright notices in
17 * the code are not to be removed.
18 * If this package is used in a product, Eric Young should be given attribution
19 * as the author of the parts of the library used.
20 * This can be in the form of a textual message at program startup or
21 * in documentation (online or textual) provided with the package.
22 *
23 * Redistribution and use in source and binary forms, with or without
24 * modification, are permitted provided that the following conditions
25 * are met:
26 * 1. Redistributions of source code must retain the copyright
27 * notice, this list of conditions and the following disclaimer.
28 * 2. Redistributions in binary form must reproduce the above copyright
29 * notice, this list of conditions and the following disclaimer in the
30 * documentation and/or other materials provided with the distribution.
31 * 3. All advertising materials mentioning features or use of this software
32 * must display the following acknowledgement:
33 * "This product includes cryptographic software written by
34 * Eric Young (eay@cryptsoft.com)"
35 * The word 'cryptographic' can be left out if the rouines from the library
36 * being used are not cryptographic related :-).
37 * 4. If you include any Windows specific code (or a derivative thereof) from
38 * the apps directory (application code) you must include an acknowledgement:
39 * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
40 *
41 * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
42 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
43 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
44 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
45 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
46 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
47 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
48 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
49 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
50 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
51 * SUCH DAMAGE.
52 *
53 * The licence and distribution terms for any publically available version or
54 * derivative of this code cannot be changed. i.e. this code cannot simply be
55 * copied and put under another distribution licence
56 * [including the GNU Public Licence.]
57 */
58
59#include <stdio.h>
60#include <openssl/des.h>
61
62int main(int argc, char *argv[])
63 {
64 DES_cblock k,k1;
65 int i;
66
67 printf("read passwd\n");
68 if ((i=des_read_password(&k,"Enter password:",0)) == 0)
69 {
70 printf("password = ");
71 for (i=0; i<8; i++)
72 printf("%02x ",k[i]);
73 }
74 else
75 printf("error %d\n",i);
76 printf("\n");
77 printf("read 2passwds and verify\n");
78 if ((i=des_read_2passwords(&k,&k1,
79 "Enter verified password:",1)) == 0)
80 {
81 printf("password1 = ");
82 for (i=0; i<8; i++)
83 printf("%02x ",k[i]);
84 printf("\n");
85 printf("password2 = ");
86 for (i=0; i<8; i++)
87 printf("%02x ",k1[i]);
88 printf("\n");
89 exit(1);
90 }
91 else
92 {
93 printf("error %d\n",i);
94 exit(0);
95 }
96#ifdef LINT
97 return(0);
98#endif
99 }
diff --git a/src/lib/libcrypto/des/speed.c b/src/lib/libcrypto/des/speed.c
deleted file mode 100644
index 2f52c1c40f..0000000000
--- a/src/lib/libcrypto/des/speed.c
+++ /dev/null
@@ -1,313 +0,0 @@
1/* crypto/des/speed.c */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved.
4 *
5 * This package is an SSL implementation written
6 * by Eric Young (eay@cryptsoft.com).
7 * The implementation was written so as to conform with Netscapes SSL.
8 *
9 * This library is free for commercial and non-commercial use as long as
10 * the following conditions are aheared to. The following conditions
11 * apply to all code found in this distribution, be it the RC4, RSA,
12 * lhash, DES, etc., code; not just the SSL code. The SSL documentation
13 * included with this distribution is covered by the same copyright terms
14 * except that the holder is Tim Hudson (tjh@cryptsoft.com).
15 *
16 * Copyright remains Eric Young's, and as such any Copyright notices in
17 * the code are not to be removed.
18 * If this package is used in a product, Eric Young should be given attribution
19 * as the author of the parts of the library used.
20 * This can be in the form of a textual message at program startup or
21 * in documentation (online or textual) provided with the package.
22 *
23 * Redistribution and use in source and binary forms, with or without
24 * modification, are permitted provided that the following conditions
25 * are met:
26 * 1. Redistributions of source code must retain the copyright
27 * notice, this list of conditions and the following disclaimer.
28 * 2. Redistributions in binary form must reproduce the above copyright
29 * notice, this list of conditions and the following disclaimer in the
30 * documentation and/or other materials provided with the distribution.
31 * 3. All advertising materials mentioning features or use of this software
32 * must display the following acknowledgement:
33 * "This product includes cryptographic software written by
34 * Eric Young (eay@cryptsoft.com)"
35 * The word 'cryptographic' can be left out if the rouines from the library
36 * being used are not cryptographic related :-).
37 * 4. If you include any Windows specific code (or a derivative thereof) from
38 * the apps directory (application code) you must include an acknowledgement:
39 * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
40 *
41 * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
42 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
43 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
44 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
45 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
46 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
47 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
48 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
49 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
50 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
51 * SUCH DAMAGE.
52 *
53 * The licence and distribution terms for any publically available version or
54 * derivative of this code cannot be changed. i.e. this code cannot simply be
55 * copied and put under another distribution licence
56 * [including the GNU Public Licence.]
57 */
58
59/* 11-Sep-92 Andrew Daviel Support for Silicon Graphics IRIX added */
60/* 06-Apr-92 Luke Brennan Support for VMS and add extra signal calls */
61
62#if !defined(OPENSSL_SYS_MSDOS) && (!defined(OPENSSL_SYS_VMS) || defined(__DECC)) && !defined(OPENSSL_SYS_MACOSX)
63#define TIMES
64#endif
65
66#include <stdio.h>
67
68#include <openssl/e_os2.h>
69#include <unistd.h>
70
71#ifndef OPENSSL_SYS_NETWARE
72#include <signal.h>
73#define crypt(c,s) (des_crypt((c),(s)))
74#endif
75
76#ifndef _IRIX
77#include <time.h>
78#endif
79#ifdef TIMES
80#include <sys/types.h>
81#include <sys/times.h>
82#endif
83
84/* Depending on the VMS version, the tms structure is perhaps defined.
85 The __TMS macro will show if it was. If it wasn't defined, we should
86 undefine TIMES, since that tells the rest of the program how things
87 should be handled. -- Richard Levitte */
88#if defined(OPENSSL_SYS_VMS_DECC) && !defined(__TMS)
89#undef TIMES
90#endif
91
92#ifndef TIMES
93#include <sys/timeb.h>
94#endif
95
96#if defined(sun) || defined(__ultrix)
97#define _POSIX_SOURCE
98#include <limits.h>
99#include <sys/param.h>
100#endif
101
102#include <openssl/des.h>
103
104/* The following if from times(3) man page. It may need to be changed */
105#ifndef HZ
106# ifndef CLK_TCK
107# ifndef _BSD_CLK_TCK_ /* FreeBSD fix */
108# define HZ 100.0
109# else /* _BSD_CLK_TCK_ */
110# define HZ ((double)_BSD_CLK_TCK_)
111# endif
112# else /* CLK_TCK */
113# define HZ ((double)CLK_TCK)
114# endif
115#endif
116
117#define BUFSIZE ((long)1024)
118long run=0;
119
120double Time_F(int s);
121#ifdef SIGALRM
122#if defined(__STDC__) || defined(sgi) || defined(_AIX)
123#define SIGRETTYPE void
124#else
125#define SIGRETTYPE int
126#endif
127
128SIGRETTYPE sig_done(int sig);
129SIGRETTYPE sig_done(int sig)
130 {
131 signal(SIGALRM,sig_done);
132 run=0;
133#ifdef LINT
134 sig=sig;
135#endif
136 }
137#endif
138
139#define START 0
140#define STOP 1
141
142double Time_F(int s)
143 {
144 double ret;
145#ifdef TIMES
146 static struct tms tstart,tend;
147
148 if (s == START)
149 {
150 times(&tstart);
151 return(0);
152 }
153 else
154 {
155 times(&tend);
156 ret=((double)(tend.tms_utime-tstart.tms_utime))/HZ;
157 return((ret == 0.0)?1e-6:ret);
158 }
159#else /* !times() */
160 static struct timeb tstart,tend;
161 long i;
162
163 if (s == START)
164 {
165 ftime(&tstart);
166 return(0);
167 }
168 else
169 {
170 ftime(&tend);
171 i=(long)tend.millitm-(long)tstart.millitm;
172 ret=((double)(tend.time-tstart.time))+((double)i)/1e3;
173 return((ret == 0.0)?1e-6:ret);
174 }
175#endif
176 }
177
178int main(int argc, char **argv)
179 {
180 long count;
181 static unsigned char buf[BUFSIZE];
182 static DES_cblock key ={0x12,0x34,0x56,0x78,0x9a,0xbc,0xde,0xf0};
183 static DES_cblock key2={0x34,0x56,0x78,0x9a,0xbc,0xde,0xf0,0x12};
184 static DES_cblock key3={0x56,0x78,0x9a,0xbc,0xde,0xf0,0x12,0x34};
185 DES_key_schedule sch,sch2,sch3;
186 double a,b,c,d,e;
187#ifndef SIGALRM
188 long ca,cb,cc,cd,ce;
189#endif
190
191#ifndef TIMES
192 printf("To get the most accurate results, try to run this\n");
193 printf("program when this computer is idle.\n");
194#endif
195
196 DES_set_key_unchecked(&key2,&sch2);
197 DES_set_key_unchecked(&key3,&sch3);
198
199#ifndef SIGALRM
200 printf("First we calculate the approximate speed ...\n");
201 DES_set_key_unchecked(&key,&sch);
202 count=10;
203 do {
204 long i;
205 DES_LONG data[2];
206
207 count*=2;
208 Time_F(START);
209 for (i=count; i; i--)
210 DES_encrypt1(data,&sch,DES_ENCRYPT);
211 d=Time_F(STOP);
212 } while (d < 3.0);
213 ca=count;
214 cb=count*3;
215 cc=count*3*8/BUFSIZE+1;
216 cd=count*8/BUFSIZE+1;
217 ce=count/20+1;
218 printf("Doing set_key %ld times\n",ca);
219#define COND(d) (count != (d))
220#define COUNT(d) (d)
221#else
222#define COND(c) (run)
223#define COUNT(d) (count)
224 signal(SIGALRM,sig_done);
225 printf("Doing set_key for 10 seconds\n");
226 alarm(10);
227#endif
228
229 Time_F(START);
230 for (count=0,run=1; COND(ca); count++)
231 DES_set_key_unchecked(&key,&sch);
232 d=Time_F(STOP);
233 printf("%ld set_key's in %.2f seconds\n",count,d);
234 a=((double)COUNT(ca))/d;
235
236#ifdef SIGALRM
237 printf("Doing DES_encrypt's for 10 seconds\n");
238 alarm(10);
239#else
240 printf("Doing DES_encrypt %ld times\n",cb);
241#endif
242 Time_F(START);
243 for (count=0,run=1; COND(cb); count++)
244 {
245 DES_LONG data[2];
246
247 DES_encrypt1(data,&sch,DES_ENCRYPT);
248 }
249 d=Time_F(STOP);
250 printf("%ld DES_encrypt's in %.2f second\n",count,d);
251 b=((double)COUNT(cb)*8)/d;
252
253#ifdef SIGALRM
254 printf("Doing DES_cbc_encrypt on %ld byte blocks for 10 seconds\n",
255 BUFSIZE);
256 alarm(10);
257#else
258 printf("Doing DES_cbc_encrypt %ld times on %ld byte blocks\n",cc,
259 BUFSIZE);
260#endif
261 Time_F(START);
262 for (count=0,run=1; COND(cc); count++)
263 DES_ncbc_encrypt(buf,buf,BUFSIZE,&sch,
264 &key,DES_ENCRYPT);
265 d=Time_F(STOP);
266 printf("%ld DES_cbc_encrypt's of %ld byte blocks in %.2f second\n",
267 count,BUFSIZE,d);
268 c=((double)COUNT(cc)*BUFSIZE)/d;
269
270#ifdef SIGALRM
271 printf("Doing DES_ede_cbc_encrypt on %ld byte blocks for 10 seconds\n",
272 BUFSIZE);
273 alarm(10);
274#else
275 printf("Doing DES_ede_cbc_encrypt %ld times on %ld byte blocks\n",cd,
276 BUFSIZE);
277#endif
278 Time_F(START);
279 for (count=0,run=1; COND(cd); count++)
280 DES_ede3_cbc_encrypt(buf,buf,BUFSIZE,
281 &sch,
282 &sch2,
283 &sch3,
284 &key,
285 DES_ENCRYPT);
286 d=Time_F(STOP);
287 printf("%ld DES_ede_cbc_encrypt's of %ld byte blocks in %.2f second\n",
288 count,BUFSIZE,d);
289 d=((double)COUNT(cd)*BUFSIZE)/d;
290
291#ifdef SIGALRM
292 printf("Doing crypt for 10 seconds\n");
293 alarm(10);
294#else
295 printf("Doing crypt %ld times\n",ce);
296#endif
297 Time_F(START);
298 for (count=0,run=1; COND(ce); count++)
299 crypt("testing1","ef");
300 e=Time_F(STOP);
301 printf("%ld crypts in %.2f second\n",count,e);
302 e=((double)COUNT(ce))/e;
303
304 printf("set_key per sec = %12.2f (%9.3fuS)\n",a,1.0e6/a);
305 printf("DES raw ecb bytes per sec = %12.2f (%9.3fuS)\n",b,8.0e6/b);
306 printf("DES cbc bytes per sec = %12.2f (%9.3fuS)\n",c,8.0e6/c);
307 printf("DES ede cbc bytes per sec = %12.2f (%9.3fuS)\n",d,8.0e6/d);
308 printf("crypt per sec = %12.2f (%9.3fuS)\n",e,1.0e6/e);
309 exit(0);
310#if defined(LINT) || defined(OPENSSL_SYS_MSDOS)
311 return(0);
312#endif
313 }
diff --git a/src/lib/libcrypto/des/t/test b/src/lib/libcrypto/des/t/test
deleted file mode 100644
index 97acd0552e..0000000000
--- a/src/lib/libcrypto/des/t/test
+++ /dev/null
@@ -1,27 +0,0 @@
1#!./perl
2
3BEGIN { push(@INC, qw(../../../lib ../../lib ../lib lib)); }
4
5use DES;
6
7$key='00000000';
8$ks=DES::set_key($key);
9@a=split(//,$ks);
10foreach (@a) { printf "%02x-",ord($_); }
11print "\n";
12
13
14$key=DES::random_key();
15print "($_)\n";
16@a=split(//,$key);
17foreach (@a) { printf "%02x-",ord($_); }
18print "\n";
19$str="this is and again into the breach";
20($k1,$k2)=DES::string_to_2keys($str);
21@a=split(//,$k1);
22foreach (@a) { printf "%02x-",ord($_); }
23print "\n";
24@a=split(//,$k2);
25foreach (@a) { printf "%02x-",ord($_); }
26print "\n";
27
diff --git a/src/lib/libcrypto/des/times/486-50.sol b/src/lib/libcrypto/des/times/486-50.sol
deleted file mode 100644
index 0de62d6db3..0000000000
--- a/src/lib/libcrypto/des/times/486-50.sol
+++ /dev/null
@@ -1,16 +0,0 @@
1Solaris 2.4, 486 50mhz, gcc 2.6.3
2options des ecb/s
316 r2 i 43552.51 100.0%
416 r1 i 43487.45 99.9%
516 c p 43003.23 98.7%
616 r2 p 42339.00 97.2%
716 c i 41900.91 96.2%
816 r1 p 41360.64 95.0%
9 4 c i 38728.48 88.9%
10 4 c p 38225.63 87.8%
11 4 r1 i 38085.79 87.4%
12 4 r2 i 37825.64 86.9%
13 4 r2 p 34611.00 79.5%
14 4 r1 p 31802.00 73.0%
15-DDES_UNROLL -DDES_RISC2
16
diff --git a/src/lib/libcrypto/des/times/586-100.lnx b/src/lib/libcrypto/des/times/586-100.lnx
deleted file mode 100644
index 4323914a11..0000000000
--- a/src/lib/libcrypto/des/times/586-100.lnx
+++ /dev/null
@@ -1,20 +0,0 @@
1Pentium 100
2Linux 2 kernel
3gcc 2.7.0 -O3 -fomit-frame-pointer
4No X server running, just a console, it makes the top speed jump from 151,000
5to 158,000 :-).
6options des ecb/s
7assember 281000.00 177.1%
816 r1 p 158667.40 100.0%
916 r1 i 148471.70 93.6%
1016 r2 p 143961.80 90.7%
1116 r2 i 141689.20 89.3%
12 4 r1 i 140100.00 88.3%
13 4 r2 i 134049.40 84.5%
1416 c i 124145.20 78.2%
1516 c p 121584.20 76.6%
16 4 c i 118116.00 74.4%
17 4 r2 p 117977.90 74.4%
18 4 c p 114971.40 72.5%
19 4 r1 p 114578.40 72.2%
20-DDES_UNROLL -DDES_RISC1 -DDES_PTR
diff --git a/src/lib/libcrypto/des/times/686-200.fre b/src/lib/libcrypto/des/times/686-200.fre
deleted file mode 100644
index 7d83f6adee..0000000000
--- a/src/lib/libcrypto/des/times/686-200.fre
+++ /dev/null
@@ -1,18 +0,0 @@
1Pentium 100
2Free BSD 2.1.5 kernel
3gcc 2.7.2.2 -O3 -fomit-frame-pointer
4options des ecb/s
5assember 578000.00 133.1%
616 r2 i 434454.80 100.0%
716 r1 i 433621.43 99.8%
816 r2 p 431375.69 99.3%
9 4 r1 i 423722.30 97.5%
10 4 r2 i 422399.40 97.2%
1116 r1 p 421739.40 97.1%
1216 c i 399027.94 91.8%
1316 c p 372251.70 85.7%
14 4 c i 365118.35 84.0%
15 4 c p 352880.51 81.2%
16 4 r2 p 255104.90 58.7%
17 4 r1 p 251289.18 57.8%
18-DDES_UNROLL -DDES_RISC2
diff --git a/src/lib/libcrypto/des/times/aix.cc b/src/lib/libcrypto/des/times/aix.cc
deleted file mode 100644
index d96b74e2ce..0000000000
--- a/src/lib/libcrypto/des/times/aix.cc
+++ /dev/null
@@ -1,26 +0,0 @@
1From: Paco Garcia <pgarcia@cam.es>
2
3This machine is a Bull Estrella Minitower Model MT604-100
4Processor : PPC604
5P.Speed : 100Mhz
6Data/Instr Cache : 16 K
7L2 Cache : 256 K
8PCI BUS Speed : 33 Mhz
9TransfRate PCI : 132 MB/s
10Memory : 96 MB
11
12options des ecb/s
13 4 c p 275118.61 100.0%
14 4 c i 273545.07 99.4%
15 4 r2 p 270441.02 98.3%
16 4 r1 p 253052.15 92.0%
17 4 r2 i 240842.97 87.5%
18 4 r1 i 240556.66 87.4%
1916 c i 224603.99 81.6%
2016 c p 224483.98 81.6%
2116 r2 p 215691.19 78.4%
2216 r1 p 208332.83 75.7%
2316 r1 i 199206.50 72.4%
2416 r2 i 198963.70 72.3%
25-DDES_PTR
26
diff --git a/src/lib/libcrypto/des/times/alpha.cc b/src/lib/libcrypto/des/times/alpha.cc
deleted file mode 100644
index 95c17efae7..0000000000
--- a/src/lib/libcrypto/des/times/alpha.cc
+++ /dev/null
@@ -1,18 +0,0 @@
1cc -O2
2DES_LONG is 'unsigned int'
3
4options des ecb/s
5 4 r2 p 181146.14 100.0%
616 r2 p 172102.94 95.0%
7 4 r2 i 165424.11 91.3%
816 c p 160468.64 88.6%
9 4 c p 156653.59 86.5%
10 4 c i 155245.18 85.7%
11 4 r1 p 154729.68 85.4%
1216 r2 i 154137.69 85.1%
1316 r1 p 152357.96 84.1%
1416 c i 148743.91 82.1%
15 4 r1 i 146695.59 81.0%
1616 r1 i 144961.00 80.0%
17-DDES_RISC2 -DDES_PTR
18
diff --git a/src/lib/libcrypto/des/times/hpux.cc b/src/lib/libcrypto/des/times/hpux.cc
deleted file mode 100644
index 3de856ddac..0000000000
--- a/src/lib/libcrypto/des/times/hpux.cc
+++ /dev/null
@@ -1,17 +0,0 @@
1HPUX 10 - 9000/887 - cc -D_HPUX_SOURCE -Aa +ESlit +O2 -Wl,-a,archive
2
3options des ecb/s
416 c i 149448.90 100.0%
5 4 c i 145861.79 97.6%
616 r2 i 141710.96 94.8%
716 r1 i 139455.33 93.3%
8 4 r2 i 138800.00 92.9%
9 4 r1 i 136692.65 91.5%
1016 r2 p 110228.17 73.8%
1116 r1 p 109397.07 73.2%
1216 c p 109209.89 73.1%
13 4 c p 108014.71 72.3%
14 4 r2 p 107873.88 72.2%
15 4 r1 p 107685.83 72.1%
16-DDES_UNROLL
17
diff --git a/src/lib/libcrypto/des/times/sparc.gcc b/src/lib/libcrypto/des/times/sparc.gcc
deleted file mode 100644
index 8eaa042104..0000000000
--- a/src/lib/libcrypto/des/times/sparc.gcc
+++ /dev/null
@@ -1,17 +0,0 @@
1solaris 2.5.1 - sparc 10 50mhz - gcc 2.7.2
2
3options des ecb/s
416 c i 124382.70 100.0%
5 4 c i 118884.68 95.6%
616 c p 112261.20 90.3%
716 r2 i 111777.10 89.9%
816 r2 p 108896.30 87.5%
916 r1 p 108791.59 87.5%
10 4 c p 107290.10 86.3%
11 4 r1 p 104583.80 84.1%
1216 r1 i 104206.20 83.8%
13 4 r2 p 103709.80 83.4%
14 4 r2 i 98306.43 79.0%
15 4 r1 i 91525.80 73.6%
16-DDES_UNROLL
17
diff --git a/src/lib/libcrypto/des/times/usparc.cc b/src/lib/libcrypto/des/times/usparc.cc
deleted file mode 100644
index 0864285ef6..0000000000
--- a/src/lib/libcrypto/des/times/usparc.cc
+++ /dev/null
@@ -1,31 +0,0 @@
1solaris 2.5.1 usparc 167mhz?? - SC4.0 cc -fast -Xa -xO5
2
3For the ultra sparc, SunC 4.0 cc -fast -Xa -xO5, running 'des_opts'
4gives a speed of 475,000 des/s while 'speed' gives 417,000 des/s.
5I believe the difference is tied up in optimisation that the compiler
6is able to perform when the code is 'inlined'. For 'speed', the DES
7routines are being linked from a library. I'll record the higher
8speed since if performance is everything, you can always inline
9'des_enc.c'.
10
11[ 16-Jan-06 - I've been playing with the
12 '-xtarget=ultra -xarch=v8plus -Xa -xO5 -Xa'
13 and while it makes the des_opts numbers much slower, it makes the
14 actual 'speed' numbers look better which is a realistic version of
15 using the libraries. ]
16
17options des ecb/s
1816 r1 p 475516.90 100.0%
1916 r2 p 439388.10 92.4%
2016 c i 427001.40 89.8%
2116 c p 419516.50 88.2%
22 4 r2 p 409491.70 86.1%
23 4 r1 p 404266.90 85.0%
24 4 c p 398121.00 83.7%
25 4 c i 370588.40 77.9%
26 4 r1 i 362742.20 76.3%
2716 r2 i 331275.50 69.7%
2816 r1 i 324730.60 68.3%
29 4 r2 i 63535.10 13.4% <-- very very weird, must be cache problems.
30-DDES_UNROLL -DDES_RISC1 -DDES_PTR
31
diff --git a/src/lib/libcrypto/des/typemap b/src/lib/libcrypto/des/typemap
deleted file mode 100644
index a524f53634..0000000000
--- a/src/lib/libcrypto/des/typemap
+++ /dev/null
@@ -1,34 +0,0 @@
1#
2# DES SECTION
3#
4deschar * T_DESCHARP
5des_cblock * T_CBLOCK
6des_cblock T_CBLOCK
7des_key_schedule T_SCHEDULE
8des_key_schedule * T_SCHEDULE
9
10INPUT
11T_CBLOCK
12 $var=(des_cblock *)SvPV($arg,len);
13 if (len < DES_KEY_SZ)
14 {
15 croak(\"$var needs to be at least %u bytes long\",DES_KEY_SZ);
16 }
17
18T_SCHEDULE
19 $var=(des_key_schedule *)SvPV($arg,len);
20 if (len < DES_SCHEDULE_SZ)
21 {
22 croak(\"$var needs to be at least %u bytes long\",
23 DES_SCHEDULE_SZ);
24 }
25
26OUTPUT
27T_CBLOCK
28 sv_setpvn($arg,(char *)$var,DES_KEY_SZ);
29
30T_SCHEDULE
31 sv_setpvn($arg,(char *)$var,DES_SCHEDULE_SZ);
32
33T_DESCHARP
34 sv_setpvn($arg,(char *)$var,len);
diff --git a/src/lib/libssl/src/crypto/des/DES.pm b/src/lib/libssl/src/crypto/des/DES.pm
deleted file mode 100644
index 6a175b6ca4..0000000000
--- a/src/lib/libssl/src/crypto/des/DES.pm
+++ /dev/null
@@ -1,19 +0,0 @@
1package DES;
2
3require Exporter;
4require DynaLoader;
5@ISA = qw(Exporter DynaLoader);
6# Items to export into callers namespace by default
7# (move infrequently used names to @EXPORT_OK below)
8@EXPORT = qw(
9);
10# Other items we are prepared to export if requested
11@EXPORT_OK = qw(
12crypt
13);
14
15# Preloaded methods go here. Autoload methods go after __END__, and are
16# processed by the autosplit program.
17bootstrap DES;
181;
19__END__
diff --git a/src/lib/libssl/src/crypto/des/DES.xs b/src/lib/libssl/src/crypto/des/DES.xs
deleted file mode 100644
index b8050b9edf..0000000000
--- a/src/lib/libssl/src/crypto/des/DES.xs
+++ /dev/null
@@ -1,268 +0,0 @@
1#include "EXTERN.h"
2#include "perl.h"
3#include "XSUB.h"
4#include "des.h"
5
6#define deschar char
7static STRLEN len;
8
9static int
10not_here(s)
11char *s;
12{
13 croak("%s not implemented on this architecture", s);
14 return -1;
15}
16
17MODULE = DES PACKAGE = DES PREFIX = des_
18
19char *
20des_crypt(buf,salt)
21 char * buf
22 char * salt
23
24void
25des_set_odd_parity(key)
26 des_cblock * key
27PPCODE:
28 {
29 SV *s;
30
31 s=sv_newmortal();
32 sv_setpvn(s,(char *)key,8);
33 des_set_odd_parity((des_cblock *)SvPV(s,na));
34 PUSHs(s);
35 }
36
37int
38des_is_weak_key(key)
39 des_cblock * key
40
41des_key_schedule
42des_set_key(key)
43 des_cblock * key
44CODE:
45 des_set_key(key,RETVAL);
46OUTPUT:
47RETVAL
48
49des_cblock
50des_ecb_encrypt(input,ks,encrypt)
51 des_cblock * input
52 des_key_schedule * ks
53 int encrypt
54CODE:
55 des_ecb_encrypt(input,&RETVAL,*ks,encrypt);
56OUTPUT:
57RETVAL
58
59void
60des_cbc_encrypt(input,ks,ivec,encrypt)
61 char * input
62 des_key_schedule * ks
63 des_cblock * ivec
64 int encrypt
65PPCODE:
66 {
67 SV *s;
68 STRLEN len,l;
69 char *c;
70
71 l=SvCUR(ST(0));
72 len=((((unsigned long)l)+7)/8)*8;
73 s=sv_newmortal();
74 sv_setpvn(s,"",0);
75 SvGROW(s,len);
76 SvCUR_set(s,len);
77 c=(char *)SvPV(s,na);
78 des_cbc_encrypt((des_cblock *)input,(des_cblock *)c,
79 l,*ks,ivec,encrypt);
80 sv_setpvn(ST(2),(char *)c[len-8],8);
81 PUSHs(s);
82 }
83
84void
85des_cbc3_encrypt(input,ks1,ks2,ivec1,ivec2,encrypt)
86 char * input
87 des_key_schedule * ks1
88 des_key_schedule * ks2
89 des_cblock * ivec1
90 des_cblock * ivec2
91 int encrypt
92PPCODE:
93 {
94 SV *s;
95 STRLEN len,l;
96
97 l=SvCUR(ST(0));
98 len=((((unsigned long)l)+7)/8)*8;
99 s=sv_newmortal();
100 sv_setpvn(s,"",0);
101 SvGROW(s,len);
102 SvCUR_set(s,len);
103 des_3cbc_encrypt((des_cblock *)input,(des_cblock *)SvPV(s,na),
104 l,*ks1,*ks2,ivec1,ivec2,encrypt);
105 sv_setpvn(ST(3),(char *)ivec1,8);
106 sv_setpvn(ST(4),(char *)ivec2,8);
107 PUSHs(s);
108 }
109
110void
111des_cbc_cksum(input,ks,ivec)
112 char * input
113 des_key_schedule * ks
114 des_cblock * ivec
115PPCODE:
116 {
117 SV *s1,*s2;
118 STRLEN len,l;
119 des_cblock c;
120 unsigned long i1,i2;
121
122 s1=sv_newmortal();
123 s2=sv_newmortal();
124 l=SvCUR(ST(0));
125 des_cbc_cksum((des_cblock *)input,(des_cblock *)c,
126 l,*ks,ivec);
127 i1=c[4]|(c[5]<<8)|(c[6]<<16)|(c[7]<<24);
128 i2=c[0]|(c[1]<<8)|(c[2]<<16)|(c[3]<<24);
129 sv_setiv(s1,i1);
130 sv_setiv(s2,i2);
131 sv_setpvn(ST(2),(char *)c,8);
132 PUSHs(s1);
133 PUSHs(s2);
134 }
135
136void
137des_cfb_encrypt(input,numbits,ks,ivec,encrypt)
138 char * input
139 int numbits
140 des_key_schedule * ks
141 des_cblock * ivec
142 int encrypt
143PPCODE:
144 {
145 SV *s;
146 STRLEN len;
147 char *c;
148
149 len=SvCUR(ST(0));
150 s=sv_newmortal();
151 sv_setpvn(s,"",0);
152 SvGROW(s,len);
153 SvCUR_set(s,len);
154 c=(char *)SvPV(s,na);
155 des_cfb_encrypt((unsigned char *)input,(unsigned char *)c,
156 (int)numbits,(long)len,*ks,ivec,encrypt);
157 sv_setpvn(ST(3),(char *)ivec,8);
158 PUSHs(s);
159 }
160
161des_cblock *
162des_ecb3_encrypt(input,ks1,ks2,encrypt)
163 des_cblock * input
164 des_key_schedule * ks1
165 des_key_schedule * ks2
166 int encrypt
167CODE:
168 {
169 des_cblock c;
170
171 des_ecb3_encrypt((des_cblock *)input,(des_cblock *)&c,
172 *ks1,*ks2,encrypt);
173 RETVAL= &c;
174 }
175OUTPUT:
176RETVAL
177
178void
179des_ofb_encrypt(input,numbits,ks,ivec)
180 unsigned char * input
181 int numbits
182 des_key_schedule * ks
183 des_cblock * ivec
184PPCODE:
185 {
186 SV *s;
187 STRLEN len,l;
188 unsigned char *c;
189
190 len=SvCUR(ST(0));
191 s=sv_newmortal();
192 sv_setpvn(s,"",0);
193 SvGROW(s,len);
194 SvCUR_set(s,len);
195 c=(unsigned char *)SvPV(s,na);
196 des_ofb_encrypt((unsigned char *)input,(unsigned char *)c,
197 numbits,len,*ks,ivec);
198 sv_setpvn(ST(3),(char *)ivec,8);
199 PUSHs(s);
200 }
201
202void
203des_pcbc_encrypt(input,ks,ivec,encrypt)
204 char * input
205 des_key_schedule * ks
206 des_cblock * ivec
207 int encrypt
208PPCODE:
209 {
210 SV *s;
211 STRLEN len,l;
212 char *c;
213
214 l=SvCUR(ST(0));
215 len=((((unsigned long)l)+7)/8)*8;
216 s=sv_newmortal();
217 sv_setpvn(s,"",0);
218 SvGROW(s,len);
219 SvCUR_set(s,len);
220 c=(char *)SvPV(s,na);
221 des_pcbc_encrypt((des_cblock *)input,(des_cblock *)c,
222 l,*ks,ivec,encrypt);
223 sv_setpvn(ST(2),(char *)c[len-8],8);
224 PUSHs(s);
225 }
226
227des_cblock *
228des_random_key()
229CODE:
230 {
231 des_cblock c;
232
233 des_random_key(c);
234 RETVAL=&c;
235 }
236OUTPUT:
237RETVAL
238
239des_cblock *
240des_string_to_key(str)
241char * str
242CODE:
243 {
244 des_cblock c;
245
246 des_string_to_key(str,&c);
247 RETVAL=&c;
248 }
249OUTPUT:
250RETVAL
251
252void
253des_string_to_2keys(str)
254char * str
255PPCODE:
256 {
257 des_cblock c1,c2;
258 SV *s1,*s2;
259
260 des_string_to_2keys(str,&c1,&c2);
261 EXTEND(sp,2);
262 s1=sv_newmortal();
263 sv_setpvn(s1,(char *)c1,8);
264 s2=sv_newmortal();
265 sv_setpvn(s2,(char *)c2,8);
266 PUSHs(s1);
267 PUSHs(s2);
268 }
diff --git a/src/lib/libssl/src/crypto/des/FILES0 b/src/lib/libssl/src/crypto/des/FILES0
index 4c7ea2de7a..2e8211ad2a 100644
--- a/src/lib/libssl/src/crypto/des/FILES0
+++ b/src/lib/libssl/src/crypto/des/FILES0
@@ -1,31 +1,10 @@
1/* General stuff */ 1/* General stuff */
2COPYRIGHT - Copyright info. 2COPYRIGHT - Copyright info.
3MODES.DES - A description of the features of the different modes of DES.
4FILES - This file. 3FILES - This file.
5INSTALL - How to make things compile.
6Imakefile - For use with kerberos.
7README - What this package is. 4README - What this package is.
8VERSION - Which version this is and what was changed. 5VERSION - Which version this is and what was changed.
9KERBEROS - Kerberos version 4 notes.
10Makefile.PL - An old makefile to build with perl5, not current.
11Makefile.ssl - The SSLeay makefile
12Makefile.uni - The normal unix makefile.
13GNUmakefile - The makefile for use with glibc.
14makefile.bc - A Borland C makefile
15times - Some outputs from 'speed' on some machines.
16vms.com - For use when compiling under VMS
17
18/* My SunOS des(1) replacement */
19des.c - des(1) source code.
20des.man - des(1) manual.
21
22/* Testing and timing programs. */
23destest.c - Source for libdes.a test program.
24speed.c - Source for libdes.a timing program.
25rpw.c - Source for libdes.a testing password reading routines.
26 6
27/* libdes.a source code */ 7/* libdes.a source code */
28des_crypt.man - libdes.a manual page.
29des.h - Public libdes.a header file. 8des.h - Public libdes.a header file.
30ecb_enc.c - des_ecb_encrypt() source, this contains the basic DES code. 9ecb_enc.c - des_ecb_encrypt() source, this contains the basic DES code.
31ecb3_enc.c - des_ecb3_encrypt() source. 10ecb3_enc.c - des_ecb3_encrypt() source.
@@ -62,35 +41,4 @@ des_ver.h - header file for the external definition of the
62 version string. 41 version string.
63des.doc - SSLeay documentation for the library. 42des.doc - SSLeay documentation for the library.
64 43
65/* The perl scripts - you can ignore these files they are only
66 * included for the curious */
67des.pl - des in perl anyone? des_set_key and des_ecb_encrypt
68 both done in a perl library.
69testdes.pl - Testing program for des.pl
70doIP - Perl script used to develop IP xor/shift code.
71doPC1 - Perl script used to develop PC1 xor/shift code.
72doPC2 - Generates sk.h.
73PC1 - Output of doPC1 should be the same as output from PC1.
74PC2 - used in development of doPC2.
75shifts.pl - Perl library used by my perl scripts.
76
77/* I started making a perl5 dynamic library for libdes
78 * but did not fully finish, these files are part of that effort. */
79DES.pm
80DES.pod
81DES.xs
82t
83typemap
84
85/* The following are for use with sun RPC implementaions. */
86rpc_des.h
87rpc_enc.c
88
89/* The following are contibuted by Mark Murray <mark@grondar.za>. They
90 * are not normally built into libdes due to machine specific routines
91 * contained in them. They are for use in the most recent incarnation of
92 * export kerberos v 4 (eBones). */
93supp.c
94new_rkey.c
95
96 44
diff --git a/src/lib/libssl/src/crypto/des/INSTALL b/src/lib/libssl/src/crypto/des/INSTALL
deleted file mode 100644
index 8aebdfe110..0000000000
--- a/src/lib/libssl/src/crypto/des/INSTALL
+++ /dev/null
@@ -1,69 +0,0 @@
1Check the CC and CFLAGS lines in the makefile
2
3If your C library does not support the times(3) function, change the
4#define TIMES to
5#undef TIMES in speed.c
6If it does, check the HZ value for the times(3) function.
7If your system does not define CLK_TCK it will be assumed to
8be 100.0.
9
10If possible use gcc v 2.7.?
11Turn on the maximum optimising (normally '-O3 -fomit-frame-pointer' for gcc)
12In recent times, some system compilers give better performace.
13
14type 'make'
15
16run './destest' to check things are ok.
17run './rpw' to check the tty code for reading passwords works.
18run './speed' to see how fast those optimisations make the library run :-)
19run './des_opts' to determin the best compile time options.
20
21The output from des_opts should be put in the makefile options and des_enc.c
22should be rebuilt. For 64 bit computers, do not use the DES_PTR option.
23For the DEC Alpha, edit des.h and change DES_LONG to 'unsigned int'
24and then you can use the 'DES_PTR' option.
25
26The file options.txt has the options listed for best speed on quite a
27few systems. Look and the options (UNROLL, PTR, RISC2 etc) and then
28turn on the relevant option in the Makefile.
29
30There are some special Makefile targets that make life easier.
31make cc - standard cc build
32make gcc - standard gcc build
33make x86-elf - x86 assembler (elf), linux-elf.
34make x86-out - x86 assembler (a.out), FreeBSD
35make x86-solaris- x86 assembler
36make x86-bsdi - x86 assembler (a.out with primative assembler).
37
38If at all possible use the assembler (for Windows NT/95, use
39asm/win32.obj to link with). The x86 assembler is very very fast.
40
41A make install will by default install
42libdes.a in /usr/local/lib/libdes.a
43des in /usr/local/bin/des
44des_crypt.man in /usr/local/man/man3/des_crypt.3
45des.man in /usr/local/man/man1/des.1
46des.h in /usr/include/des.h
47
48des(1) should be compatible with sunOS's but I have been unable to
49test it.
50
51These routines should compile on MSDOS, most 32bit and 64bit version
52of Unix (BSD and SYSV) and VMS, without modification.
53The only problems should be #include files that are in the wrong places.
54
55These routines can be compiled under MSDOS.
56I have successfully encrypted files using des(1) under MSDOS and then
57decrypted the files on a SparcStation.
58I have been able to compile and test the routines with
59Microsoft C v 5.1 and Turbo C v 2.0.
60The code in this library is in no way optimised for the 16bit
61operation of MSDOS.
62
63When building for glibc, ignore all of the above and just unpack into
64glibc-1.??/des and then gmake as per normal.
65
66As a final note on performace. Certain CPUs like sparcs and Alpha often give
67a %10 speed difference depending on the link order. It is rather anoying
68when one program reports 'x' DES encrypts a second and another reports
69'x*0.9' the speed.
diff --git a/src/lib/libssl/src/crypto/des/KERBEROS b/src/lib/libssl/src/crypto/des/KERBEROS
deleted file mode 100644
index f401b10014..0000000000
--- a/src/lib/libssl/src/crypto/des/KERBEROS
+++ /dev/null
@@ -1,41 +0,0 @@
1 [ This is an old file, I don't know if it is true anymore
2 but I will leave the file here - eay 21/11/95 ]
3
4To use this library with Bones (kerberos without DES):
51) Get my modified Bones - eBones. It can be found on
6 gondwana.ecr.mu.oz.au (128.250.1.63) /pub/athena/eBones-p9.tar.Z
7 and
8 nic.funet.fi (128.214.6.100) /pub/unix/security/Kerberos/eBones-p9.tar.Z
9
102) Unpack this library in src/lib/des, makeing sure it is version
11 3.00 or greater (libdes.tar.93-10-07.Z). This versions differences
12 from the version in comp.sources.misc volume 29 patchlevel2.
13 The primarily difference is that it should compile under kerberos :-).
14 It can be found at.
15 ftp.psy.uq.oz.au (130.102.32.1) /pub/DES/libdes.tar.93-10-07.Z
16
17Now do a normal kerberos build and things should work.
18
19One problem I found when I was build on my local sun.
20---
21For sunOS 4.1.1 apply the following patch to src/util/ss/make_commands.c
22
23*** make_commands.c.orig Fri Jul 3 04:18:35 1987
24--- make_commands.c Wed May 20 08:47:42 1992
25***************
26*** 98,104 ****
27 if (!rename(o_file, z_file)) {
28 if (!vfork()) {
29 chdir("/tmp");
30! execl("/bin/ld", "ld", "-o", o_file+5, "-s", "-r", "-n",
31 z_file+5, 0);
32 perror("/bin/ld");
33 _exit(1);
34--- 98,104 ----
35 if (!rename(o_file, z_file)) {
36 if (!vfork()) {
37 chdir("/tmp");
38! execl("/bin/ld", "ld", "-o", o_file+5, "-s", "-r",
39 z_file+5, 0);
40 perror("/bin/ld");
41 _exit(1);
diff --git a/src/lib/libssl/src/crypto/des/des.pod b/src/lib/libssl/src/crypto/des/des.pod
deleted file mode 100644
index bf479e83d2..0000000000
--- a/src/lib/libssl/src/crypto/des/des.pod
+++ /dev/null
@@ -1,217 +0,0 @@
1=pod
2
3=head1 NAME
4
5des - encrypt or decrypt data using Data Encryption Standard
6
7=head1 SYNOPSIS
8
9B<des>
10(
11B<-e>
12|
13B<-E>
14) | (
15B<-d>
16|
17B<-D>
18) | (
19B<->[B<cC>][B<ckname>]
20) |
21[
22B<-b3hfs>
23] [
24B<-k>
25I<key>
26]
27] [
28B<-u>[I<uuname>]
29[
30I<input-file>
31[
32I<output-file>
33] ]
34
35=head1 NOTE
36
37This page describes the B<des> stand-alone program, not the B<openssl des>
38command.
39
40=head1 DESCRIPTION
41
42B<des>
43encrypts and decrypts data using the
44Data Encryption Standard algorithm.
45One of
46B<-e>, B<-E>
47(for encrypt) or
48B<-d>, B<-D>
49(for decrypt) must be specified.
50It is also possible to use
51B<-c>
52or
53B<-C>
54in conjunction or instead of the a encrypt/decrypt option to generate
55a 16 character hexadecimal checksum, generated via the
56I<des_cbc_cksum>.
57
58Two standard encryption modes are supported by the
59B<des>
60program, Cipher Block Chaining (the default) and Electronic Code Book
61(specified with
62B<-b>).
63
64The key used for the DES
65algorithm is obtained by prompting the user unless the
66B<-k>
67I<key>
68option is given.
69If the key is an argument to the
70B<des>
71command, it is potentially visible to users executing
72ps(1)
73or a derivative. To minimise this possibility,
74B<des>
75takes care to destroy the key argument immediately upon entry.
76If your shell keeps a history file be careful to make sure it is not
77world readable.
78
79Since this program attempts to maintain compatibility with sunOS's
80des(1) command, there are 2 different methods used to convert the user
81supplied key to a des key.
82Whenever and one or more of
83B<-E>, B<-D>, B<-C>
84or
85B<-3>
86options are used, the key conversion procedure will not be compatible
87with the sunOS des(1) version but will use all the user supplied
88character to generate the des key.
89B<des>
90command reads from standard input unless
91I<input-file>
92is specified and writes to standard output unless
93I<output-file>
94is given.
95
96=head1 OPTIONS
97
98=over 4
99
100=item B<-b>
101
102Select ECB
103(eight bytes at a time) encryption mode.
104
105=item B<-3>
106
107Encrypt using triple encryption.
108By default triple cbc encryption is used but if the
109B<-b>
110option is used then triple ECB encryption is performed.
111If the key is less than 8 characters long, the flag has no effect.
112
113=item B<-e>
114
115Encrypt data using an 8 byte key in a manner compatible with sunOS
116des(1).
117
118=item B<-E>
119
120Encrypt data using a key of nearly unlimited length (1024 bytes).
121This will product a more secure encryption.
122
123=item B<-d>
124
125Decrypt data that was encrypted with the B<-e> option.
126
127=item B<-D>
128
129Decrypt data that was encrypted with the B<-E> option.
130
131=item B<-c>
132
133Generate a 16 character hexadecimal cbc checksum and output this to
134stderr.
135If a filename was specified after the
136B<-c>
137option, the checksum is output to that file.
138The checksum is generated using a key generated in a sunOS compatible
139manner.
140
141=item B<-C>
142
143A cbc checksum is generated in the same manner as described for the
144B<-c>
145option but the DES key is generated in the same manner as used for the
146B<-E>
147and
148B<-D>
149options
150
151=item B<-f>
152
153Does nothing - allowed for compatibility with sunOS des(1) command.
154
155=item B<-s>
156
157Does nothing - allowed for compatibility with sunOS des(1) command.
158
159=item B<-k> I<key>
160
161Use the encryption
162I<key>
163specified.
164
165=item B<-h>
166
167The
168I<key>
169is assumed to be a 16 character hexadecimal number.
170If the
171B<-3>
172option is used the key is assumed to be a 32 character hexadecimal
173number.
174
175=item B<-u>
176
177This flag is used to read and write uuencoded files. If decrypting,
178the input file is assumed to contain uuencoded, DES encrypted data.
179If encrypting, the characters following the B<-u> are used as the name of
180the uuencoded file to embed in the begin line of the uuencoded
181output. If there is no name specified after the B<-u>, the name text.des
182will be embedded in the header.
183
184=head1 SEE ALSO
185
186ps(1),
187L<des_crypt(3)|des_crypt(3)>
188
189=head1 BUGS
190
191The problem with using the
192B<-e>
193option is the short key length.
194It would be better to use a real 56-bit key rather than an
195ASCII-based 56-bit pattern. Knowing that the key was derived from ASCII
196radically reduces the time necessary for a brute-force cryptographic attack.
197My attempt to remove this problem is to add an alternative text-key to
198DES-key function. This alternative function (accessed via
199B<-E>, B<-D>, B<-S>
200and
201B<-3>)
202uses DES to help generate the key.
203
204Be carefully when using the B<-u> option. Doing B<des -ud> I<filename> will
205not decrypt filename (the B<-u> option will gobble the B<-d> option).
206
207The VMS operating system operates in a world where files are always a
208multiple of 512 bytes. This causes problems when encrypted data is
209send from Unix to VMS since a 88 byte file will suddenly be padded
210with 424 null bytes. To get around this problem, use the B<-u> option
211to uuencode the data before it is send to the VMS system.
212
213=head1 AUTHOR
214
215Eric Young (eay@cryptsoft.com)
216
217=cut
diff --git a/src/lib/libssl/src/crypto/des/makefile.bc b/src/lib/libssl/src/crypto/des/makefile.bc
deleted file mode 100644
index 1fe6d4915a..0000000000
--- a/src/lib/libssl/src/crypto/des/makefile.bc
+++ /dev/null
@@ -1,50 +0,0 @@
1#
2# Origional BC Makefile from Teun <Teun.Nijssen@kub.nl>
3#
4#
5CC = bcc
6TLIB = tlib /0 /C
7# note: the -3 flag produces code for 386, 486, Pentium etc; omit it for 286s
8OPTIMIZE= -3 -O2
9#WINDOWS= -W
10CFLAGS = -c -ml -d $(OPTIMIZE) $(WINDOWS) -DMSDOS
11LFLAGS = -ml $(WINDOWS)
12
13.c.obj:
14 $(CC) $(CFLAGS) $*.c
15
16.obj.exe:
17 $(CC) $(LFLAGS) -e$*.exe $*.obj libdes.lib
18
19all: $(LIB) destest.exe rpw.exe des.exe speed.exe
20
21# "make clean": use a directory containing only libdes .exe and .obj files...
22clean:
23 del *.exe
24 del *.obj
25 del libdes.lib
26 del libdes.rsp
27
28OBJS= cbc_cksm.obj cbc_enc.obj ecb_enc.obj pcbc_enc.obj \
29 qud_cksm.obj rand_key.obj set_key.obj str2key.obj \
30 enc_read.obj enc_writ.obj fcrypt.obj cfb_enc.obj \
31 ecb3_enc.obj ofb_enc.obj cbc3_enc.obj read_pwd.obj\
32 cfb64enc.obj ofb64enc.obj ede_enc.obj cfb64ede.obj\
33 ofb64ede.obj supp.obj
34
35LIB= libdes.lib
36
37$(LIB): $(OBJS)
38 del $(LIB)
39 makersp "+%s &\n" &&|
40 $(OBJS)
41| >libdes.rsp
42 $(TLIB) libdes.lib @libdes.rsp,nul
43 del libdes.rsp
44
45destest.exe: destest.obj libdes.lib
46rpw.exe: rpw.obj libdes.lib
47speed.exe: speed.obj libdes.lib
48des.exe: des.obj libdes.lib
49
50
diff --git a/src/lib/libssl/src/crypto/des/rpw.c b/src/lib/libssl/src/crypto/des/rpw.c
deleted file mode 100644
index 8a9473c4f9..0000000000
--- a/src/lib/libssl/src/crypto/des/rpw.c
+++ /dev/null
@@ -1,99 +0,0 @@
1/* crypto/des/rpw.c */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved.
4 *
5 * This package is an SSL implementation written
6 * by Eric Young (eay@cryptsoft.com).
7 * The implementation was written so as to conform with Netscapes SSL.
8 *
9 * This library is free for commercial and non-commercial use as long as
10 * the following conditions are aheared to. The following conditions
11 * apply to all code found in this distribution, be it the RC4, RSA,
12 * lhash, DES, etc., code; not just the SSL code. The SSL documentation
13 * included with this distribution is covered by the same copyright terms
14 * except that the holder is Tim Hudson (tjh@cryptsoft.com).
15 *
16 * Copyright remains Eric Young's, and as such any Copyright notices in
17 * the code are not to be removed.
18 * If this package is used in a product, Eric Young should be given attribution
19 * as the author of the parts of the library used.
20 * This can be in the form of a textual message at program startup or
21 * in documentation (online or textual) provided with the package.
22 *
23 * Redistribution and use in source and binary forms, with or without
24 * modification, are permitted provided that the following conditions
25 * are met:
26 * 1. Redistributions of source code must retain the copyright
27 * notice, this list of conditions and the following disclaimer.
28 * 2. Redistributions in binary form must reproduce the above copyright
29 * notice, this list of conditions and the following disclaimer in the
30 * documentation and/or other materials provided with the distribution.
31 * 3. All advertising materials mentioning features or use of this software
32 * must display the following acknowledgement:
33 * "This product includes cryptographic software written by
34 * Eric Young (eay@cryptsoft.com)"
35 * The word 'cryptographic' can be left out if the rouines from the library
36 * being used are not cryptographic related :-).
37 * 4. If you include any Windows specific code (or a derivative thereof) from
38 * the apps directory (application code) you must include an acknowledgement:
39 * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
40 *
41 * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
42 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
43 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
44 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
45 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
46 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
47 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
48 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
49 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
50 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
51 * SUCH DAMAGE.
52 *
53 * The licence and distribution terms for any publically available version or
54 * derivative of this code cannot be changed. i.e. this code cannot simply be
55 * copied and put under another distribution licence
56 * [including the GNU Public Licence.]
57 */
58
59#include <stdio.h>
60#include <openssl/des.h>
61
62int main(int argc, char *argv[])
63 {
64 DES_cblock k,k1;
65 int i;
66
67 printf("read passwd\n");
68 if ((i=des_read_password(&k,"Enter password:",0)) == 0)
69 {
70 printf("password = ");
71 for (i=0; i<8; i++)
72 printf("%02x ",k[i]);
73 }
74 else
75 printf("error %d\n",i);
76 printf("\n");
77 printf("read 2passwds and verify\n");
78 if ((i=des_read_2passwords(&k,&k1,
79 "Enter verified password:",1)) == 0)
80 {
81 printf("password1 = ");
82 for (i=0; i<8; i++)
83 printf("%02x ",k[i]);
84 printf("\n");
85 printf("password2 = ");
86 for (i=0; i<8; i++)
87 printf("%02x ",k1[i]);
88 printf("\n");
89 exit(1);
90 }
91 else
92 {
93 printf("error %d\n",i);
94 exit(0);
95 }
96#ifdef LINT
97 return(0);
98#endif
99 }
diff --git a/src/lib/libssl/src/crypto/des/speed.c b/src/lib/libssl/src/crypto/des/speed.c
deleted file mode 100644
index 2f52c1c40f..0000000000
--- a/src/lib/libssl/src/crypto/des/speed.c
+++ /dev/null
@@ -1,313 +0,0 @@
1/* crypto/des/speed.c */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved.
4 *
5 * This package is an SSL implementation written
6 * by Eric Young (eay@cryptsoft.com).
7 * The implementation was written so as to conform with Netscapes SSL.
8 *
9 * This library is free for commercial and non-commercial use as long as
10 * the following conditions are aheared to. The following conditions
11 * apply to all code found in this distribution, be it the RC4, RSA,
12 * lhash, DES, etc., code; not just the SSL code. The SSL documentation
13 * included with this distribution is covered by the same copyright terms
14 * except that the holder is Tim Hudson (tjh@cryptsoft.com).
15 *
16 * Copyright remains Eric Young's, and as such any Copyright notices in
17 * the code are not to be removed.
18 * If this package is used in a product, Eric Young should be given attribution
19 * as the author of the parts of the library used.
20 * This can be in the form of a textual message at program startup or
21 * in documentation (online or textual) provided with the package.
22 *
23 * Redistribution and use in source and binary forms, with or without
24 * modification, are permitted provided that the following conditions
25 * are met:
26 * 1. Redistributions of source code must retain the copyright
27 * notice, this list of conditions and the following disclaimer.
28 * 2. Redistributions in binary form must reproduce the above copyright
29 * notice, this list of conditions and the following disclaimer in the
30 * documentation and/or other materials provided with the distribution.
31 * 3. All advertising materials mentioning features or use of this software
32 * must display the following acknowledgement:
33 * "This product includes cryptographic software written by
34 * Eric Young (eay@cryptsoft.com)"
35 * The word 'cryptographic' can be left out if the rouines from the library
36 * being used are not cryptographic related :-).
37 * 4. If you include any Windows specific code (or a derivative thereof) from
38 * the apps directory (application code) you must include an acknowledgement:
39 * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
40 *
41 * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
42 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
43 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
44 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
45 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
46 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
47 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
48 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
49 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
50 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
51 * SUCH DAMAGE.
52 *
53 * The licence and distribution terms for any publically available version or
54 * derivative of this code cannot be changed. i.e. this code cannot simply be
55 * copied and put under another distribution licence
56 * [including the GNU Public Licence.]
57 */
58
59/* 11-Sep-92 Andrew Daviel Support for Silicon Graphics IRIX added */
60/* 06-Apr-92 Luke Brennan Support for VMS and add extra signal calls */
61
62#if !defined(OPENSSL_SYS_MSDOS) && (!defined(OPENSSL_SYS_VMS) || defined(__DECC)) && !defined(OPENSSL_SYS_MACOSX)
63#define TIMES
64#endif
65
66#include <stdio.h>
67
68#include <openssl/e_os2.h>
69#include <unistd.h>
70
71#ifndef OPENSSL_SYS_NETWARE
72#include <signal.h>
73#define crypt(c,s) (des_crypt((c),(s)))
74#endif
75
76#ifndef _IRIX
77#include <time.h>
78#endif
79#ifdef TIMES
80#include <sys/types.h>
81#include <sys/times.h>
82#endif
83
84/* Depending on the VMS version, the tms structure is perhaps defined.
85 The __TMS macro will show if it was. If it wasn't defined, we should
86 undefine TIMES, since that tells the rest of the program how things
87 should be handled. -- Richard Levitte */
88#if defined(OPENSSL_SYS_VMS_DECC) && !defined(__TMS)
89#undef TIMES
90#endif
91
92#ifndef TIMES
93#include <sys/timeb.h>
94#endif
95
96#if defined(sun) || defined(__ultrix)
97#define _POSIX_SOURCE
98#include <limits.h>
99#include <sys/param.h>
100#endif
101
102#include <openssl/des.h>
103
104/* The following if from times(3) man page. It may need to be changed */
105#ifndef HZ
106# ifndef CLK_TCK
107# ifndef _BSD_CLK_TCK_ /* FreeBSD fix */
108# define HZ 100.0
109# else /* _BSD_CLK_TCK_ */
110# define HZ ((double)_BSD_CLK_TCK_)
111# endif
112# else /* CLK_TCK */
113# define HZ ((double)CLK_TCK)
114# endif
115#endif
116
117#define BUFSIZE ((long)1024)
118long run=0;
119
120double Time_F(int s);
121#ifdef SIGALRM
122#if defined(__STDC__) || defined(sgi) || defined(_AIX)
123#define SIGRETTYPE void
124#else
125#define SIGRETTYPE int
126#endif
127
128SIGRETTYPE sig_done(int sig);
129SIGRETTYPE sig_done(int sig)
130 {
131 signal(SIGALRM,sig_done);
132 run=0;
133#ifdef LINT
134 sig=sig;
135#endif
136 }
137#endif
138
139#define START 0
140#define STOP 1
141
142double Time_F(int s)
143 {
144 double ret;
145#ifdef TIMES
146 static struct tms tstart,tend;
147
148 if (s == START)
149 {
150 times(&tstart);
151 return(0);
152 }
153 else
154 {
155 times(&tend);
156 ret=((double)(tend.tms_utime-tstart.tms_utime))/HZ;
157 return((ret == 0.0)?1e-6:ret);
158 }
159#else /* !times() */
160 static struct timeb tstart,tend;
161 long i;
162
163 if (s == START)
164 {
165 ftime(&tstart);
166 return(0);
167 }
168 else
169 {
170 ftime(&tend);
171 i=(long)tend.millitm-(long)tstart.millitm;
172 ret=((double)(tend.time-tstart.time))+((double)i)/1e3;
173 return((ret == 0.0)?1e-6:ret);
174 }
175#endif
176 }
177
178int main(int argc, char **argv)
179 {
180 long count;
181 static unsigned char buf[BUFSIZE];
182 static DES_cblock key ={0x12,0x34,0x56,0x78,0x9a,0xbc,0xde,0xf0};
183 static DES_cblock key2={0x34,0x56,0x78,0x9a,0xbc,0xde,0xf0,0x12};
184 static DES_cblock key3={0x56,0x78,0x9a,0xbc,0xde,0xf0,0x12,0x34};
185 DES_key_schedule sch,sch2,sch3;
186 double a,b,c,d,e;
187#ifndef SIGALRM
188 long ca,cb,cc,cd,ce;
189#endif
190
191#ifndef TIMES
192 printf("To get the most accurate results, try to run this\n");
193 printf("program when this computer is idle.\n");
194#endif
195
196 DES_set_key_unchecked(&key2,&sch2);
197 DES_set_key_unchecked(&key3,&sch3);
198
199#ifndef SIGALRM
200 printf("First we calculate the approximate speed ...\n");
201 DES_set_key_unchecked(&key,&sch);
202 count=10;
203 do {
204 long i;
205 DES_LONG data[2];
206
207 count*=2;
208 Time_F(START);
209 for (i=count; i; i--)
210 DES_encrypt1(data,&sch,DES_ENCRYPT);
211 d=Time_F(STOP);
212 } while (d < 3.0);
213 ca=count;
214 cb=count*3;
215 cc=count*3*8/BUFSIZE+1;
216 cd=count*8/BUFSIZE+1;
217 ce=count/20+1;
218 printf("Doing set_key %ld times\n",ca);
219#define COND(d) (count != (d))
220#define COUNT(d) (d)
221#else
222#define COND(c) (run)
223#define COUNT(d) (count)
224 signal(SIGALRM,sig_done);
225 printf("Doing set_key for 10 seconds\n");
226 alarm(10);
227#endif
228
229 Time_F(START);
230 for (count=0,run=1; COND(ca); count++)
231 DES_set_key_unchecked(&key,&sch);
232 d=Time_F(STOP);
233 printf("%ld set_key's in %.2f seconds\n",count,d);
234 a=((double)COUNT(ca))/d;
235
236#ifdef SIGALRM
237 printf("Doing DES_encrypt's for 10 seconds\n");
238 alarm(10);
239#else
240 printf("Doing DES_encrypt %ld times\n",cb);
241#endif
242 Time_F(START);
243 for (count=0,run=1; COND(cb); count++)
244 {
245 DES_LONG data[2];
246
247 DES_encrypt1(data,&sch,DES_ENCRYPT);
248 }
249 d=Time_F(STOP);
250 printf("%ld DES_encrypt's in %.2f second\n",count,d);
251 b=((double)COUNT(cb)*8)/d;
252
253#ifdef SIGALRM
254 printf("Doing DES_cbc_encrypt on %ld byte blocks for 10 seconds\n",
255 BUFSIZE);
256 alarm(10);
257#else
258 printf("Doing DES_cbc_encrypt %ld times on %ld byte blocks\n",cc,
259 BUFSIZE);
260#endif
261 Time_F(START);
262 for (count=0,run=1; COND(cc); count++)
263 DES_ncbc_encrypt(buf,buf,BUFSIZE,&sch,
264 &key,DES_ENCRYPT);
265 d=Time_F(STOP);
266 printf("%ld DES_cbc_encrypt's of %ld byte blocks in %.2f second\n",
267 count,BUFSIZE,d);
268 c=((double)COUNT(cc)*BUFSIZE)/d;
269
270#ifdef SIGALRM
271 printf("Doing DES_ede_cbc_encrypt on %ld byte blocks for 10 seconds\n",
272 BUFSIZE);
273 alarm(10);
274#else
275 printf("Doing DES_ede_cbc_encrypt %ld times on %ld byte blocks\n",cd,
276 BUFSIZE);
277#endif
278 Time_F(START);
279 for (count=0,run=1; COND(cd); count++)
280 DES_ede3_cbc_encrypt(buf,buf,BUFSIZE,
281 &sch,
282 &sch2,
283 &sch3,
284 &key,
285 DES_ENCRYPT);
286 d=Time_F(STOP);
287 printf("%ld DES_ede_cbc_encrypt's of %ld byte blocks in %.2f second\n",
288 count,BUFSIZE,d);
289 d=((double)COUNT(cd)*BUFSIZE)/d;
290
291#ifdef SIGALRM
292 printf("Doing crypt for 10 seconds\n");
293 alarm(10);
294#else
295 printf("Doing crypt %ld times\n",ce);
296#endif
297 Time_F(START);
298 for (count=0,run=1; COND(ce); count++)
299 crypt("testing1","ef");
300 e=Time_F(STOP);
301 printf("%ld crypts in %.2f second\n",count,e);
302 e=((double)COUNT(ce))/e;
303
304 printf("set_key per sec = %12.2f (%9.3fuS)\n",a,1.0e6/a);
305 printf("DES raw ecb bytes per sec = %12.2f (%9.3fuS)\n",b,8.0e6/b);
306 printf("DES cbc bytes per sec = %12.2f (%9.3fuS)\n",c,8.0e6/c);
307 printf("DES ede cbc bytes per sec = %12.2f (%9.3fuS)\n",d,8.0e6/d);
308 printf("crypt per sec = %12.2f (%9.3fuS)\n",e,1.0e6/e);
309 exit(0);
310#if defined(LINT) || defined(OPENSSL_SYS_MSDOS)
311 return(0);
312#endif
313 }
diff --git a/src/lib/libssl/src/crypto/des/t/test b/src/lib/libssl/src/crypto/des/t/test
deleted file mode 100644
index 97acd0552e..0000000000
--- a/src/lib/libssl/src/crypto/des/t/test
+++ /dev/null
@@ -1,27 +0,0 @@
1#!./perl
2
3BEGIN { push(@INC, qw(../../../lib ../../lib ../lib lib)); }
4
5use DES;
6
7$key='00000000';
8$ks=DES::set_key($key);
9@a=split(//,$ks);
10foreach (@a) { printf "%02x-",ord($_); }
11print "\n";
12
13
14$key=DES::random_key();
15print "($_)\n";
16@a=split(//,$key);
17foreach (@a) { printf "%02x-",ord($_); }
18print "\n";
19$str="this is and again into the breach";
20($k1,$k2)=DES::string_to_2keys($str);
21@a=split(//,$k1);
22foreach (@a) { printf "%02x-",ord($_); }
23print "\n";
24@a=split(//,$k2);
25foreach (@a) { printf "%02x-",ord($_); }
26print "\n";
27
diff --git a/src/lib/libssl/src/crypto/des/times/486-50.sol b/src/lib/libssl/src/crypto/des/times/486-50.sol
deleted file mode 100644
index 0de62d6db3..0000000000
--- a/src/lib/libssl/src/crypto/des/times/486-50.sol
+++ /dev/null
@@ -1,16 +0,0 @@
1Solaris 2.4, 486 50mhz, gcc 2.6.3
2options des ecb/s
316 r2 i 43552.51 100.0%
416 r1 i 43487.45 99.9%
516 c p 43003.23 98.7%
616 r2 p 42339.00 97.2%
716 c i 41900.91 96.2%
816 r1 p 41360.64 95.0%
9 4 c i 38728.48 88.9%
10 4 c p 38225.63 87.8%
11 4 r1 i 38085.79 87.4%
12 4 r2 i 37825.64 86.9%
13 4 r2 p 34611.00 79.5%
14 4 r1 p 31802.00 73.0%
15-DDES_UNROLL -DDES_RISC2
16
diff --git a/src/lib/libssl/src/crypto/des/times/586-100.lnx b/src/lib/libssl/src/crypto/des/times/586-100.lnx
deleted file mode 100644
index 4323914a11..0000000000
--- a/src/lib/libssl/src/crypto/des/times/586-100.lnx
+++ /dev/null
@@ -1,20 +0,0 @@
1Pentium 100
2Linux 2 kernel
3gcc 2.7.0 -O3 -fomit-frame-pointer
4No X server running, just a console, it makes the top speed jump from 151,000
5to 158,000 :-).
6options des ecb/s
7assember 281000.00 177.1%
816 r1 p 158667.40 100.0%
916 r1 i 148471.70 93.6%
1016 r2 p 143961.80 90.7%
1116 r2 i 141689.20 89.3%
12 4 r1 i 140100.00 88.3%
13 4 r2 i 134049.40 84.5%
1416 c i 124145.20 78.2%
1516 c p 121584.20 76.6%
16 4 c i 118116.00 74.4%
17 4 r2 p 117977.90 74.4%
18 4 c p 114971.40 72.5%
19 4 r1 p 114578.40 72.2%
20-DDES_UNROLL -DDES_RISC1 -DDES_PTR
diff --git a/src/lib/libssl/src/crypto/des/times/686-200.fre b/src/lib/libssl/src/crypto/des/times/686-200.fre
deleted file mode 100644
index 7d83f6adee..0000000000
--- a/src/lib/libssl/src/crypto/des/times/686-200.fre
+++ /dev/null
@@ -1,18 +0,0 @@
1Pentium 100
2Free BSD 2.1.5 kernel
3gcc 2.7.2.2 -O3 -fomit-frame-pointer
4options des ecb/s
5assember 578000.00 133.1%
616 r2 i 434454.80 100.0%
716 r1 i 433621.43 99.8%
816 r2 p 431375.69 99.3%
9 4 r1 i 423722.30 97.5%
10 4 r2 i 422399.40 97.2%
1116 r1 p 421739.40 97.1%
1216 c i 399027.94 91.8%
1316 c p 372251.70 85.7%
14 4 c i 365118.35 84.0%
15 4 c p 352880.51 81.2%
16 4 r2 p 255104.90 58.7%
17 4 r1 p 251289.18 57.8%
18-DDES_UNROLL -DDES_RISC2
diff --git a/src/lib/libssl/src/crypto/des/times/aix.cc b/src/lib/libssl/src/crypto/des/times/aix.cc
deleted file mode 100644
index d96b74e2ce..0000000000
--- a/src/lib/libssl/src/crypto/des/times/aix.cc
+++ /dev/null
@@ -1,26 +0,0 @@
1From: Paco Garcia <pgarcia@cam.es>
2
3This machine is a Bull Estrella Minitower Model MT604-100
4Processor : PPC604
5P.Speed : 100Mhz
6Data/Instr Cache : 16 K
7L2 Cache : 256 K
8PCI BUS Speed : 33 Mhz
9TransfRate PCI : 132 MB/s
10Memory : 96 MB
11
12options des ecb/s
13 4 c p 275118.61 100.0%
14 4 c i 273545.07 99.4%
15 4 r2 p 270441.02 98.3%
16 4 r1 p 253052.15 92.0%
17 4 r2 i 240842.97 87.5%
18 4 r1 i 240556.66 87.4%
1916 c i 224603.99 81.6%
2016 c p 224483.98 81.6%
2116 r2 p 215691.19 78.4%
2216 r1 p 208332.83 75.7%
2316 r1 i 199206.50 72.4%
2416 r2 i 198963.70 72.3%
25-DDES_PTR
26
diff --git a/src/lib/libssl/src/crypto/des/times/alpha.cc b/src/lib/libssl/src/crypto/des/times/alpha.cc
deleted file mode 100644
index 95c17efae7..0000000000
--- a/src/lib/libssl/src/crypto/des/times/alpha.cc
+++ /dev/null
@@ -1,18 +0,0 @@
1cc -O2
2DES_LONG is 'unsigned int'
3
4options des ecb/s
5 4 r2 p 181146.14 100.0%
616 r2 p 172102.94 95.0%
7 4 r2 i 165424.11 91.3%
816 c p 160468.64 88.6%
9 4 c p 156653.59 86.5%
10 4 c i 155245.18 85.7%
11 4 r1 p 154729.68 85.4%
1216 r2 i 154137.69 85.1%
1316 r1 p 152357.96 84.1%
1416 c i 148743.91 82.1%
15 4 r1 i 146695.59 81.0%
1616 r1 i 144961.00 80.0%
17-DDES_RISC2 -DDES_PTR
18
diff --git a/src/lib/libssl/src/crypto/des/times/hpux.cc b/src/lib/libssl/src/crypto/des/times/hpux.cc
deleted file mode 100644
index 3de856ddac..0000000000
--- a/src/lib/libssl/src/crypto/des/times/hpux.cc
+++ /dev/null
@@ -1,17 +0,0 @@
1HPUX 10 - 9000/887 - cc -D_HPUX_SOURCE -Aa +ESlit +O2 -Wl,-a,archive
2
3options des ecb/s
416 c i 149448.90 100.0%
5 4 c i 145861.79 97.6%
616 r2 i 141710.96 94.8%
716 r1 i 139455.33 93.3%
8 4 r2 i 138800.00 92.9%
9 4 r1 i 136692.65 91.5%
1016 r2 p 110228.17 73.8%
1116 r1 p 109397.07 73.2%
1216 c p 109209.89 73.1%
13 4 c p 108014.71 72.3%
14 4 r2 p 107873.88 72.2%
15 4 r1 p 107685.83 72.1%
16-DDES_UNROLL
17
diff --git a/src/lib/libssl/src/crypto/des/times/sparc.gcc b/src/lib/libssl/src/crypto/des/times/sparc.gcc
deleted file mode 100644
index 8eaa042104..0000000000
--- a/src/lib/libssl/src/crypto/des/times/sparc.gcc
+++ /dev/null
@@ -1,17 +0,0 @@
1solaris 2.5.1 - sparc 10 50mhz - gcc 2.7.2
2
3options des ecb/s
416 c i 124382.70 100.0%
5 4 c i 118884.68 95.6%
616 c p 112261.20 90.3%
716 r2 i 111777.10 89.9%
816 r2 p 108896.30 87.5%
916 r1 p 108791.59 87.5%
10 4 c p 107290.10 86.3%
11 4 r1 p 104583.80 84.1%
1216 r1 i 104206.20 83.8%
13 4 r2 p 103709.80 83.4%
14 4 r2 i 98306.43 79.0%
15 4 r1 i 91525.80 73.6%
16-DDES_UNROLL
17
diff --git a/src/lib/libssl/src/crypto/des/times/usparc.cc b/src/lib/libssl/src/crypto/des/times/usparc.cc
deleted file mode 100644
index 0864285ef6..0000000000
--- a/src/lib/libssl/src/crypto/des/times/usparc.cc
+++ /dev/null
@@ -1,31 +0,0 @@
1solaris 2.5.1 usparc 167mhz?? - SC4.0 cc -fast -Xa -xO5
2
3For the ultra sparc, SunC 4.0 cc -fast -Xa -xO5, running 'des_opts'
4gives a speed of 475,000 des/s while 'speed' gives 417,000 des/s.
5I believe the difference is tied up in optimisation that the compiler
6is able to perform when the code is 'inlined'. For 'speed', the DES
7routines are being linked from a library. I'll record the higher
8speed since if performance is everything, you can always inline
9'des_enc.c'.
10
11[ 16-Jan-06 - I've been playing with the
12 '-xtarget=ultra -xarch=v8plus -Xa -xO5 -Xa'
13 and while it makes the des_opts numbers much slower, it makes the
14 actual 'speed' numbers look better which is a realistic version of
15 using the libraries. ]
16
17options des ecb/s
1816 r1 p 475516.90 100.0%
1916 r2 p 439388.10 92.4%
2016 c i 427001.40 89.8%
2116 c p 419516.50 88.2%
22 4 r2 p 409491.70 86.1%
23 4 r1 p 404266.90 85.0%
24 4 c p 398121.00 83.7%
25 4 c i 370588.40 77.9%
26 4 r1 i 362742.20 76.3%
2716 r2 i 331275.50 69.7%
2816 r1 i 324730.60 68.3%
29 4 r2 i 63535.10 13.4% <-- very very weird, must be cache problems.
30-DDES_UNROLL -DDES_RISC1 -DDES_PTR
31
diff --git a/src/lib/libssl/src/crypto/des/typemap b/src/lib/libssl/src/crypto/des/typemap
deleted file mode 100644
index a524f53634..0000000000
--- a/src/lib/libssl/src/crypto/des/typemap
+++ /dev/null
@@ -1,34 +0,0 @@
1#
2# DES SECTION
3#
4deschar * T_DESCHARP
5des_cblock * T_CBLOCK
6des_cblock T_CBLOCK
7des_key_schedule T_SCHEDULE
8des_key_schedule * T_SCHEDULE
9
10INPUT
11T_CBLOCK
12 $var=(des_cblock *)SvPV($arg,len);
13 if (len < DES_KEY_SZ)
14 {
15 croak(\"$var needs to be at least %u bytes long\",DES_KEY_SZ);
16 }
17
18T_SCHEDULE
19 $var=(des_key_schedule *)SvPV($arg,len);
20 if (len < DES_SCHEDULE_SZ)
21 {
22 croak(\"$var needs to be at least %u bytes long\",
23 DES_SCHEDULE_SZ);
24 }
25
26OUTPUT
27T_CBLOCK
28 sv_setpvn($arg,(char *)$var,DES_KEY_SZ);
29
30T_SCHEDULE
31 sv_setpvn($arg,(char *)$var,DES_SCHEDULE_SZ);
32
33T_DESCHARP
34 sv_setpvn($arg,(char *)$var,len);