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