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