CSEC 507: APPLIED CRYPTOLOGY Historical Introduction to Cryptology

Similar documents
2

10/3/2017. Cryptography and Network Security. Sixth Edition by William Stallings

Substitution Ciphers, continued. 3. Polyalphabetic: Use multiple maps from the plaintext alphabet to the ciphertext alphabet.

Chapter 3 Traditional Symmetric-Key Ciphers 3.1

PART I Symmetric Ciphers

Cryptography and Network Security. Lecture 02 Symmetric Encryption. Ediz ŞAYKOL

JNTU World JNTU World. JNTU World. Cryptography and Network Security. Downloaded From JNTU World ( )( )JNTU World

CPSC 467b: Cryptography and Computer Security

Introduction to Network Security Missouri S&T University CPE 5420 Cryptology Overview

CSCE 715: Network Systems Security

Traditional Symmetric-Key Ciphers. A Biswas, IT, BESU Shibpur

Classical Encryption Techniques. CSS 322 Security and Cryptography

Chapter 2: Classical Encryption Techniques

Cryptography and Network Security

OVE EDFORS ELECTRICAL AND INFORMATION TECHNOLOGY

Cryptography and Network Security 2. Symmetric Ciphers. Lectured by Nguyễn Đức Thái

Cryptography and Network Security Chapter 2

UNIT 2 CLASSICAL ENCRYPTION TECHNIQUES

CRYPTOLOGY KEY MANAGEMENT CRYPTOGRAPHY CRYPTANALYSIS. Cryptanalytic. Brute-Force. Ciphertext-only Known-plaintext Chosen-plaintext Chosen-ciphertext

Overview of Conventional Encryption Techniques

Cryptography Symmetric Encryption Class 2

CHAPTER 1 INTRODUCTION TO CRYPTOGRAPHY. Badran Awad Computer Department Palestine Technical college

CSCE 813 Internet Security Symmetric Cryptography

(8) Cryptanalysis. Close-up of the rotors in a Fialka cipher machine

T H E U N I V E R S I T Y O F B R I T I S H C O L U M B I A. Introduction to Cryptography

UNIT - II Traditional Symmetric-Key Ciphers. Cryptography & Network Security - Behrouz A. Forouzan

Lesson 7a - Encryption and Decryption

1 Brief Overview Of the talk

Textbook: Ahmet Burak Can Hacettepe University. Supplementary books:

COMPLEXITY ACROSS DISCIPLINES

CLASSICAL CRYPTOGRAPHY. A Brief Reference for Self Build Crypto assignment

2/7/2013. CS 472 Network and System Security. Mohammad Almalag Lecture 2 January 22, Introduction To Cryptography

Classical Encryption Techniques

Introduction to Cryptography CS 136 Computer Security Peter Reiher October 9, 2014

Introduction to Cryptology

Classical Cryptography. Thierry Sans

A (Brief) History of Cryptography

Outline Basics of Data Encryption CS 239 Computer Security January 24, 2005

Cryptography. Intercepting Information Scenario 1. Tuesday, December 9, December 9, Wireless broadcasts information using radio signals

Classical Encryption Techniques

From Wikipedia, the free encyclopedia

Behrang Noohi. 22 July Behrang Noohi (QMUL) 1 / 18

CPSC 467b: Cryptography and Computer Security

CPSC 467: Cryptography and Computer Security

Cryptography Part II Introduction to Computer Security. Chapter 8

UNIVERSITY OF MASSACHUSETTS Dept. of Electrical & Computer Engineering. Introduction to Cryptography ECE 597XX/697XX. Part 1.

ICT 6541 Applied Cryptography. Hossen Asiful Mustafa

Introduction to Cryptography. In the News: Hacker exposes embassies'

EEC-484/584 Computer Networks

Classical Cryptography

Understanding Cryptography A Textbook for Students and Practitioners by Christof Paar and Jan Pelzl

Information Systems Security

Sankalchand Patel College of Engineering, Visnagar B.E. Semester V (CE/IT) INFORMATION SECURITY Practical List

3D (6 X 4 X 4) - Playfair Cipher

Cryptosystems. Truong Tuan Anh CSE-HCMUT

Cryptography MIS

Introduction to Cryptology ENEE 459E/CMSC 498R. Lecture 1 1/26/2017

CSC 580 Cryptography and Computer Security

Cryptography Introduction to Computer Security. Chapter 8

CRYPTOGRAPHY. BY, Ayesha Farhin

Chapter 3. Cryptography. Information Security/System Security p. 33/617

