                       
			P. E. A. C. E.  -  2012 1.00

		Private Electronic Alternate Cipher Experiment

			2012PEACE.zip includes:

	1)  test input - 2012apeaceinputmessage.txt
	
	  I always enjoyed programming. First on the Timex Sinclair, second on the Commodore 64.

	2)  test input - 2012bpeaceinputmessage.txt

	  1234567890123456789012345678

	3)  test input - 2012cpeaceinputmessage.txt

	  eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee

	4)  undoit.bas - prototype to show how PEACE works

	5)  2012PEACE100.bas - the2012 version of PEACE version 1.00

	6)  2012PEACEreadme.txt (recommend to open in wordpad).


		PEACE 2012 is an overhaul of my old PEACE encryption/decryption system. IT is my
	attempt to be (somewhat) original rather than re-hash (pun intended) other brilliant and
	established systems. Directions:
		
		to encrypt a file - select one at prompt start
	PEACE assumes a CRLF is at EOF and removes it, if your file does not have CRLF at end,
	any two dummy characters can be placed there as PEACE will discard them.

		to decrypt - select the file name 2012peaceoutput.txt and place the key (given during encryption)
	into the program when prompted.

		new users (testers) can leave the encryption run open on the screen, copy the key, and run
	the decryption step second.

		CREDIT for resetting the random number generator to NJames, thanks!

		algorithym overview - (to see this work, run undoit.bas)

 	1) read message and determine if encryption or decryption is needed
 	2a) if encryption - randomly create the key
 	2b) if decryption - the user is prompted for the key
 	3) key is expanded for entire string xor
 	4) the prng is seeded so cipher can be repeated for decryption
 	5) all message chars are assigned unique random numbers, (no character frequency to attack)
 	6) each number is broken to two ascii characters
 	7) those characters are randomly shuffled (note that this not only reshuffles the message -
 								it literally rips apart char pairs)
 	8) XOR shuffles characters with a random substring of the expanded key

       for decryption steps are 1,2,3,4,8,7,6,5


		why PEACE 2012 is strong?

	 T   w   a   s       t   h   e       n   i   g   h   t       .   .   .
	221 556 152 297 125 113 200 347 326 041 768 384 607 241 543 219 488 903

	Examine the above (what I call dilute). Each char is diluted to a frequency of one. There is
	no way to 'pen and pencil' break the cipher. Even if one could brute force the random number seed,
	you still need the key at start because of the XOR. Even if you have the key, PEACE uses only a
	portion of it. Reruns of same inputs will yield different outputs and different keys.

	why PEACE 2012 is weak?

	The cipher (portion) is unbreakable like a one-time pad, so attacks will come from attacks to the key
	and/or attacks to the random seed.

	So...

	1) key ====> random seed (PRNG)
	2) cipher

	Future improvements will be needed in (1). Recommendations and comments to tcoffin1@cfl.rr.com
	or private message to forum TomC.


