xref: /netbsd-src/crypto/external/bsd/openssl.old/lib/libdes/INSTALL (revision c9496f6b604074a9451a67df576a5b423068e71e)
1*c9496f6bSchristosCheck the CC and CFLAGS lines in the makefile
2*c9496f6bSchristos
3*c9496f6bSchristosIf your C library does not support the times(3) function, change the
4*c9496f6bSchristos#define TIMES to
5*c9496f6bSchristos#undef TIMES in speed.c
6*c9496f6bSchristosIf it does, check the HZ value for the times(3) function.
7*c9496f6bSchristosIf your system does not define CLK_TCK it will be assumed to
8*c9496f6bSchristosbe 100.0.
9*c9496f6bSchristos
10*c9496f6bSchristosIf possible use gcc v 2.7.?
11*c9496f6bSchristosTurn on the maximum optimising (normally '-O3 -fomit-frame-pointer' for gcc)
12*c9496f6bSchristosIn recent times, some system compilers give better performace.
13*c9496f6bSchristos
14*c9496f6bSchristostype 'make'
15*c9496f6bSchristos
16*c9496f6bSchristosrun './destest' to check things are ok.
17*c9496f6bSchristosrun './rpw' to check the tty code for reading passwords works.
18*c9496f6bSchristosrun './speed' to see how fast those optimisations make the library run :-)
19*c9496f6bSchristosrun './des_opts' to determin the best compile time options.
20*c9496f6bSchristos
21*c9496f6bSchristosThe output from des_opts should be put in the makefile options and des_enc.c
22*c9496f6bSchristosshould be rebuilt.  For 64 bit computers, do not use the DES_PTR option.
23*c9496f6bSchristosFor the DEC Alpha, edit des.h and change DES_LONG to 'unsigned int'
24*c9496f6bSchristosand then you can use the 'DES_PTR' option.
25*c9496f6bSchristos
26*c9496f6bSchristosThe file options.txt has the options listed for best speed on quite a
27*c9496f6bSchristosfew systems.  Look and the options (UNROLL, PTR, RISC2 etc) and then
28*c9496f6bSchristosturn on the relevent option in the Makefile
29*c9496f6bSchristos
30*c9496f6bSchristosThere are some special Makefile targets that make life easier.
31*c9496f6bSchristosmake cc		- standard cc build
32*c9496f6bSchristosmake gcc	- standard gcc build
33*c9496f6bSchristosmake x86-elf	- x86 assembler (elf), linux-elf.
34*c9496f6bSchristosmake x86-out	- x86 assembler (a.out), FreeBSD
35*c9496f6bSchristosmake x86-solaris- x86 assembler
36*c9496f6bSchristosmake x86-bsdi	- x86 assembler (a.out with primative assembler).
37*c9496f6bSchristos
38*c9496f6bSchristosIf at all possible use the assembler (for Windows NT/95, use
39*c9496f6bSchristosasm/win32.obj to link with).  The x86 assembler is very very fast.
40*c9496f6bSchristos
41*c9496f6bSchristosA make install will by default install
42*c9496f6bSchristoslibdes.a      in /usr/local/lib/libdes.a
43*c9496f6bSchristosdes           in /usr/local/bin/des
44*c9496f6bSchristosdes_crypt.man in /usr/local/man/man3/des_crypt.3
45*c9496f6bSchristosdes.man       in /usr/local/man/man1/des.1
46*c9496f6bSchristosdes.h         in /usr/include/des.h
47*c9496f6bSchristos
48*c9496f6bSchristosdes(1) should be compatible with sunOS's but I have been unable to
49*c9496f6bSchristostest it.
50*c9496f6bSchristos
51*c9496f6bSchristosThese routines should compile on MSDOS, most 32bit and 64bit version
52*c9496f6bSchristosof Unix (BSD and SYSV) and VMS, without modification.
53*c9496f6bSchristosThe only problems should be #include files that are in the wrong places.
54*c9496f6bSchristos
55*c9496f6bSchristosThese routines can be compiled under MSDOS.
56*c9496f6bSchristosI have successfully encrypted files using des(1) under MSDOS and then
57*c9496f6bSchristosdecrypted the files on a SparcStation.
58*c9496f6bSchristosI have been able to compile and test the routines with
59*c9496f6bSchristosMicrosoft C v 5.1 and Turbo C v 2.0.
60*c9496f6bSchristosThe code in this library is in no way optimised for the 16bit
61*c9496f6bSchristosoperation of MSDOS.
62*c9496f6bSchristos
63*c9496f6bSchristosWhen building for glibc, ignore all of the above and just unpack into
64*c9496f6bSchristosglibc-1.??/des and then gmake as per normal.
65*c9496f6bSchristos
66*c9496f6bSchristosAs a final note on performace.  Certain CPUs like sparcs and Alpha often give
67*c9496f6bSchristosa %10 speed difference depending on the link order.  It is rather anoying
68*c9496f6bSchristoswhen one program reports 'x' DES encrypts a second and another reports
69*c9496f6bSchristos'x*0.9' the speed.
70