CSE331: Introduction to Networks and Security. Lecture 20 Fall 2006



Similar documents
Cryptography and Network Security Prof. D. Mukhopadhyay Department of Computer Science and Engineering Indian Institute of Technology, Karagpur

Chap 2. Basic Encryption and Decryption

Sandeep Mahapatra Department of Computer Science and Engineering PEC, University of Technology

Dr. Jinyuan (Stella) Sun Dept. of Electrical Engineering and Computer Science University of Tennessee Fall 2010

Common Pitfalls in Cryptography for Software Developers. OWASP AppSec Israel July The OWASP Foundation

Network Security. HIT Shimrit Tzur-David

Fundamentals of Computer Security

Cryptography and Network Security Department of Computer Science and Engineering Indian Institute of Technology Kharagpur

IT Networks & Security CERT Luncheon Series: Cryptography

Cryptography: Motivation. Data Structures and Algorithms Cryptography. Secret Writing Methods. Many areas have sensitive information, e.g.

Introduction To Security and Privacy Einführung in die IT-Sicherheit I

Symmetric Key cryptosystem

Network Security CS 5490/6490 Fall 2015 Lecture Notes 8/26/2015

Cryptography & Network Security

How To Understand Cryptanalysis

How To Understand And Understand The History Of Cryptography

Application Layer (1)

Cryptography and Network Security Prof. D. Mukhopadhyay Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur

Overview/Questions. What is Cryptography? The Caesar Shift Cipher. CS101 Lecture 21: Overview of Cryptography

Cyber Security Workshop Encryption Reference Manual

Network Security. Security Attacks. Normal flow: Interruption: 孫 宏 民 Phone: 國 立 清 華 大 學 資 訊 工 程 系 資 訊 安 全 實 驗 室

Homework 2. A 4*4 image with 16 pixels Borders unaltered. Color of B2 = Average color of (B1,A2,B3,C2) A1 A2 A3 A4 B1 B2 B3 B4 C1 C2 C3 C4 D1 D2 D3 D4

Lecture 9 - Network Security TDTS (ht1)

Solutions to Problem Set 1

Introduction to Encryption

Network Security. Computer Networking Lecture 08. March 19, HKU SPACE Community College. HKU SPACE CC CN Lecture 08 1/23

SECURITY IN NETWORKS

Computer Networks. Network Security 1. Professor Richard Harris School of Engineering and Advanced Technology

Principles of Network Security

CIS433/533 - Computer and Network Security Cryptography

Block encryption. CS-4920: Lecture 7 Secret key cryptography. Determining the plaintext ciphertext mapping. CS4920-Lecture 7 4/1/2015

Multiplicative Ciphers. Cryptography of Multiplicative Ciphers

Network Security (2) CPSC 441 Department of Computer Science University of Calgary

Message Authentication Codes

Compter Networks Chapter 9: Network Security

Network Security: Cryptography CS/SS G513 S.K. Sahay

Application Layer (1)

CRYPTOGRAPHY IN NETWORK SECURITY

First Semester Examinations 2011/12 INTERNET PRINCIPLES

Network Security. Abusayeed Saifullah. CS 5600 Computer Networks. These slides are adapted from Kurose and Ross 8-1

Network Security Technology Network Management

Overview of Public-Key Cryptography

Insight Guide. Encryption: A Guide

CSCE 465 Computer & Network Security

AC76/AT76 CRYPTOGRAPHY & NETWORK SECURITY DEC 2014

Chapter 7: Network security

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

ICOM 5018 Network Security and Cryptography

Effective Secure Encryption Scheme [One Time Pad] Using Complement Approach Sharad Patil 1 Ajay Kumar 2

1 Data Encryption Algorithm

Cryptography and Network Security Chapter 3

Part I. Universität Klagenfurt - IWAS Multimedia Kommunikation (VK) M. Euchner; Mai Siemens AG 2001, ICN M NT

