0% found this document useful (0 votes)
27 views

FINALLY

The document describes encrypting a name using DES encryption. It provides the plain text, encryption process including binary conversion, key generation, and encryption rounds using feistel structure. The encryption of the first round is shown in detail.

Uploaded by

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

FINALLY

The document describes encrypting a name using DES encryption. It provides the plain text, encryption process including binary conversion, key generation, and encryption rounds using feistel structure. The encryption of the first round is shown in detail.

Uploaded by

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

WOLDIA UNIVERSITY

FACULTY OF TECHNOLOGY

DEPARTMENT OF COMPUTER SCIENCE

Computer Security Individual Assignment on Cryptography and Encryption


Techniques:

Encrypting my name (the first 64 bit only) using DES Encryption Techniques.

Name: ETSUBDINK DESALEGN


ID: 146018
Section: One

Submitted to: DANIEL TEFERA


May 8,2016
Woldia, Ethiopia
Plain Text (M) = WASIHUNE (the first 64 bit) Cipher

Text =?

Binary Version of plain text (M) = 01010111 01000001 01010011 01001001 01001000
01010101 01001110 01000101

L = 01010111 01000001 01010011 01001001

R = 01001000 01010101 01001110 01000101

K = PASSPHRA ( the first 64 bit of the key PASSPHRASE)

K(binary) = 0101000001000001010100110101001101010000010010000101001001000001

Step 1: Create 16 sub keys, each of which is 48-bits long.


The 64-bit key K is permuted according to PC-1(given in the Hand

out). Here we get the 56-bit permutation.

K+ = 00000000111111110000000001010100110000000000001000001101
Next, split this key into left and right halves, C0 and D0, where each half has 28 bits.

C0 = 0000000011111111000000000101
D0 = 0100110000000000001000001101

 With C0 and D0 defined, we now create sixteen blocks Cn and Dn, 1<=n<=16.

 Each pair of blocks Cn and Dn is formed from the previous pair Cn-1 and Dn-1,
respectively, for n = 1, 2, ..., 16, (using the given schedule in the hand out) of "left
shifts" of the previous block.

 C0 = 0000000011111111000000000101
D0 = 0100110000000000001000001101

 C1 = 0000000111111110000000001010
D1 = 1001100000000000010000011010

 C2 = 0000001111111100000000010100
D2 = 0011000000000000100000110101

 C3 = 0000111111110000000001010000
D3 =1100000000000010000011010100
 C4 = 0011111111000000000101000000
D4 = 0000000000001000001101010011

 C5 = 1111111100000000010100000000
D5 =0000000000100000110101001100

 C6 = 1111110000000001010000000011
D6 =0000000010000011010100110000

 C7 = 1111000000000101000000001111
D7 =0000001000001101010011000000

 C8 = 1100000000010100000000111111
D8 =0000100000110101001100000000

 C9 = 1000000000101000000001111111
D9 =0001000001101010011000000000

 C10 = 0000000010100000000111111110
D10 =0100000110101001100000000000

 C11 = 0000001010000000011111111000
D11 = 000001101010011000000000001

 C12 = 0000101000000001111111100000
D12 =0001101010011000000000000100

 C13 = 0010100000000111111110000000
D13 =0110101001100000000000010000

 C14 = 1010000000011111111000000000
D14 =1010100110000000000001000001

 C15 = 1000000001111111100000000010
D15 =1010011000000000000100000110

 C16 = 0000000011111111000000000101
D16 = 0100110000000000001000001101

We now form the keys Kn, for 1<=n<=16, by applying the following permutation table to
each of the concatenated pairs CnDn. Each pair has 56 bits, but PC-2( given in the hand out)
only uses 48 of these.
 C1 = 0000000111111110000000001010
D1 = 1001100000000000010000011010

C1D1 =0000000111111110000000001010 1001100000000000010000011010

which,
after we apply the permutation PC-2, becomes

K1 = 101000 001001 001001 001010 010001 000010 000001 100011

For the other keys we have

K2 = 101100 000001 001011 010010 011000 001100 000100 000001


K3 = 001101 000101 001001 010000 010000 100000 010000 001010
K4 = 000001 100101 000101 010100 110011 000001 000100 001000
K5 = 000011 100100 000101 010101 000000 000101 001001 101000

K6 = 000011 110100 000100 101001 010100 001001 100000 100000


K7 = 100010 110000 000110 101001 100000 000000 110000 111000
K8 = 100110 010000 101010 001001 000010 010011 101000 010000

