Instructor: Dania Alomar

Slides:



Advertisements
Similar presentations
CLASSICAL ENCRYPTION TECHNIQUES
Advertisements

Classical Encryption Techniques Week 6-wend. One-Time Pad if a truly random key as long as the message is used, the cipher will be secure called a One-Time.
Cryptography and Network Security Chapter 2. Chapter 2 – Classical Encryption Techniques Many savages at the present day regard their names as vital parts.
CSCE 790G: Computer Network Security
Cryptography and Network Security Third Edition by William Stallings Lecture slides by Lawrie Brown.
Chapter 2 – Classical Encryption Techniques. Classical Encryption Techniques Symmetric Encryption Or conventional / private-key / single-key sender and.
Classical Encryption Techniques
Classical Encryption Techniques
L1.1. An Introduction to Classical Cryptosystems Rocky K. C. Chang, February 2013.
Overview of Cryptographic Techniques Hector M Lugo-Cordero CIS 4361 Secure Operating System Administration 1.
Chapter 2 – Classical Encryption Techniques
3.1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 3 Traditional Symmetric-Key Ciphers.
Cryptography and Network Security Third Edition by William Stallings Lecture slides by Lawrie Brown.
Chapter 2 Basic Encryption and Decryption. csci5233 computer security & integrity 2 Encryption / Decryption encrypted transmission AB plaintext ciphertext.
Cryptography. Secret (crypto) Writing (graphy) –[Greek word] Practice and study of hiding information Concerned with developing algorithms for: –Conceal.
3.1 SERVICES AND MECHANISMS SERVICES AND MECHANISMS The International Telecommunication Union- Telecommunication Standardization Section (ITU-T) provides.
Dr. Lo’ai Tawalbeh 2007 Chapter 2: Classical Encryption Techniques Dr. Lo’ai Tawalbeh New York Institute of Technology (NYIT) Jordan’s Campus INCS.
1 University of Palestine Information Security Principles ITGD 2202 Ms. Eman Alajrami 2 nd Semester
Chapter 2 Classical Encryption Techniques. Symmetric Encryption n conventional / private-key / single-key n sender and recipient share a common key n.
Hill Cipher Developed by the mathematician Lester Hill in The encryption algorithm takes m successive plain text and substitute for them m cipher.
Information Systems Security
Lec. 5 : History of Cryptologic Research II
Cryptography and Network Security Third Edition by William Stallings Lecture slides by Lawrie Brown.
Computer Science&Technology School of Shandong University Instructor: Hou Mengbo houmb AT sdu.edu.cn Office: Information Security Research Group.
Cryptography and Network Security (CS435) Part Two (Classic Encryption Techniques)
Symmetric Encryption or conventional / private-key / single-key sender and recipient share a common key all classical encryption algorithms are private-key.
Network Security Lecture 12 Presented by: Dr. Munam Ali Shah.
Classical Encryption Techniques CSE 651: Introduction to Network Security.
 Classic Crypto  Slides based on those developed by Dr. Lawrie Brown at the Australian Defence Force Academy, University College, UNSW  See
