Report

Comp 150 - Computer Programming I An Introduction to Encryption

To view this page ensure that Adobe Flash Player version 9.0.124 or greater is installed.

Get Adobe Flash player
Please login or register to make a comment!

Comp 150 3 Computer Programming I An Introduction to Encryption Methods Introduction : The idea behind encryption is to take a message, called plaintext and encrypt (encode) it into a form called cipher-text so that if the cipher-text is intercepted, it cannot be read. Only the intended recipient has the means to correctly decrypt (decode) the cipher-text into plaintext. Plaintext should be easy to encrypt but for security reasons, cipher-text should be nearly impossible to decrypt without knowledge of the decryption algorithm.

What follows is a number of encryption systems. Mono-alphabetic Substitution : A substitution is made for each plaintext letter. This can be easily seen by lining up the cipher alphabet under the plaintext alphabet plain alphabet abcdefghijklmnopqrstuvwxyz cipher alphabet JLPAWIQBCTRZYDSKEGFXHUONVM The Caesar Shift Cipher : A form of monoalphabetic substitution where each plaintext letter is replaced by a cipher-text letter which is n positions away.

For example, if n = 3, you substitute D for A, E for B, F for C etc (A for X, B for Y, C for Z). plain alphabet abcdefghijklmnopqrstuvwxyz cipher alphabet DEFGHIJKLMNOPQRSTUVWXYZABC Keyphrase Mono-alphabetic Substitution : Another variant is to use a key word or keyphase to generate the cipher alphabet. For example, if ... more. less.

JULIUS CAESAR is used as the key phrase, remove all spaces and repeated characters to obtain JULISCAER then beginning with the last letter (R) append the rest of the alphabet in their correct order, skipping over letters which already appear.<br><br> plain alphabet abcdefghijklmnopqrstuvwxyz cipher alphabet JULISCASRTVWXYZBDEFGHKMNOP Mono-alphabetic substitutions are easy to implement but are not very secure since frequency analysis of cipher-text can be used to identify letters like 'e' and 's' that occur more frequently in messages. . Poly-alphabetic Substitution - the Vigenère Cipher : Blaise de Vigenère (b.<br><br> 1523) French diplomat, Traich è des Chiffres ("A Treatise on Secret Writing") pub 1586 One way to defeat the frequency analysis attack on mono-alphabetic substitution is to use multiple cipher alphabets. For example, if two cipher alphabets were used, substitutions would be made by alternating between cipher alphabets. Blaise de Vigenère in 1586 published a poly-alphabetic substitution method based on 26 cipher alphabet arranged into the so-called Vigenère Square.<br><br> Each row is the alphabet shifted n place to the left with n being the row number. The Vigenère Square plain a b c d e f g h i j k l m n o p q r s t u v w x y z ----------------------------------------------------- 1 B C D E F G H I J K L M N O P Q R S T U V W X Y Z A 2 C 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 3 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 4 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 D 5 F G H I J K L M N O P Q R S T U V W X Y Z A B C D E 6 G H I J K L M N O P Q R S T U V W X Y Z A B C D E F 7 H I J K L M N O P Q R S T U V W X Y Z A B C D E F G 8 I J K L M N O P Q R S T U V W X Y Z A B C D E F G H 9 J K L M N O P Q R S T U V W X Y Z A B C D E F G H I 10 K L M N O P Q R S T U V W X Y Z A B C D E F G H I J 11 L M N O P Q R S T U V W X Y Z A B C D E F G H I J K 12 M N O P Q R S T U V W X Y Z A B C D E F G H I J K L 13 N O P Q R S T U V W X Y Z A B C D E F G H I J K L M 14 O P Q R S T U V W X Y Z A B C D E F G H I J K L M N 15 P Q R S T U V W X Y Z A B C D E F G H I J K L M N O 16 Q R S T U V W X Y Z A B C D E F G H I J K L M N O P 17 R S T U V W X Y Z A B C D E F G H I J K L M N O P Q 18 S T U V W X Y Z A B C D E F G H I J K L M N O P Q R 19 T U V W X Y Z A B C D E F G H I J K L M N O P Q R S 20 U V W X Y Z A B C D E F G H I J K L M N O P Q R S T 21 V W X Y Z A B C D E F G H I J K L M N O P Q R S T U 22 W X Y Z A B C D E F G H I J K L M N O P Q R S T U V 23 X Y Z A B C D E F G H I J K L M N O P Q R S T U V W 24 Y Z A B C D E F G H I J K L M N O P Q R S T U V W X 25 Z A B C D E F G H I J K L M N O P Q R S Y T V W X Y 26 A B C D E F G H I J K L M N O P Q R S Y T V W X Y Z To encrypt a message, choose a sequence of rows which are used to define the substitution of cipher letters for plaintext letter. The sequence of rows can be based on a key word or phrase.<br><br> For example, the key word COMPSCI uses the rows beginning with C, O, M, P, S, C, and I to encrypt a message. For example key phase C O M P S C I C O M P S C I C O M P S C plain text w i t t e n b e r g u n i v e r s i t y cipher text Y W F I W P J G F S J F K D G F E X L A Decrypting is easy to do. In the row beginning with the key phase letter, locate the cipher-text letter.<br><br> The corresponding plaintext letter is at the head of that column. The advantage of the Vigenère cipher, unlike mono-alphabetic substitution, is that frequency analysis cannot be used to compromise the cipher. However, the Vigenere cipher can be broken.<br><br> In 1854, Charles Babbage (called the grandfather of computer science because of his design of the Analytic Engine , a 19 th century calculator which anticipated the modern computer) and in 1863 Friedrich Wilhelm Kasiski independently developed techniques to crack the Vigenere cipher. Kasiski published his work in Die Geheimschriften und die Deschiffrir-kunst in 1863. Babbage's earlier work only came to light in the 20 th century when his papers were examined.<br><br> It's not clear why he failed to publish his results. Suggested Readings The Code Book by Simon Singh, Doubleday 1999 Code Breaking by Rudolf Kippenhahn, Overlook Press 1999

less

Copyright © 2010 beepdf.com. All rights reserved.