Some Classical Cryptography - PowerPoint PPT Presentation

1 / 19
About This Presentation
Title:

Some Classical Cryptography

Description:

Key is CRIMSON. Plaintext of ROLLTIDE ... Pair the table with some key for example: crimson ... Key: CRIMSON. Plaintext: THE BRITISH ARE COMING ... – PowerPoint PPT presentation

Number of Views:63
Avg rating:3.0/5.0
Slides: 20
Provided by: RSm72
Category:

less

Transcript and Presenter's Notes

Title: Some Classical Cryptography


1
Some Classical Cryptography
  • Historical Cryptography Web Site
  • Trinity College Department of Computer Science
  • http//starbase.trincoll.edu/crypto/
  • Ralph A. Morelli,
  • Wireless Security Models, Threats and Solutions
  • Nichols, R., and Lekkas, P.,McGraw-Hill, (2002)
  • Applied Cryptography 2nd Edition
  • B. Schneier, Prentice Hall, (1996)
  • Public-Key Cryptography,
  • A. Salomaa, EATCS Series, Springer-Verlag, (1990)

2
Classical Ciphers
  • Substitution Cipher
  • Shift
  • Permutation
  • The Vigenere Cipher
  • Transposition Cipher
  • Product Ciphers
  • Substitution and Transposition
  • One Time Pads

3
Substitution Cipher
  • Shift (Caesar Cipher)
  • Shift of 3
  • Plaintext of ROLLTIDE
  • ABCDEFGHIJKLMNOPQRSTUVWXYZ
  • XYZABCDEFGHIJKLMNOPQRSTUVW
  • Ciphertext of OLIIQFAB

4
Shift Substitution Ciphers
  • Operating in the alphabet Z26
  • Encrypt ek(x) x k mod 26
  • Decrypt dk(c) c - k mod 26
  • Note that dk(ek(x)) x for all x in Z26
  • How large is the key space?
  • That is, how many possible keys?
  • Ciphertext attack Exhaustive Key Search

5
Exhaustive Key Search
  • In Z26, try all 26 keys
  • For Each possible key
  • Run dk(c) and check the output against a
    dictionary
  • If the decrypted ciphertext matches words in the
    dictionary, then we have cracked the cipher
  • Note, here we have one key for every letter of
    plaintext

6
Shift Substitution Ciphers
  • Use a Key Word
  • Key is CRIMSON
  • Plaintext of ROLLTIDE
  • ABCDEFGHIJKLMNOPQRSTUVWXYZ
  • CRIMSONABDEFGHJKLPQTUVWXYZ
  • Ciphertext of PJFFTBMS
  • Not a true shift

7
Shift Substitution Ciphers
  • What if we randomly assign 1 to 1
    Substitution?
  • ABCDEFGHIJKLMNOPQRSTUVWXYZ
  • WKLDEAZXGHVQBFICYOUSTJRMPN
  • ROLLTIDE Þ OIQQSGDE
  • What happens to the key space?
  • All permutations of lt A, B, , Z gt
  • Makes the key space much larger than Caesar
    Cipher
  • 26!
  • But, given some information, this can still be
    easy to crack!

8
English Character Frequency A. Salomaa 2 who
cites H.F. Gaines Cryptoanalysis, Dover, 1939.
See Salomaa for the starts of other languages too!
If we have only one key for any message, then we
can perform statistical analyses on the ciphertext
9
Shift Substitution Ciphers
  • Autokeying have the plaintext (or ciphertext)
    change the key as it goes
  • Help foil simple statistical analysis
  • Homophonic Substitution
  • Single character of plaintext can map to one of
    several possible values of ciphertext
  • A Þ 5, 13, 25, 56
  • B Þ 7, 19, 31, 42
  • Polygram Substitution
  • Blocks of characters are encrypted as groups
  • Polyalphabetic Substitution
  • Multiple simple ciphers based on some criteria
    such as position