K9 =001110 010000 100010 001010 100010 000000 001000 100001

K10 =001100 000010 100010 001100 100100 100100 101000 000100


K11 =000100 000010 110000 010100 000100 000000 001110 010000
K12 =010001 000010 110000 110100 100100 010010 000000 000001
K13 =110001 101010 010000 100100 011000 100010 001000 000000
K14 =110010 101000 011000 100010 001100 000010 000100 001110
K15 = 111010 001001 001000 101010 001001 000001 000010 000010
K16 = 101000 011001 001010 100010 000010 100010 000111 000000

So much for the sub keys.

Now we look at the message (WASIHUNE TADESSE (the first 64


bit)) itself.

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


There is an initial permutation IP of the 64 bits of the message data WASIHUNE (the first 64
bit).

This rearranges the bits according to the table given in the hand out, where the entries in the
table show the new arrangement of the bits from their initial order. The 58th bit of M
becomes the first bit of IP. The 50th bit of M becomes the second bit of IP. The 7th bit of M
is the last bit of IP. IP is given in the handout.

M = 01010111 01000001 01010011 01001001 01001000 01010101 01001110 01000101

IP = 11111111 00100101 11100001 10101111 00000000 00000000 01011000 01000101

Next divide the permuted block IP into a left half L0 of 32 bits, and a right half R0 of 32 bits.

L0 =11111111 00100101 11100001 10101111

R0 = 00000000 00000000 01011000 01000101

We now proceed through 16 iterations, for 1<=n<=16, using a function f which operates on
two blocks--a data block of 32 bits and a key Kn of 48 bits--to produce a block of 32 bits.
Let + denote XOR addition.

Then for n going from 1 to 16 we calculate Ln = Rn-1


Rn = Ln-1 + f (Rn-1,Kn) This results in a final block, for n = 16, of L16R16. That is, in each
iteration, we take the right 32 bits of the previous result and make them the left 32 bits of the
current step. For the right 32 bits in the current step, we XOR the left 32 bits of the previous
step with the calculation f .

To calculate f, we first expand each block Rn-1 from 32 bits to 48 bits. This is done by using a
E bit-selection table (given in the hand out) that repeats some of the bits in Rn-1. We'll call the
use of this selection table the function E. Thus E (Rn-1) has a 32 bit input block, and a 48 bit
output block.

Note that each block of 4 original bits has been expanded to a block of 6 output

bits. Next in the f calculation, we XOR the output E(Rn-1) with the key Kn:

 Kn + E(Rn-1).

For n = 1:
K1 = 101000 001001 001001 001010 010001 000010 000001 100011
L1 = R0 = 00000000 00000000 01011000 01000101
R1 = L0 + f (R0, K1) = ?

K1 = 101000 001001 001001 001010 010001 000010 000001 100011


E (R0) = 100000 000000 000000 000000 001011 110000 001000 001010

K1 + E (R0) = 001000 001001 001001 001010 011010 110010 001001

101001

Kn + E(Rn-1) =B1B2B3B4B5B6B7B8, where each Bi is a group of six bits. We

now calculate S1(B1)S2(B2)S3(B3)S4(B4)S5(B5)S6(B6)S7(B7)S8(B8)

where Si(Bi) refers to the output of the i th S box (given in the hand out).

The first and the last digit (in decimal) represent the row in the S table.

The middle four digit (in decimal) represents the column in the S table.

B1 = 001000, row = 00 = 0, column = 0100= 4, S1 (B1) = 2

B2 = 001001, row = 01 = 1, column = 0100= 4, S2 (B2) = 15

B3 = 001001, row = 01 = 1, column = 0100= 4, S3 (B3) = 3

B4 = 001010, row = 00 = 0, column = 0101= 5, S4 (B4) = 6

B5 = 011010, row = 00 = 0, column = 1101= 13, S5 (B5) = 0

B6 = 110010, row = 10 = 2, column = 1001= 9, S6 (B6) =0

B7 = 001001, row = 01 = 1, column = 0100= 4, S7 (B7) = 4

B8 = 101001, row = 11 = 3, column = 0100= 4, S8 (B8) =4

S1(B1)S2(B2)S3(B3)S4(B4)S5(B5)S6(B6)S7(B7)S8(B8) =2 15 3 6 0 m 4 4 (in Hexa Decimal) =

0010 1111 0011 0110 0000 0000 0100 0100 (in binary)

