1 Chapter 3 Ciphers Mechanism that decides the process of encryption/decryption Stream Cipher: Bit-by-bit encryption / decryption Block Cipher: Block-by-block.

Slides:



Advertisements
Similar presentations
DES The Data Encryption Standard (DES) is a classic symmetric block cipher algorithm. DES was developed in the 1970’s as a US government standard The block.
Advertisements

“Advanced Encryption Standard” & “Modes of Operation”
CS 483 – SD SECTION BY DR. DANIYAL ALGHAZZAWI (3) Information Security.
1 Lecture 3: Secret Key Cryptography Outline concepts DES IDEA AES.
Cryptography and Network Security Chapter 5 Fifth Edition by William Stallings Lecture slides by Lawrie Brown.
Cryptography and Network Security Chapter 3
 Stream ciphers o Encrypt chars/bits one at a time o Assume XOR w the key, need long key to be secure  Keystream generators (pseudo-random key) o Synchronous.
Cryptography and Network Security
Chapter 5 Cryptography Protecting principals communication in systems.
Advanced Encryption Standard(AES) Presented by: Venkata Marella Slide #9-1.
AES clear a replacement for DES was needed
DES 1 Data Encryption Standard DES 2 Data Encryption Standard  DES developed in 1970’s  Based on IBM Lucifer cipher  U.S. government standard  DES.
1 Overview of the DES A block cipher: –encrypts blocks of 64 bits using a 64 bit key –outputs 64 bits of ciphertext A product cipher –basic unit is the.
1 Chapter 3 – Block Ciphers and the Data Encryption Standard Modern Block Ciphers  now look at modern block ciphers  one of the most widely used types.
1 Chapter 3 – Block Ciphers and the Data Encryption Standard Modern Block Ciphers  now look at modern block ciphers  one of the most widely used types.
Cryptography and Network Security (AES) Dr. Monther Aldwairi New York Institute of Technology- Amman Campus 10/18/2009 INCS 741: Cryptography 10/18/20091Dr.
McGraw-Hill©The McGraw-Hill Companies, Inc., Security PART VII.
Cryptography and Network Security Chapter 5. Chapter 5 –Advanced Encryption Standard "It seems very simple." "It is very simple. But if you don't know.
Cryptography and Network Security Chapter 5 Fourth Edition by William Stallings.
Computer Networking Lecture 21: Security and Cryptography Thanks to various folks from , semester’s past and others.
Lecture 23 Symmetric Encryption
Dr. Lo’ai Tawalbeh 2007 Chapter 5: Advanced Encryption Standard (AES) Dr. Lo’ai Tawalbeh New York Institute of Technology (NYIT) Jordan’s Campus.
Chapter 2 (D) – Contemporary Symmetric Ciphers "I am fairly familiar with all the forms of secret writings, and am myself the author of a trifling monograph.
Cryptography Block Ciphers and Feistel Functions.
Chapter 8.  Cryptography is the science of keeping information secure in terms of confidentiality and integrity.  Cryptography is also referred to as.
ECE454/CS594 Computer and Network Security Dr. Jinyuan (Stella) Sun Dept. of Electrical Engineering and Computer Science University of Tennessee Fall 2011.
Data Encryption Standard (DES). Symmetric Cryptography  C = E(P,K)  P = D(C,K)  Requirements  Given C, the only way to obtain P should be with  the.
The Digital Encryption Standard CSCI 5857: Encoding and Encryption.
Block Cipher Transmission Modes CSCI 5857: Encoding and Encryption.
Chapter 5 Advanced Encryption Standard. Origins clear a replacement for DES was needed –have theoretical attacks that can break it –have demonstrated.
Chapter 5 –Advanced Encryption Standard "It seems very simple." "It is very simple. But if you don't know what the key is it's virtually indecipherable."
Cryptography and Network Security Chapter 6. Multiple Encryption & DES  clear a replacement for DES was needed theoretical attacks that can break it.
9/17/15UB Fall 2015 CSE565: S. Upadhyaya Lec 6.1 CSE565: Computer Security Lecture 6 Advanced Encryption Standard Shambhu Upadhyaya Computer Science &
Network Security Lecture 14 Presented by: Dr. Munam Ali Shah.
Chapter 20 Symmetric Encryption and Message Confidentiality.
TE/CS 536 Network Security Spring 2006 – Lectures 6&7 Secret Key Cryptography.
Chapter 20 Symmetric Encryption and Message Confidentiality.
CS526: Information Security Prof. Sam Wagstaff September 16, 2003 Cryptography Basics.
Block ciphers Structure of a multiround block cipher
Cryptography Team Presentation 2
3DES and Block Cipher Modes of Operation CSE 651: Introduction to Network Security.
Data Encryption Standard (DES) © 2000 Gregory Kesden.
CSIT311: Spring 2010 Network Management and Security Ghulam Murtaza.
Classical &ontemporyryptology 1 Block Cipher Today’s most widely used ciphers are in the class of Block Ciphers Today’s most widely used ciphers are in.
DES Algorithm Data Encryption Standard. DES Features Block cipher, 64 bits per block 64-bit key, with only 56 bits effective ECB mode and CBC mode.
Modes of Operation INSTRUCTOR: DANIA ALOMAR. Modes of Operation A block cipher can be used in various methods for data encryption and decryption; these.
Stream Ciphers and Block Ciphers A stream cipher is one that encrypts a digital data stream one bit or one byte at a time. Examples of classical stream.
“Implementation of a RC5 block cipher algorithm and implementing an attack on it” Cryptography Team Presentation 1.
Cryptography and Network Security Contemporary Symmetric Ciphers.
Description of a New Variable-Length Key, 64-Bit Block Cipher (BLOWFISH) Bruce Schneier BY Sunitha Thodupunuri.
TE/CS 536 Network Security Spring 2005 – Lecture 8 Security of symmetric algorithms.
Advanced Encryption Standard. Origins NIST issued a new version of DES in 1999 (FIPS PUB 46-3) DES should only be used in legacy systems 3DES will be.
Presented by: Dr. Munam Ali Shah
Lecture 23 Symmetric Encryption
Advanced Encryption Standard Dr. Shengli Liu Tel: (O) Cryptography and Information Security Lab. Dept. of Computer.
Chapter 2 Symmetric Encryption.
Dr. Lo’ai Tawalbeh summer 2007 Chapter 6: Contemporary Symmetric Ciphers Dr. Lo’ai Tawalbeh New York Institute of Technology (NYIT) Jordan’s Campus INCS.
Cipher Transmission and Storage Modes Part 2: Stream Cipher Modes CSCI 5857: Encoding and Encryption.
Network Security Lecture 3 Secret Key Cryptography
Module :MA3036NI Symmetric Encryption -3 Lecture Week 4.
Block Ciphers and the Data Encryption Standard. Modern Block Ciphers  One of the most widely used types of cryptographic algorithms  Used in symmetric.
Lecture 4 Data Encryption Standard (DES) Dr. Nermin Hamza
Provides Confidentiality
Triple DES.
PART VII Security.
ADVANCED ENCRYPTION STANDARDADVANCED ENCRYPTION STANDARD
Block Ciphers: DES and AES
Presentation transcript:

