Classical Encryption Techniques - PowerPoint PPT Presentation

1 / 29
About This Presentation
Title:

Classical Encryption Techniques

Description:

Cipher: algorithm for transforming plaintext to ciphertext. Key: info used in cipher known only to sender/receiver ... German Enigma, Allied Hagelin, Japanese Purple ... – PowerPoint PPT presentation

Number of Views:260
Avg rating:3.0/5.0
Slides: 30
Provided by: stude1441
Category:

less

Transcript and Presenter's Notes

Title: Classical Encryption Techniques


1
Cryptographic Algorithms and Protocols
  • Classical Encryption Techniques
  • Slides 02

2
Symmetric Encryption
  • Terminologies
  • Substitution Ciphers
  • Shift Cipher
  • Substitution Cipher
  • Caesar Cipher
  • Monoalphabetic Cipher
  • Playfair Cipher
  • Vigener Cipher
  • One Time Pad
  • Transposition Ciphers
  • Rail Fence cipher
  • Row Transposition Cipher
  • Product Ciphers
  • Rotor Machines Cipher
  • Steganography

3
Symmetric Encryption
Insecure Channel
Decryption Algorithm
Secure Channel
Key
4
Asymmetric Encryption
Cryptanalyst
Cipher Text
Plain Text
Decipher
Plain Text
5
Terminologies
  • Symmetric Encryption
  • Conventional encryption
  • Single Key encryption
  • Private key encryption
  • Asymmetric Encryption
  • Public Key encryption
  • One key is public and the other is secret

6
Terminologies
  • Plaintext the original message
  • Ciphertext the 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 (code-breaking) the study of
    principles/ methods of deciphering ciphertext
    without knowing key
  • Cryptology the field of both cryptography and
    cryptanalysis

7
Terminologies
  • The Encryption Process
  • EK(M) C
  • where
  • M Plain Text
  • E Cipher Function
  • K Secret Key
  • C Cipher Text
  • The Decryption Process
  • M DK(C)

8
Cryptography
  • can characterize 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
Brute Force Search
  • I will try every possible key!
  • The time to find the key depends on the key size

10
Caesar/Shift Cipher
  • Example
  • K 3
  • A ? D, B ? E , C ? F, , X ? A , Y ? B Z ? C
  • HELLO ? KHOOR
  • Click here to try the Java Applet

11
Caesar Cipher Cryptanalysis
  • Assume a Hacker caught this Cipher message
  • GB OR BE ABG GB OR GUNG VF GUR DHRFGVBA
  • JURGURE 'GVF ABOYRE VA GUR ZVAQ GB FHSSRE
  • GUR FYVATF NAQ NEEBJF BS BHGENTRBHF SBEGHAR,
  • BE GB GNXR NEZF NTNVAFG N FRN BS GEBHOYRF,
  • NAQ OL BCCBFVAT RAQ GURZ? GB QVR GB FYRRC
  • AB ZBER NAQ OL N FYRRC GB FNL JR RAQ
  • GUR URNEG-NPUR NAQ GUR GUBHFNAQ ANGHENY FUBPXF
  • GUNG SYRFU VF URVE GB, 'GVF N PBAFHZZNGVBA
  • QRIBHGYL GB OR JVFU'Q. GB QVR GB FYRRC
  • GB FYRRC CREPUNAPR GB QERNZ NL, GURER'F GUR
    EHO
  • SBE VA GUNG FYRRC BS QRNGU JUNG QERNZF ZNL PBZR
  • JURA JR UNIR FUHSSYRQ BSS GUVF ZBEGNY PBVY,
  • ZHFG TVIR HF CNHFR GURER'F GUR ERFCRPG
  • GUNG ZNXRF PNYNZVGL BS FB YBAT YVSR
  • What is the key?

12
Caesar Cipher Cryptanalysis
  • GB OR BE ABG GB OR GUNG VF GUR DHRFGVBA
  • JURGURE 'GVF ABOYRE VA GUR ZVAQ GB FHSSRE
  • GUR FYVATF NAQ NEEBJF BS BHGENTRBHF SBEGHAR,
  • BE GB GNXR NEZF NTNVAFG N FRN BS GEBHOYRF,
  • NAQ OL BCCBFVAT RAQ GURZ? GB QVR GB FYRRC
  • AB ZBER NAQ OL N FYRRC GB FNL JR RAQ
  • GUR URNEG-NPUR NAQ GUR GUBHFNAQ ANGHENY FUBPXF
  • GUNG SYRFU VF URVE GB, 'GVF N PBAFHZZNGVBA
  • QRIBHGYL GB OR JVFU'Q. GB QVR GB FYRRC
  • GB FYRRC CREPUNAPR GB QERNZ NL, GURER'F GUR
    EHO
  • SBE VA GUNG FYRRC BS QRNGU JUNG QERNZF ZNL PBZR
  • JURA JR UNIR FUHSSYRQ BSS GUVF ZBEGNY PBVY,
  • ZHFG TVIR HF CNHFR GURER'F GUR ERFCRPG
  • GUNG ZNXRF PNYNZVGL BS FB YBAT YVSR
  • N could be I or A ? key is 5 or 13
  • Comparing Letter frequency between Cipher and
    English texts

