You are on page 1of 30

‫ﻛﻠﯿﮫ‬

‫‪Lecture 3‬‬ ‫ﻋﻠﻮم اﻟﺤﺎﺳﻮب وﺗﻜﻨﻠﻮﺟﯿﺎ اﻟﻤﻌﻠﻮﻣﺎت‬

‫‪Data Security‬‬

‫‪Cryptography and‬‬
‫ﻣﺪرس اﻟﻤﺎدة‬ ‫‪Network Security‬‬
‫م‪ .‬ﻋﺪﻧﺎن ﯾﻮﺳﻒ داود‬
‫ﻣﺪرس اﻟﻤﺎده م ‪ /‬ﻋﺪﻧﺎن ﯾﻮﺳﻒ داود‬
Cryptography and Network Security

Data Encryption Standard:- (DES)

• The data encryption (DES)is a


symmetric key block cipher Published
by the national Institute of standard
and Technology (NIST)
• DES is an Implementation of Feistel cipher
it uses 16 round Feistel structure .the
block size 64 bit
‫ ﻋﺪﻧﺎن ﯾﻮﺳﻒ داود‬/ ‫ﻣﺪرس اﻟﻤﺎده م‬
Cryptography and Network Security

Data Encryption Standard:- (DES)

• Though ,key length is 64- bit DES has


an effective key length of 56 bit since 8
of the 64 bits of the key are not used
by the encryption algorithm (function
as check bits only )

‫ ﻋﺪﻧﺎن ﯾﻮﺳﻒ داود‬/ ‫ﻣﺪرس اﻟﻤﺎده م‬


Cryptography and Network Security

Data Encryption Standard:- (DES)

‫ ﻋﺪﻧﺎن ﯾﻮﺳﻒ داود‬/ ‫ﻣﺪرس اﻟﻤﺎده م‬


Cryptography and Network Security

Data Encryption Standard:- (DES)

‫ ﻋﺪﻧﺎن ﯾﻮﺳﻒ داود‬/ ‫ﻣﺪرس اﻟﻤﺎده م‬


Cryptography and Network Security

Data Encryption Standard:- (DES)


Data Encryption Standard (DES) steps.
Since DES is based on the Feistel cipher all that is
required to specify DES is :-

1- Initial Permutation
2- Encryption round 01 -16

3- Final Permutation
‫ ﻋﺪﻧﺎن ﯾﻮﺳﻒ داود‬/ ‫ﻣﺪرس اﻟﻤﺎده م‬
‫ﻣﺪرس اﻟﻤﺎده م ‪ /‬ﻋﺪﻧﺎن ﯾﻮﺳﻒ داود‬
‫ﻣﺪرس اﻟﻤﺎده م ‪ /‬ﻋﺪﻧﺎن ﯾﻮﺳﻒ داود‬
Cryptography and Network Security

Data Encryption Standard:- (DES)


1- Initial Permutation

‫ ﻋﺪﻧﺎن ﯾﻮﺳﻒ داود‬/ ‫ﻣﺪرس اﻟﻤﺎده م‬


Cryptography and Network Security

Data Encryption Standard:- (DES)


1- Initial Permutation

The Initial Permutation.


• Input block size : 64 bits
• Output block size : 64 bits
• In the stage of Initial Permutation it will only
perform a bit rearrangement for bit position
,there wont be any encryption in this stage

‫ ﻋﺪﻧﺎن ﯾﻮﺳﻒ داود‬/ ‫ﻣﺪرس اﻟﻤﺎده م‬


Cryptography and Network Security

Data Encryption Standard:- (DES)


1- Initial Permutation

‫ ﻋﺪﻧﺎن ﯾﻮﺳﻒ داود‬/ ‫ﻣﺪرس اﻟﻤﺎده م‬


Cryptography and Network Security

Data Encryption Standard:- (DES)


2- Encryption round 01 -16
• Input block size : 64 bits
• Input key size : 56 bits
• Output block size :64 bits
• In every identical encryption round the 64 bit
plaintext block which went through the initial
permutation will be divided into 2 sub block
with 32 bits in each
‫ ﻋﺪﻧﺎن ﯾﻮﺳﻒ داود‬/ ‫ﻣﺪرس اﻟﻤﺎده م‬
Cryptography and Network Security

Data Encryption Standard:- (DES)


2- Encryption round 01 -16
• The left 32 bit block will go through a XOR
with the out put of the function which is 32
bit block .the output of this XOR function will
be the next right .32 bit block for the 2nd
encryption round
• The right 32 bits will go straight as the next
left 32 bids for the 2nd encryption round while
also being an input to the (function f)
‫ ﻋﺪﻧﺎن ﯾﻮﺳﻒ داود‬/ ‫ﻣﺪرس اﻟﻤﺎده م‬
Cryptography and Network Security

Data Encryption Standard:- (DES)


Function f
• Input Ri block
size: 32 bits
• Input Key size: 48
bits
• Output block size:
32 bits

‫ ﻋﺪﻧﺎن ﯾﻮﺳﻒ داود‬/ ‫ﻣﺪرس اﻟﻤﺎده م‬