1 Chapter 3 Ciphers Mechanism that decides the process of encryption/decryption Stream Cipher: Bit-by-bit encryption / decryption Block Cipher: Block-by-block encryption / decryption

2 Chapter 3 Types of Cipher Fig 3.1 Algorithm Types Stream Ciphers Block Ciphers

3 Chapter 3 Basic operations upon string of 0/1 Coded Word –XOR ( ⊕ ) –Transposition –Logical Operations (A ∩B,…) Block Number –+,-,*,/ –Finite Field (under Modular) –Exponentiation (under Modular) –…

4 Chapter 3 XOR operation ⊕ XOR operation ⊕ : –Encrypted: M ⊕ K= C –Decrypted: C ⊕ K= M –Math. Notation: Encryption: M ⊕ K  C Decryption: C ⊕ K  M MKC

5 Chapter 3 Basic of stream cipher Message M comes in bit strings Key bit strings are generated from a key K Encryption: –Cipher C are basically an bit XOR operation between message bit strings and key bit strings (generated from key K) Decryption: –Message M comes from an bit XOR operation between Cipher C strings and key bit strings (generated from key K)

6 Chapter 3 Encrypt/Decrypt with XOR Plain text Sender (A) Networ k Receive r (B) Cipher text … … … … …01101 Cipher text

