Cryptography Cryptography: art or science of keeping messages secret Cryptology: branch of mathematics that studies the mathematical foundations of cryptographic.

Slides:



Advertisements
Similar presentations
Cryptography encryption authentication digital signatures
Advertisements

Using Cryptography to Secure Information. Overview Introduction to Cryptography Using Symmetric Encryption Using Hash Functions Using Public Key Encryption.
Cryptology with Spreadsheets A Computer Course for Everyone Jim Belk Texas A&M University.
Cryptology Terminology and Early History. Cryptology Terms Cryptology –The science of concealing the meaning of messages and the discovery of the meaning.
EEC 688/788 Secure and Dependable Computing Lecture 4 Wenbing Zhao Department of Electrical and Computer Engineering Cleveland State University
McGraw-Hill©The McGraw-Hill Companies, Inc., Security PART VII.
CYPHER INDEX n Introduction n Background n Demo INTRODUCTION n Cypher is a software toolkit designed to aid in the decryption of standard (historical)
CS526Topic 2: Classical Cryptography1 Information Security CS 526 Topic 2 Cryptography: Terminology & Classic Ciphers.
Section 2.9 The Hill Cipher; Matrices
L1.1. An Introduction to Classical Cryptosystems Rocky K. C. Chang, February 2013.
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.
3.1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 3 Traditional Symmetric-Key Ciphers.
Cryptography Week-6.
History and Background Part 1: Basic Concepts and Monoalphabetic Substitution CSCI 5857: Encoding and Encryption.
EE5552 Network Security and Encryption block 4 Dr. T.J. Owens CEng MIET Dr T. Itagaki MIET, MIEEE, MAES.
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.
1st Class Discrete Structures الهياكل المتقطعة أستاذة المادة: م. م
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.
3.1 SERVICES AND MECHANISMS SERVICES AND MECHANISMS The International Telecommunication Union- Telecommunication Standardization Section (ITU-T) provides.
A Technical Seminar Presentation CLASSICAL CRYPTOGRAPHY
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.
a connection between language and mathematics
Systems of Equations as Matrices and Hill Cipher.
Cryptography Data communications and networks Momina Tariq: Ambreen Sohail: Data Communications and Networks.
Cryptography and Network Security (CS435) Part Two (Classic Encryption Techniques)
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.
CIT 380: Securing Computer SystemsSlide #1 CIT 380: Securing Computer Systems Classical Cryptography.
ITMS – 3153 Information Systems Security
Section 2.7: The Friedman and Kasiski Tests Practice HW (not to hand in) From Barr Text p. 1-4, 8.
Symmetric-Key Cryptography
Module :MA3036NI Cryptography and Number Theory Lecture Week 3 Symmetric Encryption-2.
CSCI 5857: Encoding and Encryption
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.
© G. Dhillon, IS Department Virginia Commonwealth University Principles of IS Security Cryptography and Technical IS Security.
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
Web Tools for Classical Cryptology Tristan Beeble.
Computer Security Cryptography. Cryptography Now and Before  In the past – mainly used for confidentiality  Today –Still used for confidentiality –Data.
Section 2.3: Substitution Ciphers
K. Salah1 Cryptography Module I. K. Salah2 Cryptographic Protocols  Messages should be transmitted to destination  Only the recipient should see it.
CRYPTOGRAPHY PRESENTED BY : NILAY JAYSWAL BRANCH : COMPUTER SCIENCE & ENGINEERING ENTRY NO. : 14BCS033 1.
Introduction to Cryptography Lecture 8. Polyalphabetic Substitutions Definition: Let be different substitution ciphers. Then to encrypt the message apply.
Symmetric Cipher Model Plaintext input 1- encryption algorithm 2- secret key Encryption Cipher text output Cipher text input 1- Decryption algorithm 2-
Vigenére Cipher Kimberly Chiffens & Maria Jannelli.
CS526Topic 2: Classical Cryptography1 Information Security CS 526 Topic 2 Cryptography: Terminology & Classic Ciphers.
1 Classical Encryption Techniques. 2 Symmetric cipher model –Cryptography –Cryptanalysis Substitution techniques –Caesar cipher –Monoalphabetic cipher.
Chapter Two: Classic Cryptography
Department of Computer Science Chapter 5 Introduction to Cryptography Semester 1.
COMPUTER AND NETWORK SECURITY First of all, an introduction to the field of computer security and some of relevant issues are presented. Then, a background.
CRYPTOGRAPHY G REEK WORD MEANING “ SECRET WRITING ”
Substitution Ciphers.
Chapter 2 Basic Encryption and Decryption
Affine Cipher.
Asad Gondal Ali Haider Mansoor
Section 2.7 The Friedman and Kasiski Tests
Computer and Data Security 4th Class
Taehyung Kim HPC Lab. POSTECH
Outline Some Basic Terminology Symmetric Encryption
Campbell R. Harvey Duke University and NBER
Traditional Symmetric-Key Ciphers
Symmetric Encryption or conventional / private-key / single-key
Presentation transcript:

