You are on page 1of 3

LAB 2 REPORT

Course name: Web Security


Course code: CRY302

Student name Student ID


Nguyễn Bảo An SE130109
DES cipher
Key: xxxFC91 BE8Dxxx (hex) (master key)

xxx: the last three number of your student id

103FC91 BE8D109

Step1: Generate the round 1 subkey

left haft
0 0 0 1 0 0 1 1 0 0 0 0 1 1 1 1 1 1 0 0 1 0 0 1 0 0 0 1

 shift left 1
0 0 1 0 0 1 1 0 0 0 0 1 1 1 1 1 1 0 0 1 0 0 1 0 0 0 1 0

Right haft
1 0 1 1 1 1 1 0 1 0 0 0 1 1 0 1 0 0 0 1 0 0 0 0 1 0 0 1

 shift left 1

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

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

0 0 1 0 0 1 1
0 0 0 0 1 1 1
1 1 1 0 0 1 0 Permutation
0 1 0 0 0 1 0 choice 2
0 1 1 1 1 1 0 Bỏ vị trị 9, 18,
1 0 0 0 1 1 0 22, 25, 35, 38,
1 0 0 0 1 0 0 43, 54
0 0 1 0 0 1 1
0
0
0 0
0
0
1
0

Subkey for round 1


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

Part 2:
Expand Permutation
Key mixing
S-box (8 boxes)
Plaintext: helloxxx
SE130109 => hello109 =>

01101000 01100101 01101100 01101100 01101111 00110100 00110011 00110000

Key mixing:

XoR:

100001
100011
111101
010010
011111
100110
010000
110001

You might also like