7 Chapter 3 How to generate the key bit sequence by a key Pseudo random generator Key A serial of bit sequence LFSR, Linear Feedback shift register output Concept

8 Chapter 3 Program for LFSR Parameter: –Unsigned long shiftRegister –shiftRegister = input_key Procedure: –Output shiftRegister&0x ; –shiftRegister = ( (shiftRegister >>2) ^ (shiftRegister >>1) & 0x ) >1);

9 Chapter 3 Stream Cipher basic (XOR Blockbit level) F S; Plain text Cipher text the key In normal format In binary format

10 Chapter 3 Block Cipher Message are chocked into numbers of block Each block are encrypted with block ciphers Block between block are operated with one of the four modes (ECB,CBC,OFB, OCB). Known Block Ciphers: –DES, triple DES,IDEA, RC5, Blowfish, AES

11 Chapter 3 Symmetric Key Cryptography Fig 3.15 Plain text Encrypt with symmetric key Plain text Decrypt with symmetric key Sender (A) Net wor k Receive r (B) Cipher text

12 Chapter 3 Data Encryption Standard (DES) History –1977 published by National Institute of Standard and Technology, USA –Based on IBM Lucifer cipher and NSA Specification: –Uses a 56-bit key (among 64-bit), and map a 64-bit input block into a 64-bit output block. Theory basics: –Input permutation, key introduce bit string (s-box), XOR Comment: –DES is efficient to implement in hardware but relative slow in software. For example, a 500-MIPS CPU can encrypt at 30 Koctets per second.

13 Chapter 3 Conceptual View of DES Fig bit Plain text 56-bit Key DES 64-bit Cipher text Block 1 64-bit Plain text 56-bit Key DES 64-bit Cipher text Block 2 64-bit Plain text 56-bit Key DES 64-bit Cipher text Block n 

14 Chapter 3 Broad Level Steps in DES Fig 3.19 Initial Permutation (IP) LPTRPT 16 rounds Key Key i Final Permutation (FP) Step 1 Step 2 Step 3 Step 4 Step 5 Step 6 Plain text (64 bits) Cipher text (64 bits)

15 Chapter 3 Initial permutation (IP) Input 64-bit after bit position change (IP) produces 64-bit output Means: Output bit 1 from bit 58, bit 2 from bit 50, bit 3 from 42,…

16 Chapter 3 Board level include the master Key 64-bit input Round 1 Round 2 64-bit output Round bit key Generate 16 per-round keys Initial Permutation Final Permutation Swap left and right halves 48-bit K 1 48-bit K 2 48-bit K 16

17 Chapter 3 A DES Round

18 Chapter 3 The Mangler Function Two inputs: 32-bit plus 48-bit subkey Output: 32-bit Operations: –Step 1: 32-bit are expanded into 48-bit –Step 2: the expanded 48-bit are XORed with the 48-bit subkey –Step 3: the 48-bit result are divide into 8 blocks with 6 bits. –Step 4: each block are lookup into the S-box to generate the 4 bit –Step 5: the result 32-bit are then permutated to generate the 32 output.

19 Chapter 3 32-bit(RPT) 48-bit(subkey) Expansion permutation XOR 48-bit 48-bit divide into 8 6-bit blocks S-box 1S-box 8S-box 2 32-bit P-Box permutation 32-bit

