Chapter 1 CLASSICAL ENCRYPTION TECHNIQUES Cryptography Techniques CNET326

  • Slides: 17
Download presentation
Chapter -1 CLASSICAL ENCRYPTION TECHNIQUES Cryptography Techniques (CNET-326)

Chapter -1 CLASSICAL ENCRYPTION TECHNIQUES Cryptography Techniques (CNET-326)

Symmetric Encryption Ø Or conventional / private-key / single-key Ø Sender and recipient share

Symmetric Encryption Ø Or conventional / private-key / single-key Ø Sender and recipient share a common key Ø All classical encryption algorithms are private-key

Some Basic Terminology Ø Plaintext - original message Ø Ciphertext - coded message Ø

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

Symmetric Cipher Model

Symmetric Cipher Model

Requirements Ø Two requirements for secure use of symmetric encryption: l l a strong

Requirements Ø Two requirements for secure use of symmetric encryption: l l a strong encryption algorithm a secret key known only to sender / receiver Ø mathematically have: Y = E(K, X) X = D(K, Y) Ø assume encryption algorithm is known Ø implies a secure channel to distribute key

Cryptography Ø can characterize cryptographic system by: l Type of encryption operations used •

Cryptography Ø can characterize cryptographic system by: l Type of encryption operations used • • • l substitution transposition product Number of keys used • single-key or private • two-key or public l way in which plaintext is processed • Block • Stream

Cryptanalysis Ø objective to recover key not just message Ø general approaches: l l

Cryptanalysis Ø objective to recover key not just message Ø general approaches: l l cryptanalytic attack brute-force attack Ø if either succeed all key use compromised

Cryptanalytic Attacks Ø ciphertext only l only know algorithm & ciphertext, is statistical, know

Cryptanalytic Attacks Ø ciphertext only l only know algorithm & ciphertext, is statistical, know or can identify plaintext Ø known plaintext l know/suspect plaintext & ciphertext Ø chosen plaintext l select plaintext and obtain ciphertext Ø chosen ciphertext l select ciphertext and obtain plaintext Ø chosen text l select plaintext or ciphertext to en/decrypt

Classical Substitution Ciphers Ø where letters of plaintext are replaced by other letters or

Classical Substitution Ciphers Ø where letters of plaintext are replaced by other letters or by numbers or symbols Ø or if plaintext is viewed as a sequence of bits, then substitution involves replacing plaintext bit patterns with ciphertext bit patterns

Caesar Cipher Ø earliest known substitution cipher Ø by Julius Caesar Ø first attested

Caesar Cipher Ø earliest known substitution cipher Ø by Julius Caesar Ø first attested use in military affairs Ø replaces each letter by 3 rd letter on Ø example: meet me after the toga party PHHW PH DIWHU WKH WRJD SDUWB

Caesar Cipher Ø can define transformation as: abcdefghijklmnopqrstuvwxyz DEFGHIJKLMNOPQRSTUVWXYZABC Ø mathematically give each letter

Caesar Cipher Ø can define transformation as: abcdefghijklmnopqrstuvwxyz DEFGHIJKLMNOPQRSTUVWXYZABC Ø mathematically give each letter a number abcdefghij 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)

Monoalphabetic Cipher rather than just shifting the alphabet Ø could shuffle (jumble) the letters

Monoalphabetic Cipher rather than just shifting the alphabet Ø could shuffle (jumble) the letters arbitrarily Ø each plaintext letter maps to a different random ciphertext letter Ø hence key is 26 letters long Ø Plain: abcdefghijklmnopqrstuvwxyz Cipher: DKVQFIBJWPESCXHTMYAUOLRGZN Plaintext: ifwewishtoreplaceletters Ciphertext: WIRFRWAJUHYFTSDVFSFUUFYA

Polyalphabetic Ciphers polyalphabetic substitution ciphers Ø improve security using multiple cipher alphabets Ø make

Polyalphabetic Ciphers polyalphabetic substitution ciphers Ø improve security using multiple cipher alphabets Ø make cryptanalysis harder with more alphabets to guess and flatter frequency distribution Ø use a key to select which alphabet is used for each letter of the message Ø use each alphabet in turn Ø repeat from start after end of key is reached Ø

Vernam Cipher Ø ultimate defense is to use a key as long as the

Vernam Cipher Ø ultimate defense is to use a key as long as the plaintext Ø with no statistical relationship to it Ø invented by AT&T engineer Gilbert Vernam in 1918 Ø originally proposed using a very long but eventually repeating key

One-Time Pad if a truly random key as long as the message is used,

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 Ø

Row Transposition Ciphers Ø is a more complex transposition Ø write letters of message

Row Transposition Ciphers Ø is a more complex transposition Ø 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 Key: 4312567 Column Out 3 4 2 1 5 6 7 Plaintext: a t t a c k p ostpone duntilt woamxyz Ciphertext: TTNAAPTMTSUOAODWCOIXKNLYPETZ

Steganography Ø An alternative to encryption Ø Hides existence of message l l l

Steganography Ø An alternative to encryption Ø Hides existence of message l l l 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 l high overhead to hide relatively few info bits Ø advantage is can obscure encryption use