Xreferat.com » Рефераты по информатике и программированию » Система криптозащиты в стандарте DES. Система взаимодействия периферийных устройств
Система криптозащиты в стандарте DES. Система взаимодействия периферийных устройств
the
block consisting of the bits of B1 followed by the bits of B2...followed by
the bits of B8.
** Blocks are composed of bits numbered from left to right, i.e., the left
most bit of a block is bit one.
Figure 1. Enciphering computation.
Enciphering
A sketch of the enciphering computation is given in Figure 1.
The 64 bits of the input block to be enciphered are first subjected to the
following permutation, called the initial permutation IP:
IP
58 50 42 34 26 18 10 2
60 52 44 36 28 20 12 4
62 54 46 38 30 22 14 6
64 56 48 40 32 24 16 8
57 49 41 33 25 17 9 1
59 51 43 35 27 19 11 3
61 53 45 37 29 21 13 5
63 55 47 39 31 23 15 7
That is the permuted input has bit 58 of the input as its first bit, bit 50
as its second bit, and so on with bit 7 as its last bit. The permuted input
block is then the input to a complex key-dependent computation described
below. The output of that computation, called the preoutput, is then
subjected to the following permutation which is the inverse of the initial
permutation:
IP-1
40 8 48 16 56 24 64 32
39 7 47 15 55 23 63 31
38 6 46 14 54 22 62 30
37 5 45 13 53 21 61 29
36 4 44 12 52 20 60 28
35 3 43 11 51 19 59 27
34 2 42 10 50 18 58 26
33 1 41 9 49 17 57 25
That is, the output of the algorithm has bit 40 of the preoutput block as
its first bit, bit 8 as its second bit, and so on, until bit 25 of the
preoutput block is the last bit of the output.
The computation which uses the permuted input block as its input to produce
the preoutput block consists, but for a final interchange of blocks, of 16
iterations of a calculation that is described below in terms of the cipher
function f which operates on two blocks, one of 32 bits and one of 48 bits,
and produces a block of 32 bits.
Let the 64 bits of the input block to an iteration consist of a 32 bit block
L followed by a 32 bit block R. Using the notation defined in the
introduction, the input block is then LR.
Let K be a block of 48 bits chosen from the 64-bit key. Then the output L'R'
of an iteration with input LR is defined by:
(1) L' = R
R' = L(+)f(R,K)
where (+) denotes bit-by-bit addition modulo 2.
As remarked before, the input of the first iteration of the calculation is
the permuted input block. If L'R' is the output of the 16th iteration then
R'L' is the preoutput block. At each iteration a different block K of key
bits is chosen from the 64-bit key designated by KEY.
With more notation we can describe the iterations of the computation in more
detail. Let KS be a function which takes an integer n in the range from 1 to
16 and a 64-bit block KEY as input and yields as output a 48-bit block Kn
which is a permuted selection of bits from KEY. That is
(2) Kn = KS(n,KEY)
with Kn determined by the bits in 48 distinct bit positions of KEY. KS is
called the key schedule because the block K used in the n'th iteration of
(1) is the block Kn determined by (2).
As before, let the permuted input block be LR. Finally, let L() and R() be
respectively L and R and let Ln and Rn be respectively L' and R' of (1) when
L and R are respectively Ln-1 and Rn-1 and K is Kn; that is, when n is in
the range from 1 to 16,
(3) Ln = Rn-1
Rnn = Ln-1(+)f(Rn-1,Kn)
The preoutput block is then R16L16.
The key schedule KS of the algorithm is described in detail in the Appendix.
The key schedule produces the 16 Kn which are required for the algorithm.
Deciphering
The permutation IP-1 applied to the preoutput block is the inverse of the
initial permutation IP applied to the input. Further, from (1) it follows
that:
(4) R = L'
L = R' (+) f(L',K)
Consequently, to decipher it is only necessary to apply the very same
algorithm to an enciphered message block, taking care that at each iteration
of the computation the same block of key bits K is used during decipherment
as was used during the encipherment of the block. Using the notation of the
previous section, this can be expressed by the equations:
(5) Rn-1 = Ln
Ln-1 = Rn (+) f(Ln,Kn)
where now R16L16 is the permuted input block for the deciphering calculation
and L() and R() is the preoutput block. That is, for the decipherment
calculation with R16L16 as the permuted input, K16 is used in the first
iteration, K15 in the second, and so on, with K1 used in the 16th iteration.
The Cipher Function f
A sketch of the calculation of f(R,K) is given in Figure 2.
Figure 2. Calculation of f(R,K).
Let E denote a function which takes a block of 32 bits as input and yields a
block of 48 bits as output. Let 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 following table:
E BIT-SELECTION TABLE
32 1 2 3 4 5
4 5 6 7 8 9
8 9 10
block consisting of the bits of B1 followed by the bits of B2...followed by
the bits of B8.
** Blocks are composed of bits numbered from left to right, i.e., the left
most bit of a block is bit one.
Figure 1. Enciphering computation.
Enciphering
A sketch of the enciphering computation is given in Figure 1.
The 64 bits of the input block to be enciphered are first subjected to the
following permutation, called the initial permutation IP:
IP
58 50 42 34 26 18 10 2
60 52 44 36 28 20 12 4
62 54 46 38 30 22 14 6
64 56 48 40 32 24 16 8
57 49 41 33 25 17 9 1
59 51 43 35 27 19 11 3
61 53 45 37 29 21 13 5
63 55 47 39 31 23 15 7
That is the permuted input has bit 58 of the input as its first bit, bit 50
as its second bit, and so on with bit 7 as its last bit. The permuted input
block is then the input to a complex key-dependent computation described
below. The output of that computation, called the preoutput, is then
subjected to the following permutation which is the inverse of the initial
permutation:
IP-1
40 8 48 16 56 24 64 32
39 7 47 15 55 23 63 31
38 6 46 14 54 22 62 30
37 5 45 13 53 21 61 29
36 4 44 12 52 20 60 28
35 3 43 11 51 19 59 27
34 2 42 10 50 18 58 26
33 1 41 9 49 17 57 25
That is, the output of the algorithm has bit 40 of the preoutput block as
its first bit, bit 8 as its second bit, and so on, until bit 25 of the
preoutput block is the last bit of the output.
The computation which uses the permuted input block as its input to produce
the preoutput block consists, but for a final interchange of blocks, of 16
iterations of a calculation that is described below in terms of the cipher
function f which operates on two blocks, one of 32 bits and one of 48 bits,
and produces a block of 32 bits.
Let the 64 bits of the input block to an iteration consist of a 32 bit block
L followed by a 32 bit block R. Using the notation defined in the
introduction, the input block is then LR.
Let K be a block of 48 bits chosen from the 64-bit key. Then the output L'R'
of an iteration with input LR is defined by:
(1) L' = R
R' = L(+)f(R,K)
where (+) denotes bit-by-bit addition modulo 2.
As remarked before, the input of the first iteration of the calculation is
the permuted input block. If L'R' is the output of the 16th iteration then
R'L' is the preoutput block. At each iteration a different block K of key
bits is chosen from the 64-bit key designated by KEY.
With more notation we can describe the iterations of the computation in more
detail. Let KS be a function which takes an integer n in the range from 1 to
16 and a 64-bit block KEY as input and yields as output a 48-bit block Kn
which is a permuted selection of bits from KEY. That is
(2) Kn = KS(n,KEY)
with Kn determined by the bits in 48 distinct bit positions of KEY. KS is
called the key schedule because the block K used in the n'th iteration of
(1) is the block Kn determined by (2).
As before, let the permuted input block be LR. Finally, let L() and R() be
respectively L and R and let Ln and Rn be respectively L' and R' of (1) when
L and R are respectively Ln-1 and Rn-1 and K is Kn; that is, when n is in
the range from 1 to 16,
(3) Ln = Rn-1
Rnn = Ln-1(+)f(Rn-1,Kn)
The preoutput block is then R16L16.
The key schedule KS of the algorithm is described in detail in the Appendix.
The key schedule produces the 16 Kn which are required for the algorithm.
Deciphering
The permutation IP-1 applied to the preoutput block is the inverse of the
initial permutation IP applied to the input. Further, from (1) it follows
that:
(4) R = L'
L = R' (+) f(L',K)
Consequently, to decipher it is only necessary to apply the very same
algorithm to an enciphered message block, taking care that at each iteration
of the computation the same block of key bits K is used during decipherment
as was used during the encipherment of the block. Using the notation of the
previous section, this can be expressed by the equations:
(5) Rn-1 = Ln
Ln-1 = Rn (+) f(Ln,Kn)
where now R16L16 is the permuted input block for the deciphering calculation
and L() and R() is the preoutput block. That is, for the decipherment
calculation with R16L16 as the permuted input, K16 is used in the first
iteration, K15 in the second, and so on, with K1 used in the 16th iteration.
The Cipher Function f
A sketch of the calculation of f(R,K) is given in Figure 2.
Figure 2. Calculation of f(R,K).
Let E denote a function which takes a block of 32 bits as input and yields a
block of 48 bits as output. Let 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 following table:
E BIT-SELECTION TABLE
32 1 2 3 4 5
4 5 6 7 8 9
8 9 10
Если Вам нужна помощь с академической работой (курсовая, контрольная, диплом, реферат и т.д.),
обратитесь к нашим специалистам. Более 90000 специалистов готовы Вам помочь.
Бесплатные корректировки и доработки. Бесплатная оценка стоимости работы.
Нужна помощь в написании работы?
Мы - биржа профессиональных авторов (преподавателей и доцентов вузов). Пишем статьи РИНЦ, ВАК, Scopus.
Помогаем в публикации. Правки вносим бесплатно.