20 Chapter 3 Expansion permutation P-box permutation

21 Chapter 3 S-box(1~8) S-box For example: bit , table look up

22 Chapter 3 How Sub key generate from Key Input : 64 bits Output: 48 bits x 16 (round 1~16) Steps: –1) 64 bits to 56 bits, and the 56 bits is divide into 2 halves, each of 28 bits, called C and D. (through a discard permutation) –2) each of 28 bits are rotated (round 1,2,9,1nd 16 are 1bit, and other are 2-bit) –3) from the 2 halves, among the 56 bits only 48 bits are got through compression permutation

23 Chapter 3 Discard permutation compression permutation

24 Chapter 3 Mathematics‘ notation on Block cipher Like DES For plain text m, encrypted with key K1, is denoted as: E k1 [m] (m) k1 if encrypt / decrypt operation is obvious. For a cipher text c, decrypted with key K1, is denoted as: D k1 [c] (c) k1 if encrypt / decrypt operation is obvious. i.e., D k1 [E k1 [m] ] = m ((m) k1 ) k1 = m

25 Chapter 3 DES operation mode Operation modes: –Block between block operation –Four modes: ECS (Electronic Code Book) CBC (Cipher Block Chaining) CFB (Cipher Feedback) OFB (Output Feedback)

26 Chapter 3 Encryption in ECB Mode Fig 3.6 Encrypt Plain text block 1 Key Cipher text block 1 Step 1 Encrypt Plain text block 2 Key Cipher text block 2 Step 2 Encrypt Plain text block n Key Cipher text block n Step n

27 Chapter 3 Decryption in ECB Mode Fig 3.7 Decrypt Cipher text block 1 Key Plain text block 1 Step 1 Decrypt Cipher text block 2 Key Plain text block 2 Step 2 Decrypt Cipher text block n Key Plain text block n Step n

28 Chapter 3 ECB Example Fig 3.4 FOUR_AND_FOUR Plain text Encrypt VFa% *yT1x Cipher text (a) The Encryption Process at the sender’s end VFa% *yT1x Cipher text Decrypt FOUR_AND_FOUR Plain text (b) The Decryption Process at the receiver’s end

29 Chapter 3 Encryption in CBC Mode Fig 3.8 Encrypt Plain text block 1 IV Cipher text block 1 Step 1 Encrypt Plain text block 2 Cipher text block 2 Step 2 Encrypt Plain text block n Cipher text block n Step n Key XOR Key XOR

30 Chapter 3 Decryption in CBC Mode Fig 3.9 Decrypt Cipher text block 1 IV Plain text block 1 Step 1 Decrypt Cipher text block 2 Plain text block 2 Step 2 Decrypt Cipher text block n Plain text block n Step n Key XOR Key XOR

31 Chapter 3 Encryption in CFB Mode Fig 3.13 IV (Shift register) Encrypt Key Take just the leftmost 8 bits XOR Plain text j bits Cipher text j bits IV (Shift register) Encrypt Key Take just the leftmost 8 bits XOR Plain text j bits IV (Shift register) Encrypt Key Take just the leftmost 8 bits XOR Plain text j bits Cipher text j bits

32 Chapter 3 Algorithm Modes Fig 3.5 Algorithm Modes Electronic Code Book (ECB) Cipher Block Chaining (CBC) Cipher Feedback (CFB) Output Feedback (OFB) These two modes work on block ciphers. These two modes work on block ciphers acting as stream ciphers.

33 Chapter 3 Encryption in OFB Mode Fig 3.14 IV (Shift register) Encrypt Key Take just the leftmost 8 bits XOR Plain text j bits Cipher text j bits IV (Shift register) Encrypt Key Take just the leftmost 8 bits XOR Plain text j bits IV (Shift register) Encrypt Key Take just the leftmost 8 bits XOR Plain text j bits Cipher text j bits

34 Chapter 3 Modified Versions of DES Double DES: Perform DES twice with two different keys Triple DES with Three Different Keys Triple DES with Two Different Keys

