Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!execu!sequoia!rpp386!woody From: woody@rpp386.cactus.org (Woodrow Baker) Newsgroups: comp.lang.postscript Subject: Re: Info on using eexec Summary: yup Message-ID: <17883@rpp386.cactus.org> Date: 7 Feb 90 18:37:32 GMT References: <31604@shemp.CS.UCLA.EDU> Organization: River Parishes Programming, Plano, TX Lines: 66 In article <31604@shemp.CS.UCLA.EDU>, david@oahu.cs.ucla.edu (David Dantowitz) writes: > > > Does anyone have info on using eexec. An older copy of the red book > mentioned it (briefly) but the new version has nothing. > Yep. A routine has been posted on the net to decrypt the eexec data into plain text, and also convert plain text to eexec data. I've got it. Basicaly eexec is an encryption algorthym that uses a linear congruent random number and uses the byte of data and XOR's them together, then uses the incoming data to compute the next random number. you might try this nclude "stdio.h" /* routine takes an encrypted eexec file and creates a decrypted file. By Woody Baker */ FILE *infile,*outfile; main(argc,argv) char *argv[]; int argc; { int first =4; int state=0xD971; int c; char decrptd; if(argc !=3) { printf("usage: decrpt infile outfile\n"); exit(0); }; infile=fopen(argv[1],"rb"); outfile=fopen(argv[2],"wb"); while(fscanf(infile,"%2x",&c)>0) { decrptd= c ^ (state >>8); if(first !=0) { first--; } else { fputc(decrptd,outfile); } state=state + c; state=state * 0xCE6D; state=state + 0x58BF; } fclose(infile); fclose(outfile); } I think this is the working version that I use. Hope this helps. Cheers Woody