0% found this document useful (0 votes)
515 views

Classical Encryption Techniques

Classical encryption techniques

Uploaded by

mimirose90
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
515 views

Classical Encryption Techniques

Classical encryption techniques

Uploaded by

mimirose90
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 18

Classical Encryption Techniques

Raj Jain Washington University in Saint Louis Saint Louis, MO 63130 [email protected] Audio/Video recordings of this lecture are available at: http://www.cse.wustl.edu/~jain/cse571-11/
Washington University in St. Louis CSE571S 2011 Raj Jain

2-1

Overview
1. 2. 3. 4. 5.

Symmetric Cipher Model Substitution Techniques Transposition Techniques Product Ciphers Steganography
These slides are based on Lawrie Browns slides supplied with William Stallings book Cryptography and Network Security: Principles and Practice, 5th Ed, 2011.

Washington University in St. Louis

CSE571S

2011 Raj Jain

2-2

Symmetric Cipher Model

Y = E(K, X) X = D(K, Y) K=Secret Key Same key is used for encryption and decryption. Single-key or private key encryption.
Washington University in St. Louis CSE571S 2011 Raj Jain

2-3

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 (code breaking) - study of principles/ methods of deciphering ciphertext without knowing key Cryptology - field of both cryptography and cryptanalysis
Washington University in St. Louis CSE571S 2011 Raj Jain

2-4

Cryptography Classification
By type of encryption operations used Substitution Transposition Product By number of keys used Single-key or private Two-key or public By the way in which plaintext is processed Block Stream
Washington University in St. Louis CSE571S 2011 Raj Jain

2-5

Cryptanalysis
Objective: To recover key not just message Approaches: Cryptanalytic attack Brute-force attack If either succeed all key use is compromised Brute-force attack:
Key Size (bits) 32 56 128 168 26 characters (permutation) Number of Alternative Keys 232 = 4.3 109 256 = 7.2 1016 2128 = 3.4 1038 2168 = 3.7 1050 26! = 4 1026 Time required at 1 decryption/s 231 s 255 s 2127 s 2167 s 2 1026 s CSE571S = 35.8 minutes = 1142 years = 5.4 1024 years = 5.9 1036 years = 6.4 1012 years Time required at 106 decryptions/s 2.15 milliseconds 10.01 hours 5.4 1018 years 5.9 1030 years 6.4 106 years 2011 Raj Jain

Washington University in St. Louis

2-6

Substitution
Caesar Cipher: Replaces each letter by 3rd letter on Example: meet me after the toga party PHHW PH DIWHU WKH WRJD SDUWB Can define transformation as:
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 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

Mathematically give each letter a number


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 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25

Then have Caesar cipher as: c = E(k, p) = (p + k) mod (26) p = D(k, c) = (c k) mod (26) Weakness: Total 26 keys
Washington University in St. Louis CSE571S 2011 Raj Jain

2-7

Substitution: Other forms


Random substitution: Plain: abcdefghijklmnopqrstuvwxyz Cipher: DKVQFIBJWPESCXHTMYAUOLRGZN The key is 26 character long => 26! (= 4 x 1026) Keys in place of 26 keys Letter frequencies to find common letters: E,T,R,N,I,O,A,S

Washington University in St. Louis

CSE571S

2011 Raj Jain

2-8

Substitution: Other forms (Cont)


Use two-letter combinations: Playfair Cipher Use multiple letter combinations: Hill Cipher

Washington University in St. Louis

CSE571S

2011 Raj Jain

2-9

Poly-alphabetic Substitution Ciphers


Use multiple ciphers. Use a key to select which alphabet (code) is used for each letter of the message Vigenre Cipher: Example using keyword deceptive key: deceptivedeceptivedeceptive plaintext: wearediscoveredsaveyourself ciphertext:ZICVTWQNGRZGVTWAVZHCQYGLMGJ

Washington University in St. Louis

CSE571S

2011 Raj Jain

2-10

One-Time Pad
If a truly random key as long as the message is used, the cipher will be secure Called a One-Time pad Is unbreakable since ciphertext bears no statistical relationship to the plaintext Since for any plaintext & any ciphertext there exists a key mapping one to other Can only use the key once though Problems in generation & safe distribution of key

Washington University in St. Louis

CSE571S

2011 Raj Jain

2-11

Transposition (Permutation) Ciphers


Rearrange the letter order without altering the actual letters Rail Fence Cipher: Write message out diagonally 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 Row Transposition Ciphers: Write letters in rows, reorder the columns according to the key before reading off . Key: 4312567 Column Out 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 Ciphertext: TTNAAPTMTSUOAODWCOIXKNLYPETZ
Washington University in St. Louis CSE571S 2011 Raj Jain

2-12

Product Ciphers
Use 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 a bridge from classical to modern ciphers

Washington University in St. Louis

CSE571S

2011 Raj Jain

2-13

Rotor Machines
Before modern ciphers, rotor machines were most common complex ciphers in use 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 Hagelin Rotor Machine
Washington University in St. Louis CSE571S 2011 Raj Jain

2-14

Rotor Machine Principle

A becomes Y (First rotor). Y becomes R (2nd rotor). R becomes B (3rd rotor). After each letter, first rotor moves 1 position. After each full rotation of 1st rotor, 2nd rotor moves by 1 position. Cycle length = 263
Washington University in St. Louis CSE571S 2011 Raj Jain

2-15

Steganography
Hide characters in a text, hide bits in a photograph Least significant bit (lsb) of a digital photograph may be a message. Drawback: high overhead to hide relatively few info bits Advantage: Can obscure encryption use

Ref: http://www.cse.wustl.edu/~jain/cse571-09/ftp/stegano/index.html
Washington University in St. Louis CSE571S 2011 Raj Jain

2-16

Summary

1. 2. 3.

4. 5.

The key methods for cryptography are: Substitution and transposition Letter frequency can be used to break substitution Substitution can be extended to multiple letters and multiple ciphers. Mono-alphabetic=1 cipher, Poly-alphabetic=multiple ciphers Examples: Caesar cipher (1 letter substitution), Playfair (2letter), Hill (multiple letters), Vigenere (poly-alphabetic). Multiple stages of substitution and transposition can be used to form strong ciphers.
CSE571S 2011 Raj Jain

Washington University in St. Louis

2-17

Homework 2
Submit solution to problem 2.18 2.8 This problem explores the use of a one-time pad version of the Vigenere cipher. In this scheme, the key is a stream of random numbers between 0 and 26. For example, if the key is 3 19 5, then the first letter of the plaintext is encrypted with a shift of 3 letters, the second with a shift of 19 letters, the third with a shift of 5 letters, and so on. A. Encrypt the plain text sendmoremoney with the key stream 9 0 1 7 23 15 21 14 11 11 2 8 9 B. Using the ciphertext produced in part (a), find a key so that the cipher text decrypts to the plain text cashnotneeded.

Washington University in St. Louis

CSE571S

2011 Raj Jain

2-18

You might also like