0% found this document useful (0 votes)
6 views26 pages

6 - DeS Algorithm

The document provides an overview of the DES (Data Encryption Standard) algorithm, detailing the steps involved in creating subkeys and encoding data blocks. It outlines the process of generating 16 subkeys from a given hexadecimal key and describes the encoding of 64-bit data blocks using these subkeys. The document includes examples of binary representations and transformations used in the DES algorithm.

Uploaded by

ramzrami570
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views26 pages

6 - DeS Algorithm

The document provides an overview of the DES (Data Encryption Standard) algorithm, detailing the steps involved in creating subkeys and encoding data blocks. It outlines the process of generating 16 subkeys from a given hexadecimal key and describes the encoding of 64-bit data blocks using these subkeys. The document includes examples of binary representations and transformations used in the DES algorithm.

Uploaded by

ramzrami570
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 26

Information Systems Security

‫أمن نظم المعلومات‬

6 ‫المحاضرة رقم‬
DES Algorithm

Information Systems Security– Queen Arwa University 04/25/2025 1


DES Algorithm
 Let M be the plain text message ‫النص االصلي‬
M = 0123456789ABCDEF, where M is in hexadecimal (base 16)
format.
 M = 0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 1010
1011 1100 1101 1110 1111

 Let K be the hexadecimal key ‫المفتاح‬


K = 133457799BBCDFF1
 K = 00010011 00110100 01010111 01111001 10011011 10111100
11011111 11110001

Information Systems Security– Queen Arwa University 04/25/2025 2


DES Algorithm

Information Systems Security– Queen Arwa University 04/25/2025 3


Step 1: Create 16 sub keys, each of which is 48-bits
.long
K =00010011 00110100 01010111 01111001 10011011 10111100 11011111 11110001
we get the 56-bit permutation ‫تباديل‬
K+ =1111000 0110011 0010101 0101111 0101010 1011001 1001111 0001111

‫ بت‬28 ‫كل نصف من‬


C0 and D0, each half has 28 bits
C0 = 1111000 0110011 0010101 0101111
D0 = 0101010 1011001 1001111 0001111

Information Systems Security– Queen Arwa University 04/25/2025 4


Step 1: Create 16 sub keys, each of which is 48-bits
.long
Each pair of blocks Cn and Dn is formed from the previous pair Cn- Iteration Number of
Number Left Shifts
1 and Dn-1, respectively, for n = 1, 2, ..., 16, using the following
schedule of "left shifts" of the previous block.
1 1
 C = 1110000110011001010101011111
1 2 1
D1 = 1010101011001100111100011110 3 2
 C2 = 1100001100110010101010111111 4 2
5 2
D2 = 0101010110011001111000111101
6 2
 C3 = 0000110011001010101011111111 7 2
D3 = 0101011001100111100011110101 8 2
9 1
 C4 = 0011001100101010101111111100
10 2
D4 = 0101100110011110001111010101 11 2
 C5 = 1100110010101010111111110000 12 2
D5 = 0110011001111000111101010101 13 2
14 2
 C6 = 0011001010101011111111000011 15 2
D6 = 1001100111100011110101010101 16 1
 C7 = 1100101010101111111100001100
D7 = 0110011110001111010101010110 04/25/2025 5
Information Systems Security– Queen Arwa University
Step 1: Create 16 sub keys, each of which is 48-bits
.long
 C8 = 0010101010111111110000110011 Iteration Number of
D8 = 1001111000111101010101011001 Number Left Shifts
 C9 = 0101010101111111100001100110
1 1
D9 = 0011110001111010101010110011 2 1
 C10 = 0101010111111110000110011001 3 2
D10 = 1111000111101010101011001100 4 2
 C11 = 0101011111111000011001100101 5 2
6 2
D11 = 1100011110101010101100110011
7 2
 C12 = 0101111111100001100110010101 8 2
D12 = 0001111010101010110011001111 9 1
 C13 = 0111111110000110011001010101 10 2
D13 = 0111101010101011001100111100 11 2
12 2
 C14 = 1111111000011001100101010101 13 2
D14 = 1110101010101100110011110001 14 2
 C15 = 1111100001100110010101010111 15 2
D15 = 1010101010110011001111000111 16 1
 C16 = 1111000011001100101010101111