The final stage in the calculation of f is to do a permutation P table (given in the hand out) of
the
S-box output to obtain the final value of f :

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

f = 0100 0100 0101 1000 0101 0010 0011 0100

 R1 = L 0 + f
L0 = 11111111 00100101 11100001 10101111

f = 0100 0100 0101 1000 0111 0010 0011 0100

R1=1011 1011 0111 1101 1011 0011 1001 1011

FOR N=2

 In the next round, we will have L2 = R1, which is the block we just calculated, and
then we must calculate R2 =L1 + f(R1, K2), and so on for 16 rounds.

L2 = R1 = 1011 1011 0111 1101 1011 0011 1001 1011

K2 = 101100 000001 001011 010010 011000 001100 000100 000001

R2 =L1 + f (R1, K2) = ?

K2 = 101100 000001 001011 010010 011000 001100 000100 000001

E (R1) = 110111 110110 101111 111011 110110 100111 110011 110111

K2 + E (R1) = 011011 110111 100100 101001 101110 101011 110111


110110

B1 = 011011 , row = 01 = 1, column =1101 = 13, S1 (B1) = 5


B2 = 110111 , row = 11 = 3, column =1011 = 11, S2 (B2) = 12
B3 = 100100 , row = 10 = 2, column = 0010 = 2, S3 (B3) = 4
B4 = 101001 , row = 11 = 3, column = 0100 = 4, S4 (B4) = 10
B5 = 101110 , row = 10 = 2, column = 0111 = 7, S5 (B5) = 8
B6 = 101011 , row = 11 = 3, column = 0101 = 5, S6 (B6) = 5
B7 = 110111, row = 11 = 3 column = 1011= 11, S7 (B7) = 15
B8 = 110110, row = 10= 2, column = 1011= 11, S8 (B8) = 13

S1(B1)S2(B2)S3(B3)S4(B4)S5(B5)S6(B6)S7(B7)S8(B8) = 5 12 4 10 8 5 15 13 (in Hexa Decimal)

= 0101 1100 0100 1010 1000 0101 1111 1101 (in Binary).

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

f =000010 110101 100110 101100 01111011

 R2 = L 1 + f
L1 = 00000000 00000000 01011000 01000101

f = 000010 110101 100110 101100 01111011

R2= 000010 110101 100111 110100 0011 1110

For n= 3:

L3= R2 = 000010 110101 100111 110100 0011 1110

K3= 001101 000101 001001 010000 010000 100000 010000 001010

R3=L2+ f (R2, K3)= ?

K3= 001101 000101 001001 010000 010000 100000 010000 001010

E (R2) = 000001 010110 101011 110011 111110 101000 000111 111100

K3+ E (R2)= 001100 010011 100010 100011 101110 001000 010111 111110

B1 = 001100 , row = 00 = 0, column = 0110 = 6 , S1 (B1) = 11

B2 = 010011 , row = 01= 1, column = 1001 = 9 , S2 (B2) = 0

B3 = 100010 , row = 10= 2, column = 0001 = 1 , S3 (B3) = 6

B4 = 100011 , row = 11 = 3, column = 0001 = 1 , S4 (B4) = 15

B5 = 101110 , row = 10= 2, column = 0111 = 7, S5 (B5) = 8

B6 = 001000 , row = 00 = 0, column = 0100 = 4 , S6 (B6) = 9

B7 = 010111 , row = 01 = 1, column = 1011 = 11 , S7 (B7) = 12

B8 = 111110, row = 10= 2, column = 1111= 15 , S8 (B8) =8

S1(B1)S2(B2)S3(B3)S4(B4)S5(B5)S6(B6)S7(B7)S8(B8)= 11 0 6 15 8 9 12 (in Hexa Decimal)

= 1011 0000 0110 1111 1000 1001 1100 (in Binary).

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

f= 100110 011101 000100 110010 0100 0111

R3= L2+ f

L2 = 1011 1011 0111 1101 1011 0011 1001 1011


f= 100110 011101 000100 110010 0100 0111

R3 = 001000 101010 110010 000001 1101 1100

For n= 4:

L4= R3 = 001000 101010 110010 000001 1101 1100

K4= 000001 100101 000101 010100 110011 000001 000100 001000

R4=L3+ f(R3, K4)= ?

K4= 000001 100101 000101 010100 110011 000001 000100 001000


E (R3) = 000100 000101 010101 011001 010000 000011 111011 111000

K4 + E (R3)= 000101 100000 010000 001101 100011 000010 111111 110000

