You are on page 1of 9

‫الجامعة المستنصرية ‪/‬كلية التربية ‪ /‬قسم‬

‫علوم الحاسبات‬
‫‪4th Class‬‬
‫‪Computers & Data Security‬‬
‫أمنية الحاسوب والبيانات‬

‫أستاذ المادة‬
‫أ ‪ .‬م ‪ .‬د ‪ .‬اخالص عباس البحراني‬
The solution of the homework about the Initial
Permutation
IP(675a6967 5e5a6b5a) = (ffb2194d 004df6fb)
6 7 5 a 6 9 6 7 5 e 5 a 6 b 5 a
0110 0111 0101 1010 0110 1001 0110 0111 0101 1110 0101 1010 0110 1011 0101 1010

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32

0 1 1 0 0 1 1 1 0 1 0 1 1 0 1 0 0 1 1 0 1 0 0 1 0 1 1 0 0 1 1 1

33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64

0 1 0 1 1 1 1 0 0 1 0 1 1 0 1 0 0 1 1 0 1 0 1 1 0 1 0 1 1 0 1 0

‫ اخالص عباس البحراني‬.‫د‬.‫م‬.‫ا‬ 2


1 1 1 1 1 1 1 1 1 0 1 1 0 0 1 0

0 0 0 1 1 0 0 1 0 1 0 0 1 1 0 1

0 0 0 0 0 0 0 0 0 1 0 0 1 1 0 1

1 1 1 1 0 1 1 0 1 1 1 1 1 0 1 1

1111 1111 1011 0010 0001 1001 0100 1101 0000 0000 0100 1101 1111 0110 1111 1011
f f b 2 1 9 4 d 0 0 4 d f 6 f b
So the result after IP is ffb2194d 004df6fb
‫ اخالص عباس البحراني‬.‫د‬.‫م‬.‫ا‬ 3
The solution of the homework about The Key
Transformation
keyinit(5b5a5767, 6a56676e)

5 b 5 a 5 7 6 7 6 a 5 6 6 7 6 e
0101 1011 0101 1010 0101 0111 0110 0111 0110 1010 0101 0110 0110 0111 0110 1110
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32

0 1 0 1 1 0 1 1 0 1 0 1 1 0 1 0 0 1 0 1 0 1 1 1 0 1 1 0 0 1 1 1

33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64

0 1 1 0 1 0 1 0 0 1 0 1 0 1 1 0 0 1 1 0 0 1 1 1 0 1 1 0 1 1 1 0

‫ اخالص عباس البحراني‬.‫د‬.‫م‬.‫ا‬ 4


Step 1: the 64-bit DES key is reduced to a 56-bit key using the table

0 0 0 0 0 0 0 0 1 1 1 1 1 1

1 1 1 1 0 1 1 0 0 0 0 0 1 0

1 1 1 1 1 1 1 1 1 1 1 0 1 1

0 0 1 0 0 1 0 0 1 1 0 1 1 1

The result =0000 0000 1111 1111 1101 1000 0010 1111 1111 1110 1100 1001 0011 0111

‫ اخالص عباس البحراني‬.‫د‬.‫م‬.‫ا‬ 5


Step 2: Next the 56-bits key is reduced to a 48-bits subkey in the following manner:-
A- splits the 56-bits key bits into 2 halves (C and D), each 28-bits
The result =00000000111111 11110110000010 11111111111011 00100100110111

C D
0000 0000 1111 1111 1101 1000 0010 1111 1111 1110 1100 1001 0011 0111

We are in the first round so The halves C and D are circularly shifted left one bits based on the table

C D
0000 0001 1111 1111 1011 0000 0100 1111 1111 1101 1001 0010 0110 1111

‫ اخالص عباس البحراني‬.‫د‬.‫م‬.‫ا‬ 6


Step 3:- After being shifted, 48 out of the 56 bits are selected suing the following table:

0000 0001 1111 1111 1011 0000 0100 1111 1111 1101 1001 0010 0110 1111
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 0 1 1 0 0 0 0 0 1 0 0

29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
1 1 1 1 1 1 1 1 1 1 0 1 1 0 0 1 0 0 1 0 0 1 1 0 1 1 1 1

1 1 1 0 0 0 0 0 1 0 0 1
0 1 1 0 1 1 1 0 0 1 1 0
1 0 1 1 1 1 1 1 1 0 1 0
1 0 0 1 1 1 0 0 1 1 1 1

111000 001001 011011 100110 101111 111010 100111 001111


38 09 1b 26 2f 3a 27 0f
‫ اخالص عباس البحراني‬.‫د‬.‫م‬.‫ا‬ 7
The solution of the homework about The S-BOX

‫ اخالص عباس البحراني‬.‫د‬.‫م‬.‫ا‬ 8


Example : s (18 09 12 3d 11 17 38 39 )
18 =00011000 =011000 = row (00) = 0 , column (1100 ) =12, in s-box 1 =5

09=00001001 =001001= row (01) =1 , column(0100) = 4 , in s-box 2= 15=f

12=00010010=010010 = row (00) =0, column (1001) =9 in sbox3 = 13=D

3d=00111101=111101 = row (11) =3 , column (1110) = 14 in sbox 4=2

11=00010001=010001 = row (01) =1 , column ( 1000) = 8 in sbox 5 =5

17=00010111=010111 = row (01) =1, column( 1011)= 11 in sbox 6=14=e

38=00111000=111000 = row (10) =2 , column (1100) = 12 in sbox 7=0

39=00111001=111001 = row (11) =3, column (1100) = 12 in sbox 8=3

= 5fd25e03

‫ اخالص عباس البحراني‬.‫د‬.‫م‬.‫ا‬ 9

You might also like