Hill s Cipher: Linear Algebra in Cryptography

CSC474/574 - Information Systems Security: Homework1 Solutions Sketch

CS 758: Cryptography / Network Security

Cryptography and Network Security Prof. D. Mukhopadhyay Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur

Split Based Encryption in Secure File Transfer

Introduction to Hill cipher

Security (WEP, WPA\WPA2) 19/05/2009. Giulio Rossetti Unipi

Network Security. Outline of the Tutorial

CIS 6930 Emerging Topics in Network Security. Topic 2. Network Security Primitives

Cryptography & Network Security. Introduction. Chester Rebeiro IIT Madras

Chapter 10. Network Security

Priyanka et al. Page 17

CS 4476/5413 Lecture Notes INTRODUCTION TO NETWORK SECURITY. Ruizhong Wei. Department of Computer Science Lakehead University

YALE UNIVERSITY DEPARTMENT OF COMPUTER SCIENCE

FAREY FRACTION BASED VECTOR PROCESSING FOR SECURE DATA TRANSMISSION

Advanced Cryptography

7! Cryptographic Techniques! A Brief Introduction

Chapter 2 Homework 2-5, 7, 9-11, 13-18, 24. (9x + 2)(mod 26) y 1 1 (x 2)(mod 26) 3(x 2)(mod 26) U : y 1 = 3(20 2)(mod 26) 54(mod 26) 2(mod 26) c

Chapter 23. Database Security. Security Issues. Database Security

EXAM questions for the course TTM Information Security May Part 1

VALLIAMMAI ENGINEERING COLLEGE

Cryptography and Network Security Prof. D. Mukhopadhyay Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur

Properties of Secure Network Communication

RSA Attacks. By Abdulaziz Alrasheed and Fatima

CSCE 465 Computer & Network Security

Forward Secrecy: How to Secure SSL from Attacks by Government Agencies

Error oracle attacks and CBC encryption. Chris Mitchell ISG, RHUL

CSE/EE 461 Lecture 23

An Introduction to Cryptography and Digital Signatures

Students will operate in pairs and teams of four to decipher and encipher information.

Lukasz Pater CMMS Administrator and Developer

CSE331: Introduction to Networks and Security. Lecture 18 Fall 2006

CPSC 467b: Cryptography and Computer Security

SAMPLE EXAM QUESTIONS MODULE EE5552 NETWORK SECURITY AND ENCRYPTION ECE, SCHOOL OF ENGINEERING AND DESIGN BRUNEL UNIVERSITY UXBRIDGE MIDDLESEX, UK

What is network security?

Techniques of Asymmetric File Encryption. Alvin Li Thomas Jefferson High School For Science and Technology Computer Systems Lab

INTRODUCTION TO CRYPTOGRAPHY

Cryptography and Network Security

Chapter 23. Database Security. Security Issues. Database Security

BRIEF INTRODUCTION TO CRYPTOGRAPHY. By PAGVAC. February 8, 2004

Cryptosystems. Bob wants to send a message M to Alice. Symmetric ciphers: Bob and Alice both share a secret key, K.

Overview of Cryptographic Tools for Data Security. Murat Kantarcioglu

How To Encrypt With A 64 Bit Block Cipher

Princeton University Computer Science COS 432: Information Security (Fall 2013)

Computer Networks. Network Security and Ethics. Week 14. College of Information Science and Engineering Ritsumeikan University

Enhancing Advanced Encryption Standard S-Box Generation Based on Round Key

Transcription:

CSE331: Introduction to Networks and Security Lecture 20 Fall 2006

Announcements Homework 2 has been assigned: **NEW DUE DATE** It's now due on Friday, November 3rd. Midterm 2 is Friday, November 10th **NEW DATE** It covers just the material since Midterm 1 CSE331 Fall 2004 2

