summaryrefslogtreecommitdiff
path: root/main/openssl/crypto/des/INSTALL
blob: 8aebdfe1100cc7f5c76130a935e3244151e6710d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
Check the CC and CFLAGS lines in the makefile

If your C library does not support the times(3) function, change the
#define TIMES to
#undef TIMES in speed.c
If it does, check the HZ value for the times(3) function.
If your system does not define CLK_TCK it will be assumed to
be 100.0.

If possible use gcc v 2.7.?
Turn on the maximum optimising (normally '-O3 -fomit-frame-pointer' for gcc)
In recent times, some system compilers give better performace.

type 'make'

run './destest' to check things are ok.
run './rpw' to check the tty code for reading passwords works.
run './speed' to see how fast those optimisations make the library run :-)
run './des_opts' to determin the best compile time options.

The output from des_opts should be put in the makefile options and des_enc.c
should be rebuilt.  For 64 bit computers, do not use the DES_PTR option.
For the DEC Alpha, edit des.h and change DES_LONG to 'unsigned int'
and then you can use the 'DES_PTR' option.

The file options.txt has the options listed for best speed on quite a
few systems.  Look and the options (UNROLL, PTR, RISC2 etc) and then
turn on the relevant option in the Makefile.

There are some special Makefile targets that make life easier.
make cc		- standard cc build
make gcc	- standard gcc build
make x86-elf	- x86 assembler (elf), linux-elf.
make x86-out	- x86 assembler (a.out), FreeBSD
make x86-solaris- x86 assembler
make x86-bsdi	- x86 assembler (a.out with primative assembler).

If at all possible use the assembler (for Windows NT/95, use
asm/win32.obj to link with).  The x86 assembler is very very fast.

A make install will by default install
libdes.a      in /usr/local/lib/libdes.a
des           in /usr/local/bin/des
des_crypt.man in /usr/local/man/man3/des_crypt.3
des.man       in /usr/local/man/man1/des.1
des.h         in /usr/include/des.h

des(1) should be compatible with sunOS's but I have been unable to
test it.

These routines should compile on MSDOS, most 32bit and 64bit version
of Unix (BSD and SYSV) and VMS, without modification.
The only problems should be #include files that are in the wrong places.

These routines can be compiled under MSDOS.
I have successfully encrypted files using des(1) under MSDOS and then
decrypted the files on a SparcStation.
I have been able to compile and test the routines with
Microsoft C v 5.1 and Turbo C v 2.0.
The code in this library is in no way optimised for the 16bit
operation of MSDOS.

When building for glibc, ignore all of the above and just unpack into
glibc-1.??/des and then gmake as per normal.

As a final note on performace.  Certain CPUs like sparcs and Alpha often give
a %10 speed difference depending on the link order.  It is rather anoying
when one program reports 'x' DES encrypts a second and another reports
'x*0.9' the speed.