B1 = 000101 , row = 01 = 1, column = 0010 = 2, S1 (B1) = 15

B2 = 100000 , row = 10 = 2, column = 0000 = 0, S2 (B2) = 0

B3 = 010000 , row = 00 = 0, column = 1000 = 8, S3 (B3) = 10

B4 = 001101 , row = 01 = 1, column = 0110 = 6, S4 (B4) = 0

B5 = 100011 , row = 11 = 3, column = 0001 = 1, S5 (B5) = 8

B6 = 000010 , row = 00 = 0, column = 0001 =1, S6 (B6) = 1

B7 = 111111 , row = 11 = 3, column = 1111 = 15, S7 (B7) = 12

B8 = 110000, row = 10 = 2, column = 1000= 8, S8 (B8) = 0

S1(B1)S2(B2)S3(B3)S4(B4)S5(B5)S6(B6)S7(B7)S8(B8)= 15 0 1 0 8 1 12 0 (in Hexa Decimal)

= 1111 0000 1010 1000 0001 1100 0000(in Binary).

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

f= 000001 011001 000010 100010 00000011

 R4= L3+ f

L3=000010 110101 100111 110100 0011 1110

f=000001 011001 000010 100010 00000011

R4=000011 101100 100101 010110 00111101


For n= 5:

L5= R4=000011 101100 100101 010110 00111101

K5= 000011 100100 000101 010101 000000 000101 001001 101000


R5=L4+ f(R4, K5)= ?

K5= 000011 100100 000101 010101 000000 000101 001001 101000

E (R4) = 100001 011101 011001 010010 101010 101100 000111 111010

K5 + E (R4)= 100010 111001 011100 000111 101010 101001 001110 010010

B1 = 100010 , row = 10 = 2, column = 0001 = 1, S1 (B1) = 1

B2 = 111001 , row = 11 = 3, column = 1100 = 12, S2 (B2) = 0

B3 = 011100 , row = 00 = 0, column = 1110 = 14 , S3 (B3) = 2

B4 = 000111 , row = 01 = 1, column = 0011 = 3, S4 (B4) = 5

B5 = 101010 , row = 10= 2, column = 0101 = 5, S5 (B5) = 13

B6 = 101001, row = 11 = 3, column = 0100 = 4, S6 (B6) = 9

B7 = 001110, row = 00 = 0, column = 0111 =7, S7 (B7) = 13

B8 = 010010, row = 00= 0, column = 1001 = 9, S8 (B8) = 9

S1(B1)S2(B2)S3(B3)S4(B4)S5(B5)S6(B6)S7(B7)S8(B8)= 1 0 2 5 13 9 13 9 (in Hexa Decimal) =

0001 0000 0010 1101 1001 1101 1001 (in Binary).

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

f=101110 110001 010000 011000 00000111

 R5= L4+ f

L4=001000 101010 110010 000001 1101 1100

f=101110 110001 010000 011000 00000111

R5=100110 011011 100010 011001 11011011

For n= 6:

L6= R5 = 100110 011011 100010 011001 11011011


K6=000011 110100 000100 101001 010100 001001 100000 100000

R6=L5+ f(R5, K6)= ?

K6=000011 110100 000100 101001 010100 001001 100000 100000

E (R5) = 110011 110011 110111 110001 010011 110011 111011 110111

K6+ E (R5)= 110000 000111 110011 011000 000111 111010 011011 010111

B1 = 110000 , row = 10 = 2, column = 1000 = 8, S1 (B1) = 15

B2 = 000111 , row = 01 = 1, column = 0011 = 3, S2 (B2) = 7

B3 = 110011 , row = 11= 3, column = 1001 = 9, S3 (B3) = 15

B4 = 011000 , row = 00= 0, column = 1100 = 12, S4 (B4) = 11

B5 = 000111 00, row = 01= 1, column = 0011 = 3, S5 (B5) =12

B6 = 111010 , row = 10 = 2, column = 1101 = 13, S6 (B6) = 13

B7 = 011011 , row = 01 = 1, column = 1101 = 13, S7 (B7) = 15

B8 = 010111, row = 01= 1, column = 1011= 11, S8 (B8) = 11

S1(B1)S2(B2)S3(B3)S4(B4)S5(B5)S6(B6)S7(B7)S8(B8)= 15 7 15 11 12 13 15 11 (in Hexa Decimal)


= 1111 0111 1111 1011 1100 1101 1111 1101 (in Binary).

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

