Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10 5/3/83; site reed.UUCP Path: utzoo!linus!vaxine!wjh12!genrad!grkermit!masscomp!clyde!floyd!harpo!ihnp4!zehntel!hplabs!tektronix!ogcvax!metheus!cdi!reed!cbenson From: cbenson@reed.UUCP Newsgroups: net.lang.c Subject: Data Encryption Techniques Message-ID: <503@reed.UUCP> Date: Sun, 15-Apr-84 01:15:17 EST Article-I.D.: reed.503 Posted: Sun Apr 15 01:15:17 1984 Date-Received: Fri, 13-Apr-84 01:53:21 EST Organization: Benson High School, Portland, Oregon Lines: 160 I wrote the following program to fill my need for some form of security for my source code on our Altair. What I am interested in is an evaluation by some "knowledgeable Joe" as to the relative security of my algorithm. Please send your response either by mail or this news group. (Perhaps the news group would be the best way since we can never fig- ure a path that works twice.) I probably misspelled the name of the French guy who gave me the idea, but I doubt that this will affect the operation of my program. Any, and all, advice will be greatly appreciated. /* Jason E. Elliott 9 March 1984 13 March 1984 14 March 1984 Program uses my own modification of the Vigenere algorithm for enciphering and deciphering files. If one file is specified on the command line then the file is read, a temporary file is created, and the result of the cipher- ment is written to the temporary file. The temporary file is the read and the contents are written back onto the original file. The temporary file is then unlinked. If two files are specified on the command line then the first file is read and ciphered, then the ciphered data is written on the second file. Warning: The contents of the output file are lost upon invocation of this program. Usage: cipher f1 [f2] */ #include #define BUFLEN 16384 main (argc, argv) int argc; char *argv[]; { register int l, i, f1, f2, sr; char key[255], buf[BUFLEN], c; if (argc == 1 || argc >3) { printf ("Usage: cipher f1 [f2]\n"); exit(1); } f1 = openfl (argv[1]); if (argc == 2) argv[2] = "temp.out.cpr"; if (!(f2 = creat (argv[2], 0600))) die (argv[2]); system ("stty cbreak"); system ("stty -echo"); printf ("Enter Key: "); for (l=0;(key[l]=getchar ()) != '\n';l++) ; printf ("\nConfirm Key: "); for (i=0;i