1
18ECC303J – Computer
Communication Networks
Course Credit : 4
Theory : 9 Hours
1. Behrouz A. Fehrouzan, “Data communication & Networking”, Mc-Graw Hill, 5th Edition Reprint,
2014.
2.Andrew S.Tanenbaum,“Computer Networks”, Pearson Education India, 5th Edition, 2013.
3.William Stallings,“Data & Computer Communication”, Pearson Education India, 10th Edition, 2014.
Prepared by Dr. M.S.Vasanthi, SRMIST
Prepared by Dr. M.S.Vasanthi, SRMIST 2
Unit 5 – Application Layer
 Introduction to Application Layer
 Application Layer Paradigms
 Client Server Interaction
 Session Initiation Protocol (SIP)
 Compression Techniques
 Introduction to Cryptography
 Types, Attacks and Services
 DES
 RSA
 Email, FTP, HTTP
 SNMP
Prepared by Dr. M.S.Vasanthi, SRMIST 3
Unit 5 – Week 2
Session 1
 Compression Techniques
ReferenceText Books:
1. Behrouz A. Fehrouzan, “Data communication & Networking”, Mc-Graw Hill, 5th Edition Reprint,
2014.
2.Andrew S.Tanenbaum,“Computer Networks”, Pearson Education India, 5th Edition, 2013.
Session 2
 Introduction to
Cryptography
 Types,Attacks, Services
Session 3
 DES
Prepared by Dr. M.S.Vasanthi, SRMIST 4
Data Encryption standard
Objectives :
 To define characteristics of good ciphers
 To describe key and key strength
 To describe Data encryption standard(DES)
Prepared by Dr. M.S.Vasanthi, SRMIST 5
Ciphers
 Shannon’s Characteristics of “Good” Ciphers
• The amount of secrecy needed should determine the
amount of labor appropriate for the encryption and
decryption.
• The set of keys and the enciphering algorithm should be
free from complexity.
• The implementation of the process should be as simple
as possible.
• Errors in ciphering should not propagate and cause
corruption of further information in the message.
• The size of the enciphered text should be no larger than
the text of the original message.
 Types of Ciphers
• Block Ciphers
• Encrypt data one block at a time (typically 64
bits, or 128 bits)
• Used for a single message
• Stream Ciphers
• Encrypt data one bit or one byte at a time
• Used if data is a constant stream of information
6
Ciphers
 Key Strength
• Strength of algorithm is determined by the size of the key
• The longer the key the more difficult it is to crack
• Key length is expressed in bits
• Typical key sizes vary between 48 bits and 448 bits
• Set of possible keys for a cipher is called key space
• For 40-bit key there are 240
possible keys
• For 128-bit key there are 2128
possible keys
• Each additional bit added to the key length doubles the security
• To crack the key the hacker has to use brute-force
• (i.e. try all the possible keys till a key that works is found)
Prepared by D. M.S.Vasanthi, SRMIST
 Key
• The key which is an input to the algorithm is secret
• Key is a string of numbers or characters
• Symmetric : If same key is used for encryption &
decryption the algorithm is called symmetric
• Asymmetric: If different keys are used for
encryption & decryption the algorithm is called
asymmetric
Prepared by Dr. M.S.Vasanthi, SRMIST 7
Symmetric and Asymmetric
Prepared by Dr. M.S.Vasanthi, SRMIST 8
Data Encryption Standard (DES) Basics
 DES
• Goal of DES is to completely scramble the data and
key so that every bit of cipher text depends on every
bit of data and ever bit of key
• DES is a block Cipher Algorithm
• Encryption: Tales 64 bit plain text and creates 64 bit
cipher text
• Decryption: Takes 64 bit cipher text and generates 64
bit plain text.
• Key: Same 56 bit key is used for encryption and
decryption
• DES satisfies both the desired properties of block
cipher. These two properties make cipher very strong.
• Avalanche effect − A small change in plaintext results in
the very great change in the ciphertext.
• Completeness − Each bit of ciphertext depends on many
bits of plaintext.
Prepared by Dr. M.S.Vasanthi, SRMIST 9
Structure of DES
• Encryption: Two permutations and 16 rounds. Each round is a
feistel rounds.
• The block size is 64-bit. Though, key length is 64-bit, DES has an
effective key length of 56 bits, since 8 of the 64 bits of the key are
not used by the encryption algorithm (function as check bits only).
• Each round uses a different 48 bit round key generated from the
cipher key according to a predefined algorithm.
Prepared by Dr. M.S.Vasanthi, SRMIST 10
DES
 Permutation boxes (P-boxes)
• Permutations: Initial and final permutations take a 64
bit input and permute them according to a predefined
rule.
• These permutations are keyless straight permutations
that are the inverse of each other.
• In initial permutation, the 58th
bit in the input
becomes 1st
bit in output.
• In final permutation, the first bit in input becomes
58th
bit in the output.
Prepared by Dr. M.S.Vasanthi, SRMIST 11
DES
 Round function