f=110111 111101 011111 101111 01011111

R6= L5+ f

L5=000011 101100 100101 010110 00111101

f= 110111 111101 011111 101111 01011111

R6=110100 010001 111010 111001 01100010

For n= 7:

L7= R6 = 110100 010001 111010 111001 01100010

K7= 100010 110000 000110 101001 100000 000000 110000 111000


R7=L6+ f(R6, K7)= ?

K7= 100010 110000 000110 101001 100000 000000 110000 111000


E (R6) =011010 100010 100010 111101 010111 110010 101100 000101

K7 + E (R6)= 111000 010010 100101 010100 110111 110010 011100 111101

B1 = 111000 , row = 10 = 2, column = 1100 = 12, S1 (B1) = 3

B2 = 010010 , row = 00= 0, column = 1001 = 9, S2 (B2) = 7

B3 = 100101 , row = 11= 3, column = 0010 = 2, S3 (B3) = 13

B4 = 010100 , row = 00 = 0, column = 1010 = 10, S4 (B4) =8

B5 = 110111 , row = 11 = 3, column = 1011 = 11, S5 (B5) = 9

B6 = 110010, row = 10 = 2, column = 1001 = 9, S6 (B6) = 0

B7 = 011100 , row = 00= 0, column = 1110 = 14, S7 (B7) = 6

B8 = 111101, row = 11 = 3, column = 1110= 14, S8 (B8) = 6

S1(B1)S2(B2)S3(B3)S4(B4)S5(B5)S6(B6)S7(B7)S8(B8)= 3 7 13 8 9 0 6 6 (in Hexa Decimal)

= 0011 0111 1101 1000 1001 0000 0110 0110 (in Binary).

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

f=011001 010001 001101 000111 0111 0010

R7= L6+ f

L6=100110 011011 100010 011001 11011011

f=011001 010001 001101 000111 0111 0010

R7=111111 001010 101111 011110 10101001

For n= 8:

L8= R7 = 111111 001010 101111 011110 10101001

K8= 100110 010000 101010 001001 000010 010011 101000 010000


R8=L7+ f(R7, K8)= ?

K8=100110 010000 101010 001001 000010 010011 101000 010000


E (R7) =111111 111001 010101 010111 111011 111101 010101 010011
K8 + E (R7)=011001 101001 110111 011110 111001 101110 111101 000011
B1 = 011001 , row = 01= 1, column = 1100 = 12, S1 (B1) = 9

B2 = 101001 , row = 11 = 3, column = 0100 = 4, S2 (B2) = 3

B3 = 110111 , row = 11= 3, column = 1011 = 11, S3 (B3) = 3

B4 = 011110 , row = 00= 0, column = 1111 = 15, S4 (B4) = 15

B5 = 111001 , row = 11= 3, column = 1100 = 12, S5 (B5) = 10

B6 = 101110 , row = 10 = 2, column =0111 = 7, S6 (B6) = 3

B7 = 111101 , row = 11= 3, column = 1110 = 14, S7 (B7) = 3

B8 = 000011, row = 01= 1, column = 0001= 1, S8 (B8) = 15

S1(B1)S2(B2)S3(B3)S4(B4)S5(B5)S6(B6)S7(B7)S8(B8)= 9 3 3 15 10 3 3 15 (in Hexa Decimal)

= 1001 0011 0011 1111 1010 0011 0011 1111 (in Binary).

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

f=110010 111110 001001 111101 11100110

 R8= L7+ f

L7= 110100 010001 111010 111001 01100010

f=110010 111110 001001 111101 11100110

R8= 000111 101111 110011 000101 10000100

For n= 9:

L9= R8 = 000111 101111 110011 000101 10000100

K9= 001110 010000 100010 001010 100010 000000 001000 100001

R9=L8+ f(R8, K9)= ?

K9= 001110 010000 100010 001010 100010 000000 001000 100001

E (R8) = 000011 111101 011111 111001 011000 001011 110000 001000

K9 + E (R8)= 001101 101101 111101 110011 111010 001011 111000 101001

B1 = 001101 , row = 01= 1, column = 0110 = 6, S1 (B1) = 13

B2 = 101101 , row = 11 = 3, column = 0110 = 6, S2 (B2) = 4


B3 = 111101 , row = 11= 3, column = 1110 = 14, S3 (B3) = 2

B4 = 110011 ,row = 11= 3, column = 1001 = 9, S4 (B4) = 4

B5 = 111010 , row = 10= 2, column = 1101 = 13, S5 (B5) = 3