D16 = 0101010101100110011110001111
Information Systems Security– Queen Arwa University 04/25/2025 6
Step 1: Create 16 sub keys, each of which is 48-bits
.long
 C1D1 = 1110000 1100110 0101010 1011111 1010101 0110011
0011110 0011110

 PC-2 only uses 48 of these.


 ‫ منهم‬48 ‫تستخدم فقط‬

 K1 = 000110 110000 001011 101111 111111 000111 000001


110010

Information Systems Security– Queen Arwa University 04/25/2025 7


Step 1: Create 16 sub keys, each of which is 48-bits
.long
 K1 = 000110 110000 001011 101111 111111 000111 000001 110010
K2 = 011110 011010 111011 011001 110110 111100 100111 100101
K3 = 010101 011111 110010 001010 010000 101100 111110 011001
K4 = 011100 101010 110111 010110 110110 110011 010100 011101
K5 = 011111 001110 110000 000111 111010 110101 001110 101000
K6 = 011000 111010 010100 111110 010100 000111 101100 101111
K7 = 111011 001000 010010 110111 111101 100001 100010 111100
K8 = 111101 111000 101000 111010 110000 010011 101111 111011
K9 = 111000 001101 101111 101011 111011 011110 011110 000001
K10 = 101100 011111 001101 000111 101110 100100 011001 001111
K11 = 001000 010101 111111 010011 110111 101101 001110 000110
K12 = 011101 010111 000111 110101 100101 000110 011111 101001
K13 = 100101 111100 010111 010001 111110 101011 101001 000001
K14 = 010111 110100 001110 110111 111100 101110 011100 111010
K15 = 101111 111001 000110 001101 001111 010011 111100 001010
Information Systems Security– Queen Arwa University 04/25/2025 8
K = 110010 110011 110110 001011 000011 100001 011111 110101
Step 1: Create 16 sub keys, each of which is 48-bits
.long

Information Systems Security– Queen Arwa University 04/25/2025 9


.Step 2: Encode each 64-bit block of data
 M = 0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 1010
1011 1100 1101 1110 1111

 IP = 1100 1100 0000 0000 1100 1100 1111 1111 1111 0000 1010
1010 1111 0000 1010 1010

Information Systems Security– Queen Arwa University 04/25/2025 10


.Step 2: Encode each 64-bit block of data

L0 R0

L1 R1

Information Systems Security– Queen Arwa University 04/25/2025 11


.Step 2: Encode each 64-bit block of data
 IP = 1100 1100 0000 0000 1100 1100 1111 1111
1111 0000 1010 1010 1111 0000 1010 1010

L = 1100 1100 0000 0000 1100 1100 1111 1111


0
R0 = 1111 0000 1010 1010 1111 0000 1010 1010

L = Rn-1
n
Rn = Ln-1 + f (Rn-1 , Kn)

Information Systems Security– Queen Arwa University 04/25/2025 12


.Step 2: Encode each 64-bit block of data

L0 R0

L1 R1

Information Systems Security– Queen Arwa University 04/25/2025 13


.Step 2: Encode each 64-bit block of data
 For n = 1
 K = 000110 110000 001011 101111 111111 000111
1
000001 110010

 L1 = R0 = 1111 0000 1010 1010 1111 0000 1010 1010

 R1 = L0 + f (R0 , K1)

Information Systems Security– Queen Arwa University 04/25/2025 14


.Step 2: Encode each 64-bit block of data
 a function f operates on two blocks ‫الدالة تعمل مع‬
• a data block of 32 bits and 32 ‫البيانات والمكونة من‬
‫بت‬
• a key Kn of 48 bits. ‫ بت‬48 ‫المفتاح والمكون من‬
 To calculate f , we first expand each block R n-1 from 32
bits to 48 bits. ‫ بت‬48 ‫ الى‬32 ‫نوسع البلوك من‬
 This is done by using a selection table that repeats some

of the bits in Rn-1 by using E ‫باستخدام جدول االختيار‬


 Thus E(Rn-1) has a 32 bit input block, and a 48 bit output
block. ‫ بت‬48 ‫ بت وتخرج‬32 ‫تاخذ‬
Information Systems Security– Queen Arwa University 04/25/2025 15
.Step 2: Encode each 64-bit block of data
 R0 = 1111 0000 1010 1010 1111 0000 1010 1010

 E(R0) = 011110 100001 010101 010101 011110 100001