A Modified Playfair Encryption Using Fibonacci Numbers

CPSC 467b: Cryptography and Computer Security

Cryptography ThreeB. Ed Crowley. Fall 08

CIT 380: Securing Computer Systems. Symmetric Cryptography

Lecture 2: Shared-Key Cryptography

CIS 4360 Introduction to Computer Security Fall WITH ANSWERS in bold. First Midterm

The Hill Cipher. In 1929 Lester Hill, a professor at Hunter College, published an article in the American

A Tour of Classical and Modern Cryptography

Cryptanalysis. Ed Crowley

Conventional Encryption Principles Conventional Encryption Algorithms Cipher Block Modes of Operation Location of Encryption Devices Key Distribution

COMP4109 : Applied Cryptography

Polyalphabetic cyphers

Understanding Cryptography A Textbook for Students and Practitioners by Christof Paar and Jan Pelzl

Computer Security. 08r. Pre-exam 2 Last-minute Review Cryptography. Paul Krzyzanowski. Rutgers University. Spring 2018

Introduction to Symmetric Cryptography

Cryptography Intro and RSA

Introduction to Cryptography. --- Foundations of computer security ---

Security+ Guide to Network Security Fundamentals, Third Edition. Chapter 11 Basic Cryptography

Introduction to Software Security Crypto Basics (Chapter 2)

ECE 646 Fall 2008 Multiple-choice test

Block Ciphers. Advanced Encryption Standard (AES)

Introduction to Cryptology. Lecture 2

Hardware Design and Software Simulation for Four Classical Cryptosystems

Making and Breaking Ciphers

Some Stuff About Crypto

CS150: Problem Set 4: The Lorenz Cipher and the Postman's Computer

CS150 Assignment 7 Cryptography

Cryptography. Historical Encoding. Encryption Media. Intro to Encryption 8/24/2010. COMP620 Information Privacy & Security 1

CSCI 454/554 Computer and Network Security. Topic 2. Introduction to Cryptography

File and Disk Encryption

L2. An Introduction to Classical Cryptosystems. Rocky K. C. Chang, 23 January 2015

Classic Cryptography: From Caesar to the Hot Line

Cryptography and Network Security

Introduction. CSE 5351: Introduction to cryptography Reading assignment: Chapter 1 of Katz & Lindell

Cryptography Symmetric Cryptography Asymmetric Cryptography Internet Communication. Telling Secrets. Secret Writing Through the Ages.

A New Symmetric Key Algorithm for Modern Cryptography Rupesh Kumar 1 Sanjay Patel 2 Purushottam Patel 3 Rakesh Patel 4

Study Guide to Mideterm Exam

Survey: Recent Modifications in Vigenere Cipher

Exploring Cryptography Using CrypTool

Transcription:

CSEC 507: APPLIED CRYPTOLOGY Middle East Technical University Ankara, Turkey Last Modified: December 9, 2015 Created: August 5, 2015

What is Cryptology, Cryptography, and Cryptanalysis? (A Short) Definition Cryptology is about secure communication in an insecure channel. Definitions Cryptography is about designing secure cryptosystems Cryptanalysis is about analyzing (breaking) cryptosystem Note Today the words Cryptology and Cryptography are used interchangeably.

Solved Problems Some of the Security Problems Solved by Cryptography Privacy of stored data, messages, and conversations Integrity of stored data, messages, and conversations User and data authentication Transaction non-repudiation

What is a Cryptosystem/Cipher What is a Cryptosystem? Plaintext is what you want to protect A cryptosystem is pair of algorithms that convert plaintext to ciphertext and back. Ciphertext is the encrypted version of the plaintext Ciphertext should appear like a random sequence

Historical Ciphers Historical ciphers They are mostly pen and paper methods. Key and the cryptosystem should be easy to use in practice. Mostly based on letter substitutions. Most of the time empty spaces and punctuation marks are removed from the ciphertext to avoid information leakage.

Substitution Ciphers Caesar s Cipher Every letter is replaced by a letter some fixed number of positions k down the alphabet. Used in ancient Rome by Julius Caesar who supposedly invented it. Example (k=2, English Alphabet) Plaintext: Ciphertext: CYBERSECURITY AWZCPQCASPGRW Notation p: plaintext P: Plaintext space Enc(p,k): Encryption function c: ciphertext C: Ciphertext space Dec(c,k): Decryption function k: key K: Key space. : Set size

