Docsity

Cryptography Lecture Notes: Shift Cipher, Substitution Cipher, and Frequency Analysis, Exams of Cryptography and System Security

Partial preview of the text

Download Cryptography Lecture Notes: Shift Cipher, Substitution Cipher, and Frequency Analysis and more Exams Cryptography and System Security in PDF only on Docsity!

Cristina Nita-Rotaru

CS355: Cryptography

Lecture 2: Shift cipher, substitution cipher.

Course overview (1)

Cristina Nita-Rotaru } Concepts and principles of cryptography: security services, attacks and mechanisms. " } Classical cryptographic systems: shift cipher, Vigenere and Vernam ciphers, Jefferson wheel cipher and the Enigma machine. " } Block ciphers: DES, Blowfish, RC5, IDEA, AES. " } Stream ciphers: SEAL, RC4." } Public-key encryption: RSA, " ElGamal, Rabin." } Data integrity: hash functions, MD5, SHA1, HMAC." } Digital signatures: RSA, ElGamal, DSA, Schnorr. " } Authentication protocols, data and entity authentication. One time passwords, Lamport's scheme, challenge-response schemes, Kerberos. " 2

Reference material

4 Cristina Nita-Rotaru

Course information

Cristina Nita-Rotaru } Meetings } MWF 12:30-1:20 LWSN 1106 } Make up class: Monday at 6 pm in same room, TU 6 pm in LWSN B 146. We will use the lab for exercises in class. } Professor contact info: } Office: 2142J } Email: crisn@cs } Office hours: by appointment } TA: Denis Ulybyshev } Email: [email protected] } Class webpage } http://homes.cerias.purdue.edu/~crisn/courses/cs355_Fall_2012/ } Use Piazza for questions and postings 5

Grading policy

Cristina Nita-Rotaru

} Written Assignments (~5) 20%

} Projects (~4, 3+final project) 25%

} Midterm Exam 20%

} Final Exam 25%

} Class/Piazza Participation 10%

7

Extra days

Cristina Nita-Rotaru

} Every student has 5 extra days for all the written

assignments and 5 extra days for individual

programming projects

} YOU DECIDE HOW TO USE THEM

} Email me and the TA with name and number of extra

days used for an assignment. 1 minute late counts as

1 extra day

} After using your extra days, no late homework or

project will be accepted

8

Exams

Cristina Nita-Rotaru

} Midterm - proposed date week Oct. 3 in class (before

Fall break week)

} 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

10

Programming projects

Cristina Nita-Rotaru

} Three programming projects

} One final project

} You must work alone

} More information will come

} Purpose of the projects is to offer a glimpse of what is

means to design and implement secure protocols

} Submission will be via turn in, make sure you have a CS

account of you’re not a CS major

11

Phases in cryptography’s development

Cristina Nita-Rotaru

} Cryptography is driven by computing and

communication technology

} First stage:

} paper and ink based scheme

} Second stage:

} use cryptographic engines

} Third stage, modern cryptography:

} relying on mathematics and computers

} information-theoretic security

} computational security

13

} A substitution cipher } The Key Space: } [0 .. 25] } Encryption given a key K: } each letter in the plaintext P is replaced with the K th letter following corresponding number (shift right) } Decryption given K: } shift left

History: K = 3, Caesar s cipher

14 Cristina Nita-Rotaru

Shift cipher

Shift cipher: Cryptanalysis

16 Cristina Nita-Rotaru

} Can an attacker find K?

} YES: exhaustive search, key space is small (<= 26 possible keys).

} Once K is found, very easy to decrypt

Mono-alphabetical substitution cipher

17 Cristina Nita-Rotaru } The key space: all permutations of Σ = {A, B, C, …, Z} } Encryption given a key (permutation) π:

} each letter X in the plaintext P is replaced with π(X)

} Decryption given a key π:

} each letter Y in the cipherext P is replaced with π

  • (Y) 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 π = B A D C Z H W Y G O Q X L V T R N M S K J I P F E U

BECAUSE → AZDBJSZ

History of frequency analysis

19 Cristina Nita-Rotaru

} Discovered by the Arabs

} Earliest known description of frequency analysis

is in a book by the ninth-century scientist Al-

Kindi

} Rediscovered or introduced from the Arabs in

the Europe during the Renaissance

} Frequency analysis made substitution cipher

insecure

Frequency analysis

} 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

20 Cristina Nita-Rotaru