010101 010101
Information Systems Security– Queen Arwa University 04/25/2025 16
.Step 2: Encode each 64-bit block of data
 f ( E(R0) , K1 )
 K1 = 000110 110000 001011 101111 111111 000111 000001 110010

 E(R0)= 011110 100001 010101 010101 011110 100001 010101 010101

 E(R0) + K1 = 011000 010001 011110 111010 100001 100110 010100


100111.
 =B1B2B3B4B5B6B7B8
 =S1(B1)S2(B2)S3(B3)S4(B4)S5(B5)S6(B6)S7(B7)S8(B8)

 Each of the functions S1, S2,..., S8, takes a 6-bit block as input and
yields a 4-bit block as output ‫ بت‬4 ‫ بت وتعطي‬6 ‫كل من هذه الدوال تأخذ‬
‫كمخرجات‬
Information Systems Security– Queen Arwa University 04/25/2025 17
.Step 2: Encode each 64-bit block of data

‫ البت االول واالخير يمثل‬


3 ‫ الى‬0 ‫رقم عشري من‬
i ‫وهذا يكون‬
‫ االربعة بت في الوسط‬
15 ‫ الى‬0 ‫يمثل رقم من‬
j ‫وهذا يكون‬

Information Systems Security– Queen Arwa University 04/25/2025 18


‫‪.Step 2: Encode each 64-bit block of data‬‬
‫انظر الجدول للرقم في الصف ‪i‬‬ ‫‪‬‬

‫والعمود ‪j‬‬
‫وهو رقم من ‪ 0‬الى ‪ 15‬ويمثل‬ ‫‪‬‬

‫بأربع بتات‬
‫هذا الرقم هو مخرج الدالة ‪S‬‬ ‫‪‬‬

‫للمدخل ‪B‬‬
‫‪‬‬ ‫= )‪S8(100111‬‬
‫‪‬‬ ‫‪i=11=3‬‬
‫‪ j=0011=3‬‬

‫بالصف الثالث والعمود الثالث‬ ‫‪‬‬

‫يوجد الرقم ‪ 7‬والذي يكون ‪0111‬‬

‫‪Information Systems Security– Queen Arwa University‬‬ ‫‪04/25/2025‬‬ ‫‪19‬‬


.Step 2: Encode each 64-bit block of data
 S1(B1)S2(B2)S3(B3)S4(B4)S5(B5)S6(B6)S7(B7)S8(B8) =
0101 1100 1000 0010 1011 0101 1001 0111

 f = P(S1(B1) S2(B2)...S8(B8))

 f = P (0101 1100 1000 0010 1011 0101 1001 0111)

 f = 0010 0011 0100 1010 1010 1001 1011 1011

Information Systems Security– Queen Arwa University 04/25/2025 20


.Step 2: Encode each 64-bit block of data
 R1 = L0 + f (R0 , K1 )

 = 1100 1100 0000 0000 1100 1100 1111 1111


 + 0010 0011 0100 1010 1010 1001 1011 1011

 = 1110 1111 0100 1010 0110 0101 0100 0100

Information Systems Security– Queen Arwa University 04/25/2025 21


.Step 2: Encode each 64-bit block of data

L0 R0

L1 R1

Information Systems Security– Queen Arwa University 04/25/2025 22


.Step 2: Encode each 64-bit block of data
 L16 = 0100 0011 0100 0010 0011 0010 0011 0100
R16 = 0000 1010 0100 1100 1101 1001 1001 0101

16 ‫بالنهاية وبعد الجولة ال‬ 

‫نحصل على‬
R16 ‫ و‬L16 

‫نعيد ترتيب مواقعهم الى‬ 

‫النص المشفر‬
IP-1 ‫النهائي باستخدام الجدول‬ 

Information Systems Security– Queen Arwa University 04/25/2025 23


.Step 2: Encode each 64-bit block of data

L0 R0

L1 R1

Information Systems Security– Queen Arwa University 04/25/2025 24


.Step 2: Encode each 64-bit block of data

Information Systems Security– Queen Arwa University 04/25/2025 25


The End

Information Systems Security– Queen Arwa University 04/25/2025 26

You might also like