Substitution Ciphers Caesar s Cipher P = 26 (English alphabet) C = 26 (Same as plaintext space) K = 26 (Actually 25 because if k = 0 then p = c) Enc(p,k)=k letter downs the alphabet Dec(c,k)=k letter up the alphabet Weaknesses key is easy to guess (key space is too small) 1 known plaintext-ciphertext is enough to break the cryptosystem

Substitution Ciphers Affine Cipher In order to increase the key space, we use two numbers a and b as the key and encrypt as follows E(p, k) = a p + b mod 26. Example (a=3,b=1, English Alphabet) Plaintext: CYBERSECURITY Ciphertext: HVENADNHJAZGV Affine Cipher P = 26 (English alphabet) C = 26 (Same as plaintext space) K = 26 26 = 676 (Actually much lower) Enc(p,k)=a p + b mod 26 = c Dec(c,k)=a 1 c a 1 b mod 26 = p

Substitution Ciphers Warning a can have an inverse a 1 in Z N if and only if gcd(a, N) = 1. Key Space There are 12 possibilities for a so that gcd(a, 26) = 1. Thus, there are 12 26 = 312 useable keys. Example (a=2,b=1, English Alphabet) Plaintext: Ciphertext: CYBERSECURITY FXDJJLJFPJRNX Weaknesses key is easy to guess (small key space) 1 known plaintext-ciphertext is enough to break the cryptosystem

Substitution Ciphers Definition Classical cryptosystems can be categorized according to the message units that the plaintext and ciphertext are broken into: Monograph: Single letter Digraph: Pair of letters Trigraph: Triple of letters Polygraph: Longer than a single letter Some Examples Ceaser s Cipher: E(p, k) = p k mod 26 Affine Cipher: E(p, k) = a p + b mod 26 Digraphic Shift Cipher: E(p, k) = k + p mod 676 Digraphic Affine Cipher: E(p, k) = a p + b mod 676

Substitution Ciphers Simple Monoalphabetic Substitution Every letter is replaced by a letter. Example Alphabet: A B C D E F G H... Y Z Key: K U E Z Q B O R... V S There are 26! = 403291461126605635584000000 possibilities!!!! Weakness Redundancy in the language Can be broken by frequency analysis.

Frequency Analysis Frequency Analysis Frequency analysis is introduced by Al-Kindi in A Manuscript Deciphering Cryptographic Messages in 9th century. It is based on the redundancy of the language: For a given language, find a long text and count the number of frequencies of every letter. For instance, in English E is the letter that appears the most. The second place belongs to T. If the ciphertext is long enough, the letter that appears the most in the ciphertext is most probably corresponds to E in the plaintext. The letter in the ciphertext with the second most frequency is most probably corresponds to T in the plaintext. And so on...

Digraph Ciphers Playfair Invented by Charles Wheatstone in 1854 (Lord Playfair promoted its use) First literal digraph substitution cipher Uses a 5 5 table containing a keyword and the rest of the alphabet Memorizing the keyword and 4 simple rules are enough to use the system British Foreign Office rejected because of its perceived complexity. Wheatstone offered to demonstrate that three out of four boys in a nearby school could learn to use it in 15 minutes, but the Under Secretary of the Foreign Office responded, That is very possible, but you could never teach it to attaches.

Playfair Example Example (Playfair) Plaintext: CYBERSECURITY Keyword: CRYPTOLOGY Key Schedule C R Y P T O L G A B D E F H I/J K M N Q S U V W X Z First write the keyword. Drop any duplicate letters. Fill the rest of the 5 5 table with the remaining letters of the alphabet. I and J are put in the same space since we have 26 letters.

Playfair Example Rules 1 If both letters are the same (or only one letter is left), add an X after the first letter. 2 If the letters appear on the same row of your table, replace them with the letters to their immediate right respectively (wrapping around to the left side of the row if a letter in the original pair was on the right side of the row). 3 If the letters appear on the same column of your table, replace them with the letters immediately below respectively (wrapping around to the top side of the column if a letter in the original pair was on the bottom side of the column). 4 If the letters are not on the same row or column, replace them with the letters on the same row respectively but at the other pair of corners of the rectangle defined by the original pair. The order is important the first letter of the encrypted pair is the one that lies on the same row as the first letter of the plaintext pair.

Playfair Example Encryption Plaintext: Ciphertext: C R Y P T O L G A B D E F H I/J K M N Q S U V W X Z CY BE RS EC UR IT YX RP

Playfair Example Encryption Plaintext: Ciphertext: C R Y P T O L G A B D E F H I/J K M N Q S U V W X Z CY BE RS EC UR IT YX RP LI

