Cryptography And Network Security

Published in: Networking
8,691 views
  • M

    Muhammad R

    • Dubai
    • 4 Years of Experience
    • Qualification: Bachelor of Science, CCNA Certified, Nebosh Certified, Flash...
    • Teaches: Computer, Maths, Science, Computer science, Mathem...
  • Contact this tutor

The Data Encryption Standard was once a predominant symmetric-key algorithm for the encryption of electronic data. It was highly influential in the advancement of modern cryptography in the academic world.This PPT will give a complete knowledge about Net Security.

  • 1
    Cryptography and Network Security
  • 2
    Cryptographic Tools o cryptographic algorithms important element in security services o review various types of elements symmetric encryption O public-key (asymmetric) encryption O digital signatures and key management O o secure hash functions o example is use to encrypt stored data
  • 3
    Symmetric Encryption o or conventional / private-key / single-key 0 sender and recipient share a common key o all classical encryption algorithms are private-key o was only type prior to invention of public- key in 1970's o and by far most widely used
  • 4
    Some Basic Terminology o plaintext - original message o ciphertext - coded message o cipher - algorithm for transforming plaintext to ciphertext o key - info used in cipher known only to sender/receiver
  • 5
    Some Basic Terminology o encipher (encrypt) - converting plaintext to ciphertext o decipher (decrypt) - recovering ciphertext from plaintext 0 cryptography - study of encryption principles/methods 0 cryptanalysis (codebreaking) - study of principles/ methods of deciphering ciphertext without knowing key o cryptology - field of both cryptography and cryptanalysis
  • 6
    Symmetric Cipher Model Secret key shared by sender and recipient x Plaintext Encryption algorithm input (e.g., AES) Transmitted ciphertext Secret key shared by sender and recipient Plaintext Decryption algorithm output (reverse of encryption algorithm)
  • 7
    Requirements o two requirements for secure use of symmetric encryption: o a strong encryption algorithm a secret key known only to sender / receiver O 0 mathematically have: o assume encryption algorithm is known o implies a secure channel to distribute key
  • 8
    Cryptography o can characterize cryptographic system by: type of encryption operations used O substitution transposition product number of keys used O single-key or private two-key or public way in which plaintext is processed O block stream
  • 9
    Cryptanalysis o objective to recover key not just message o general approaches: cryptanalytic attack O brute-force attack O o if either succeed all key use compromised
  • 10
    Attacking Symmetric Encryption o cryptanalysis o rely on nature of the algorithm plus some knowledge of plaintext characteristics O even some sample plaintext-ciphertext pairs O exploits characteristics of algorithm to deduce O specific plaintext or key o brute-force attack try all possible keys on some ciphertext until get O an intelligible translation into plaintext
  • 11
    Cryptanalytic Attacks ciphertext only o only know algorithm & ciphertext, is statistical, know or can identify plaintext known plaintext o know/suspect plaintext & ciphertext chosen plaintext o select plaintext and obtain ciphertext chosen ciphertext o select ciphertext and obtain plaintext chosen text select plaintext or ciphertext to en/decrypt
  • 12
    Brute Force Search o always possible to simply try every key 0 most basic attack, proportional to key size 0 assume either know / recognise plaintext Key Size (bits) 32 56 128 168 26 characters (permutation) Number of Alternative Time required at 1 decryption/ps 232 256 2128 2168 Keys 4.3 x 109 7.2 x 1016 3.4 x 1038 3.7 x 1050 4 x 1026 231 us 255 us 2127 us 2167 s 2 x 1026 us 35.8 minutes 1142 years 5.4 x 1024 years 5.9 x 1036 years 6.4 x 1012 years Time required at 106 decryptions/ps 2.15 milliseconds 10.01 hours 5.4 x 1018 years 5.9 x 1030 years 6.4 x 106 years
  • 13
    Classical Substitution Ciphers o where letters of plaintext are replaced by other letters or by numbers or symbols o or if plaintext is viewed as a sequence of bits, then substitution involves replacing plaintext bit patterns with ciphertext bit patterns
  • 14
    Caesar Cipher 0 earliest known substitution cipher o by Julius Caesar 0 first attested use in military affairs o replaces each letter by 3rd letter on 0 example: meet me after the toga party PHHW PH DIWHU WKH WRJD SDUWB
  • 15
    Caesar Cipher 0 can define transformation as: abcdefghijk 1m nopqrstuvwxyz DEFGHIJKLMNOPQRSTUVWXYZABC 0 mathematically give each letter a number abcdef g h i j k 1 111 012345678 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 o then have Caesar cipher as: c: E(k, p) : (p + k) mod (26) p: D(k, c) : (c - k) mod (26)
  • 16
    Cryptanalysis of Caesar Cipher only have 26 possible ciphers A maps to could simply try each in turn a brute force search given ciphertext, just try all shifts of letters
  • 17
    Monoalphabetic Cipher 0 rather than just shifting the alphabet 0 could shuffle (jumble) the letters arbitrarily 0 each plaintext letter maps to a different random ciphertext letter o hence key is 26 letters long Plain: abcde fghij klmnopqrstuvwxyz Cipher: DKVQFIBJWPESCXHTMYAUOLRGZN Plaintext : ifwewishtoreplaceletters Ciphertext: WIRFRWAJUHYFTSDVFSFUUFYA
  • 18
    Monoalphabetic Cipher Security o now have a total of 26! : 4 x 1026 keys o with so many keys, might think is secure o but would be o problem is language characteristics
  • 19
    English Letter Frequencies 14 10 G HIJKLMNOPQRSTUV W X 'f Z
  • 20
    Use in Cryptanalysis o key concept - monoalphabetic substitution ciphers do not change relative letter frequencies o discovered by Arabian scientists in 9th century o calculate letter frequencies for ciphertext o compare counts/plots against known values
  • 21
    Example Cryptanalysis o given ciphertext: UZQSOVUOHXMOPVGPOZPEVSGZWSZOPFPESXUDBMETSXAIZ VUEPHZHMDZSHZOWSFPAPPDTSVPQUZWYMXUZUHSX EPYEPOPDZSZUFPOMBZWPFUPZHMDJUDTMOHMQ 0 count relative letter frequencies (see text) 0 guess P & Z are e and t 0 guess ZW is th and hence Z WP is the o proceeding with trial and error finally get: it was disclosed yesterday that several informal but direct contacts have been made with political representatives of the viet cong in moscow
  • 22
    Playfair Cipher not even the large number of keys in a monoalphabetic cipher provides security one approach to improving security was to encrypt multiple letters the Playfair Cipher is an example invented by Charles Wheatstone in 1854 but named after his friend Baron Playfair
  • 23
    Playfair Key Matrix a 5X5 matrix of letters based on a keyword fill in letters of keyword (sans duplicates) fill rest of matrix with other letters ego using the keyword MONARCHY w x
  • 24
    Encrypting and Decrypting plaintext is encrypted two letters at a time 1. 2. 3. 4. if a pair is a repeated letter, insert filler like 'X' if both letters fall in the same row, replace each with letter to right (wrapping back to start from end) if both letters fall in the same column, replace each with the letter below it (wrapping to top from bottom) otherwise each letter is replaced by the letter in the same row and in the column of the other letter of the pair
  • 25
    Security of Playfair Cipher security much improved over monoalphabetic since have 26 x 26 : 676 digrams would need a 676 entry frequency table to analyse (verses 26 for a monoalphabetic) and correspondingly more ciphertext was widely used for many years ego by US & British military in WW1 it can be broken, given a few hundred letters since still has much of plaintext structure
  • 26
    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
  • 27
    Vigenåre Cipher o simplest polyalphabetic substitution cipher o effectively multiple caesar ciphers o key is multiple letters long K kl kd o ith letter specifies ith alphabet to use 0 use each alphabet in turn o repeat from start after d letters in message o decryption simply works in reverse
  • 28
    Example of 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 plaintext: wearediscoveredsaveyourself ciphertext : ZICVTWQNGRZGVTWAVZHCQYGLMGJ
  • 29
    Vigenère Cipher Table ABCDEFGHIJKLMNOPQRSTUVWXYZ ABCDEFGHIJKLMNOPQRSTUVWXYZ A B ABCDEFGHIJKLMNOPQRSTUVWXY B CDEFGHIJKLMNOPQRSTUVWXYZAB c DEFGHIJKLMNOPQRSTUVWXYZABC E EFGHIJKLMNOPQRSTUVWXYZABCD FGHIJKLMNOPQRSTUVWXYZABCDE F GGHIJKLMNOPQRSTUVWXYZABCDEF HIJKLMNOPQRSTUVWXYZABCDEFG H IJKLMNOPQRSTUVWXYZABCDEFGH 1 JJKLMNOPQRSTUVWXYZABCDEFGHI KLMNOPQRSTUVWXYZABCDEFGHIJ K LLMNOPQRSTUVWXYZABCDEFGHIJK MMNOPQRSTUVWXYZABCDEFGHIJKL 29
  • 30
    Vigenčre Cipher Table (conťd) ABC DEF GHIJKLMNOPQRSTUVWXYZ NOPQRSTUVWXYZABCDEFGHIJKLM N OPQRSTUVWXYZABCDEFGHIJKLMN o PQRSTUVWXYZABCDEFGHIJKLMNO QQRSTUVWXYZABCDEFGHIJKLMNOP RRSTUVWXYZABCDEFGHIJKLMNOPQ SSTUVWXYZABCDEFGHIJKLMNOPQR TTUVWXYZABCDEFGHIJKLMNOPQRS UUVWXYZABCDEFGHIJKLMNOPQRST V VWXYZABCDEFGHIJKLMNOPQRSTU WXYZABCDEFGHIJKLMNOPQRSTUV XXYZABCDEFGHIJKLMNOPQRSTUVW YYZABCDEFGHIJKLMNOPQRSTUVWX Z ZABCDEFGHIJKLMNOPQRSTUVWXY 30
  • 31
    Polyalphabetic Cipher E.g., Message = SEE ME IN MALL Take keyword as INFOSEC Vigen&re cipher works as follows: 1 NFOSECINFO ARJAWMPUNQZ 31
  • 32
    Polyalphabetic Cipher To decrypt, the receiver places the keyword characters below each ciphertext character Using the table, choose the row corresponding to the keyword character and look for the ciphertext character in that row Plaintext character is then at the top of that column 32
  • 33
    Polyalphabetic Cipher Decryption of ciphertext: ARJ AWMPUNQZ INFO SEC INFO SEEM EIN MALL Best feature is that same plaintext character is substituted by different ciphertext characters (i.e., polyalphabetic) 33
  • 34
    Security of Vigenåre Ciphers o have multiple ciphertext letters for each plaintext letter 0 hence letter frequencies are obscured o but not totally lost 0 start with letter frequencies o see if look monoalphabetic or not 0 if not, then need to determine number of alphabets, since then can attach each
  • 35
    Autokey Cipher o ideally want a key as long as the message o Vigen&re proposed the autokey cipher o with keyword is prefixed to message as key o knowing keyword can recover the first few letters 0 use these in turn on the rest of the message o but still have frequency characteristics to attack o ego given key deceptive deceptivewearediscoveredsav plaintext: wearediscoveredsaveyourself ciphertext : Z ICVTWQNGKZEI IGASXSTSLVVWLA
  • 36
    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
  • 37
    One-Time Pad o if a truly random key as long as the message is used, the cipher will be secure o called a One-Time pad o is unbreakable since ciphertext bears no statistical relationship to the plaintext 0 since for any plaintext & any ciphertext there exists a key mapping one to other o can only use the key once though o problems in generation & safe distribution of key
  • 38
    Transposition Ciphers now consider classical transposition or permutation ciphers these hide the message by rearranging the letter order without altering the actual letters used can recognise these since have the same frequency distribution as the original text
  • 39
    Rail Fence cipher 0 write message letters out diagonally over a number of rows o then read off cipher row by row 0 ego write message out as: me m atr h t g pry o giving ciphertext MEMATRHTGPRYETEFETEOAAT
  • 40
    Row Transposition Ciphers is a more complex transposition write letters of messaqe 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 Plaintext : Cipher text : 3421567 attack p o st pone dun tilt w oa m xyz TTNAAPTMTSUOAODWCOIXKNLYPETZ
  • 41
    Row Transposition Ciphers 0 Plaintext is written row by row in a rectangle. o Ciphertext: write out the columns in an order specified by a key. 421567 3 Plaintext : Cipher text : a O d W t S u O t t n a ti I y t z 41 TTNAAPTMTSUOAODWCOIXKNLYPETZ
  • 42
    11 10 etc. 12 Columnar Transposition.
  • 43
    Product Ciphers o ciphers using substitutions or transpositions are not secure because of language characteristics o hence consider using several ciphers in succession to make harder, but: two substitutions make a more complex O substitution o two transpositions make more complex transposition but a substitution followed by a transposition O makes a new much harder cipher o this is bridge from classical to modern ciphers
  • 44
    Rotor Machines o before modern ciphers, rotor machines were most common complex ciphers in use o widely used in WW2 German Enigma, Allied Hagelin, Japanese Purple O o implemented a very complex, varying substitution cipher o used a series of cylinders, each giving one substitution, which rotated and changed after each letter was encrypted o with 3 cylinders have 263=17576 alphabets
  • 45
    Rotor Machine Principles 18 B 17 D 15 16 R 16 R z 23 direction of motion direction of motion D E F G H I M N o P R s T v w x Y 24 25 26 1 2 3 4 5 6 10 11 12 13 14 15 16 17 19 20 21 22 fast rotor 21 15 19 10 14 20 16 22 11 17 12 23 18 25 24 13 26 .7 10 12 13 14 15 16 17 19 20 21 22 23 24 25 15 14 12 23 16 19 11 18 25 24 13 7 10 21 26 17 9 10 12 15 16 17 19 20 21 22 23 24 25 26 26 20 22 10 13 Il 4 23 5 24 9 12 25 19 15 7 14 slow rotor c s x z E F G M o P Q s T w x Y z 23 24 25 26 1 2 3 4 9 10 11 12 13 14 15 16 17 19 20 21 22 fast rotor 13 21 15 19 10 14 26 20 16 22 11 17 12 23 18 25 6 24 26 9 10 11 12 13 14 15 16 17 19 20 21 22 23 24 25 15 14 12 23 16 22 19 11 18 25 24 13 7 10 21 26 17 10 11 12 13 15 16 17 19 20 21 22 23 24 25 26 26 c 17 D 20 22 10 13 Il 4 23 24 .N 9 12 25 19 s 15 z 14 slow rotor medium rotor (a) Initial setting medium rotor (b) Setting after one keystroke
  • 46
    Steganography 0 an alternative to encryption o hides existence of message o using only a subset of letters/words in a longer message marked in some way o using invisible ink hiding in LSB in graphic image or sound file O o has drawbacks high overhead to hide relatively few info bits O 0 advantage is can obscure encryption use
  • 47
    Summary o have considered: o classical cipher techniques and terminology monoalphabetic substitution ciphers O cryptanalysis using letter frequencies O Playfair cipher O polyalphabetic ciphers O o transposition ciphers product ciphers and rotor machines O o stenography

Need a Tutor or Coaching Class?

Post an enquiry and get instant responses from qualified and experienced tutors.

Post Requirement

Related PPTs