Announcements: Please pass in Assignment 1 now. Please pass in Assignment 1 now. Assignment 2 posted (when due?) Assignment 2 posted (when due?)Questions?

Slides:



Advertisements
Similar presentations
CLASSICAL ENCRYPTION TECHNIQUES
Advertisements

1 CIS 5371 Cryptography 5b. Pseudorandom Objects in Practice Block Ciphers.
Cryptology  Terminology  plaintext - text that is not encrypted.  ciphertext - the output of the encryption process.  key - the information required.
Week 2 - Friday.  What did we talk about last time?  Substitution ciphers  Vigenère ciphers  One-time pad.
Announcements: Programming exam next Thursday on breaking codes from chapter 2 Programming exam next Thursday on breaking codes from chapter 2 Written.
Announcements: Subscribe to Angel forums Subscribe to Angel forumsQuestions? Roll Call Today: affine ciphers DTTF/NB479: DszquphsbqizDay 2.
Announcements: Matlab: tutorial available at Matlab: tutorial available at
Creating Secret Messages. 2 Why do we need to keep things secret? Historically, secret messages were used in wars and battles For example, the Enigma.
Announcements: Computer exam next class Computer exam next classQuestions? DTTF/NB479: DszquphsbqizDay 10.
Announcements: Class is cancelled Thurs+Fri while I’m at the SIGCSE conference Class is cancelled Thurs+Fri while I’m at the SIGCSE conference Assignment.
Announcements: Homework 3 due now Homework 3 due now Homework 4 posted Homework 4 postedToday: Attacks on DES Attacks on DESQuestions? DTTF/NB479: DszquphsbqizDay.
Announcements: Assignment 2 finalized Assignment 2 finalizedQuestions?Today: Wrap up Hill ciphers Wrap up Hill ciphers One-time pads and LFSR One-time.
Announcements: 1. HW6 due now 2. HW7 posted Questions? This week: Discrete Logs, Diffie-Hellman, ElGamal Discrete Logs, Diffie-Hellman, ElGamal Hash Functions.
Announcements: Quizzes returned at end of class Quizzes returned at end of class This week: Mon-Thurs: Data Encryption Standard (DES) Mon-Thurs: Data Encryption.
Announcements: Pass in Assignment 1 now Pass in Assignment 1 now Meet my assistant Kevin Reed Meet my assistant Kevin Reed Assignment 2 (tentative) posted.
CSE331: Introduction to Networks and Security Lecture 17 Fall 2002.
Intro To Encryption Exercise 1. Monoalphabetic Ciphers Examples:  Caesar Cipher  At Bash  PigPen (Will be demonstrated)  …
Chapter 2 Basic Encryption and Decryption (part B)
Lecture 2.2: Private Key Cryptography II CS 436/636/736 Spring 2012 Nitesh Saxena.
Announcements: Assignment 1 due tomorrow in class. Assignment 1 due tomorrow in class.Questions? Roll Call Today: Vigenere ciphers Pronunciation? DTTF/NB479:
Announcements: Homework 1 coming Monday… Homework 1 coming Monday… Practical quiz during week 4 on putting your code to work Practical quiz during week.
CS526Topic 2: Classical Cryptography1 Information Security CS 526 Topic 2 Cryptography: Terminology & Classic Ciphers.
DTTF/NB479: Jouspevdujpo up Dszquphsbqiz Nbuu Cpvufmm G-222 y8534 (It should now be obvious whether or.
Cryptography Week-6.
Cryptanalysis. The Speaker  Chuck Easttom  
Polyalphabetic Substitution Ciphers. First Steps Towards Complexity  If one alphabet is good, then two alphabets must be better!  By doubling the number.
Classical Monoalphabetic Ciphers Day 2. Keyword cipher Select a keyword, if the keyword has any repeated letters, drop all but the first occurrence. Write.
Cryptanalysis of the Vigenere Cipher Using Signatures and Scrawls To break a Vigenere cipher you need to know the keyword length. – The Kasiski and Friedman.
Chapter 2 Basic Encryption and Decryption. csci5233 computer security & integrity 2 Encryption / Decryption encrypted transmission AB plaintext ciphertext.
Cryptography Programming Lab
Section 2.2: Affine Ciphers; More Modular Arithmetic Practice HW (not to hand in) From Barr Textbook p. 80 # 2a, 3e, 3f, 4, 5a, 7, 8 9, 10 (Use affinecipherbreaker.
Week 2 - Wednesday.  What did we talk about last time?  Encryption  Shift ciphers  Transposition ciphers.
Chapter 2 – Elementary Cryptography  Concepts of encryption  Cryptanalysis  Symmetric (secret key) Encryption (DES & AES)(DES & AES)  Asymmetric (public.
Section 2.1: Shift Ciphers and Modular Arithmetic The purpose of this section is to learn about modular arithmetic, which is one of the fundamental mathematical.
Cryptography and Network Security (CS435) Part Two (Classic Encryption Techniques)
Day 18. Concepts Plaintext: the original message Ciphertext: the transformed message Encryption: transformation of plaintext into ciphertext Decryption:
Introduction to Cryptography Techniques How secure is that banking network traffic?
Rather than just shifting the alphabet Could shuffle (jumble) the letters arbitrarily Each plaintext letter maps to a different random cipher text letter.
Symmetric-Key Cryptography
2002 Networking Operating Systems (CO32010) 1. Operating Systems 2. Processes and scheduling 3.
Announcements: Please pass in Assignment 1 now. Please pass in Assignment 1 now. Assignment 2 posted (when due?) Assignment 2 posted (when due?)Questions?
CSCI 5857: Encoding and Encryption
Cryptography Lecture 2: Classic Ciphers Piotr Faliszewski.
Introduction to Ciphers Breno de Medeiros. Cipher types From “Cipher”, Wikipedia article.
Abstract: Cryptology is a combination of the processes of keeping a message secret (cryptography) and trying to break the secrecy of that message (cryptoanalysis).
Elementary Cryptography  Concepts of encryption  Symmetric (secret key) Encryption (DES & AES)(DES & AES)  Asymmetric (public key) Encryption (RSA)(RSA)
1 Cryptanalysis Four kinds of attacks (recall) The objective: determine the key ( Herckhoff principle ) Assumption: English plaintext text Basic techniques:
Announcements: Homework 3 due now Homework 3 due now Homework 4 posted Homework 4 postedToday: Attacks on DES Attacks on DESQuestions? DTTF/NB479: DszquphsbqizDay.
Traditional Symmetric-Key Ciphers
Basic Cryptography Some examples taken from “Coding Theory and Cryptography, the essentials” Second Edition Hankerson, et.al. 2000, Marcel Dekker, Inc.
Encryption No. 1  Seattle Pacific University Encryption: Protecting Your Data While in Transit Kevin Bolding Electrical Engineering Seattle Pacific University.
Vigenére Cipher Kimberly Chiffens & Maria Jannelli.
Announcements: Homework 2 returned Homework 2 returned Monday: Written (concept and small calculations) exam on breaking ch 2 ciphers Monday: Written (concept.
Intro to Cryptography Lesson Introduction
Introduction to Cryptography Lecture 8. Polyalphabetic Substitutions Definition: Let be different substitution ciphers. Then to encrypt the message apply.
Vigenère Tableau Reference –Matt Bishop, Computer Security, Addison Wesley, 2003.
CS526Topic 2: Classical Cryptography1 Information Security CS 526 Topic 2 Cryptography: Terminology & Classic Ciphers.
1 Introduction CS 303 Algorithmic Number Theory and Cryptography Jeremy R. Johnson.
Substitution Ciphers Reference –Matt Bishop, Computer Security, Addison Wesley, 2003.
CMSC 414 Computer (and Network) Security Lecture 3 Jonathan Katz.
Chapter 2 Basic Encryption and Decryption
CAP Cryptographic Analysis Program
Asad Gondal Ali Haider Mansoor
Section 2.7 The Friedman and Kasiski Tests
Cryptography Lecture 2.
Classical Polyalphabetic Ciphers
Cryptanalysis of Vigenere Cipher
Homework #1 Chap. 1, 3, 4 J. H. Wang Oct. 2, 2018.
Cryptography Lecture 2.
EKRJGTU CTG CYGUQOG! Can you break the code?.
Presentation transcript:

Announcements: Please pass in Assignment 1 now. Please pass in Assignment 1 now. Assignment 2 posted (when due?) Assignment 2 posted (when due?)Questions? Roll Call Today: Vigenere ciphers Invented in 1553 by Bellaso, not Vigenere Invented in 1553 by Bellaso, not Vigenere DTTF/NB479: DszquphsbqizDay 5

Idea: the key is a vector of shifts The key and its length are unknown to Eve The key and its length are unknown to EveEncryption: Repeat the vector as many times as needed to get the same length as the plaintext Repeat the vector as many times as needed to get the same length as the plaintext Add this repeated vector to the plaintext. Add this repeated vector to the plaintext.Example: Key = hidden ( ). Key = hidden ( ). The recent development of various methods of aph uiplvw giiltrsqrub ri znyqrxw zlbkrhf vn Demo Demo Vigenere Ciphers Q1-2 Key

The shift vector isn’t known (of course) 1. It’s length isn’t even known! 2. With shift ciphers, the most frequent cipher letter is probably e. But here, e maps to H, I, L, … (spread out!) But here, e maps to H, I, L, … (spread out!) Consider 4 attacks: Known plaintext? Known plaintext? Chosen plaintext? Chosen plaintext? Chosen ciphertext? Chosen ciphertext? Ciphertext only? Ciphertext only? Security Q3

English letter frequencies 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 Graph:

Ciphertext-only attack Assume you know the key length, L. Make any other assumptions you need. Take 5 min with a partner and devise a method to break Vigenere. Q4

Perhaps yours looks something like this? Assume we know the key length, L, … We’ll see how to find it shortly We’ll see how to find it shortly Method 1: Parse out the characters at positions p = i (mod L) Parse out the characters at positions p = i (mod L) These have all been shifted the same amount Do a frequency analysis to find shift The most frequent letter should be e, given enough text. Can verify to see how shift affects other letters. The most frequent letter should be e, given enough text. Can verify to see how shift affects other letters. This gives the first letter of the key This gives the first letter of the key Repeat for positions p = 2, p = 3, … p = L Repeat for positions p = 2, p = 3, … p = L Problem: involves some trial and error. Problem: involves some trial and error. For brute force to work, would need to brute force all letters of key simultaneously: _____ possibilities For brute force to work, would need to brute force all letters of key simultaneously: _____ possibilities

Dot products Consider A = ( ); A i = A displaced i positions to the right A 0 = ( … ) A 1 = ( … ) A 2 = ( … ) A 0.* A 1 = A 0.* A 0 = A i.* A j depends on _____ only. Max occurs when _____. 3 reasons why: Q5-6

Towards another method Method 1 Parse out the characters at positions p = 1 (mod L) Parse out the characters at positions p = 1 (mod L) These have all been shifted the same amount Do a frequency analysis to find shift The most frequent letter should be e, given enough text. Can verify to see how shift affects other letters. The most frequent letter should be e, given enough text. Can verify to see how shift affects other letters. This gives the first letter of the key This gives the first letter of the key Repeat for positions p = 2, p = 3, … p = L Repeat for positions p = 2, p = 3, … p = L

Another method Method 2 Parse out the characters at positions p = 1 (mod L) Parse out the characters at positions p = 1 (mod L) These have all been shifted the same amount Get the whole freq. distribution W = (0.05, 0.002, …) W approximates A. Calculate W approximates A. Calculate Max occurs when we got the shift correct. Max occurs when we got the shift correct. This gives the first letter of the key This gives the first letter of the key Repeat for positions p = 2, p = 3, … p = L Repeat for positions p = 2, p = 3, … p = L Demo Demo

Method 2 is more robust since it uses the whole letter distribution Find dot product of A i : and W: Q7-8 More robust than just using 1 letter (‘e’)… …but harder to compute by hand.

Finding the key length What if the frequency of letters in the plaintext approximates A? Then for each k, the frequency of each group of letters in position p = k (mod L) in the ciphertext approximates A. Then loop, displacing the ciphertext by i, and counting the number of matches. Get max when displace by correct key length Get max when displace by correct key length So just look for the max number of matches! So just look for the max number of matches!displacement APHUIPLVWGIILTRSQRUBRIZNYQRXWZLBKRHFVN (0) NAPHUIPLVWGIILTRSQRUBRIZNYQRXWZLBKRHFV (1) 1 match VNAPHUIPLVWGIILTRSQRUBRIZNYQRXWZLBKRHF (2) 0 matches … KRHFVNAPHUIPLVWGIILTRSQRUBRIZNYQRXWZLB (6) 5 matches …

Key length: an example Take any random pair in the ciphertext: The letter in the top row is shifted by i (say 0) The letter in the bottom row is shifted by j (say 2) Prob(both ‘A’) = P(‘a’)*P(‘y’) = * Prob(both ‘B’) = P(‘b’)*P(‘z’) = * Prob both same (any letter) is ___ or generally ___ Recall, this is maximum when ______ When are each letter in the top and bottom rows shifted by same amount? A 0 = ( … ) A 2 = ( … )

Still a bit fuzzy? Nothing like implementation to aid understanding! Homework 2: Program it Homework 2: Program it Third week programming quiz: use your program to decrypt a message Third week programming quiz: use your program to decrypt a message

Exceptions Consider Gadsby by Ernest Vincent Wright, February 1939: What do you notice about it?