Presentation is loading. Please wait.

Presentation is loading. Please wait.

Cryptographic Algorithms and Protocols

Similar presentations


Presentation on theme: "Cryptographic Algorithms and Protocols"— Presentation transcript:

1 Cryptographic Algorithms and Protocols
Classical Encryption Techniques Slides 02 5-Feb-19 Cryptographic Algorithms and Protocols

2 Cryptographic Algorithms and Protocols
Symmetric Encryption Terminologies Substitution Ciphers Shift Cipher Substitution Cipher Caesar Cipher Monoalphabetic Cipher Playfair Cipher Vigener Cipher One Time Pad Transposition Ciphers Rail Fence cipher Row Transposition Cipher Product Ciphers Rotor Machines Cipher Steganography 5-Feb-19 Cryptographic Algorithms and Protocols

3 Cryptographic Algorithms and Protocols
Symmetric Encryption Hacker Insecure Channel Encryption Algorithm Decryption Algorithm M M M M M M Key Generator Secure Channel Key 5-Feb-19 Cryptographic Algorithms and Protocols

4 Asymmetric Encryption
Cryptanalyst Cipher Text Hacker Plain Text Encipher Decipher M M M M M M Key Generator Plain Text 5-Feb-19 Cryptographic Algorithms and Protocols

5 Cryptographic Algorithms and Protocols
Terminologies Symmetric Encryption Conventional encryption Single Key encryption Private key encryption Asymmetric Encryption Public Key encryption One key is public and the other is secret 5-Feb-19 Cryptographic Algorithms and Protocols

6 Cryptographic Algorithms and Protocols
Terminologies Plaintext: the original message Ciphertext: the 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): the study of principles/ methods of deciphering ciphertext without knowing key Cryptology: the field of both cryptography and cryptanalysis 5-Feb-19 Cryptographic Algorithms and Protocols

7 Cryptographic Algorithms and Protocols
Terminologies The Encryption Process: EK(M) = C where M: Plain Text E: Cipher Function K: Secret Key C: Cipher Text The Decryption Process: M = DK(C) 5-Feb-19 Cryptographic Algorithms and Protocols

8 Cryptographic Algorithms and Protocols
Cryptography can characterize by: type of encryption operations used substitution / transposition / product number of keys used single-key or private / two-key or public way in which plaintext is processed block / stream 5-Feb-19 Cryptographic Algorithms and Protocols

9 Cryptographic Algorithms and Protocols
Brute Force Search I will try every possible key! The time to find the key depends on the key size 5-Feb-19 Cryptographic Algorithms and Protocols

10 Cryptographic Algorithms and Protocols
Caesar/Shift Cipher Example: K = 3 A  D, B  E , C  F, … , X  A , Y  B Z  C HELLO  KHOOR Click here to try the Java Applet 5-Feb-19 Cryptographic Algorithms and Protocols

11 Caesar Cipher – Cryptanalysis
Assume a Hacker caught this Cipher message: GB OR BE ABG GB OR: GUNG VF GUR DHRFGVBA: JURGURE 'GVF ABOYRE VA GUR ZVAQ GB FHSSRE GUR FYVATF NAQ NEEBJF BS BHGENTRBHF SBEGHAR, BE GB GNXR NEZF NTNVAFG N FRN BS GEBHOYRF, NAQ OL BCCBFVAT RAQ GURZ? GB QVR: GB FYRRC; AB ZBER; NAQ OL N FYRRC GB FNL JR RAQ GUR URNEG-NPUR NAQ GUR GUBHFNAQ ANGHENY FUBPXF GUNG SYRFU VF URVE GB, 'GVF N PBAFHZZNGVBA QRIBHGYL GB OR JVFU'Q. GB QVR: GB FYRRC; GB FYRRC: CREPUNAPR GB QERNZ: NL, GURER'F GUR EHO; SBE VA GUNG FYRRC BS QRNGU JUNG QERNZF ZNL PBZR JURA JR UNIR FUHSSYRQ BSS GUVF ZBEGNY PBVY, ZHFG TVIR HF CNHFR: GURER'F GUR ERFCRPG GUNG ZNXRF PNYNZVGL BS FB YBAT YVSR; What is the key? 5-Feb-19 Cryptographic Algorithms and Protocols

12 Caesar Cipher – Cryptanalysis
GB OR BE ABG GB OR: GUNG VF GUR DHRFGVBA: JURGURE 'GVF ABOYRE VA GUR ZVAQ GB FHSSRE GUR FYVATF NAQ NEEBJF BS BHGENTRBHF SBEGHAR, BE GB GNXR NEZF NTNVAFG N FRN BS GEBHOYRF, NAQ OL BCCBFVAT RAQ GURZ? GB QVR: GB FYRRC; AB ZBER; NAQ OL N FYRRC GB FNL JR RAQ GUR URNEG-NPUR NAQ GUR GUBHFNAQ ANGHENY FUBPXF GUNG SYRFU VF URVE GB, 'GVF N PBAFHZZNGVBA QRIBHGYL GB OR JVFU'Q. GB QVR: GB FYRRC; GB FYRRC: CREPUNAPR GB QERNZ: NL, GURER'F GUR EHO; SBE VA GUNG FYRRC BS QRNGU JUNG QERNZF ZNL PBZR JURA JR UNIR FUHSSYRQ BSS GUVF ZBEGNY PBVY, ZHFG TVIR HF CNHFR: GURER'F GUR ERFCRPG GUNG ZNXRF PNYNZVGL BS FB YBAT YVSR; N could be I or A  key is 5 or 13 Comparing Letter frequency between Cipher and English texts 5-Feb-19 Cryptographic Algorithms and Protocols