Cryptography Cryptography: art or science of keeping messages secret Cryptology: branch of mathematics that studies the mathematical foundations of cryptographic methods. Plaintext P = the original message. Encryption E k : Encoding the contents of the message to hides its contents from outsiders. Ciphertext C: The encrypted message. Decryption D k : The process of retrieving the plaintext from the ciphertext. Key K: Encryption and decryption usually make use of a key, and the coding method is such that decryption can be performed only by knowing the proper key. Cryptosystem= finite set of plaintexts P + finite set of ciphertexts C + set of keys K+ set of encryption functions E k and corresponding decryption functions D k for each key k from K, such that D k [E k (x)] = x. Cryptanalysis: is the art of breaking ciphers without knowing the proper key. Cryptographers: People who do cryptography. Cryptanalysts: practitioners of cryptanalysis.

General Process E=Plaintext P= Numerical Representation Encryption EDecryption D C=E(P)P=D(C) C= Ciphertext C= Numerical Represeantion

8.1. Character Ciphers Numerical Transformation: Restriction to the alphabet and to English  work modulo 26 (finite representation of large to infinite number of words/plaintexts) Letter ABCDEFGHIJKLMNOPQRSTUVWXYZ Nume rical value Frequ ency in % <1<1 <1< <1< <1<1 2<1<1

Caesar Cipher (Shift) Key: k between 1 and 25 Encryption: P  C= E(P) = P + k Decryption: C  P= D(C) = C – k Example with k=3: P= HEY = C= P+ 3 (mod 26) = = = KHA C=AHK = P= C-3 (mod 26) = = = YEH

Cryptanalysis of Shift cipher Given C, find k and P? Use the frequency of letter. Example: C=YFXMPCESPZCJTDFDPQFWQZCPYNTASPCTYRXPDDLRPD Most frequent letters are (decreasing): P, C, D,F,T,Y Initial guess: E  P, thus E+k=P 4+ k = 15 (mod 26) k = 15-4=11 (mod 26) P=C-11 (mod 26) Thus P = NUMEBRTHEORYISUSEFULFORENCIPHERINGMESAGES = NUMEBR THEORY IS USEFUL FOR ENCIPHERING MESAGES