Cryptography and Network Security
Data Encryption Standard:- (DES)
Function f
• There are 4 main steps in Function f,
1. Expansion
• Input block size: 32 bits
• Output block size: 48 bits
• Since right input is 32-bit and round key is a
48-bit, we first need to expand right input to 48
bits. Permutation logic is graphically depicted in
the following illustration.

‫ ﻋﺪﻧﺎن ﯾﻮﺳﻒ داود‬/ ‫ﻣﺪرس اﻟﻤﺎده م‬


Cryptography and Network Security

Data Encryption Standard:- (DES)


Function f

‫ ﻋﺪﻧﺎن ﯾﻮﺳﻒ داود‬/ ‫ﻣﺪرس اﻟﻤﺎده م‬


Cryptography and Network Security

Data Encryption Standard:- (DES)


Function f

‫ ﻋﺪﻧﺎن ﯾﻮﺳﻒ داود‬/ ‫ﻣﺪرس اﻟﻤﺎده م‬


Cryptography and Network Security

Data Encryption Standard:- (DES)


Function f
2. XOR
• Input block size: 48 bits
• Input Key size: 48 bits
• Output block size: 48 bits
• 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.
‫ ﻋﺪﻧﺎن ﯾﻮﺳﻒ داود‬/ ‫ﻣﺪرس اﻟﻤﺎده م‬
Cryptography and Network Security
Data Encryption Standard:- (DES)
Function f
3. S- Boxes (Substitution
boxes)
• Input block size: 48 bits
• Output block size: 32 bits
• No of S boxes: 08
• 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. Refer the following
illustration.
‫ ﻋﺪﻧﺎن ﯾﻮﺳﻒ داود‬/ ‫ﻣﺪرس اﻟﻤﺎده م‬
Cryptography and Network Security

Data Encryption Standard:- (DES)


Function f

‫ ﻋﺪﻧﺎن ﯾﻮﺳﻒ داود‬/ ‫ﻣﺪرس اﻟﻤﺎده م‬


Cryptography and Network Security
Data Encryption Standard:- (DES)
Function f (S Boxes Cont.)
There are a total of eight S-box tables. The output of all eight s-boxes is
then combined in to 32 bit section.

The S-box rule

‫ ﻋﺪﻧﺎن ﯾﻮﺳﻒ داود‬/ ‫ﻣﺪرس اﻟﻤﺎده م‬


Cryptography and Network Security
Data Encryption Standard:- (DES)
Function f (S Boxes Cont.)

‫ ﻋﺪﻧﺎن ﯾﻮﺳﻒ داود‬/ ‫ﻣﺪرس اﻟﻤﺎده م‬


Cryptography and Network Security

Data Encryption Standard:- (DES)


Function f
4. Permutation
• Input block size: 32 bits
• Output block size: 32 bits
Function f

• There are a total of eight S-box


tables. The
output of all eight s-boxes is
then combined in
to 32 bit section.
‫ ﻋﺪﻧﺎن ﯾﻮﺳﻒ داود‬/ ‫ﻣﺪرس اﻟﻤﺎده م‬
Cryptography and Network Security

Data Encryption Standard:- (DES)


Key Transformation
Function
• The round-key generator creates sixteen
48-bit keys out of a 56-bit cipher key.

• For example, if the round number 1, 2, 9 or


16 the shift is done by only position for other
rounds, the circular shift is done by two
positions.
‫ ﻋﺪﻧﺎن ﯾﻮﺳﻒ داود‬/ ‫ﻣﺪرس اﻟﻤﺎده م‬
Cryptography and Network Security

Data Encryption Standard:- (DES)


Key Transformation
Function

‫ ﻋﺪﻧﺎن ﯾﻮﺳﻒ داود‬/ ‫ﻣﺪرس اﻟﻤﺎده م‬


Cryptography and Network Security

Data Encryption Standard:- (DES)

‫ ﻋﺪﻧﺎن ﯾﻮﺳﻒ داود‬/ ‫ﻣﺪرس اﻟﻤﺎده م‬


Cryptography and Network Security

Data Encryption Standard:- (DES)


3- Final Premutation
• Input block size : 64 bits
• Output block size :64 bits
• In the stage of Final Permutation it will again
perform a bit rearrangement for bit position
,this will be the inverse of the initial
permutation ,there wont be any encryption
in this stage .
‫ ﻋﺪﻧﺎن ﯾﻮﺳﻒ داود‬/ ‫ﻣﺪرس اﻟﻤﺎده م‬
Cryptography and Network Security

Data Encryption Standard:- (DES)


3- Final Premutation

‫ ﻋﺪﻧﺎن ﯾﻮﺳﻒ داود‬/ ‫ﻣﺪرس اﻟﻤﺎده م‬


Cryptography and Network Security
Data Encryption Standard:- (DES)
Last Encryption and First Decryption process

‫ ﻋﺪﻧﺎن ﯾﻮﺳﻒ داود‬/ ‫ﻣﺪرس اﻟﻤﺎده م‬


‫‪End of the lecture ..‬‬
‫ﻣﺪرس اﻟﻤﺎده م ‪ /‬ﻋﺪﻧﺎن ﯾﻮﺳﻒ داود‬

You might also like