Top Banner

of 17

39601372 Substitution Techniques

Apr 05, 2018

Download

Documents

Chetan Chauhan
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
  • 7/31/2019 39601372 Substitution Techniques

    1/17

    Substitution Techniques

  • 7/31/2019 39601372 Substitution Techniques

    2/17

    Classical Ciphers

    Plaintext is viewed as a sequence of elements (e.g., bits orcharacters)

    Substitution cipher: replacing each element of theplaintext with another element.

    Transposition (or permutation) cipher: rearranging theorder of the elements of the plaintext.

    Product cipher: using multiple stages of substitutions andtranspositions

  • 7/31/2019 39601372 Substitution Techniques

    3/17

    Classical Substitution Ciphers

    where letters of plaintext are replaced by other letters orby numbers or symbols

    or if plaintext is viewed as a sequence of bits, thensubstitution involves replacing plaintext bit patterns withciphertext bit patterns

  • 7/31/2019 39601372 Substitution Techniques

    4/17

    Caesar Cipher

    Earliest known substitution cipher Invented by Julius Caesar

    Each letter is replaced by the letter three positions furtherdown the alphabet.

    Plain: a b c d e f g h i j k l m n o p q r s t

    Cipher: D E F G H I J K L M N O P Q RS T U V W

    u v w x y z

    X Y Z A B C

  • 7/31/2019 39601372 Substitution Techniques

    5/17

    Example Plain text : meet me after the party

    Ciphertext: PHHW PH DIWHU WKH SDUWB

  • 7/31/2019 39601372 Substitution Techniques

    6/17

    Cryptanalysis of Caesar Cipher Key space: {0, 1, ..., 25}

    Vulnerable to brute-force attacks.

    Major weakness of Caesar cipher is its Predictability

  • 7/31/2019 39601372 Substitution Techniques

    7/17

    Monoalphabetic Substitution Cipher

    Shuffle the letters and map each plaintext letter to adifferent random ciphertext letter:

    Plain letters:

    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 zD KVQ F I B J W P E S C X H T M Y A U O L R G Z N

    Plaintext: ifwewish to replace letters

    Ciphertext: WI RF RWAJ UH YFTSDVF SFUUFYA

  • 7/31/2019 39601372 Substitution Techniques

    8/17

    Homophonic Cipher One Plaintext alphabet is replaced with fixed alphabet set.

    Ex: A is replaced by the set { D,H,P,R}

  • 7/31/2019 39601372 Substitution Techniques

    9/17

    PolyGram Cipher Replacement of plaintext happens block-by-block Ex:

    plaintext: Hello Hell

    Ciphertext: YUQQW TEUI

  • 7/31/2019 39601372 Substitution Techniques

    10/17

    Polyalphabetic Substitution Ciphers

    A sequence of monoalphabetic ciphers (M1, M2, M3, ...,

    Mk) is used in turn to encrypt letters.

    A key determines which sequence of ciphers to use.

    Each plaintext letter has multiple corresponding

    ciphertext letters. This makes cryptanalysis harder since the letter frequency

    distribution will be flatter.

  • 7/31/2019 39601372 Substitution Techniques

    11/17

    Vigenre Cipher

    Simplest polyalphabetic substitution cipher

    Consider the set of all Caesar ciphers:{ Ca, Cb, Cc, ..., Cz }

    Key: e.g. security

    Encrypt each letter using Cs, C

    e, C

    c, C

    u,C

    r, C

    i, C

    t, C

    yin

    turn.

    Repeat from start after Cy.

    Decryption simply works in reverse.

  • 7/31/2019 39601372 Substitution Techniques

    12/17

    Examplewrite the plaintext outwrite 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: we are discovered save yourself

    wearediscoveredsaveyourself

    ciphertext: ZICVTWQNGRZGVTWAVZHCQYGLMGJ

  • 7/31/2019 39601372 Substitution Techniques

    13/17

    Hill Cipher Multiletter cipher Invented by the mathematician Lester Hill in 1929

    m successive Plaintext letters encrypted at a time Substitution is determined bym linear equations For each character ,numerical value is assigned

    a=0,b=1,c=2,..z=25Form=3,system can be described as follows

  • 7/31/2019 39601372 Substitution Techniques

    14/17

    Hill Cipher .

    3 representing

  • 7/31/2019 39601372 Substitution Techniques

    15/17

    3,representing

    ciphertext and plain text. K is 3x3

    matrix, key

  • 7/31/2019 39601372 Substitution Techniques

    16/17

    Hill Cipher .. Ex: plain text: paymoremoney

  • 7/31/2019 39601372 Substitution Techniques

    17/17

    Hill cipher Ciphertext: LNSHDLEWMTRW

    For decryption,