Xreferat.com » Рефераты по информатике и программированию » Система криптозащиты в стандарте DES. Система взаимодействия периферийных устройств
Система криптозащиты в стандарте DES. Система взаимодействия периферийных устройств
11 12 13
12 13 14 15 16 17
16 17 18 19 20 21
20 21 22 23 24 25
24 25 26 27 28 29
28 29 30 31 32 1
Thus the first three bits of E(R) are the bits in positions 32, 1 and 2 of R
while the last 2 bits of E(R) are the bits in positions 32 and 1.
Each of the unique selection functions S1,S2,...,S8, takes a 6-bit block as
input and yields a 4-bit block as output and is illustrated by using a table
containing the recommended S1:
S1
Column Number
Row
No. 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
0 14 4 13 1 2 15 11 8 3 10 6 12 5 9 0 7
1 0 15 7 4 14 2 13 1 10 6 12 11 9 5 3 8
2 4 1 14 8 13 6 2 11 15 12 9 7 3 10 5 0
3 15 12 8 2 4 9 1 7 5 11 3 14 10 0 6 13
If S1 is the function defined in this table and B is a block of 6 bits, then
S1(B)is determined as follows: The first and last bits of B represent in
base 2 a number in the range 0 to 3. Let that number be i. The middle 4 bits
of B represent in base 2 a number in the range 0 to 15. Let that number be
j. Look up in the table the number in the i'th row and j'th column. It is a
number in the range 0 to 15 and is uniquely represented by a 4 bit block.
That block is the output S1(B) of S1 for the input B. For example, for input
011011 the row is 01, that is row 1, and the column is determined by 1101,
that is column 13. In row 1 column 13 appears 5 so that the output is 0101.
Selection functions S1,S2,...,S8 of the algorithm appear in the Appendix.
The permutation function P yields a 32-bit output from a 32-bit input by
permuting the bits of the input block. Such a function is defined by the
following table:
P
16 7 20 21
29 12 28 17
1 15 23 26
5 18 31 10
2 8 24 14
32 27 3 9
19 13 30 6
22 11 4 25
The output P(L) for the function P defined by this table is obtained from
the input L by taking the 16th bit of L as the first bit of P(L), the 7th
bit as the second bit of P(L), and so on until the 25th bit of L is taken as
the 32nd bit of P(L). The permutation function P of the algorithm is
repeated in the Appendix.
Now let S1,...,S8 be eight distinct selection functions, let P be the
permutation function and let E be the function defined above.
To define f(R,K) we first define B1,...,B8 to be blocks of 6 bits each for
which
(6) B1B2...B8 = K(+)E(R)
The block f(R,K) is then defined to be
(7)
P(S1(B1)S2(B2)...S
8(B8))
Thus K(+)E(R) is first divided into the 8 blocks as indicated in (6). Then
each Bi is taken as an input to Si and the 8 blocks (S1(B1)S2(B2)...S8(B8)
of 4 bits each are consolidated into a single block of 32 bits which forms
the input to P. The output (7) is then the output of the function f for the
inputs R and K.
APPENDIX
PRIMITIVE FUNCTIONS FOR THE DATA ENCRYPTION ALGORITHM
The choice of the primitive functions KS, S1,...,S8 and P is critical to the
strength of an encipherment resulting from the algorithm. Specified below is
the recommended set of functions, describing S1,...,S8 and P in the same way
they are described in the algorithm. For the interpretation of the tables
describing these functions, see the discussion in the body of the algorithm.
The primitive functions S1,...,S8 are:
S1
14 4 13 1 2 15 11 8 3 10 6 12 5 9 0 7
O 15 7 4 14 2 13 1 10 6 12 11 9 5 3 8
4 1 14 8 13 6 2 11 15 12 9 7 3 10 5 0
15 12 8 2 4 9 1 7 5 11 3 14 10 O 6 13
S2
15 1 8 14 6 11 3 4 9 7 2 13 12 O 5 10
3 13 4 7 15 2 8 14 12 0 1 10 6 9 11 5
0 14 7 11 10 4 13 1 5 8 12 6 9 3 2 15
13 8 10 1 3 15 4 2 11 6 7 12 0 5 14 9
S3
10 0 9 14 6 3 15 5 1 13 12 7 11 4 2 8
13 7 O
12 13 14 15 16 17
16 17 18 19 20 21
20 21 22 23 24 25
24 25 26 27 28 29
28 29 30 31 32 1
Thus the first three bits of E(R) are the bits in positions 32, 1 and 2 of R
while the last 2 bits of E(R) are the bits in positions 32 and 1.
Each of the unique selection functions S1,S2,...,S8, takes a 6-bit block as
input and yields a 4-bit block as output and is illustrated by using a table
containing the recommended S1:
S1
Column Number
Row
No. 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
0 14 4 13 1 2 15 11 8 3 10 6 12 5 9 0 7
1 0 15 7 4 14 2 13 1 10 6 12 11 9 5 3 8
2 4 1 14 8 13 6 2 11 15 12 9 7 3 10 5 0
3 15 12 8 2 4 9 1 7 5 11 3 14 10 0 6 13
If S1 is the function defined in this table and B is a block of 6 bits, then
S1(B)is determined as follows: The first and last bits of B represent in
base 2 a number in the range 0 to 3. Let that number be i. The middle 4 bits
of B represent in base 2 a number in the range 0 to 15. Let that number be
j. Look up in the table the number in the i'th row and j'th column. It is a
number in the range 0 to 15 and is uniquely represented by a 4 bit block.
That block is the output S1(B) of S1 for the input B. For example, for input
011011 the row is 01, that is row 1, and the column is determined by 1101,
that is column 13. In row 1 column 13 appears 5 so that the output is 0101.
Selection functions S1,S2,...,S8 of the algorithm appear in the Appendix.
The permutation function P yields a 32-bit output from a 32-bit input by
permuting the bits of the input block. Such a function is defined by the
following table:
P
16 7 20 21
29 12 28 17
1 15 23 26
5 18 31 10
2 8 24 14
32 27 3 9
19 13 30 6
22 11 4 25
The output P(L) for the function P defined by this table is obtained from
the input L by taking the 16th bit of L as the first bit of P(L), the 7th
bit as the second bit of P(L), and so on until the 25th bit of L is taken as
the 32nd bit of P(L). The permutation function P of the algorithm is
repeated in the Appendix.
Now let S1,...,S8 be eight distinct selection functions, let P be the
permutation function and let E be the function defined above.
To define f(R,K) we first define B1,...,B8 to be blocks of 6 bits each for
which
(6) B1B2...B8 = K(+)E(R)
The block f(R,K) is then defined to be
(7)
P(S1(B1)S2(B2)...S
8(B8))
Thus K(+)E(R) is first divided into the 8 blocks as indicated in (6). Then
each Bi is taken as an input to Si and the 8 blocks (S1(B1)S2(B2)...S8(B8)
of 4 bits each are consolidated into a single block of 32 bits which forms
the input to P. The output (7) is then the output of the function f for the
inputs R and K.
APPENDIX
PRIMITIVE FUNCTIONS FOR THE DATA ENCRYPTION ALGORITHM
The choice of the primitive functions KS, S1,...,S8 and P is critical to the
strength of an encipherment resulting from the algorithm. Specified below is
the recommended set of functions, describing S1,...,S8 and P in the same way
they are described in the algorithm. For the interpretation of the tables
describing these functions, see the discussion in the body of the algorithm.
The primitive functions S1,...,S8 are:
S1
14 4 13 1 2 15 11 8 3 10 6 12 5 9 0 7
O 15 7 4 14 2 13 1 10 6 12 11 9 5 3 8
4 1 14 8 13 6 2 11 15 12 9 7 3 10 5 0
15 12 8 2 4 9 1 7 5 11 3 14 10 O 6 13
S2
15 1 8 14 6 11 3 4 9 7 2 13 12 O 5 10
3 13 4 7 15 2 8 14 12 0 1 10 6 9 11 5
0 14 7 11 10 4 13 1 5 8 12 6 9 3 2 15
13 8 10 1 3 15 4 2 11 6 7 12 0 5 14 9
S3
10 0 9 14 6 3 15 5 1 13 12 7 11 4 2 8
13 7 O
Если Вам нужна помощь с академической работой (курсовая, контрольная, диплом, реферат и т.д.),
обратитесь к нашим специалистам. Более 90000 специалистов готовы Вам помочь.
Бесплатные корректировки и доработки. Бесплатная оценка стоимости работы.
Нужна помощь в написании работы?
Мы - биржа профессиональных авторов (преподавателей и доцентов вузов). Пишем статьи РИНЦ, ВАК, Scopus.
Помогаем в публикации. Правки вносим бесплатно.