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

Exercises: Data Encryption Stand

The document outlines the process of data encryption using a specific algorithm, detailing steps such as initial permutation, division into two parts, expansion, XOR with the key, substitution using S-boxes, and permutation. It includes binary representations for the message and key, as well as the transformations applied during the encryption process. The document serves as a guide for understanding the mechanics of data encryption.

Uploaded by

qadry4688
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)
6 views11 pages

Exercises: Data Encryption Stand

The document outlines the process of data encryption using a specific algorithm, detailing steps such as initial permutation, division into two parts, expansion, XOR with the key, substitution using S-boxes, and permutation. It includes binary representations for the message and key, as well as the transformations applied during the encryption process. The document serves as a guide for understanding the mechanics of data encryption.

Uploaded by

qadry4688
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/ 11

Data Encryption Stand

Exercises
Data Encryption Stand

M:
1100100000111111101010011010111
0101011101101101110100111111001
00
K:
1000100111100101001111011010001
00111011101101110
1 2 3 4 5 6 7 8
1 1 0 0 1 0 0 0

9 1 1 1 1 1 1 1
0 1 2 3 4 5 6
0 0 1 1 1 1 1 1

1 1 1 2 2 2 2 2
7 8 9 0 1 2 3 4
1 0 1 0 1 0 0 1

2 2 2 2 2 3 3 3
5 6 7 8 9 0 1 2
1 0 1 0 1 1 1 0
3 3 3 3 3 3 3 4
3 4 5 6 7 8 9 0
1 0 1 0 1 1 1 0

4 4 4 4 4 4 4 4
1 2 3 4 5 6 7 8
1 1 0 1 1 0 1 1

4 5 5 5 5 5 5 5
9 0 1 2 3 4 5 6
1 0 1 0 0 1 1 1

5 5 5 6 6 6 6 6
7 8 9 0 1 2 3 4
1 1 1 0 0 1 0 0

1. Initial Permutation (IP)

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

2.Division into Two Parts:

10100001
00100010
11011010
Right
01100110

11111101
11011110
Left
00111111
01111010

3.Expansion:

1 2 3 4 5 6 7 8
1 0 1 0 0 0 0 1

9 1 1 1 1 1 1 1
0 1 2 3 4 5 6
0 0 1 0 0 0 1 0

1 1 1 2 2 2 2 2
7 8 9 0 1 2 3 4
1 1 0 1 1 0 1 0

2 2 2 2 2 3 3 3
5 6 7 8 9 0 1 2
0 1 1 0 0 1 1 0

3
0

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

4.XOR With the key


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

XOR

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

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

5.SUBSTITION (S-BOX)
S1 :110110 0111
S2: 011100 0101
S3: 110000 1011
S4: 111000 0101
S5: 110011 1111
S6: 010011 0001
S7: 010001 1110
S8: 100011 0001
6.Permutation
1 2 3 4 5 6 7 8
0 1 1 1 0 1 0 1

9 1 1 1 1 1 1 1
0 1 2 3 4 5 6
1 0 1 1 0 1 0 1

1 1 1 2 2 2 2 2
7 8 9 0 1 2 3 4
1 1 1 1 0 0 0 1
2 2 2 2 2 3 3 3
5 6 7 8 9 0 1 2
1 1 1 0 0 0 0 1

1 0 1 0 0 1 0 1
1 0 0 1 0 1 0 0
0 1 1 1 1 1 1 1
1 0 0 1 0 1 1 1
7.XOR the right with the left
1 0 1 0 0 1 0 1
1 0 0 1 0 1 0 0
0 1 1 1 1 1 1 1
1 0 0 1 0 1 1 1

XOR

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

0 1 0 1 0 0 0 1
0 1 0 0 1 0 1 0
0 1 0 0 1 0 0 0
1 1 1 0 1 1 0 1
The key is
1 1 0 0 1 0 0 0
0 0 1 1 1 1 1 1
1 0 1 0 1 0 0 1
0 0 1 0 0 1 1 0
1 0 1 0 1 1 1 0
1 1 0 1 1 0 1 1
1 0 1 0 0 1 1 1
1 1 1 0 0 1 0 0

1-Key Generation

1 1 1 1 0 1 0 1
1 0 1 0 0 0 0 1
1 1 0 1 1 1 1 0
0 0 1 0 0 1 1 1
1 0 1 0 1 1 0 1
1 0 1 0 0 0 1 1
0 1 1 1 0 0 1 0
2.Division into Two Parts:

1111010
1101000
Right
0111011
1100010

0111101
0110110
Left 1000110
1110010

2. Shift

Round-1

Left : 1 1 1 0 1 01 1 0 1 0 0 0 0 1 1 1 0 1 11 1 0
0 0 1 01
Right: 1 1 1 1 0 1 0 1 1 0 1 1 0 1 0 0 0 1 1 0 1
1 1 0 0 1 00
3.Permuted choice2

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

You might also like