Plain: Meet Me After The Toga Party Cipher: PHHW PH Diwhu WKH WRJD Sduwb
Plain: Meet Me After The Toga Party Cipher: PHHW PH Diwhu WKH WRJD Sduwb
simplest, was by Julius Caesar. The Caesar cipher involves replacing each letter of the alphabet with the letter standing three places further down the alphabet. For example, plain: MEET ME AFTER THE TOGA PARTY cipher: PHHW PH DIWHU WKH WRJD SDUWB Note that the alphabet is wrapped around, so that the letter following Z is A. We can define the transformation by listing all possibilities, as follows:
plain: A B C D E F G H I J K K M N O P Q R S T U V W X Y Z cipher: D E F G H I J K L M N O P Q R S T U V W X Y Z A B C
0 1 2 3 4 5 6 7 8 9 10 11 12 n o p q r s t u v w x y z
13 14 15 16 17 18 19 20 21 22 23 24 25
Then the algorithm can be expressed as follows. For each plaintext letter p, substitute the ciphertext letter C. C = E(3, p) = (p + 3) mod 26 A shift may be of any amount, so that the general Caesar algorithm is C = E(k, p) = (p + k) mod 26 where k takes on a value in the range 1 to 25. The decryption algorithm is simply p = D(k, C) = (C k) mod 26
Your task: 1. 2. 3. 4. 5. Design and implement Caesar cipher using programming language Java SE. Your program should be built via GUI components. Your program should accept any key. Include documentation to your program, explanation of your code. Deadline 03/02/2013 23:55
Email: [email protected]