Cryptology Tools sectionCryptology Tools section(online PARI/GP) Frequency Count: cut-and-paste a block of text to return the counts of letters from A to Z.Frequency Count Letter Block Count: to count the frequency of blocks of consecutive letters (bigrams, trigrams, etc.) in a text.Letter Block Count Subtext Count: This tool gives the letter frequencies of a subtext of a given text, consisting of each n-th letter starting with the k-th one.Subtext Count Caesar Cipher: This tool encodes and decodes according to the simple shift cipherCaesar Cipher Affine Ciphers: This encodes and decodes texts by affine transformations.Affine Ciphers General Monoalphabetic Cipher: This encodes and decodes text using a monoalphabetic substitution.General Monoalphabetic Cipher Babbage-Kasiski Method: This tool tabulates repeated blocks in any text and gives the distances (in numbers of letters) between the repetitions. The method of Babbage and Kasiski involves looking for common factors in these distances as a guess for the length of the keyword. The distances are factored to aid this guess. Friedman's Method: This tool calculates the index of coincidence of any text and uses that to guess the length of the keyword (or more generally the number of alphabets in a polyalphabetic cipher).Babbage-Kasiski Method Friedman's Method Subtext Count: This is the same tool as mentioned above for counting subtext frequencies. Once you have a reasonable guess for the keyword length, use this tool to guess the individual keyword letters.Subtext Count Keyword Guesser: This tool is a shortcut that guesses the keyword based on the keylength and on identifying the most common cipher letter as the translation of `E'. This is not always a good choice!Keyword Guesser Frequency Chart Alignment: Use this tool to additively shift a ciphertext to fit the pattern of English letter frequencies.Frequency Chart Alignment

Affine Cipher P  C = a P + b C  P = ā (C – b) Key: a & b between 0 & 25 with (a,26)=1 Phi(26)= only12 possible values for a. Reminder:  Euler’s theorem: (a,26)=1 → a Φ(26) Ξ 1 (mod 26)  Corollary: (a,26)=1 → ā Ξ a Φ(26)-1 (mod 26)  Solving ax Ξ c (mod 26)  x Ξ ā c (mod 26) a ā

Cryptanalysis From C find x=a & y=b then P: C=xP+y? Use the most two frequent letters to create two linear equations with two unknown. C=JAPXMSJGYPGDZWJPGJEGHDSSLBGWPGJYHVPOODCJZDMYJW ZWFMGPCPSFBDBVHWNB Most frequent letters: G 7, J 7, P 7 Compare to most frequent letters in English: E 13, T 9, A 8, etc. Try J  E and G  T to get the equations: x E + y = J and x T + y = G Or again x 4 + y = 9 and x 19 + y = 6 (mod 26)

System of Linear Congruences a x + b y Ξ e (mod m) c x + d y Ξ f (mod m) Use material from section 4.2 if possible, or Use Theorems (page ): Put If (∆, m)= 1, then the solution of the system is with the inverse of A mod 26:

Application to the example x 4 + y = 9 and x 19 + y = 6 (mod 26) (∆, m)= 1, inverse of ∆ (mod 26) is ∆¯ =19 to get: On Derive: MOD( ∆¯ MOD(DET(A)·A -1, 26), 26) On Maple: Mod( ∆¯ · Mod(Det(A)·A -1, 26), 26) Solution P=EXAMPLETHATICREATEDTOILLUSTRATEHOWAFFINECIPHERCRYPT ANALYSISWORKS EXAMPLE THAT I CREATED TO ILLUSTRATE HOW AFFINE CIPHER CRYPTANALYSIS WORKS

8.2 Block and Stream Ciphers Less vulnerable to cryptanalysis than Character Ciphers. Substitute for each block of plaintext letters of a specific length a block of ciphertext letters of the same length. Called Block or Polygraphic ciphers. They are symmetric algorithms (or secret-key), i.e., use the same key for encryption and decryption (or the decryption key is easily derived from the encryption key).

8.2.1 Vigenere Ciphers (see web & pages ) Consists of a Keyword of length n: l 1 l 2 … l n It numerical equivalence is then: k 1 k 2 … k n Split plaintext into blocks of length n: p 1 p 2 … p n Transform it into ciphertext blocks: c 1 c 2 … c n Such that: c i = p i + k i (mod 26) for i =1,2,…,n or C=P+L C = (c 1, c 2, …, c n ) P= (c 1, c 2, …, c n ) L = (c 1, c 2, …, c n ) To decrypt: p i = c i - k i (mod 26) for i =1,2,…,n A dummy letter can be used for a terminal block of less than n letters

Hill Ciphers (1929, see pages ) Consists of a Key matrix A=(k ij ) of size n x n Split plaintext into blocks P of length n. Transform it into ciphertext blocks C of length n. C = A P (mod 26) or to decrypt P = C (mod 26) Where A dummy letter can be used for a terminal block of less than n letters

Case of n=2; diagraphic ciphers

Cryptanalysis of polygraphic Ciphers Not vulnerable to letter frequency Vulnerable to frequency of blocks of size n. For n=2  26 2 = 676 diagraphs ( blocks of length 2) In English, the most common diagraphs with decreasing frequency: TH then HE So if TH  c 1 c 2 & HE  c 3 c 4 then solve for matrix A: