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 and Early History. Cryptology Terms Cryptology –The science of concealing the meaning of messages and the discovery of the meaning.
DTTF/NB479: Jouspevdujpo up Dszquphsbqiz Nbuu Cpvufmm G-224 y8534 (It should now be obvious whether or.
Announcements: Please pass in Assignment 1 now. Please pass in Assignment 1 now. Assignment 2 posted (when due?) Assignment 2 posted (when due?)Questions?
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
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)
CPSC CPSC 3730 Cryptography Chapter 2 Classical Encryption Techniques.
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.
L1.1. An Introduction to Classical Cryptosystems Rocky K. C. Chang, February 2013.
Chapter 2 – Classical Encryption Techniques
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.
Network Security Lecture 12 Presented by: Dr. Munam Ali Shah.
Section 2.1: Shift Ciphers and Modular Arithmetic Practice HW from Barr Textbook (not to hand in) p.66 # 1, 2, 3-6, 9-12, 13, 15.
13. BETTER SYMMETRIC CIPHER STREAM CIPHERS 1. SOME TRICKS FOR SUBSTITUTION CIPHER There are some tricks to make substitution cipher safer: Nulls: insert.
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
Module :MA3036NI Cryptography and Number Theory Lecture Week 3 Symmetric Encryption-2.
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).
Cryptography Part 1: Classical Ciphers Jerzy Wojdyło May 4, 2001.
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:
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.
Section 2.2: Affine Ciphers; More Modular Arithmetic Shift ciphers use an additive key. To increase security, we can add a multiplicative parameter. –For.
Section 2.5 Polyaphabetic Substitutions
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.
Vigenére Cipher Kimberly Chiffens & Maria Jannelli.
CS526Topic 2: Classical Cryptography1 Information Security CS 526 Topic 2 Cryptography: Terminology & Classic Ciphers.
Encryption. LEARNING OBJECTIVES: BY THE END OF THE LESSON YOU SHOULD KNOW. What encryption is and why it is important The basics of encryption techniques.
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
Cryptography Lecture 2.
Cryptanalysis of Vigenere Cipher
Homework #1 Chap. 1, 3, 4 J. H. Wang Oct. 2, 2018.
EKRJGTU CTG CYGUQOG! Can you break the code?.
Symmetric Encryption or conventional / private-key / single-key
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 DTTF/NB479: DszquphsbqizDay 5

1. How many possibilities to brute force? 2. What idea is new? ShiftAffineSubstitution Vigenere ciphers Invented in 1553 by Bellaso Invented in 1553 by Bellaso A different type of complexity A different type of complexity Shift, Affine, and Substitution ciphers are related

Idea: the key is a vector of shifts The key and its length are unknown to Eve Encryption: Repeat the vector as many times as needed to get the same length as the plaintext Add this repeated vector to the plaintext. Example: Key = hidden ( ). The recent development of various methods … aph uiplvw giiltrsqrub ri znyqrxw zlbkrhf Vigenere Ciphers (quiz # now at top) 1 Key

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

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. 4

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 = 1, p = 2, … p = L-1 Repeat for positions p = 1, p = 2, … p = L-1 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

Using the whole frequency distribution is more robust than using a single letter Do this via dot products of frequency vectors.

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 _____. Why? 5-6

Towards another method Method 1 Parse out the characters at positions p = 0 (mod L) Parse out the characters at positions p = 0 (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 = 1, p = 2, … p = L-1 Repeat for positions p = 1, p = 2, … p = L-1

Another method Method 2 Parse out the characters at positions p = 0 (mod L) Parse out the characters at positions p = 0 (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 = 1, p = 2, … p = L-1 Repeat for positions p = 1, p = 2, … p = L-1 Demo Demo

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

Finding the key length also uses dot products Just displace the ciphertext by various amounts and look for the maximum dot product

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 = ( … )

The text helps with implementation Read it. Implement it. You’ll own it. You’ll do this on Homework 2: You’ll do this on Homework 2: Week 3 programming test: use your program to decrypt a vigenere-encrypted message Week 3 programming test: use your program to decrypt a vigenere-encrypted message

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