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