Classical Encryption Techniques - PowerPoint PPT Presentation

About This Presentation
Title:

Classical Encryption Techniques

Description:

Introduction Lecture 4 – PowerPoint PPT presentation

Number of Views:835
Slides: 27
Provided by: inam12
Tags:

less

Transcript and Presenter's Notes

Title: Classical Encryption Techniques


1
Classical Encryption Techniques 1
  • BSIT-7th
  • Delivered by Inam ul Haq
  • Chapter 2 Cryptography and Network Security by
    William Stallings

2
Table of Contents
  • 2 Main Types of Encryption
  • Symmetric Encryption
  • Basic Terminologies
  • Symmetric Cipher Model
  • Cryptography Cryptanalysis
  • Brute Force Search
  • Ciphers Caesar, Monoalphabetic,

3
2 Main Encryption Types
  • Two main encryption types are
  • Symmetric the same key is used forboth
    encryption and decryption
  • Asymmetric different keys forencryption and
    decryption, e.g. public-keyencryption such as
    RSA.

4
Symmetric Encryption
  • Encryption and decryption keys are same
  • Conventional / private-key / single-key
  • Sender and recipient share a common key
  • All classical encryption algorithms are
    private-key
  • First prior to invention of public-key in 1970s
  • Most widely used

5
Some Basic Terminology
  • plaintext - original message
  • ciphertext - coded message
  • cipher - algorithm for transforming plaintext to
    ciphertext
  • key - info used in cipher known only to
    sender/receiver
  • encipher (encrypt) - converting plaintext to
    ciphertext
  • decipher (decrypt) - recovering ciphertext from
    plaintext
  • cryptography - study of encryption
    principles/methods
  • cryptanalysis (codebreaking) - study of
    principles/ methods of deciphering ciphertext
    without knowing key
  • cryptology - field of both cryptography and
    cryptanalysis

6
Symmetric Cipher Model
7
Requirements
  • Two requirements for secure use of symmetric
    encryption
  • a strong encryption algorithm
  • a secret key known only to sender / receiver
  • mathematically
  • Y E(K, X)
  • X D(K, Y)
  • Assume encryption algorithm is known
  • Implies a secure channel to distribute key

8
Cryptography
  • Can characterize cryptographic system by
  • type of encryption operations used
  • substitution
  • transposition
  • product
  • number of keys used
  • single-key or private
  • two-key or public
  • way in which plaintext is processed
  • block
  • stream

9
Cryptanalysis
  • Objective to recover key not just message
  • General approaches
  • cryptanalytic attack
  • brute-force attack
  • if either succeed all keys are compromised

10
Types of Attacks on Encrypted Messages
  • ciphertext only
  • only know algorithm ciphertext, is statistical,
    know or can identify plaintext
  • known plaintext
  • know/suspect plaintext ciphertext
  • chosen plaintext
  • select plaintext and obtain ciphertext
  • chosen ciphertext
  • select ciphertext and obtain plaintext
  • chosen text
  • select plaintext or ciphertext to en/decrypt

11
More Definitions
  • Unconditional security
  • no matter how much computer power or time is
    available, the cipher cannot be broken since the
    ciphertext provides insufficient information to
    uniquely determine the corresponding plaintext
  • Computational security
  • given limited computing resources (eg time needed
    for calculations is greater than age of
    universe), the cipher cannot be broken

12
Brute Force Search
  • Try every possible character (from dictionary)
  • most basic attack, proportional to key size
  • assume either know / recognise plaintext

4-Digits PIN lt 1s
UpperLowerNumberSymbol lt25s
6 characters 11hrs
7 characters 6 weeks
8 characters 5 months
9 characters 10 years
13
1-Caesar Cipher
  • Earliest known substitution cipher
  • By Julius Caesar
  • First attested use in military affairs
  • Replaces each letter by 3rd letter on
  • example

14
1-Caesar Cipher
  • 1-Monoalphabetic substitution
  • One table describes all substitutions
  • Jump x step in the alphabet where 0 x 26
  • If x 3 then the table below could be used for
    encryption and decryption
  • ROT 13 another Caesar cipher

15
Cryptanalysis of Caesar Cipher
  • only have 26 possible ciphers
  • A maps to A,B,..Z
  • could simply try each in turn
  • a brute force search
  • given ciphertext, just try all shifts of letters
  • do need to recognize when have plaintext
  • eg. break ciphertext "GCUA VQ DTGCM"

16
1-Caesar Cipher
  • 1-Monoalphabetic Cipher Security
  • now have a total of 26! 4 x 1026 keys
  • with so many keys, might think is secure
  • but would be !!!WRONG!!!
  • problem is language characteristics

17
Language Redundancy and Cryptanalysis
  • human languages are redundant
  • eg "th lrd s m shphrd shll nt wnt"
  • letters are not equally commonly used
  • in English E is by far the most common letter
  • followed by T, A, O, I
  • other letters like Z,J,Q,X are fairly rare
  • have tables of single, double triple letter
    frequencies for various languages

18
English Letter Frequencies
19
2-Polyalphabetic Cipher
  • Also substitution cipher
  •  Vigenère cipher is probably the best-known
    example
  • Polyalphabetic cipher that uses a tableau of 26
    alphabets!? Invented by Blaise de Vigenère in
    the 16th century
  • Encrypting a plaintext character!? Lookup the
    column that corresponds to the current character
    in the key!? Use the row that begins with the
    current plaintext character!? Replace the
    plaintext character with the one highlighted by
    the current column and row!? To decrypt, just
    reverse the procedure

20
2-Polyalphabetic Cipher (Vigenère cipher)
21
2-Polyalphabetic Cipher (Vigenère cipher)
  • !? Key phrase Boldtbol dtb oldtboldt!?
    Plaintext Overhead the albatross!?
    Ciphertext Pjpuafoo waf owetufzvl!? So,
    which keyword was used?

22
3-Playfair Cipher
  • not even the large number of keys in a
    monoalphabetic cipher provides security
  • one approach to improving security was to encrypt
    multiple letters
  • the Playfair Cipher is an example
  • invented by Charles Wheatstone in 1854, but named
    after his friend Baron Playfair

23
Playfair Key Matrix
  • a 5X5 matrix of letters based on a keyword
  • fill in letters of keyword (filter duplicates)
  • fill rest of matrix with other letters
  • eg. using the keyword MONARCHY

M O N A R
C H Y B D
E F G I/J K
L P Q S T
U V W X Z
24
Encrypting and Decrypting
  • plaintext is encrypted two letters at a time
  • if a pair is a repeated letter, insert filler
    like 'X
  • if both letters fall in the same row, replace
    each with letter to right (wrapping back to start
    from end)
  • if both letters fall in the same column, replace
    each with the letter below it (wrapping to top
    from bottom)
  • otherwise each letter is replaced by the letter
    in the same row and in the column of the other
    letter of the pair

25
Security of Playfair Cipher
  • Security much improved over monoalphabetic
  • Better than Vigenere cipher
  • Widely used for many years
  • eg. by US British military in WW1
  • How to decipher?
  • Since still has much of plaintext structure

26
Exercise
  • Can you make your cipher?
  • How to decipher Playfair?
  • How many times Caesar Cipher has been broken?
Write a Comment
User Comments (0)
About PowerShow.com