1 Chapter 2-1 Conventional Encryption Message Confidentiality.
Network Security Lecture 11 Presented by: Dr. Munam Ali Shah.
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.
Terminology and classical Cryptology
Classic Cryptography History. Some Basic Terminology plaintext - original message ciphertext - coded message cipher - algorithm for transforming plaintext.
1 University of Palestine Information Security Principles ITGD 2202 Ms. Eman Alajrami.
Computer and Network Security Rabie A. Ramadan Lecture 2.
Cryptography Lynn Ackler Southern Oregon University.
Data Security and Encryption (CSE348) 1. Lecture # 4 2.
Traditional Symmetric-Key Ciphers
Cryptography. Introduction Cryptography is the art of achieving security by encoding messages to make them non- readable. Some cryptography algorithms.
Information Systems Security 3. Chapter 2 – Classical Encryption Techniques Many savages at the present day regard their names as vital parts of themselves,
Chapter 2 – Classical Encryption Techniques. Symmetric Encryption or conventional / private-key / single-key sender and recipient share a common key all.
Cryptography and Network Security Chapter 2
Network Security Lecture 13 Presented by: Dr. Munam Ali Shah.
1 Classical Encryption Techniques. 2 Symmetric cipher model –Cryptography –Cryptanalysis Substitution techniques –Caesar cipher –Monoalphabetic cipher.
Introduction to Cryptography Hyunsung Kim, PhD University of Malawi, Chancellor College Kyungil University February, 2016.
Cryptography and Network Security Third Edition by William Stallings Lecture slides by Lawrie Brown.
Cryptography and Network Security Third Edition by William Stallings Lecture slides by Lawrie Brown.
By Marwan Al-Namari & Hafezah Ben Othman Author: William Stallings College of Computer Science at Al-Qunfudah Umm Al-Qura University, KSA, Makkah 1.
Cryptography and Network Security Third Edition by William Stallings Lecture slides by Lawrie Brown.
Prof. Wenguo Wang Network Information Security Prof. Wenguo Wang Tel College of Computer Science QUFU NORMAL UNIVERSITY.
Computer Security By Rubel Biswas. Introduction History Terms & Definitions Symmetric and Asymmetric Attacks on Cryptosystems Outline.
Department of Computer Science Chapter 5 Introduction to Cryptography Semester 1.
@Yuan Xue CS 285 Network Security Cryptography Overview and Classical Encryption Algorithms Fall 2012 Yuan Xue.
CS480 Cryptography and Information Security Huiping Guo Department of Computer Science California State University, Los Angeles 4. Traditional and Modern.
@Yuan Xue Quick Review.
CRYPTOGRAPHY G REEK WORD MEANING “ SECRET WRITING ”
Substitution Ciphers.
Chapter 2 Basic Encryption and Decryption
Communication Security
Cryptography and Network Security
Lecture Classical Encryption Techniques Dr. Nermin Hamza
CS4780 Cryptography and Information Security
Substitution Ciphers.
Cryptography.
Outline Some Basic Terminology Symmetric Encryption
Running Key Cipher The security of polyalphabetic substitution cipher reside in key length. In running-key cipher, the length of key must be equal the.
Symmetric Encryption or conventional / private-key / single-key
Presentation transcript:

Instructor: Dania Alomar Cryptography Instructor: Dania Alomar

Cryptology Cryptology Cryptography Cryptanalysis “The art and science of keeping message secure” Cryptanalysis “The art and science of breaking the code “

Cryptology Cryptography Cryptanalysis Cryptology The art and science of keeping message secure. Cryptography comes from Greek and it means hidden/secret (crypto) and writing (graphy) Cryptanalysis The art and science of breaking the code. Cryptology The branch of mathematics encompassing both cryptography and cryptanalysis. Its practitioners are Cryptologists

Encryption and Decryption The original message is called Plaintext. The process of disguising a message in such a way to hide its substance, is called Encryption. The encrypted message is called Ciphertext The Encryption is done using the specified key: C = EK(P) or E(K, P) Decryption It takes the ciphertext and the secret key and produces the original plaintext. C = EK(P) P C P = DK(C)

Algorithm and keys Cipher Key & Key Space A cryptographic algorithm for performing encryption or decryption . It is a mathematical function used for both encryption and decryption. Key & Key Space The key is a value independent of the plaintext and of the algorithm The security of modern cryptosystem is based on a Key: which could be one of any large values. The range of possible key values is called the Key Space. Both encryption and decryption depends upon the Key. The algorithm will produce a different output depending on the specific key being used at the time

Secret Key Cryptography Public Key Cryptography Types Of Cryptography Secret Key Cryptography Each two parties share the same key Problem: How to distribute keys. Public Key Cryptography Each individual has two keys: private key (not revealed to anyone) public key (make it known to everyone) Problem: How to authenticate Plaintext ciphertext encryption decryption Key Plaintext ciphertext encryption decryption Public key Private key

Cryptography Services Confidentiality Prevent unauthorized disclosure of information Integrity Prevent unauthorized modification of information Authentication To verify the identity of subject Non-repudiation Protect from deniability

Kerckhoffs Principle Basic assumption The algorithm is completely known to the attacker Only the key is secret Also known as Kerckhoffs Principle Crypto algorithms are not secret Why do we make this assumption? Secret algorithms never remain secret Better to find weaknesses beforehand

Cryptanalysis The objective of attacking an encryption system is to recover the key in use rather than simply to recover the plaintext of a single ciphertext. General approaches: cryptanalytic attack brute-force attack Cryptanalytic attacks rely on the nature of the algorithm plus perhaps some knowledge of the general characteristics of the plaintext or even some sample plaintext–ciphertext pairs

Brute-Force Attack Try every key to decipher the ciphertext. On average, need to try half of all possible keys Time needed proportional to size of key space

Cryptanalytic Attacks May be classified by how much information needed by the attacker: Ciphertext-only attack Known-plaintext attack Chosen-plaintext attack Chosen-ciphertext attack

Ciphertext-only attack Given: a ciphertext c Q: what is the plaintext m? An encryption scheme is completely insecure if it cannot resist ciphertext-only attacks.

Known-plaintext attack Is an attack where a cryptanalyst has access to a plaintext and the corresponding ciphertext and seeks to discover a correlation between the two. Given: (m1,c1), (m2,c2), …, (mk,ck) and a new ciphertext c. Q: what is the plaintext of c? Q: what is the secret key in use?

Chosen-plaintext attack Is an attack where a cryptanalyst can encrypt a plaintext of his choosing and study the resulting ciphertext. This is most common against asymmetric cryptography, where a cryptanalyst has access to a public key Given: (m1,c1), (m2,c2), …, (mk,ck), where m1, m2, …, mk are chosen by the adversary; and a new ciphertext c. Q: what is the plaintext of c, or what is the secret key?

Chosen-ciphertext attack Is an attack where a cryptanalyst chooses a ciphertext and attempts to find a matching plaintext. Given: (m1,c1), (m2,c2), …, (mk,ck), where c1, c2, …, ck are chosen by the adversary; and a new ciphertext c. Q: what is the plaintext of c, or what is the secret key?

Arithmetic modulo m The integer modulo m, denoted by Zm is the set of integers {0,1,2,..,m-1} where addition, subtraction and multiplication is performed modulo m.

Classical Ciphers Substitution cipher Replacing each element of the plaintext with another element. Transposition (or permutation) cipher Rearranging the order of the elements of the plaintext. Product cipher Using multiple stages of substitutions and transpositions

Substitution cipher Monoalphabetic cipher Polyalphabetic cipher Uses fixed substitution over the entire message. Polyalphabetic cipher Uses a number of substitutions at different times in the message, where a unit from the plaintext is mapped to one of several possibilities in the ciphertext and vice-versa.

Monoalphabetic Ciphers The ciphers for which, once a key is chosen, each alphabetic character is mapped to a unique alphabetic character. Examples of mono alphabetic ciphers include Caesar cipher, Simple Substitution Cipher and Affine cipher.

Caesar Cipher Invented by Julius Caesar . Each letter is replaced by the letter three positions (with wrap around) further down the alphabet. Plain: 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 Cipher: D E F G H I J K L M N O P Q R S T U V W X Y Z A B C Example: ohio state  RKLR VWDWH Extension (Shift Cipher): Instead of 3 use any number K between 1 and 25. e.g., for K=1, HAL  IBM.

Caesar Cipher Mathematically, map letters to numbers: a, b, c, ..., x, y, z 0, 1, 2, ..., 23, 24, 25 Then the general Caesar cipher is: c = EK(p) = (p + k) mod 26 p = DK(c) = (c – k) mod 26 Cryptanalysis of Caesar Cipher Key space: {0, 1, ..., 25} Vulnerable to brute-force attacks.

Simple Substitution Cipher Shuffle the letters and map each plaintext letter to a different random ciphertext letter. Keys for the simple substitution cipher usually consist of 26 letters (compared to the caeser cipher's single number). An example key is: An example encryption using the above key: When generating keys it is popular to use a key word, e.g. 'zebra' to generate it, since it is much easier to remember a key word compared to a random jumble of 26 characters. Using the keyword 'zebra', the key would become: plain alphabet : abcdefghijklmnopqrstuvwxyz cipher alphabet: phqgiumeaylnofdxjkrcvstzwb plaintext : defend the east wall of the castle ciphertext: giuifg cei iprc tpnn du cei qprcni cipher alphabet: zebracdfghijklmnopqstuvwxy

Cryptanalysis of Simple Substitution Cipher Now we have a total of 26! = 4 x 1026 keys. With so many keys, it is secure against brute-force attacks. But not secure against some cryptanalytic attacks. Problem is language characteristics.

Language Statistics and Cryptanalysis Human languages are not random. Letters are not equally frequently used. In English, E is by far the most common letter, followed by T, R, N, I, O, A, S. Other letters like Z, J, K, Q, X are fairly rare. There are tables of single, double & triple letter frequencies for various languages

English Letter Frequencies

Cryptanalysis of Simple Substitution Cipher Given ciphertext: UZQSOVUOHXMOPVGPOZPEVSGZWSZOPFPESXUDBMETSXAIZ VUEPHZHMDZSHZOWSFPAPPDTSVPQUZWYMXUZUHSX EPYEPOPDZSZUFPOMBZWPFUPZHMDJUDTMOHMQ Count relative letter frequencies (see next page) Guess {P, Z} = {e, t} Of double letters, ZW has highest frequency, so guess ZW = th and hence ZWP = the Proceeding with trial and error finally get: it was disclosed yesterday that several informal but direct contacts have been made with political representatives of the viet cong in moscow

Cont. Letter frequencies in ciphertext

Polyalphabetic Ciphers The use of multiple substitution alphabets will mean that a plaintext letter can encrypt to different ciphertext letters, thus causing the letter frequency distribution to appear “flatter”. A cipher that uses multiple substitution alphabets is called a polyalphabetic substitution cipher. The Vigenere Cipher, Playfair and Hill Cipher are examples of polyalphabetic ciphers.

Vigenere Cipher

Playfair Cipher Invented by Charles Wheatstone in 1854, but named after his friend Baron Playfair who promoted the use of the cipher . The Playfair algorithm is based on the use of a 5 × 5 matrix of letters constructed using a keyword. Example using the key word “PLAYFAIR EXAMPLE” The matrix is constructed by filling in the letters of the keyword (minus duplicates) from left to right and from top to bottom, and then filling in the remainder of the matrix with the remaining letters in alphabetic order. The letters I and J count as one letter. (plain IJ will be Ix Ix) In the Playfair cipher, there is not a single translation of each letter of the alphabet; that is, you don’t just decide that every B will be turned into an F. Instead, of letters are translated into other pairs of letters

Cont. plaintext is encrypted two letters at a time if a pair is a repeated letter, insert filler like 'X’ so that balloon would be treated as ba lx lo on. if both letters fall in the same row, replace each with letter to right (wrapping back to start from end). For example, lx is encrypted as RM. if both letters fall in the same column, replace each with the letter below it (again wrapping to top from bottom). For example, ru is encrypted as CL. Otherwise, each plaintext letter in a pair is replaced by the letter that lies in its own row and the column occupied by the other plaintext letter. For example pd is encrypted as AB.

Cont. Encrypting the message "Hide the gold in the tree stump": Plain text: HI DE TH EG OL DI NT HE TR EX ES TU MP Cipher text: BM OD ZB XD NA BE KU DM UI XM MO UV IF Decrypt this message: DIKZSARLBN

Cryptanalysis of Playfair Cipher security much improved over monoalphabetic since have 26 x 26 = 676 digrams. would need a 676 entry frequency table to analyse (verses 26 for a monoalphabetic) and correspondingly more ciphertext was widely used for many years eg. by US & British military in WW1 it can be broken, it leaves much of the structure of the plaintext language intact. A few hundred letters of ciphertext are generally sufficient.

Transposition Ciphers Also called permutation ciphers. Shuffle the plaintext, without altering the actual letters used. Example: rail fence ,Row Transposition Ciphers

rail fence The simplest permutation technique, in which the plaintext is written down as a sequence of diagonals and then read off as a sequence of rows. Example, to encipher the message "defend the east wall“ with a rail fence of depth 2, we write the following: The encrypted message is : DFNTEATALEEDHESWL

rail fence For the plaintext we used, "defend the east wall", with a key of 3, we write the following: Note that at the end of the message we have inserted two "X“ (so that there are the same number of letters on the top row, as on the bottom row). Decryption: The decryption process for the Rail Fence Cipher involves reconstructing the diagonal grid used to encrypt the message.

Decrypt rail fence We start by making a grid with as many rows as the key is, and as many columns as the length of the ciphertext. For example, if you receive the ciphertext "TEKOOHRACIRMNREATANFTETYTGHH", encrypted with a key of 4.  From this we can now read the plaintext off following the diagonals to get "they are attacking from the north".

Row Transposition Ciphers Plaintext is written row by row in a rectangle. Ciphertext: write out the columns in an order specified by a key. Key: 3 4 2 1 5 6 7 Plaintext: Ciphertext: TTNAAPTMTSUOAODWCOIXKNLYPETZ

Decrypt Row Transposition Ciphers To decrypt a message we must know the number of columns. The number of rows is length of the message divided by the number of columns. Ciphertext: TTNAAPTMTSUOAODWCOIXKNLYPETZ Key: 3 4 2 1 5 6 7 Number of columns is 7 and length of message is 28=> 28/7= 4 rows. Divide cipher text into block of 4 , rearrange blocks based on key.

Reading “Cryptography and Network Security Principles and Practices”, Fourth Edition by William Stallings Part one, Chapter 2