B6 = 001011 , row = 01= 1, column = 0101 = 5, S6 (B6) = 12

B7 = 111000 , row = 10= 2, column = 1100 = 12, S7 (B7) = 0

B8 = 101001, row = 11= 3, column = 0100= 4, S8 (B8) = 4

S1(B1)S2(B2)S3(B3)S4(B4)S5(B5)S6(B6)S7(B7)S8(B8)= 13 4 2 4 3 12 0 4 (in Hexa Decimal)

= 1101 0100 0010 0011 1100 0000 01000(in Binary).

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

f= 001100 001000 000010 010000 10111110

R9= L8+ f

L8=111111 001010 101111 011110 10101001

f= 001100 001000 000010 010000 10111110

R9=110011 000010 101101 001110 00010111

For n= 10:

L10= R9 = 110011 000010 101101 001110 00010111

K10= 001100 000010 100010 001100 100100 100100 101000 000100

R10=L9+ f(R9, K10)= ?

K10=001100 000010 100010 001100 100100 100100 101000 000100

E (R9) =111001 011000 000101 010110 101001 011101 000010 101111

K10 + E (R9)=110101 011010 100111 011010 001101 111000 101010 101011

B1 = 110101 , row = 11= 3, column = 1010 = 10, S1 (B1) = 3

B2 = 011010 , row = 00 = 0, column = 1101 = 13, S2 (B2) = 0


B3 = 100111 , row = 11= 3, column = 0011 = 3, S3 (B3) = 0

B4 = 011010 , row = 00= 0, column = 1101 = 13, S4 (B4) = 12

B5 = 001101 , row = 01 = 1, column = 0110 = 6, S5 (B5) = 13

B6 = 111000 , row = 10 = 2, column = 1100 = 12, S6 (B6) =1

B7 = 101010, row = 10= 2, column = 0101 = 5, S7 (B7) = 3

B8 = 101011,row = 11 = 3, column = 0101 = 5, S8 (B8) = 10

S1(B1)S2(B2)S3(B3)S4(B4)S5(B5)S6(B6)S7(B7)S8(B8)= 3 0 0 12 13 1 3 10 (in Hexa Decimal) =

0011 0000 0000 1100 1101 0001 0011 1010 (in Binary).

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

f= 001010 110000 011000 110110 01000010

R10= L9+ f

L9=000111 101111 110011 000101 10000100

f= 001010 110000 011000 110110 01000010

R10= 001101 011111 101011 110011 11000110

For n= 11:

L11= R10=001101 011111 101011 110011 11000110

K11= 000100 000010 110000 010100 000100 000000 001110 010000


R11=L10+ f(R10, K11)= ?

K11=000100 000010 110000 010100 000100 000000 001110 010000


E (R10) = 000110 101011 111111 110101 011110 100111 111000 001100

K11 + E (R10)= 000010 101001 001111 100001 011010 100111 110110 011100

B1 = 000010 , row = 00 = 0, column = 0001 = 1, S1 (B1) = 4

B2 = 101001 , row = 11= 3, column = 0100 = 4, S2 (B2) = 3

B3 = 001111 , row = 01 = 1, column = 0111 = 7, S3 (B3) = 10


B4 = 100001 , row = 11 = 3, column = 0000 = 0, S4 (B4) = 3

B5 = 011010 , row = 00 = 0, column = 1101 = 13, S5 (B5) = 0

B6 = 100111 , row = 11 = 3, column = 0011 = 3, S6 (B6) = 12

B7 = 110110 , row = 10 = 2, column = 1011 = 11, S7 (B7) = 8

B8 = 011100, row = 00 = 0, column = 1110= 14, S8 (B8) = 12

S1(B1)S2(B2)S3(B3)S4(B4)S5(B5)S6(B6)S7(B7)S8(B8)= 4 3 10 3 0 12 8 12 (in Hexa Decimal) =

0100 0011 1010 0011 0000 1100 1000 1100 (in Binary).

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

f=110110 000100 000011 000001 00101101

 R11= L10+ f

L10=1001 0110 0101 0101 0101 1000 1000 1010

f=110110 000100 000011 000001 00101101

R11= 000101 000110 101110 001111 00111010

For n= 12:

L12= R11=000101 000110 101110 001111 00111010

K12= 010001 000010 110000 110100 100100 010010 000000 000001

R12=L11+ f(R11, K12)= ?

K12=010001 000010 110000 110100 100100 010010 000000 000001