13
Caesar Cipher Cryptanalysis
Try the shift 1, 6, 13, or 17 The common shift
is 13
14
Monoalphabetic Cipher
  • Plain abcdefghijklmnopqrstuvwxyz
  • CipherDKVQFIBJWPESCXHTMYAUOLRGZN
  • EXAMPLE
  • Plaintext ifwewishtoreplaceletters
  • CiphertextWIRFRWAJUHYFTSDVFSFUUFYA
  • Click here to try the Java Applet

15
Playfair Cipher
  • a 5X5 matrix of letters based on a keyword
  • fill in letters of keyword (sans duplicates)
  • fill rest of matrix with other letters
  • eg. using the keyword CHARLES
  • Click here to try the Java Applet

L R A H C
F D B S E
N M K I G
U T Q P O
Z Y X W V
16
Vigenère Cipher
  • An improvement over the Playfair
  • It is a polyalphabetic substitution cipher
  • Effectively multiple Caesar ciphers
  • Key is multiple letters long K k1 k2 ... kd
  • ith letter specifies ith alphabet to use
  • Use each alphabet in turn
  • Repeat from start after d letters in message
  • Decryption simply works in reverse

17
Vigenère Cipher
KEY
18
Vigenère Cipher
  • write the plaintext out
  • write the keyword repeated above it
  • use each key letter as a caesar cipher key
  • encrypt the corresponding plaintext letter
  • eg using keyword deceptive
  • key deceptivedeceptivedeceptive
  • plaintext wearediscoveredsaveyourself
  • ciphertextZICVTWQNGRZGVTWAVZHCQYGLMGJ
  • Click here to try the Java Applet

19
Vigenère Cipher Autokey Cryptanalysis
  • Ideally, we need a key as long as the message
  • Vigenère proposed the autokey cipher
  • Example
  • key deceptivewearediscoveredsav
  • plaintext wearediscoveredsaveyourself
  • ciphertextZICVTWQNGKZEIIGASXSTSLVVWLA
  • knowing keyword can recover the first few letters
  • Click here to try the Java Applet

20
One-Time Pad
  • To build unbreakable Cipher using Vigenère, the
    key must be random.
  • Each key is used once
  • Example
  • key sdvbncfhjkledtghyrtustryuil
  • plaintext wearediscoveredsaveyourself
  • ciphertextZICVTWQNGKZEIIGASXSTSLVVWLA
  • Difficult to secure the key
  • Click here to try the Java Applet

21
One-Time Pad
  • Different decryptions using two different keys
  • Example
  • KEY pxlmvmsydoftyrvzwctnlebnecvgdupathfzzlmnyih
  • Plain mr mustard with the candlestick in the
    hall
  • CipherANKYODKYUREOFJBYOJXMNEOQPGMZLWZ_AUERFPLUYTS
  • KEY mvbpnvmykbigeejqviptrdycxlqytiyshydbnqbuoq
  • Plain miss scarlet with the knife in the library
  • CipherANKYODKYUREOFJBYOJXMNEOQPGMZLWZ_AUERFPLUYTS
  • Click here to try the Java Applet

22
Transposition Ciphers
  • Hiding the message by rearranging the letter
    order without altering the actual letters used
  • Still can be recognised since ciphertext have the
    same frequency distribution as the original text

23
Rail Fence cipher
  • write message letters out diagonally over a
    number of rows
  • then read off cipher row by row
  • eg. write message out as
  • m e m a t r h t g p r y
  • e t e f e t e o a a t
  • giving ciphertext
  • MEMATRHTGPRYETEFETEOAAT

24
Row Transposition Ciphers
  • a more complex scheme
  • write letters of message out in rows over a
    specified number of columns
  • then reorder the columns according to some key
    before reading off the rows
  • M attackpostponeduntiltwoam
  • Key 4 3 1 2 5 6 7
  • Plaintext a t t a c k p
  • o s t p o n e
  • d u n t i l t
  • w o a m x y z
  • C TTNAAPTMTSUOAODWCOIXKNLYPETZ

25
Product Ciphers
  • ciphers using substitutions or transpositions are
    not secure because of language characteristics
  • hence consider using several ciphers in
    succession to make harder, but
  • two substitutions make a more complex
    substitution
  • two transpositions make more complex
    transposition
  • but a substitution followed by a transposition
    makes a new much harder cipher
  • this is bridge from classical to modern ciphers

26
Rotor Machines
  • before modern ciphers, rotor machines were most
    common product cipher
  • were widely used in WW2
  • German Enigma, Allied Hagelin, Japanese Purple
  • implemented a very complex, varying substitution
    cipher
  • used a series of cylinders, each giving one
    substitution, which rotated and changed after
    each letter was encrypted
  • with 3 cylinders have 26317576 alphabets

27
Rotor Machines
A ? B, B ? I, C ? E ltone cyclegt A
? E, B ? Q, C ? T
28
Steganography
  • an alternative to encryption
  • hides existence of message
  • using only a subset of letters/words in a longer
    message marked in some way
  • using invisible ink
  • hiding in LSB in graphic image or sound file
  • has drawbacks
  • high overhead to hide relatively few info bits

29
Summary
  • have considered
  • classical cipher techniques and terminology
  • monoalphabetic substitution ciphers
  • cryptanalysis using letter frequencies
  • Playfair ciphers
  • polyalphabetic ciphers
  • transposition ciphers
  • product ciphers and rotor machines
  • stenography
Write a Comment
User Comments (0)
About PowerShow.com