Broader View of Defenses Prevention -- make the monoculture hardier Get the code right in the first place or figure out what s wrong with it and fix it Lots of active research (static & dynamic methods) Security reviews now taken seriously by industry E.g., ~$200M just to review Windows Server 2003 But very expensive and very large Installed Base problem Prevention -- diversify the monoculture Via exploiting existing heterogeneity Via creating artificial heterogeneity Prevention -- keep vulnerabilities inaccessible Cisco s Network Admission Control Examine hosts that try to connect, block if vulnerable Microsoft s Shield Shim-layer blocks network traffic that fits known vulnerability (rather than known exploit) CSE331 Fall 2004 3

κρµπτο γραφη (Cryptography) Greek for secret writing Confidentiality Obscure a message from eaves-droppers Integrity Assure recipient that the message was not altered Authentication Verify the identity of the source of a message Non-repudiation Convince a 3 rd party that what was said is accurate CSE331 Fall 2004 4

Terminology encryption decryption Plaintext Ciphertext Plaintext Cryptographer Invents cryptosystems Cryptanalyst Breaks cryptosystems Cryptology Study of crypto systems Cipher Mechanical way of encrypting text Code Semantic translation: eat breakfast tomorrow = attack on Thursday (or use Navajo!) CSE331 Fall 2004 5

Kinds of Cryptographic Analysis Goal is to recover the key (& algorithm) Ciphertext only attacks No information about content or algorithm Very hard Known Plaintext attacks Full or partial plaintext available in addition to ciphertext Chosen Plaintext attacks Know which plaintext has been encrypted Algorithm & Ciphertext attacks Known algorithm, known ciphertext, recover key CSE331 Fall 2004 6

The Caesar Cipher Purportedly used by Julius Caesar (c. 75 B.C.) Add 3 mod 26 a b c x y z Advantages Simple d e f a b c Intended to be performed in the field Most people couldn t read anyway Disadvantages Violates no security through obscurity Easy to break (why?) CSE331 Fall 2004 7

Monoalphabetic Ciphers Also called substitution ciphers Separate algorithm from the key Add N mod 26 rot13 = Add 13 mod 26 General monoalphabetic cipher Arbitrary permutation π of the alphabet Key is the permutation a b c d π(a) π(b) π(c) π(d) CSE331 Fall 2004 8

Example Cipher π a b c d e f g h i j k l... z d a n c e w i b f g h... Plaintext: Ciphertext: he lied ic hbcn CSE331 Fall 2004 9

Cryptanalysis of Monoalphabetic Ciphers Brute force attack: try every key N! Possible keys for N-letter alphabet 26! 4 x 10 26 possible keys Try 1 key per µsec 10 trillion years but (!) monoalphabetic ciphers are easy to solve One-to-one mapping of letters is bad Frequency distributions of common letters CSE331 Fall 2004 10

Order & Frequency of Single Letters E 12.31% L 4.03% B 1.62% T 9.59 D 3.65 G 1.61 A 8.05 C 3.20 V 0.93 O 7.94 U 3.10 K 0.52 N 7.19 P 2.29 Q 0.20 I 7.18 F 2.28 X 0.20 S 6.59 M 2.25 J 0.10 R 6.03 W 2.03 Z 0.09 H 5.14 Y 1.88 14 12 E 10 T 8 A O I N S 6 R H 4 D L C U F M P 2 W B G Y V K 0 J Q X Z 0 5 10 15 20 25 30-2 CSE331 Fall 2004 11

Monoalphabetic Cryptanalysis Count the occurrences of each letter in the cipher text Match against the statistics of English Most frequent letter likely to be e 2 nd most frequent likely to be t etc. Longer ciphertext makes statistical analysis more likely to work CSE331 Fall 2004 12

Digrams and Trigrams Diagrams in frequency order TH HE AN IN ER RE ES ON EA TI AT ST EN ND OR Trigrams in frequency order THE AND THA ENT ION TIO FOR NDE HAS NCE EDT TIS OFT STH MEN CSE331 Fall 2004 13