Playfair Example Encryption Plaintext: Ciphertext: C R Y P T O L G A B D E F H I/J K M N Q S U V W X Z CY BE RS EC UR IT YX RP LI TM

Playfair Example Encryption Plaintext: Ciphertext: C R Y P T O L G A B D E F H I/J K M N Q S U V W X Z CY BE RS EC UR IT YX RP LI TM DR

Playfair Example Encryption Plaintext: Ciphertext: C R Y P T O L G A B D E F H I/J K M N Q S U V W X Z CY BE RS EC UR IT YX RP LI TM DR VC

Playfair Example Encryption Plaintext: Ciphertext: C R Y P T O L G A B D E F H I/J K M N Q S U V W X Z CY BE RS EC UR IT YX RP LI TM DR VC SB

Playfair Example Encryption Plaintext: Ciphertext: C R Y P T O L G A B D E F H I/J K M N Q S U V W X Z CY BE RS EC UR IT YX RP LI TM DR VC SB PW

Frequency Analysis Countermeasures for Frequency Analysis Use polygraphic substitution. But playfair or digraph ciphers are still vulnerable to two-letter frequency analysis. Computers allow frequency analysis on short polygraphic substitution (e.g. Playfair). 8-character simple substitution systems are probably secure. Problems of longer substitution Key is too long to use/store in practice Encryption and decryption become too complicated Note Idea of polygraphic substitution leads to the idea of Block Ciphers.

Kerkckhoffs s Principle Kerkckhoffs s Principle (1883) Cipher must not be required to be secret, and it must be able to fall into the hands of the enemy without inconvenience. In other words, the security of the system must rest entirely on the secrecy of the key. Claude Shannon The enemy knows the system. 3 B s of Cryptography Bribe, Burglary, Blackmail Warning Our national ciphers are not available for academic analysis.

The Unbreakable Cipher One-time Pad Generate a very long sequence of random bits (one-time pad) XOR the plaintext and the one-time pad to get the ciphertext XOR the ciphertext and the one-time pad to get the plaintext Example Plaintext 010101111001001... One-time pad 101111010110101... Ciphertext 111010101111100... Warning One-time pad must be truly random Can only be used once

Unbreakable Cipher One-time Pad Perfect secrecy (ciphertext provides no information about plaintext) Usually printed on a single page with very small letters (hence the name one-time pad) Instead of working with bits, one can work on letters or characters Problems Key is too long Key distribution Randomness

Unbreakable Cipher Weakness key re-use Example (Key Re-use) If the adversary captures two ciphertexts C 1 and C 2 which were generated with the same key, then they can compute C 1 C 2 = (P 1 K) (P 2 K) = P 1 P 2 Then the adversary can use the redundancy of the language or statistical techniques to capture P 1 and P 2.

Unbreakable Cipher Note Venona Project: Soviet one-time pad messages sent from the US for a brief time during WWII used non-random key material. US cryptanalysts, beginning in the late 40s, were able to, entirely or partially, break a few thousand messages out of several hundred thousand. Thus, the unbreakable cipher can be broken when it is not used properly One-time pads are exchanged between Washington and Moscow in order to be used in the future if necessary. Idea of one-time pad leads to the idea of Stream Ciphers.

Cipher Machines Cipher Machines Technological advancement replaced pen and paper methods with machines. Famous example: Enigma. Enigma An Enigma Machine is an electro-mechanical rotor cipher machine. Used in 20th century in military and commercial sectors like banking. It generates a polyalphabetic substitution cipher. Cryptanalysis of Enigma by British mathematicians/cryptologists (with the initial help Polish cryptologists) changed the course of WWII.

WWI: Enigma

Cryptanalysis of Enigma Weakness Impossible event: A letter is never encrypted to itself. Example Cryptanalysis of Enigma during the WWII Idea: Plaintext may contain Keine besonderen Ereignisse (means nothing to report ) WW2 Cryptanalysis Germans constantly modified their machines during the war and the their latest cipher machines eluded Allied cryptologists.

Colossus Colossus Computer The first programmable electronic digital computer (1943). Developed by British codebreakers at Bletchley Park to cryptanalyse Lorenz cipher. Alan Turing s use of probability in cryptanalysis contributed to its design. Optically reads a paper tape and then applies programmable logical functions to the bits of the key and ciphertext characters, counting how often the function returned false. Destroyed by British after the WW2. Reconstructed in 2007, available in Bletchley Park in a museum.

Further Read Further Read David Kahn - The CodeBreakers (1996) Simon Singh - Code Book: The Science of Secrecy from Ancient Egypt to Quantum Cryptography (2000) http://practicalcryptography.com/