1*0Sstevel@tonic-gate Fixed the weak key values which were wrong :-( 2*0Sstevel@tonic-gate Defining SIGACTION causes sigaction() to be used instead of signal(). 3*0Sstevel@tonic-gate SIGUSR1/SIGUSR2 are no longer mapped in the read tty stuff because it 4*0Sstevel@tonic-gate can cause problems. This should hopefully not affect normal 5*0Sstevel@tonic-gate applications. 6*0Sstevel@tonic-gate 7*0Sstevel@tonic-gateVersion 4.04 8*0Sstevel@tonic-gate Fixed a few tests in destest. Also added x86 assember for 9*0Sstevel@tonic-gate des_ncbc_encrypt() which is the standard cbc mode function. 10*0Sstevel@tonic-gate This makes a very very large performace difference. 11*0Sstevel@tonic-gate Ariel Glenn ariel@columbia.edu reports that the terminal 12*0Sstevel@tonic-gate 'turn echo off' can return (errno == EINVAL) under solaris 13*0Sstevel@tonic-gate when redirection is used. So I now catch that as well as ENOTTY. 14*0Sstevel@tonic-gate 15*0Sstevel@tonic-gate 16*0Sstevel@tonic-gateVersion 4.03 17*0Sstevel@tonic-gate Left a static out of enc_write.c, which caused to buffer to be 18*0Sstevel@tonic-gate continiously malloc()ed. Does anyone use these functions? I keep 19*0Sstevel@tonic-gate on feeling like removing them since I only had these in there 20*0Sstevel@tonic-gate for a version of kerberised login. Anyway, this was pointed out 21*0Sstevel@tonic-gate by Theo de Raadt <deraadt@cvs.openbsd.org> 22*0Sstevel@tonic-gate The 'n' bit ofb code was wrong, it was not shifting the shift 23*0Sstevel@tonic-gate register. It worked correctly for n == 64. Thanks to 24*0Sstevel@tonic-gate Gigi Ankeny <Gigi.Ankeny@Eng.Sun.COM> for pointing this one out. 25*0Sstevel@tonic-gate 26*0Sstevel@tonic-gateVersion 4.02 27*0Sstevel@tonic-gate I was doing 'if (memcmp(weak_keys[i],key,sizeof(key)) == 0)' 28*0Sstevel@tonic-gate when checking for weak keys which is wrong :-(, pointed out by 29*0Sstevel@tonic-gate Markus F.X.J. Oberhumer <markus.oberhumer@jk.uni-linz.ac.at>. 30*0Sstevel@tonic-gate 31*0Sstevel@tonic-gateVersion 4.01 32*0Sstevel@tonic-gate Even faster inner loop in the DES assembler for x86 and a modification 33*0Sstevel@tonic-gate for IP/FP which is faster on x86. Both of these changes are 34*0Sstevel@tonic-gate from Svend Olaf Mikkelsen <svolaf@inet.uni-c.dk>. His 35*0Sstevel@tonic-gate changes make the assembler run %40 faster on a pentium. This is just 36*0Sstevel@tonic-gate a case of getting the instruction sequence 'just right'. 37*0Sstevel@tonic-gate All credit to 'Svend' :-) 38*0Sstevel@tonic-gate Quite a few special x86 'make' targets. 39*0Sstevel@tonic-gate A libdes-l (lite) distribution. 40*0Sstevel@tonic-gate 41*0Sstevel@tonic-gateVersion 4.00 42*0Sstevel@tonic-gate After a bit of a pause, I'll up the major version number since this 43*0Sstevel@tonic-gate is mostly a performace release. I've added x86 assembler and 44*0Sstevel@tonic-gate added more options for performance. A %28 speedup for gcc 45*0Sstevel@tonic-gate on a pentium and the assembler is a %50 speedup. 46*0Sstevel@tonic-gate MIPS CPU's, sparc and Alpha are the main CPU's with speedups. 47*0Sstevel@tonic-gate Run des_opts to work out which options should be used. 48*0Sstevel@tonic-gate DES_RISC1/DES_RISC2 use alternative inner loops which use 49*0Sstevel@tonic-gate more registers but should give speedups on any CPU that does 50*0Sstevel@tonic-gate dual issue (pentium). DES_UNROLL unrolls the inner loop, 51*0Sstevel@tonic-gate which costs in code size. 52*0Sstevel@tonic-gate 53*0Sstevel@tonic-gateVersion 3.26 54*0Sstevel@tonic-gate I've finally removed one of the shifts in D_ENCRYPT. This 55*0Sstevel@tonic-gate meant I've changed the des_SPtrans table (spr.h), the set_key() 56*0Sstevel@tonic-gate function and some things in des_enc.c. This has definitly 57*0Sstevel@tonic-gate made things faster :-). I've known about this one for some 58*0Sstevel@tonic-gate time but I've been too lazy to follow it up :-). 59*0Sstevel@tonic-gate Noticed that in the D_ENCRYPT() macro, we can just do L^=(..)^(..)^.. 60*0Sstevel@tonic-gate instead of L^=((..)|(..)|(..).. This should save a register at 61*0Sstevel@tonic-gate least. 62*0Sstevel@tonic-gate Assember for x86. The file to replace is des_enc.c, which is replaced 63*0Sstevel@tonic-gate by one of the assembler files found in asm. Look at des/asm/readme 64*0Sstevel@tonic-gate for more info. 65*0Sstevel@tonic-gate 66*0Sstevel@tonic-gate /* Modification to fcrypt so it can be compiled to support 67*0Sstevel@tonic-gate HPUX 10.x's long password format, define -DLONGCRYPT to use this. 68*0Sstevel@tonic-gate Thanks to Jens Kupferschmidt <bt1cu@hpboot.rz.uni-leipzig.de>. */ 69*0Sstevel@tonic-gate 70*0Sstevel@tonic-gate SIGWINCH case put in des_read_passwd() so the function does not 71*0Sstevel@tonic-gate 'exit' if this function is recieved. 72*0Sstevel@tonic-gate 73*0Sstevel@tonic-gateVersion 3.25 17/07/96 74*0Sstevel@tonic-gate Modified read_pwd.c so that stdin can be read if not a tty. 75*0Sstevel@tonic-gate Thanks to Jeff Barber <jeffb@issl.atl.hp.com> for the patches. 76*0Sstevel@tonic-gate des_init_random_number_generator() shortened due to VMS linker 77*0Sstevel@tonic-gate limits. 78*0Sstevel@tonic-gate Added RSA's DESX cbc mode. It is a form of cbc encryption, with 2 79*0Sstevel@tonic-gate 8 byte quantites xored before and after encryption. 80*0Sstevel@tonic-gate des_xcbc_encryption() - the name is funny to preserve the des_ 81*0Sstevel@tonic-gate prefix on all functions. 82*0Sstevel@tonic-gate 83*0Sstevel@tonic-gateVersion 3.24 20/04/96 84*0Sstevel@tonic-gate The DES_PTR macro option checked and used by SSLeay configuration 85*0Sstevel@tonic-gate 86*0Sstevel@tonic-gateVersion 3.23 11/04/96 87*0Sstevel@tonic-gate Added DES_LONG. If defined to 'unsigned int' on the DEC Alpha, 88*0Sstevel@tonic-gate it gives a %20 speedup :-) 89*0Sstevel@tonic-gate Fixed the problem with des.pl under perl5. The patches were 90*0Sstevel@tonic-gate sent by Ed Kubaitis (ejk@uiuc.edu). 91*0Sstevel@tonic-gate if fcrypt.c, changed values to handle illegal salt values the way 92*0Sstevel@tonic-gate normal crypt() implementations do. Some programs apparently use 93*0Sstevel@tonic-gate them :-(. The patch was sent by Bjorn Gronvall <bg@sics.se> 94*0Sstevel@tonic-gate 95*0Sstevel@tonic-gateVersion 3.22 29/11/95 96*0Sstevel@tonic-gate Bug in des(1), an error with the uuencoding stuff when the 97*0Sstevel@tonic-gate 'data' is small, thanks to Geoff Keating <keagchon@mehta.anu.edu.au> 98*0Sstevel@tonic-gate for the patch. 99*0Sstevel@tonic-gate 100*0Sstevel@tonic-gateVersion 3.21 22/11/95 101*0Sstevel@tonic-gate After some emailing back and forth with 102*0Sstevel@tonic-gate Colin Plumb <colin@nyx10.cs.du.edu>, I've tweaked a few things 103*0Sstevel@tonic-gate and in a future version I will probably put in some of the 104*0Sstevel@tonic-gate optimisation he suggested for use with the DES_USE_PTR option. 105*0Sstevel@tonic-gate Extra routines from Mark Murray <mark@grondar.za> for use in 106*0Sstevel@tonic-gate freeBSD. They mostly involve random number generation for use 107*0Sstevel@tonic-gate with kerberos. They involve evil machine specific system calls 108*0Sstevel@tonic-gate etc so I would normally suggest pushing this stuff into the 109*0Sstevel@tonic-gate application and/or using RAND_seed()/RAND_bytes() if you are 110*0Sstevel@tonic-gate using this DES library as part of SSLeay. 111*0Sstevel@tonic-gate Redone the read_pw() function so that it is cleaner and 112*0Sstevel@tonic-gate supports termios, thanks to Sameer Parekh <sameer@c2.org> 113*0Sstevel@tonic-gate for the initial patches for this. 114*0Sstevel@tonic-gate Renamed 3ecb_encrypt() to ecb3_encrypt(). This has been 115*0Sstevel@tonic-gate done just to make things more consistent. 116*0Sstevel@tonic-gate I have also now added triple DES versions of cfb and ofb. 117*0Sstevel@tonic-gate 118*0Sstevel@tonic-gateVersion 3.20 119*0Sstevel@tonic-gate Damn, Damn, Damn, as pointed out by Mike_Spreitzer.PARC@xerox.com, 120*0Sstevel@tonic-gate my des_random_seed() function was only copying 4 bytes of the 121*0Sstevel@tonic-gate passed seed into the init structure. It is now fixed to copy 8. 122*0Sstevel@tonic-gate My own suggestion is to used something like MD5 :-) 123*0Sstevel@tonic-gate 124*0Sstevel@tonic-gateVersion 3.19 125*0Sstevel@tonic-gate While looking at my code one day, I though, why do I keep on 126*0Sstevel@tonic-gate calling des_encrypt(in,out,ks,enc) when every function that 127*0Sstevel@tonic-gate calls it has in and out the same. So I dropped the 'out' 128*0Sstevel@tonic-gate parameter, people should not be using this function. 129*0Sstevel@tonic-gate 130*0Sstevel@tonic-gateVersion 3.18 30/08/95 131*0Sstevel@tonic-gate Fixed a few bit with the distribution and the filenames. 132*0Sstevel@tonic-gate 3.17 had been munged via a move to DOS and back again. 133*0Sstevel@tonic-gate NO CODE CHANGES 134*0Sstevel@tonic-gate 135*0Sstevel@tonic-gateVersion 3.17 14/07/95 136*0Sstevel@tonic-gate Fixed ede3 cbc which I had broken in 3.16. I have also 137*0Sstevel@tonic-gate removed some unneeded variables in 7-8 of the routines. 138*0Sstevel@tonic-gate 139*0Sstevel@tonic-gateVersion 3.16 26/06/95 140*0Sstevel@tonic-gate Added des_encrypt2() which does not use IP/FP, used by triple 141*0Sstevel@tonic-gate des routines. Tweaked things a bit elsewhere. %13 speedup on 142*0Sstevel@tonic-gate sparc and %6 on a R4400 for ede3 cbc mode. 143*0Sstevel@tonic-gate 144*0Sstevel@tonic-gateVersion 3.15 06/06/95 145*0Sstevel@tonic-gate Added des_ncbc_encrypt(), it is des_cbc mode except that it is 146*0Sstevel@tonic-gate 'normal' and copies the new iv value back over the top of the 147*0Sstevel@tonic-gate passed parameter. 148*0Sstevel@tonic-gate CHANGED des_ede3_cbc_encrypt() so that it too now overwrites 149*0Sstevel@tonic-gate the iv. THIS WILL BREAK EXISTING CODE, but since this function 150*0Sstevel@tonic-gate only new, I feel I can change it, not so with des_cbc_encrypt :-(. 151*0Sstevel@tonic-gate I need to update the documentation. 152*0Sstevel@tonic-gate 153*0Sstevel@tonic-gateVersion 3.14 31/05/95 154*0Sstevel@tonic-gate New release upon the world, as part of my SSL implementation. 155*0Sstevel@tonic-gate New copyright and usage stuff. Basically free for all to use 156*0Sstevel@tonic-gate as long as you say it came from me :-) 157*0Sstevel@tonic-gate 158*0Sstevel@tonic-gateVersion 3.13 31/05/95 159*0Sstevel@tonic-gate A fix in speed.c, if HZ is not defined, I set it to 100.0 160*0Sstevel@tonic-gate which is reasonable for most unixes except SunOS 4.x. 161*0Sstevel@tonic-gate I now have a #ifdef sun but timing for SunOS 4.x looked very 162*0Sstevel@tonic-gate good :-(. At my last job where I used SunOS 4.x, it was 163*0Sstevel@tonic-gate defined to be 60.0 (look at the old INSTALL documentation), at 164*0Sstevel@tonic-gate the last release had it changed to 100.0 since I now work with 165*0Sstevel@tonic-gate Solaris2 and SVR4 boxes. 166*0Sstevel@tonic-gate Thanks to Rory Chisholm <rchishol@math.ethz.ch> for pointing this 167*0Sstevel@tonic-gate one out. 168*0Sstevel@tonic-gate 169*0Sstevel@tonic-gateVersion 3.12 08/05/95 170*0Sstevel@tonic-gate As pointed out by The Crypt Keeper <tck@bend.UCSD.EDU>, 171*0Sstevel@tonic-gate my D_ENCRYPT macro in crypt() had an un-necessary variable. 172*0Sstevel@tonic-gate It has been removed. 173*0Sstevel@tonic-gate 174*0Sstevel@tonic-gateVersion 3.11 03/05/95 175*0Sstevel@tonic-gate Added des_ede3_cbc_encrypt() which is cbc mode des with 3 keys 176*0Sstevel@tonic-gate and one iv. It is a standard and I needed it for my SSL code. 177*0Sstevel@tonic-gate It makes more sense to use this for triple DES than 178*0Sstevel@tonic-gate 3cbc_encrypt(). I have also added (or should I say tested :-) 179*0Sstevel@tonic-gate cfb64_encrypt() which is cfb64 but it will encrypt a partial 180*0Sstevel@tonic-gate number of bytes - 3 bytes in 3 bytes out. Again this is for 181*0Sstevel@tonic-gate my SSL library, as a form of encryption to use with SSL 182*0Sstevel@tonic-gate telnet. 183*0Sstevel@tonic-gate 184*0Sstevel@tonic-gateVersion 3.10 22/03/95 185*0Sstevel@tonic-gate Fixed a bug in 3cbc_encrypt() :-(. When making repeated calls 186*0Sstevel@tonic-gate to cbc3_encrypt, the 2 iv values that were being returned to 187*0Sstevel@tonic-gate be used in the next call were reversed :-(. 188*0Sstevel@tonic-gate Many thanks to Bill Wade <wade@Stoner.COM> for pointing out 189*0Sstevel@tonic-gate this error. 190*0Sstevel@tonic-gate 191*0Sstevel@tonic-gateVersion 3.09 01/02/95 192*0Sstevel@tonic-gate Fixed des_random_key to far more random, it was rather feeble 193*0Sstevel@tonic-gate with regards to picking the initial seed. The problem was 194*0Sstevel@tonic-gate pointed out by Olaf Kirch <okir@monad.swb.de>. 195*0Sstevel@tonic-gate 196*0Sstevel@tonic-gateVersion 3.08 14/12/94 197*0Sstevel@tonic-gate Added Makefile.PL so libdes can be built into perl5. 198*0Sstevel@tonic-gate Changed des_locl.h so RAND is always defined. 199*0Sstevel@tonic-gate 200*0Sstevel@tonic-gateVersion 3.07 05/12/94 201*0Sstevel@tonic-gate Added GNUmake and stuff so the library can be build with 202*0Sstevel@tonic-gate glibc. 203*0Sstevel@tonic-gate 204*0Sstevel@tonic-gateVersion 3.06 30/08/94 205*0Sstevel@tonic-gate Added rpc_enc.c which contains _des_crypt. This is for use in 206*0Sstevel@tonic-gate secure_rpc v 4.0 207*0Sstevel@tonic-gate Finally fixed the cfb_enc problems. 208*0Sstevel@tonic-gate Fixed a few parameter parsing bugs in des (-3 and -b), thanks 209*0Sstevel@tonic-gate to Rob McMillan <R.McMillan@its.gu.edu.au> 210*0Sstevel@tonic-gate 211*0Sstevel@tonic-gateVersion 3.05 21/04/94 212*0Sstevel@tonic-gate for unsigned long l; gcc does not produce ((l>>34) == 0) 213*0Sstevel@tonic-gate This causes bugs in cfb_enc. 214*0Sstevel@tonic-gate Thanks to Hadmut Danisch <danisch@ira.uka.de> 215*0Sstevel@tonic-gate 216*0Sstevel@tonic-gateVersion 3.04 20/04/94 217*0Sstevel@tonic-gate Added a version number to des.c and libdes.a 218*0Sstevel@tonic-gate 219*0Sstevel@tonic-gateVersion 3.03 12/01/94 220*0Sstevel@tonic-gate Fixed a bug in non zero iv in 3cbc_enc. 221*0Sstevel@tonic-gate 222*0Sstevel@tonic-gateVersion 3.02 29/10/93 223*0Sstevel@tonic-gate I now work in a place where there are 6+ architectures and 14+ 224*0Sstevel@tonic-gate OS versions :-). 225*0Sstevel@tonic-gate Fixed TERMIO definition so the most sys V boxes will work :-) 226*0Sstevel@tonic-gate 227*0Sstevel@tonic-gateRelease upon comp.sources.misc 228*0Sstevel@tonic-gateVersion 3.01 08/10/93 229*0Sstevel@tonic-gate Added des_3cbc_encrypt() 230*0Sstevel@tonic-gate 231*0Sstevel@tonic-gateVersion 3.00 07/10/93 232*0Sstevel@tonic-gate Fixed up documentation. 233*0Sstevel@tonic-gate quad_cksum definitely compatible with MIT's now. 234*0Sstevel@tonic-gate 235*0Sstevel@tonic-gateVersion 2.30 24/08/93 236*0Sstevel@tonic-gate Triple DES now defaults to triple cbc but can do triple ecb 237*0Sstevel@tonic-gate with the -b flag. 238*0Sstevel@tonic-gate Fixed some MSDOS uuen/uudecoding problems, thanks to 239*0Sstevel@tonic-gate Added prototypes. 240*0Sstevel@tonic-gate 241*0Sstevel@tonic-gateVersion 2.22 29/06/93 242*0Sstevel@tonic-gate Fixed a bug in des_is_weak_key() which stopped it working :-( 243*0Sstevel@tonic-gate thanks to engineering@MorningStar.Com. 244*0Sstevel@tonic-gate 245*0Sstevel@tonic-gateVersion 2.21 03/06/93 246*0Sstevel@tonic-gate des(1) with no arguments gives quite a bit of help. 247*0Sstevel@tonic-gate Added -c (generate ckecksum) flag to des(1). 248*0Sstevel@tonic-gate Added -3 (triple DES) flag to des(1). 249*0Sstevel@tonic-gate Added cfb and ofb routines to the library. 250*0Sstevel@tonic-gate 251*0Sstevel@tonic-gateVersion 2.20 11/03/93 252*0Sstevel@tonic-gate Added -u (uuencode) flag to des(1). 253*0Sstevel@tonic-gate I have been playing with byte order in quad_cksum to make it 254*0Sstevel@tonic-gate compatible with MIT's version. All I can say is avid this 255*0Sstevel@tonic-gate function if possible since MIT's output is endian dependent. 256*0Sstevel@tonic-gate 257*0Sstevel@tonic-gateVersion 2.12 14/10/92 258*0Sstevel@tonic-gate Added MSDOS specific macro in ecb_encrypt which gives a %70 259*0Sstevel@tonic-gate speed up when the code is compiled with turbo C. 260*0Sstevel@tonic-gate 261*0Sstevel@tonic-gateVersion 2.11 12/10/92 262*0Sstevel@tonic-gate Speedup in set_key (recoding of PC-1) 263*0Sstevel@tonic-gate I now do it in 47 simple operations, down from 60. 264*0Sstevel@tonic-gate Thanks to John Fletcher (john_fletcher@lccmail.ocf.llnl.gov) 265*0Sstevel@tonic-gate for motivating me to look for a faster system :-) 266*0Sstevel@tonic-gate The speedup is probably less that 1% but it is still 13 267*0Sstevel@tonic-gate instructions less :-). 268*0Sstevel@tonic-gate 269*0Sstevel@tonic-gateVersion 2.10 06/10/92 270*0Sstevel@tonic-gate The code now works on the 64bit ETA10 and CRAY without modifications or 271*0Sstevel@tonic-gate #defines. I believe the code should work on any machine that 272*0Sstevel@tonic-gate defines long, int or short to be 8 bytes long. 273*0Sstevel@tonic-gate Thanks to Shabbir J. Safdar (shabby@mentor.cc.purdue.edu) 274*0Sstevel@tonic-gate for helping me fix the code to run on 64bit machines (he had 275*0Sstevel@tonic-gate access to an ETA10). 276*0Sstevel@tonic-gate Thanks also to John Fletcher <john_fletcher@lccmail.ocf.llnl.gov> 277*0Sstevel@tonic-gate for testing the routines on a CRAY. 278*0Sstevel@tonic-gate read_password.c has been renamed to read_passwd.c 279*0Sstevel@tonic-gate string_to_key.c has been renamed to string2key.c 280*0Sstevel@tonic-gate 281*0Sstevel@tonic-gateVersion 2.00 14/09/92 282*0Sstevel@tonic-gate Made mods so that the library should work on 64bit CPU's. 283*0Sstevel@tonic-gate Removed all my uchar and ulong defs. To many different 284*0Sstevel@tonic-gate versions of unix define them in their header files in too many 285*0Sstevel@tonic-gate different combinations :-) 286*0Sstevel@tonic-gate IRIX - Sillicon Graphics mods (mostly in read_password.c). 287*0Sstevel@tonic-gate Thanks to Andrew Daviel (advax@erich.triumf.ca) 288*0Sstevel@tonic-gate 289*0Sstevel@tonic-gateVersion 1.99 26/08/92 290*0Sstevel@tonic-gate Fixed a bug or 2 in enc_read.c 291*0Sstevel@tonic-gate Fixed a bug in enc_write.c 292*0Sstevel@tonic-gate Fixed a pseudo bug in fcrypt.c (very obscure). 293*0Sstevel@tonic-gate 294*0Sstevel@tonic-gateVersion 1.98 31/07/92 295*0Sstevel@tonic-gate Support for the ETA10. This is a strange machine that defines 296*0Sstevel@tonic-gate longs and ints as 8 bytes and shorts as 4 bytes. 297*0Sstevel@tonic-gate Since I do evil things with long * that assume that they are 4 298*0Sstevel@tonic-gate bytes. Look in the Makefile for the option to compile for 299*0Sstevel@tonic-gate this machine. quad_cksum appears to have problems but I 300*0Sstevel@tonic-gate will don't have the time to fix it right now, and this is not 301*0Sstevel@tonic-gate a function that uses DES and so will not effect the main uses 302*0Sstevel@tonic-gate of the library. 303*0Sstevel@tonic-gate 304*0Sstevel@tonic-gateVersion 1.97 20/05/92 eay 305*0Sstevel@tonic-gate Fixed the Imakefile and made some changes to des.h to fix some 306*0Sstevel@tonic-gate problems when building this package with Kerberos v 4. 307*0Sstevel@tonic-gate 308*0Sstevel@tonic-gateVersion 1.96 18/05/92 eay 309*0Sstevel@tonic-gate Fixed a small bug in string_to_key() where problems could 310*0Sstevel@tonic-gate occur if des_check_key was set to true and the string 311*0Sstevel@tonic-gate generated a weak key. 312*0Sstevel@tonic-gate 313*0Sstevel@tonic-gatePatch2 posted to comp.sources.misc 314*0Sstevel@tonic-gateVersion 1.95 13/05/92 eay 315*0Sstevel@tonic-gate Added an alternative version of the D_ENCRYPT macro in 316*0Sstevel@tonic-gate ecb_encrypt and fcrypt. Depending on the compiler, one version or the 317*0Sstevel@tonic-gate other will be faster. This was inspired by 318*0Sstevel@tonic-gate Dana How <how@isl.stanford.edu>, and her pointers about doing the 319*0Sstevel@tonic-gate *(ulong *)((uchar *)ptr+(value&0xfc)) 320*0Sstevel@tonic-gate vs 321*0Sstevel@tonic-gate ptr[value&0x3f] 322*0Sstevel@tonic-gate to stop the C compiler doing a <<2 to convert the long array index. 323*0Sstevel@tonic-gate 324*0Sstevel@tonic-gateVersion 1.94 05/05/92 eay 325*0Sstevel@tonic-gate Fixed an incompatibility between my string_to_key and the MIT 326*0Sstevel@tonic-gate version. When the key is longer than 8 chars, I was wrapping 327*0Sstevel@tonic-gate with a different method. To use the old version, define 328*0Sstevel@tonic-gate OLD_STR_TO_KEY in the makefile. Thanks to 329*0Sstevel@tonic-gate viktor@newsu.shearson.com (Viktor Dukhovni). 330*0Sstevel@tonic-gate 331*0Sstevel@tonic-gateVersion 1.93 28/04/92 eay 332*0Sstevel@tonic-gate Fixed the VMS mods so that echo is now turned off in 333*0Sstevel@tonic-gate read_password. Thanks again to brennan@coco.cchs.su.oz.AU. 334*0Sstevel@tonic-gate MSDOS support added. The routines can be compiled with 335*0Sstevel@tonic-gate Turbo C (v2.0) and MSC (v5.1). Make sure MSDOS is defined. 336*0Sstevel@tonic-gate 337*0Sstevel@tonic-gatePatch1 posted to comp.sources.misc 338*0Sstevel@tonic-gateVersion 1.92 13/04/92 eay 339*0Sstevel@tonic-gate Changed D_ENCRYPT so that the rotation of R occurs outside of 340*0Sstevel@tonic-gate the loop. This required rotating all the longs in sp.h (now 341*0Sstevel@tonic-gate called spr.h). Thanks to Richard Outerbridge <71755.204@CompuServe.COM> 342*0Sstevel@tonic-gate speed.c has been changed so it will work without SIGALRM. If 343*0Sstevel@tonic-gate times(3) is not present it will try to use ftime() instead. 344*0Sstevel@tonic-gate 345*0Sstevel@tonic-gateVersion 1.91 08/04/92 eay 346*0Sstevel@tonic-gate Added -E/-D options to des(1) so it can use string_to_key. 347*0Sstevel@tonic-gate Added SVR4 mods suggested by witr@rwwa.COM 348*0Sstevel@tonic-gate Added VMS mods suggested by brennan@coco.cchs.su.oz.AU. If 349*0Sstevel@tonic-gate anyone knows how to turn of tty echo in VMS please tell me or 350*0Sstevel@tonic-gate implement it yourself :-). 351*0Sstevel@tonic-gate Changed FILE *IN/*OUT to *DES_IN/*DES_OUT since it appears VMS 352*0Sstevel@tonic-gate does not like IN/OUT being used. 353*0Sstevel@tonic-gate 354*0Sstevel@tonic-gateLibdes posted to comp.sources.misc 355*0Sstevel@tonic-gateVersion 1.9 24/03/92 eay 356*0Sstevel@tonic-gate Now contains a fast small crypt replacement. 357*0Sstevel@tonic-gate Added des(1) command. 358*0Sstevel@tonic-gate Added des_rw_mode so people can use cbc encryption with 359*0Sstevel@tonic-gate enc_read and enc_write. 360*0Sstevel@tonic-gate 361*0Sstevel@tonic-gateVersion 1.8 15/10/91 eay 362*0Sstevel@tonic-gate Bug in cbc_cksum. 363*0Sstevel@tonic-gate Many thanks to Keith Reynolds (keithr@sco.COM) for pointing this 364*0Sstevel@tonic-gate one out. 365*0Sstevel@tonic-gate 366*0Sstevel@tonic-gateVersion 1.7 24/09/91 eay 367*0Sstevel@tonic-gate Fixed set_key :-) 368*0Sstevel@tonic-gate set_key is 4 times faster and takes less space. 369*0Sstevel@tonic-gate There are a few minor changes that could be made. 370*0Sstevel@tonic-gate 371*0Sstevel@tonic-gateVersion 1.6 19/09/1991 eay 372*0Sstevel@tonic-gate Finally go IP and FP finished. 373*0Sstevel@tonic-gate Now I need to fix set_key. 374*0Sstevel@tonic-gate This version is quite a bit faster that 1.51 375*0Sstevel@tonic-gate 376*0Sstevel@tonic-gateVersion 1.52 15/06/1991 eay 377*0Sstevel@tonic-gate 20% speedup in ecb_encrypt by changing the E bit selection 378*0Sstevel@tonic-gate to use 2 32bit words. This also required modification of the 379*0Sstevel@tonic-gate sp table. There is still a way to speedup the IP and IP-1 380*0Sstevel@tonic-gate (hints from outer@sq.com) still working on this one :-(. 381*0Sstevel@tonic-gate 382*0Sstevel@tonic-gateVersion 1.51 07/06/1991 eay 383*0Sstevel@tonic-gate Faster des_encrypt by loop unrolling 384*0Sstevel@tonic-gate Fixed bug in quad_cksum.c (thanks to hughes@logos.ucs.indiana.edu) 385*0Sstevel@tonic-gate 386*0Sstevel@tonic-gateVersion 1.50 28/05/1991 eay 387*0Sstevel@tonic-gate Optimised the code a bit more for the sparc. I have improved the 388*0Sstevel@tonic-gate speed of the inner des_encrypt by speeding up the initial and 389*0Sstevel@tonic-gate final permutations. 390*0Sstevel@tonic-gate 391*0Sstevel@tonic-gateVersion 1.40 23/10/1990 eay 392*0Sstevel@tonic-gate Fixed des_random_key, it did not produce a random key :-( 393*0Sstevel@tonic-gate 394*0Sstevel@tonic-gateVersion 1.30 2/10/1990 eay 395*0Sstevel@tonic-gate Have made des_quad_cksum the same as MIT's, the full package 396*0Sstevel@tonic-gate should be compatible with MIT's 397*0Sstevel@tonic-gate Have tested on a DECstation 3100 398*0Sstevel@tonic-gate Still need to fix des_set_key (make it faster). 399*0Sstevel@tonic-gate Does des_cbc_encrypts at 70.5k/sec on a 3100. 400*0Sstevel@tonic-gate 401*0Sstevel@tonic-gateVersion 1.20 18/09/1990 eay 402*0Sstevel@tonic-gate Fixed byte order dependencies. 403*0Sstevel@tonic-gate Fixed (I hope) all the word alignment problems. 404*0Sstevel@tonic-gate Speedup in des_ecb_encrypt. 405*0Sstevel@tonic-gate 406*0Sstevel@tonic-gateVersion 1.10 11/09/1990 eay 407*0Sstevel@tonic-gate Added des_enc_read and des_enc_write. 408*0Sstevel@tonic-gate Still need to fix des_quad_cksum. 409*0Sstevel@tonic-gate Still need to document des_enc_read and des_enc_write. 410*0Sstevel@tonic-gate 411*0Sstevel@tonic-gateVersion 1.00 27/08/1990 eay 412*0Sstevel@tonic-gate 413