• The heart of this cipher is the DES function, f. The DES
function applies a 48-bit key to the rightmost 32 bits to produce
a 32-bit output. The function is made up of four sections.
• Expansion P-box: Since right input is 32-bit and round key is a
48-bit, we first need to expand right input to 48 bits.
• XOR (Whitener): After the expansion permutation, DES does
XOR operation on the expanded right section and the round
key. The round key is used only in this operation.
• Substitution Boxes: The S-boxes carry out the real mixing
(confusion). DES uses 8 S-boxes, each with a 6-bit input and a
4-bit output.
• Straight Permutation − The 32 bit output of S-boxes is then
subjected to the straight permutation
Prepared by Dr. M.S.Vasanthi, SRMIST 12
DES
Expansion permutation: Since right input is 32-bit and round key is a
48-bit, we first need to expand right input to 48 bits.
Prepared by Dr. M.S.Vasanthi, SRMIST 13
DES
Substitution box:The S-boxes carry out the real mixing
(confusion). DES uses 8 S-boxes, each with a 6-bit input
and a 4-bit output. The output of all eight s-boxes is then
combined in to 32 bit section.
14
DES
Straight Permutation − The 32 bit output of S-
boxes is then subjected to the straight
permutation
.
Key Generation: The round-key generator creates sixteen 48-bit
keys out of a 56-bit cipher key.
Prepared by Dr. M.S.Vasanthi, SRMIST
Prepared by Dr. M.S.Vasanthi, SRMIST 15
Review Questions
Q1 DES follows
a) Hash Algorithm
b) Caesars Cipher
c) Feistel Cipher Structure
d) SP Networks
Q2. The DES Algorithm Cipher System consists of
____________rounds (iterations) each with a round key
a) 12 (b)18 ©9 (d)16
Q3. The DES algorithm has a key length of
a) 128 Bits
b) 32 Bits
c) 64 Bits
d) 16 Bits
Q4. In the DES algorithm, although the key size is 64 bits
only 48bits are used for the encryption procedure, the rest are
parity bits.
a) True
b) False
Q5. The number of unique substitution boxes in DES after the
48 bit XOR operation are
a) 8 b) 4 c) 6 d) 12
Q6. In the DES algorithm the round key is __________ bit
and the Round Input is ____________bits.
Q7. The Initial Permutation table/matrix is of size
a) 16×8
b) 12×8
c) 8×8
d) 4×8
Prepared by Dr. M.S.Vasanthi, SRMIST 16
Answers
 1. Feistel Cipher Structure
 2. 16
 3. 64 bits
4. False
 5. 8
6. 48, 32
7.8X8