Desired Statistics Problems with monoalphabetic ciphers Frequency of letters in ciphertext reflects frequency of plaintext Want a single plaintext letter to map to multiple ciphertext letters e x, c, w Ideally, ciphertext frequencies should be flat 14 12 10 8 6 4 2 0 0 5 10 15 20 25 30-2 CSE331 Fall 2004 14

Polyalphabetic Substitutions Pick k substitution ciphers π 1 π 2 π 3 π k Encrypt the message by rotating through the k substitutions m e s s a g e π 1 (m) π 2 (e) π 3 (s) π 4 (s) π 1 (a) π 2 (g) π 3 (e) q a x o a u v Same letter can be mapped to multiple different ciphertexts Helps smooth out the frequency distributions Diffusion CSE331 Fall 2004 15

Vigenère Tableau Multiple substitutions Can choose complimentary ciphers so that the frequency distribution flattens out More generally: more substitutions means flatter distribution Vigenère Tableau Invented by Blaise de Vigenère for the court of Henry III of France (c. 1500 s) Collection of 26 permutations Usually thought of as a 26 x 26 grid Key is a word CSE331 Fall 2004 16

Vigenère Tableau a b c d e f g... A a b c d e f g... B b c d e f g h... C c d e f g h i... D d e f g h i j... E e f g h i j k......................... Plaintext: Key bed : Ciphertext: a bad deed B EDB EDBE b fde hgfh CSE331 Fall 2004 17

Kasiski Method Identify key length of polyalphabetic ciphers If pattern appears k times and key length is n then it will be encoded k/n times by the same key 1. Identify repeated patterns of 3 chars. 2. For each pattern Compute the differences between starting points of successive instances Determine the factors of those differences 3. Key length is likely to be one of the frequently occurring factors CSE331 Fall 2004 18

Cryptanalysis Continued Once key length is guessed to be k Split ciphertext into k slices Single letter frequency distribution for each slice should resemble English distribution How do we tell whether a particular distribution is a good match for another? Let prob(α) be the probability for letter α In a perfectly flat distribution prob(α) = 1/26 0.0384 CSE331 Fall 2004 19

Variance: Measure of roughness 14 12 10 8 6 4 2 0-2 0 5 10 15 20 Measure distance from 25 30 flat dist. α = z Var = Σ (prob(α) 1/26) 2 α = a = α = z = ( Σ prob(α) 2 ) 1/26 α = a CSE331 Fall 2004 20

Estimate Variance From Frequency prob(α) 2 is probability that any two characters drawn from the text will be α Suppose there are n ciphertext letters total Suppose freq(α) is the frequency of α What is likelihood of picking α twice at random? freq(α) ways of picking the first α (freq(α) 1) ways of picking the second α But this counts twice because (α,β) = (β,α) So freq(α) x (freq(α) 1) 2 CSE331 Fall 2004 21

Index of Coincidence But there are n x (n-1) 2 pairs of letters so prob(α) is roughly freq(α) x (freq(α) 1) n x (n-1) Index of coincidence: approximates variance from frequencies IC = α = z Σ α = a freq(α) x (freq(α) 1) n x (n-1) CSE331 Fall 2004 22

What s it good for? If the distribution is flat, then IC 0.0384 If the distribution is like English, then IC 0.068 Can verify key length: keylen 1 2 3 4 5 many IC 0.068 0.052 0.047 0.044 0.044 0.038 CSE331 Fall 2004 23

Summary: Cracking Polyalphabetics Use Kasiski method to guess likely key lengths Compute the Index of Coincidence to verify key length k k-slices should have similar IC to English Note: digram information harder to use for polyalphabetic ciphers May want to consider split digrams Example: if tion is a common sequence k=2 then t?o and i?n are likely split digrams CSE331 Fall 2004 24