File:  [Research Unix] / researchv10no / cmd / descrypt / decrypt.c
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 17:21:35 2018 UTC (8 years, 1 month ago) by root
Branches: belllabs, MAIN
CVS tags: researchv10, HEAD
researchv10 Norman

/*
 *	Decrypt a Message with New Crypt Algorithm
 *	D.P.Mitchell  83/06/08.
 */

#include <stdio.h>
#include "crypt.h"

main(argc, argv)
int argc;
char *argv[];
{
	Block key;
	Block plaintext;
	Block ciphertext;
	Block lastcipher;
	extern Block setup();

	key = setup(argc, argv);
	key_setup(&key, 1);
	lastcipher.left = 0;
	lastcipher.right = 0;
	while (c_source(&ciphertext)) {
		plaintext = ciphertext;
		des(&plaintext);
		plaintext.left ^= lastcipher.left;
		plaintext.right ^= lastcipher.right;
		lastcipher = ciphertext;
		p_sink(&plaintext);
	}
}

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.