Unit5-week2_ DES.pptx data encryption std

  • 1.
    1 18ECC303J – Computer CommunicationNetworks Course Credit : 4 Theory : 9 Hours 1. Behrouz A. Fehrouzan, “Data communication & Networking”, Mc-Graw Hill, 5th Edition Reprint, 2014. 2.Andrew S.Tanenbaum,“Computer Networks”, Pearson Education India, 5th Edition, 2013. 3.William Stallings,“Data & Computer Communication”, Pearson Education India, 10th Edition, 2014. Prepared by Dr. M.S.Vasanthi, SRMIST
  • 2.
    Prepared by Dr.M.S.Vasanthi, SRMIST 2 Unit 5 – Application Layer  Introduction to Application Layer  Application Layer Paradigms  Client Server Interaction  Session Initiation Protocol (SIP)  Compression Techniques  Introduction to Cryptography  Types, Attacks and Services  DES  RSA  Email, FTP, HTTP  SNMP
  • 3.
    Prepared by Dr.M.S.Vasanthi, SRMIST 3 Unit 5 – Week 2 Session 1  Compression Techniques ReferenceText Books: 1. Behrouz A. Fehrouzan, “Data communication & Networking”, Mc-Graw Hill, 5th Edition Reprint, 2014. 2.Andrew S.Tanenbaum,“Computer Networks”, Pearson Education India, 5th Edition, 2013. Session 2  Introduction to Cryptography  Types,Attacks, Services Session 3  DES
  • 4.
    Prepared by Dr.M.S.Vasanthi, SRMIST 4 Data Encryption standard Objectives :  To define characteristics of good ciphers  To describe key and key strength  To describe Data encryption standard(DES)
  • 5.
    Prepared by Dr.M.S.Vasanthi, SRMIST 5 Ciphers  Shannon’s Characteristics of “Good” Ciphers • The amount of secrecy needed should determine the amount of labor appropriate for the encryption and decryption. • The set of keys and the enciphering algorithm should be free from complexity. • The implementation of the process should be as simple as possible. • Errors in ciphering should not propagate and cause corruption of further information in the message. • The size of the enciphered text should be no larger than the text of the original message.  Types of Ciphers • Block Ciphers • Encrypt data one block at a time (typically 64 bits, or 128 bits) • Used for a single message • Stream Ciphers • Encrypt data one bit or one byte at a time • Used if data is a constant stream of information
  • 6.
    6 Ciphers  Key Strength •Strength of algorithm is determined by the size of the key • The longer the key the more difficult it is to crack • Key length is expressed in bits • Typical key sizes vary between 48 bits and 448 bits • Set of possible keys for a cipher is called key space • For 40-bit key there are 240 possible keys • For 128-bit key there are 2128 possible keys • Each additional bit added to the key length doubles the security • To crack the key the hacker has to use brute-force • (i.e. try all the possible keys till a key that works is found) Prepared by D. M.S.Vasanthi, SRMIST  Key • The key which is an input to the algorithm is secret • Key is a string of numbers or characters • Symmetric : If same key is used for encryption & decryption the algorithm is called symmetric • Asymmetric: If different keys are used for encryption & decryption the algorithm is called asymmetric
  • 7.
    Prepared by Dr.M.S.Vasanthi, SRMIST 7 Symmetric and Asymmetric
  • 8.
    Prepared by Dr.M.S.Vasanthi, SRMIST 8 Data Encryption Standard (DES) Basics  DES • Goal of DES is to completely scramble the data and key so that every bit of cipher text depends on every bit of data and ever bit of key • DES is a block Cipher Algorithm • Encryption: Tales 64 bit plain text and creates 64 bit cipher text • Decryption: Takes 64 bit cipher text and generates 64 bit plain text. • Key: Same 56 bit key is used for encryption and decryption • DES satisfies both the desired properties of block cipher. These two properties make cipher very strong. • Avalanche effect − A small change in plaintext results in the very great change in the ciphertext. • Completeness − Each bit of ciphertext depends on many bits of plaintext.
  • 9.
    Prepared by Dr.M.S.Vasanthi, SRMIST 9 Structure of DES • Encryption: Two permutations and 16 rounds. Each round is a feistel rounds. • The block size is 64-bit. Though, key length is 64-bit, DES has an effective key length of 56 bits, since 8 of the 64 bits of the key are not used by the encryption algorithm (function as check bits only). • Each round uses a different 48 bit round key generated from the cipher key according to a predefined algorithm.
  • 10.
    Prepared by Dr.M.S.Vasanthi, SRMIST 10 DES  Permutation boxes (P-boxes) • Permutations: Initial and final permutations take a 64 bit input and permute them according to a predefined rule. • These permutations are keyless straight permutations that are the inverse of each other. • In initial permutation, the 58th bit in the input becomes 1st bit in output. • In final permutation, the first bit in input becomes 58th bit in the output.
  • 11.
    Prepared by Dr.M.S.Vasanthi, SRMIST 11 DES  Round function • The heart of this cipher is the DES function, f. The DES function applies a 48-bit key to the rightmost 32 bits to produce a 32-bit output. The function is made up of four sections. • Expansion P-box: Since right input is 32-bit and round key is a 48-bit, we first need to expand right input to 48 bits. • XOR (Whitener): After the expansion permutation, DES does XOR operation on the expanded right section and the round key. The round key is used only in this operation. • Substitution Boxes: The S-boxes carry out the real mixing (confusion). DES uses 8 S-boxes, each with a 6-bit input and a 4-bit output. • Straight Permutation − The 32 bit output of S-boxes is then subjected to the straight permutation
  • 12.
    Prepared by Dr.M.S.Vasanthi, SRMIST 12 DES Expansion permutation: Since right input is 32-bit and round key is a 48-bit, we first need to expand right input to 48 bits.
  • 13.
    Prepared by Dr.M.S.Vasanthi, SRMIST 13 DES Substitution box:The S-boxes carry out the real mixing (confusion). DES uses 8 S-boxes, each with a 6-bit input and a 4-bit output. The output of all eight s-boxes is then combined in to 32 bit section.
  • 14.
    14 DES Straight Permutation −The 32 bit output of S- boxes is then subjected to the straight permutation . Key Generation: The round-key generator creates sixteen 48-bit keys out of a 56-bit cipher key. Prepared by Dr. M.S.Vasanthi, SRMIST
  • 15.
    Prepared by Dr.M.S.Vasanthi, SRMIST 15 Review Questions Q1 DES follows a) Hash Algorithm b) Caesars Cipher c) Feistel Cipher Structure d) SP Networks Q2. The DES Algorithm Cipher System consists of ____________rounds (iterations) each with a round key a) 12 (b)18 ©9 (d)16 Q3. The DES algorithm has a key length of a) 128 Bits b) 32 Bits c) 64 Bits d) 16 Bits Q4. In the DES algorithm, although the key size is 64 bits only 48bits are used for the encryption procedure, the rest are parity bits. a) True b) False Q5. The number of unique substitution boxes in DES after the 48 bit XOR operation are a) 8 b) 4 c) 6 d) 12 Q6. In the DES algorithm the round key is __________ bit and the Round Input is ____________bits. Q7. The Initial Permutation table/matrix is of size a) 16×8 b) 12×8 c) 8×8 d) 4×8
  • 16.
    Prepared by Dr.M.S.Vasanthi, SRMIST 16 Answers  1. Feistel Cipher Structure  2. 16  3. 64 bits 4. False  5. 8 6. 48, 32 7.8X8