E (R11) = 000010 101000 001101 010111 110001 011110 100111 110100

K12+ E (R11)= 010011 101010 111101 100011 010101 001100 100111 110101

B1 = 010011 , row = 01 = 1, column = 1001 = 9, S1 (B1) = 11

B2 = 101010 , row = 10= 2, column = 0101 = 5, S2 (B2) = 4

B3 = 111101 , row = 11= 3, column = 1110 = 14, S3 (B3) = 2


B4 = 100011 , row = 11 = 3, column =0001 = 1, S4 (B4) =8

B5 = 010101 , row = 01= 1, column = 1010 = 10, S5 (B5) = 15

B6 = 001100 , row = 00= 0, column = 0110 = 6, S6 (B6) = 6

B7 = 100111 , row = 11= 3, column = 0011 = 3, S7 (B7) = 8

B8 = 110101, row = 11 = 3, column = 1010= 10 , S8 (B8) = 9

S1(B1)S2(B2)S3(B3)S4(B4)S5(B5)S6(B6)S7(B7)S8(B8)= 11 4 2 8 15 6 8 9 (in Hexa Decimal)

= 1011 0100 0010 1000 1111 0110 1000 1001 (in Binary).

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

f= 001010 011010 010000 001010 11011111

R12= L11+ f

L11= 001101 011111 101011 110011 11000110

f=001010 011010 010000 001010 11011111

R12= 000111 000101 111011 111001 00011001

For n= 13:

L13= R12 = 000111 000101 111011 111001 00011001

K13= 110001 101010 010000 100100 011000 100010 001000 000000


R13=L12+ f(R12, K13)= ?

K13= 110001 101010 010000 100100 011000 100010 001000 000000

E (R12) = 100011 111000 001011 111101 011111 110010 100011 110010

K13 + E (R12)= 010010 010010 011011 011001 100111 010000 101011 110010

B1 = 010010 , row = 00= 0, column = 1001 = 9, S1 (B1) = 10

B2 = 010010 , row = 00 = 0, column =1001 = 9, S2 (B2) = 7


B3 = 011011 , row = 01= 1, column = 1101 = 13, S3 (B3) = 11

B4 = 011001 ,row = 01 = 1, column = 1100 = 12, S4 (B4) = 1

B5 = 100111, row = 11 = 3, column = 0011 = 3, S5 (B5) = 7

B6 = 010000 , row = 00 =0, column =1000 = 8, S6 (B6) = 0

B7 = 101011 , row = 11= 3, column = 0101 = 5, S7 (B7) = 8

B8 = 110010 , row = 10 = 2, column =1001= 9, S8 (B8) = 9

S1(B1)S2(B2)S3(B3)S4(B4)S5(B5)S6(B6)S7(B7)S8(B8)=10 7 11 1 7 0 8 9 (in Hexa Decimal)

= 1010 0111 1011 0001 0111 0000 1000 1001 (in Binary).

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

f=111011 001000 010001 001011 10010101

R13= L12+ f

L12= 000101 000110 101110 001111 00111010

f= 111011 001000 010001 001011 10010101

R13= 111110 001110 111111 000100 10101111

For n= 14:

L14= R13=111110 001110 111111 000100 10101111

K14= 110010 101000 011000 100010 001100 000010 000100 001110


R14=L13+ f(R13, K14)=?

K14= 110010 101000 011000 100010 001100 000010 000100 001110


E (R13) = 111111 110001 011101 011111 111000 001001 010101 011111

K14 + E (R13)=001101 011001 000101 111101 110100 001011 010001 010001

B1 = 001101 , row = 01 = 1, column = 0110 = 6, S1 (B1) = 6

B2 = 011001 , row = 01 = 1, column = 1100 = 12, S2 (B2) = 11

B3 = 000101 , row = 01 = 1, column = 0010 = 2, S3 (B3) = 0

B4 = 111101 , row = 11= 3, column = 1110 = 14, S4 (B4) = 2


B5 = 110100 , row = 10 = 2, column = 1010 = 10, S5 (B5) = 12

B6 = 001011 , row = 01= 1, column = 0101 = 5, S6 (B6) = 12

B7 = 010001 , row = 01= 1, column = 1000 = 8, S7 (B7) = 14

B8 = 010001 , row = 01 =1, column = 1000 = 8, S8 (B8) = 12

S1(B1)S2(B2)S3(B3)S4(B4)S5(B5)S6(B6)S7(B7)S8(B8)= 6 11 0 2 12 12 14 12 (in Hexa Decimal) =