13 Caesar Cipher – Cryptanalysis
Try the shift: 1, 6, 13, or 17 The common shift is 13 5-Feb-19 Cryptographic Algorithms and Protocols

14 Monoalphabetic Cipher
Plain: abcdefghijklmnopqrstuvwxyz Cipher:DKVQFIBJWPESCXHTMYAUOLRGZN EXAMPLE Plaintext: ifwewishtoreplaceletters Ciphertext:WIRFRWAJUHYFTSDVFSFUUFYA Click here to try the Java Applet 5-Feb-19 Cryptographic Algorithms and Protocols

15 Cryptographic Algorithms and Protocols
Playfair Cipher a 5X5 matrix of letters based on a keyword fill in letters of keyword (sans duplicates) fill rest of matrix with other letters eg. using the keyword CHARLES Click here to try the Java Applet L R A H C F D B S E N M K I G U T Q P O Z Y X W V 5-Feb-19 Cryptographic Algorithms and Protocols

16 Cryptographic Algorithms and Protocols
Vigenère Cipher An improvement over the Playfair It is a polyalphabetic substitution cipher Effectively multiple Caesar ciphers Key is multiple letters long K = k1 k2 ... kd ith letter specifies ith alphabet to use Use each alphabet in turn Repeat from start after d letters in message Decryption simply works in reverse 5-Feb-19 Cryptographic Algorithms and Protocols

17 Cryptographic Algorithms and Protocols
Vigenère Cipher KEY 5-Feb-19 Cryptographic Algorithms and Protocols

18 Cryptographic Algorithms and Protocols
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 key: deceptivedeceptivedeceptive plaintext: wearediscoveredsaveyourself ciphertext:ZICVTWQNGRZGVTWAVZHCQYGLMGJ Click here to try the Java Applet 5-Feb-19 Cryptographic Algorithms and Protocols

19 Vigenère Cipher – Autokey Cryptanalysis
Ideally, we need a key as long as the message Vigenère proposed the autokey cipher Example: key: deceptivewearediscoveredsav plaintext: wearediscoveredsaveyourself ciphertext:ZICVTWQNGKZEIIGASXSTSLVVWLA knowing keyword can recover the first few letters Click here to try the Java Applet 5-Feb-19 Cryptographic Algorithms and Protocols

20 Cryptographic Algorithms and Protocols
One-Time Pad To build unbreakable Cipher using Vigenère, the key must be random. Each key is used once Example: key: sdvbncfhjkledtghyrtustryuil plaintext: wearediscoveredsaveyourself ciphertext:ZICVTWQNGKZEIIGASXSTSLVVWLA Difficult to secure the key Click here to try the Java Applet 5-Feb-19 Cryptographic Algorithms and Protocols

21 Cryptographic Algorithms and Protocols
One-Time Pad Different decryptions using two different keys: Example: KEY: pxlmvmsydoftyrvzwctnlebnecvgdupathfzzlmnyih Plain: mr mustard with the candlestick in the hall Cipher:ANKYODKYUREOFJBYOJXMNEOQPGMZLWZ_AUERFPLUYTS KEY: mvbpnvmykbigeejqviptrdycxlqytiyshydbnqbuoq Plain: miss scarlet with the knife in the library Click here to try the Java Applet 5-Feb-19 Cryptographic Algorithms and Protocols

22 Transposition Ciphers
Hiding the message by rearranging the letter order without altering the actual letters used Still can be recognised since ciphertext have the same frequency distribution as the original text Transposition Ciphers form the second basic building block of ciphers. The core idea is to rearrange the order of basic units (letters/bytes/bits) without altering their actual values. 5-Feb-19 Cryptographic Algorithms and Protocols

23 Cryptographic Algorithms and Protocols
Rail Fence cipher write message letters out diagonally over a number of rows then read off cipher row by row eg. write message out 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 Example message is: "meet me after the toga party" with a rail fence of depth 2. 5-Feb-19 Cryptographic Algorithms and Protocols

24 Row Transposition Ciphers
a more complex scheme 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 M = attackpostponeduntiltwoam Key: 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 C: TTNAAPTMTSUOAODWCOIXKNLYPETZ The key is wrong in the book. 5-Feb-19 Cryptographic Algorithms and Protocols

25 Cryptographic Algorithms and Protocols
Product Ciphers ciphers using substitutions or transpositions are not secure because of language characteristics hence consider using 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 bridge from classical to modern ciphers 5-Feb-19 Cryptographic Algorithms and Protocols

26 Cryptographic Algorithms and Protocols
Rotor Machines before modern ciphers, rotor machines were most common product cipher were 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 with 3 cylinders have 263=17576 alphabets 5-Feb-19 Cryptographic Algorithms and Protocols

27 Cryptographic Algorithms and Protocols
Rotor Machines A  B, B  I, C  E <one cycle> A  E, B  Q, C  T 5-Feb-19 Cryptographic Algorithms and Protocols

28 Cryptographic Algorithms and Protocols
Steganography an alternative to encryption hides existence of message 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 high overhead to hide relatively few info bits 5-Feb-19 Cryptographic Algorithms and Protocols

29 Cryptographic Algorithms and Protocols
Summary have considered: classical cipher techniques and terminology monoalphabetic substitution ciphers cryptanalysis using letter frequencies Playfair ciphers polyalphabetic ciphers transposition ciphers product ciphers and rotor machines stenography 5-Feb-19 Cryptographic Algorithms and Protocols


Download ppt "Cryptographic Algorithms and Protocols"

Similar presentations


Ads by Google