A) Create 16 Subkeys, Each of Which Is 48-Bits Long and Derive K1
A) Create 16 Subkeys, Each of Which Is 48-Bits Long and Derive K1
M = (0123456789ABCDEF) Hex = (0000 0001 0010 0011 0100 0101 0110 0111 1000
1001 1010 1011 1100 1101 1110 1111) b
key K= (0123456789ABCDEF) Hex = (0000 0001 0010 0011 0100 0101 0110 0111
1000 1001 1010 1011 1100 1101 1110 1111) b
grouping together every eight bits, of which the last one in each group will be
unused):
K= 00000001 00100011 01000101 01100111 10001001 10101011 11001101
11101111
a) Create 16 subkeys, each of which is 48-bits long and derive K1:
The 64-bit key is permuted according to the table, PC-1. Since the first entry in
the table is "57", this means that the 57th bit of the original key K becomes the
first bit of the permuted key K+, only 56 bits of the original key appear in the
permuted key.
K+=1111000 0110011 0010101 0100000 1010101 0110011 0011110 0000000
C0= 1111000 0110011 0010101 0100000
D0= 1010101 0110011 0011110 0000000
With C0 and D0 defined, we now create sixteen blocks Cn and Dn, 1<=n<=16. Each
pair of blocks C n∧Dnis formed from the previous pair Cn-1 and Dn-1,
respectively, for n = 1, 2, ..., 16, using the following schedule of "left shifts" of the
previous block. To do a left shift, move each bit one place to the left, except for
the first bit, which is cycled to the end of the block
C1=1110000110011001010101000001
D1= 0101010110011001111000000001 …………….
We now form the keys n K , for 1≤n≤16 , by applying the following permutation
table to each of the concatenated pairs n Dn . Each pair has 56 bits, but PC-2 only
C
uses 48 of these. We apply PC-2 on C 1 D 1
We have
K1 = 000010110000001001100111100110110100100110100101
b) Encode each 64-bit block of data and derive L0 (Left half) and R0 (Right half) from
the plaintext
There is an initial permutation IP of the 64 bits of the message data M. This
rearranges the bits according to the following table, where the entries in the table
show the new arrangement of the bits from their initial order:
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
we get L0 and R0
L0 = 1100 1100 0000 0000 1100 1100 1111 1111
R0 = 1111 0000 1010 1010 1111 0000 1010 1010
c) Calculate E[R0] ⊕ K1:
E be such that the 48 bits of its output, written as 8 blocks of 6 bits each, are
obtained by selecting the bits in its inputs in order according to the table Expansion
Permutation
E[R0] = 011110100001010101010101011110100001010101010101
K1 = 000010110000001001100111100110110100100110100101
E[R0] ⊕ K1=011100010001011100110010111000010101110011110000