10
The Vigenere Tableau
FROM Morelli polyalphabetic
  • Note that each row is a shift
  • Pair the table with some key for example crimson
  • Then pair the key with the message repeating as
    needed
  • Key CRIMSON
  • Plaintext THE BRITISH ARE COMING
  • Find the intersection of the row given by the
    corresponding keyword letter and the column given
    by the plaintext letter itself to pick out the
    ciphertext letter.
  • CRIMSONCRIMSONCRIMS
  • THEBRITISHARECOMING
  • VYMNJWGKJPMJSPQDQZW
  • 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
  • A 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
  • B 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 A
  • C C 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
  • D 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
  • E 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 D
  • F F G H I J K L M N O P Q R S T U V W X Y Z A B
    C D E
  • G G H I J K L M N O P Q R S T U V W X Y Z A B C
    D E F
  • H H I J K L M N O P Q R S T U V W X Y Z A B C D
    E F G
  • I I J K L M N O P Q R S T U V W X Y Z A B C D E
    F G H
  • J J K L M N O P Q R S T U V W X Y Z A B C D E F
    G H I
  • K K L M N O P Q R S T U V W X Y Z A B C D E F G
    H I J
  • L L M N O P Q R S T U V W X Y Z A B C D E F G H
    I J K
  • M M N O P Q R S T U V W X Y Z A B C D E F G H I
    J K L
  • N N O P Q R S T U V W X Y Z A B C D E F G H I J
    K L M
  • O O P Q R S T U V W X Y Z A B C D E F G H I J K
    L M N
  • P P Q R S T U V W X Y Z A B C D E F G H I J K L
    M N O
  • Q Q R S T U V W X Y Z A B C D E F G H I J K L M
    N O P

11
Attacks on Substitution
  • Shift Þ Brute Force
  • Other Substitution Þ Statistical attacks
  • Based on character usage
  • Based on language (
  • Bigrams(it, to, so, on, be )
  • Articles (A, an, the)
  • Defense against attacks
  • Break the reliance on character/word/etc
    positioning and ordering confuse the attacker

12
Transposition Ciphers
  • Characters remain the same. Their order is
    scrambled.
  • Simple Columnar Transposition
  • Place the plaintext in a 2-dimensional matrix
  • (left to right, top to bottom).
  • Output column order
  • (top to bottom, left to right)

13
Transposition Ciphers
  • Keyword Example (Nichols and Lekkas)
  • Use the natural occurrence of characters in the
    key word to determine the order of the columns.
  • Key is CRIMSON
  • Plaintext is MEET-ME-AT-DENNY-CHIMES-3-PM
  • CRIMSON
  • 1623754
  • MEET-ME
  • -AT-DEN
  • NY-CHIM M-NEEAYSET--T-C3-DH-MEIPENMM
  • ES-3-PM

M-NEET--T-C3ENMMMEIPEAYS-DH-
Corrected Ciphertext, sorry for the oversight
14
Attacks on transposition
  • Characters in a transposed message are the same
    as those in the plaintext.
  • Single round transposition still has strong
    relationship to plaintext.
  • If 4 X 4 matrix, then every 4th letter is
  • Statistical Attacks still available
  • Character usage
  • Word usage
  • Defense
  • Randomize the relationship

15
Product Ciphers
  • Diffusion Dispersion or distribution of the
    plaintext, in a random manner, over the cipher
    text. (Transposition, see Schneier p. 237)
  • Confusion The key or plaintext cannot be
    deduced from the ciphertext. (Substitution, see
    Schneier p. 237)
  • Modern Ciphers rely on Diffusion and Confusion
  • Consider this
  • Apply Diffusion and Confusion to the bits that
    make up a characters
  • Apply Diffusion and Confusion to the characters
    that make up a word
  • Apply Diffusion and Confusion to the words that
    make up the message
  • Digital Cryptography, bits, bytes, computer words

16
Issue
  • The use of a key
  • Three of the previous ciphers relied on sender
    and receiver sharing the same key.
  • How was the key created?
  • How was the key distributed?
  • How secure is the key?
  • When is the key changed?
  • Changed to what?
  • Do I need a new key for every message?
  • Much more on this later!

17
One-Time Pads
  • Use real random key K
  • Of the same length as the plaintext
  • XOR each element of K with each element of the
    plaintext
  • The claim is the output is unconditionally secure
  • Why?

18
References
  • Historical Cryptography Web Site
  • Trinity College Department of Computer Science
  • http//starbase.trincoll.edu/crypto/
  • Ralph A. Morelli,
  • Wireless Security Models, Threats and Solutions
  • Nichols, R., and Lekkas, P.,McGraw-Hill, (2002)
  • Applied Cryptography 2nd Edition
  • B. Schneier, Prentice Hall, (1996)
  • Public-Key Cryptography,
  • A. Salomaa, EATCS Series, Springer-Verlag, (1990)

19
The not really homework homework
  • http//dictionary.reference.com/fun/
  • Try the free Cryptogram
Write a Comment
User Comments (0)
About PowerShow.com