35 Chapter 3 Double DES Encryption Fig 3.36 Original Plain Text Encrypt K1 Cipher Text Encrypt K2 Cipher Text

36 Chapter 3 Double DES Decryption Fig 3.37 Original Plain Text Decrypt K2 Decrypt K1 Cipher Text

37 Chapter 3 Double DES Expressed P Encrypt K1 Temporary result (T) Encrypt K2 C E K1 (P) E K2 (E K1 (P)) T = E K1 (P) C = E K2 (E K1 (P)) Subject to: meet-in-the-middle attack Step 1: store all possible E K1 (P) Step 2: decrypt c with all possible key value D K2 (C) Step 3: find a match value at step 1 and 2.

38 Chapter 3 Triple DES Fig 3.41 Original Plain Text Encrypt K1 Cipher Text 1 Encrypt K2 Cipher Text 2 Encrypt K3 Final Cipher Text

39 Chapter 3 Triple DES with Two Keys Fig 3.42 Original Plain Text Encrypt K1 Cipher Text 1 Decrypt K2 Cipher Text 2 Encrypt K1 Final Cipher Text

40 Chapter 3 RC5 Developed by Ron Rivest Quite fast, flexibility (security vs speed) Almost no memory for execution: –Suitable for PDA, smart card,..

41 Chapter 3 Basic principles Variable lengths –Block size (word bits and 2-word blocks), number of rounds and number of 8-bit bytes (octets) of the key Particular RC5 instance should be assigned, denoted as RC5-w/r/b, e.g., RC5-32/12/16 means 64-bit block, 12 round, and 16x8 bits key

42 Chapter 3 Encryption using RC5 Fig 3.54 First, divide the original plain text into two blocks of equal size. Call them as A and B. Add A and S[0] to produce C. Add B and S[1] to produce D. 1. XOR C and D to produce E. 4. XOR D and F to produce G. 2. Circular-left shift E by D bits. 3. Add E and S[2i] to produce F. 5. Circular-left shift G by F bits. 6. Add G and S[2i + 1] to produce H. Increment i by 1. Check: Is i > r? Stop Yes No Note: First perform all the left-hand side steps, and then come to the right hand side steps, as indicated by the step numbers. Call F as C (i.e. C = F) Call H as D (i.e. D = H)

43 Chapter 3 RC5 Encryption Fig 3.63 A = A + S[0] B = B + S[1] For i = 1 to r A = ((A XOR B) <<< B) + S[2i] B = ((B XOR A) <<< A) + S[2i + 1] Next i

44 Chapter 3 RC5 Decryption Fig 3.64 For i = r to 1 step –1 (i.e. decrement i each time by 1) B = ((B – S[2i + 1]) >>> A) XOR A A = ((A – S[2i]) >>> B) XOR B Next i B = B – S[1] A = A – S[0]

45 Chapter 3 Sub-key creation in RC5 8-bit as a unit First, the key is put to array L, denoted as, L[0], L[1],…, L[b-1] Second, generate the array S, by using two constant P (0xb7e15163)and Q (0x9e3779b9), up to 2 times round plus 1, S[0], S[1],…S[2r+1] Third, Mixing array L and S, to produce the final subkey array S

46 Chapter 3 s[0]=p For i=1 to 2r+1 s[i]=(s[i-1]+Q) mod 2^32 Next i i=j=0 A=B=0 Do 3n times (n =max(2r+1, b)) A=s[i]=(s[i]+A+B)<<<3 B=L[j]=(L[j]+A+B)<<<(A+B) i = (i+1) mod 2(r+1) j= (j+1) mod b end-do Array S generated Mix Array S and L to generate S

47 Chapter 3 Advanced Encryption Standard (AES) 1990s, US want to the next generation cipher, and among many 15 proposals, Rijndael was accepted. Features: –Fast, variable in block size and key size. –Security Application: –Triple DES and AES.

48 Chapter 3