- •Lecture 6
- •1 Modes of des algorithm operation
- •1.1 Mode of " Electronic Code Book "
- •1.2 The mode " Cipher Block Chaining "
- •1.3 Mode " Cipher Feed Back " cfb
- •2 General description of гост 28147-89 algorithm
- •Figure 2 - a chart of algorithm in the mode of feed-back
- •1.4 Mode " Output Feed Back " ofb
- •Figure 3- a chart of algorithm in the mode of feed-back
- •1.5 Domain of application of des algorithm
- •3 Encipherement in the mode of simple replacements
Ent.
bl. Ent.
bl.
1
k
1 k
Outp.
bl. Outp. bl.
1
k
1 k
1
k
1 k
Encryption
Decryption
Shift
ShiftFigure 2 - a chart of algorithm in the mode of feed-back
Into an entry block the vector of initialising is written. Then, his content is encrypted with the use of algorithm of DES. After it k its senior bits a symbol-by-symbol is added on the module two with transferrable in a communication channel the k-digit block of message
Ci = Mi Pi-1,
Pi-1 means content of senior bits of previous in cipher block.
The update of shift register is carried out on the chain of feed-back by the extrusion of its content by the massege Ci transferred in a communication channel.
Renewal of the accepted message is carried out implementation of the transferred operations upside-down
Mi = Ci Pi-1.
1.4 Mode " Output Feed Back " ofb
This mode (fig. 3), like, as well as previous, assumes, that block length differed from 64 bits. The difference of this method consists of organization of feed-back. The update of content of entry block is carried out not content transferrable in a communication of ciphertext channel, but content of in cipher vector of initialising on the first and subsequent steps of encipherement of blocks.
Let М = М1М2 ,…, Мn
For all i = 1, … , n: Ci = Mi Pi .
where Pi - senior k bits of operation of DES Ci-1.
The algorithm of such encipherement is illustrated by a chart, resulted on a picture.
Entr.bl.
Entr.bl.
1
k
1 k
Outp.
bl. Outp. bl.
1
k
1 k
1
k
1 k
Encryption
Decryption
Shift
Figure 3- a chart of algorithm in the mode of feed-back
1.5 Domain of application of des algorithm
The mode of ECB is found by application for the encipherement of the keys; the mode of CFB, as a rule, targets at the encipherement of separate characters, and the mode of OFB quite often is used for an encipherement in the satellite systems of connection.
The modes of CBC and CFB are suitable for authentification of information. They allow to utillize an algorithm for:
- interactive encipherement between at an exchange by information between terminals and computer;
· encipherements of the cryptographic keys at their distributing between users;
· encipherements of files, postal mails etc.
2 General description of гост 28147-89 algorithm
An algorithm is carried by the name ГОСТ 28147-89. It is intended for hardware and programmatic representation, suits, to produced for modern cryptosystems, and does not lay on limits on secrecy of transferable information.
As well as DES algorithm, the ГОСТ algorithm is built on the basis of Feystel network. On every stage the encoded report is broken up to left L0 and to right R0 parts which cipher by rule
Li = Ri-1
Ri = Li -1 f(Ri-1 ,Ki),
Ki
f(Ri-1
,Ki)
Realization
of network of Feystel in an algorithm
ГОСТ
28147-89
A difference consists of that in place of the 64-bit key 256-bit key is utilized.
An amount of the stages of encypherement is twice as much as compared to DES.
In addition, operation of replacement, carried out of S-blocks is not permanent, but can change as necessary and, in addition, it is assumed to keep it in secret, that equivalently to lengthening of the key, practically to 610 bits.
Finally, the ГОСТ algorithm is utillized nonlinear function fГОСТ , which substantially differs from the function of fDES , wich is applied in the DES algorithm.
Before to begin consideration of the modes of operations of ГОСТ algorithm, it is necessary to be stopped for the features of some operations, in-use at implementation of nonlinear function of f. It at first, adding up on the module 2 n and, secondly adding up on the module of 2 n - 1.
Operation of adding up of numbers a and b on the module of 2n supposes that
a + b (mod 2 n) = a + b, if a + b < 2 n
a + b (mod 2 n) = a + b - 2 n, if a + b > 2 n
In this algorithm these operations are executed above numbers, presented in a binary code. We will consider the example of addition of numbers 13 and 9 on the module of 2 n at n = 4.
1101 13 + 9 = 22; 2 n = 16; 22 - 16 = 6
1001
---------------
10110
From this example evidently, that for the receipt of the sought result, from the result of addition it is necessary to cast away a most significant digit. Self addition must be carried out with the transfer of unit in a most significant digit.
Addition on the module 2 n - 1 carried out by rule.
a + b (mod 2 n - 1) = a + b, if a + b < 2 n - 1
a + b (mod 2 n - 1) = a + b - 2 n - 1, if a + b > 2 n - 1
We will consider the example of addition of numbers 13 and 9 on the module 2 n - 1 at n = 4.
1101 13 + 9 = 22; 2 n - 1 = 15; 22 - 15 = 7; 0110
1001 0001
--------------- ------------
10110 0111
From this example evidently, that for the receipt of the sought result, from the result of addition it is necessary to cast away a most significant digit and add unit to the got remain.
This algorithm is entended a few modes of work. To their number behave, mode of simple replacements, mode of gamming, mode of gamming with a feed-back and mode of making of imito-insertion.
Mode of simple replacement are intended by dividing of the encoded sequence into blocks long in 64 digits and is component part of other modes of encipherement. This mode can be utillized only for the encipherement of blocks length of which is multiple 64th bits. On this account it is used only for the transmission of the next key.
The modes of gamming and gamming with a feed-back are ordinary operating modes and them, mainly, apply for the encipherement of dates.
The mode of forming of imito-insertion is intended for forming of signatury, necessary for the digital signature of electronic documents.
