Docsity

Cryptography Course: Lecture 2 - Shift, Substitution and Vigenere Ciphers, Study notes of Cryptography and System Security

Partial preview of the text

Download Cryptography Course: Lecture 2 - Shift, Substitution and Vigenere Ciphers and more Study notes Cryptography and System Security in PDF only on Docsity!

CS355: Cryptography

Lecture 2 : Shift cipher,

substitution cipher,

Vigenere cipher.

Course Information

 Meetings

 TTh 1:30-2:45 LWSN B

 Professor contact info:

 Office: 2142J

 Email: crisn@cs

 Office hours: by appointment

 TA: Camille Gaspard

 Office: LWSN B

 Office hours: TTh 3:00 - 4:00 PM

 Email: cgaspard@cs

 Class webpage

 http://homes.cerias.purdue.edu/~crisn/courses/cs355_Fall_2008/

Grading Policy

 Written Assignments (~5) 20%  Projects (3) 20%  Midterm Exam 20%  Final Exam 30%  Class Participation 10%

Homework

 Homework must by TYPED. IF IT’S NOT TYPED, WE DO NOT GRADE IT.  Homework is due in class at 1:30. If you use extra days you can email it, use PDF format  Homework will be returned in class at 1:30.  You must work alone on the written homework.

 Midterm - proposed date week Oct. 7 - 9  Final – check university web page  We will have a review of the material before midterm and final  Final covers all the material studied all semester  Exam problems are similar with homework and test also what you learn through the programming projects  You will receive a practice final

Exams

 Three programming projects  First two you must work alone  Last one you must work in pairs  More information will come  Purpose of the projects is to offer a glimpse of what is means to design and implement secure protocols

Programming Projects

QUESTIONS????

Today and next week: simple ciphers, enigma, one-time pad, perfect secrecy (chapter 2 book)

Shift Cipher: An Example

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

P = CRYPTOGRAPHYISFUN K = 11 C = NCJAVZRCLASJTDQFY C → 2; 2+11 mod 26 = 13 → N R → 17; 17+11 mod 26 = 2 → C … N → 13; 13+11 mod 26 = 24 → Y

Shift Cipher: Cryptanalysis

 Can an attacker find K?  YES: exhaustive search, key space is small (<= 26 possible keys).  Once K is found, very easy to decrypt

Strength of the General Substitution Cipher  Exhaustive search is infeasible  key space size is 26! ≈ 4* 26  Dominates the art of secret writing throughout the first millennium A.D.  Thought to be unbreakable by many back then

Cryptanalysis of Substitution Ciphers: Frequency Analysis  Basic ideas:  Each language has certain features: frequency of letters, or of groups of two or more letters.  Substitution ciphers preserve the language features.  Substitution ciphers are vulnerable to frequency analysis attacks.

 Vowels, which constitute 40 % of plaintext, are often separated by consonants.  Letter A is often found in the beginning of a word or second from last.  Letter I is often third from the end of a word.  Letter Q is followed only by U  And more … Other Frequency Features of English

 The number of different ciphertext characters or combinations are counted to determine the frequency of usage.  The cipher text is examined for patterns, repeated series, and common combinations.  Replace ciphertext characters with possible plaintext equivalents using known language characteristics.

Substitution Ciphers: Cryptanalysis