0110 1011 0000 0010 1100 1110 1100 (in Binary).

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

f=010110 011101 010010 000100 00111011

R14= L13+ f

L13= 000111 000101 111011 111001 00011001

f= 010110 011101 010010 000100 00111011

R14= 010001 011000 101001 111101 00100010

For n= 15:

L15= R14=010001 011000 101001 111101 00100010

K15= 111010 001001 001000 101010 001001 000001 000010 000010

R15=L14+ f(R14, K15)=?

K15= 111010 001001 001000 101010 001001 000001 000010 000010

E (R14) = 001000 001011 110001 010100 001111 111010 100100 000100

K15 + E (R14)= 110010 000010 111001 111110 000110 111011 100110 000110

B1 = 110010 , row = 10 = 2, column = 1001 = 9, S1 (B1) = 12

B2 = 000010 , row = 00= 0, column = 0001 = 1, S2 (B2) = 1

B3 = 111001 , row = 11 = 3, column = 1100 = 12, S3 (B3) = 11

B4 = 111110 , row = 10 = 2, column = 1111 = 15, S4 (B4) = 4

B5 = 000110 , row = 00= 0, column = 0011 = 3, S5 (B5) = 1


B6 = 111011 , row = 11 = 3, column = 1101 = 13, S6 (B6) = 0

B7 = 100110 , row = 10= 2, column = 0011 = 3, S7 (B7) = 13

B8 = 000110, row = 00= 0, column = 0011= 3, S8 (B8) = 4

S1(B1)S2(B2)S3(B3)S4(B4)S5(B5)S6(B6)S7(B7)S8(B8)= 12 1 11 4 1 0 13 4 (in Hexa Decimal)

= 1100 0001 1011 0100 0001 0000 1101 0100 (in Binary).

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

f=001011 101001 000011 010001 00100101

R15= L14+ f

L14= 111110 001110 111111 000100 10101111

f=001011 101001 000011 010001 00100101

R15=110101 100111 111100 010101 10001010

For n= 16:

L16= R15=110101 100111 111100 010101 10001010

K16= 101000 011001 001010 100010 000010 100010 000111 000000

R16=L15+ f(R15, K16)=?

K16= 101000 011001 001010 100010 000010 100010 000111 000000

E (R15) = 011010 101100 001111 111110 100010 101011 110001 010101

K16 + E (R15)= 110010 110101 000101 011100 100000 001001 110110 010101

B1 = 110010 , row = 10 = 2, column = 1001 = 9, S1 (B1) = 12

B2 = 110101 , row = 11= 3, column = 1010 = 10, S2 (B2) = 7

B3 = 000101 , row = 01= 1, column = 0010 = 2, S3 (B3) = 0

B4 = 011100 , row = 00= 0, column = 1110 = 14, S4 (B4) =4

B5 = 100000 , row = 10 = 2, column =0000 = 0, S5 (B5) = 4

B6 = 001001 , row = 01 = 1, column =0100 = 4, S6 (B6) = 7


B7 = 110110 , row = 10= 2, column =1011 = 11, S7 (B7) = 8

B8 = 010101, row = 01 = 1, column = 1010= 10, S8 (B8) = 6

S1(B1)S2(B2)S3(B3)S4(B4)S5(B5)S6(B6)S7(B7)S8(B8)=12 7 0 4 4 7 8 6 (in Hexa Decimal)

= 1100 0111 0000 0100 0100 0111 1000 0110 (in Binary).

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

f= 000000 110100 010000 101011 00001100

R16= L15+ f

L15= 010001 011000 101001 111101 00100010

f=000000 110100 010000 101011 00001100

R16= 010001 101100 111001 010110 00101110

We then reverse the order of the two blocks into the 64-bit block R16L16and apply a final

permutation IP-1 (given in the hand out):

R16 L16 = 010001 101100 111001 010110 00101110 110101 100111 111100 010101 10001010

IP-1 = 0010 1000 1111 0111 1111 1101 0011 0011 1010 1100 0010 0001 1111 0100 1001 0010

BOOM!! BOOM!! BOOM!! BOOM!! BOOM!! BOOM!! BOOM!! BOOM!!

Whichis in hexadecimal format is00E2FB7D5E75043F

C= 00E2FB7D5E75043F

This is the encrypted form of M=DANIEL TE (The first 64 bit of my full name: WAS5H4NE TADESSE ).

You might also like