Documente Academic
Documente Profesional
Documente Cultură
Overview
DES algorithm has been a popular secret key encryption algorithm and is used in many commercial and financial applications. However, its key size is too small by current standards and its entire 56 bit key space can be searched in approximately 22 hours IDEA is a block cipher designed by Xuejia Lai and James L. Massey in 1991 It is a minor revision of an earlier cipher, PES (Proposed Encryption Standard) IDEA was originally called IPES (Improved PES) and was developed to replace DES
2
Overview (cont)
It entirely avoids the use of any lookup tables or S-boxes IDEA was used as the symmetric cipher in early versions of the Pretty Good Privacy cryptosystem
Key generation
The 64-bit plaintext block is partitioned into four 16bit sub-blocks six 16-bit key are generated from the 128bit key. Since a further four 16-bit key-sub-blocks are required for the subsequent output transformation, a total of 52 (= 8 x 6 + 4) different 16-bit sub-blocks have to be generated from the 128-bit key.
5
Encryption
the first four 16-bit key sub-blocks are combined with two of the 16bit plaintext blocks using addition modulo 216, and with the other two plaintext blocks using multiplication modulo 216 + 1 At the end of the first encryption round four 16-bit values are produced which are used as input to the second encryption round The process is repeated in each of the subsequent 7 encryption rounds The four 16-bit values produced at the end of the 8th encryption round are combined with the last four of the 52 key sub-blocks using addition modulo 216 and multiplication modulo 216 + 1 to form the resulting four 16-bit ciphertext blocks
8
Decryption
The computational process used for decryption of the ciphertext is essentially the same as that used for encryption The only difference is that each of the 52 16-bit key sub-blocks used for decryption is the inverse of the key sub-block used during encryption In addition, the key sub-blocks must be used in the reverse order during decryption in order to reverse the encryption process
10
Modes of operation
IDEA supports all modes of operation such as:
Electronic Code Book (ECB) mode Cipher Block Chaining (CBC) Cipher Feedback (CFB) Output Feedback (OFB) modes
For plaintext exceeding this fixed size, the simplest approach is to partition the plaintext into blocks of equal length and encrypt each separately. This method is named Electronic Code Book (ECB) mode. However, Electronic Code Book is not a good system to use with small block sizes (for example, smaller than 40 bits)
11
Blowfish Algorithm
The expansion of the key: break the original key into a set of subkeys. Specifically, a key of no more than 448 bits is separated into 4168 bytes. There is a P-array and four 32-bit S-boxes. The P-array contains 18 32-bit subkeys, while each S-box contains 256 entries. The encryption of the data: 64-bit input is denoted with an x, while the P-array is denoted with a Pi (where i is the iteration).
Blowfish Algorithm
The algorithm consists of two parts:
A key - expansion part. A data - encryption part.
Blowfish Algorithm
Key expansion converts a key of at most 448 bits into several subkey arrays totaling 4168 bytes. Data encryption occurs via a 16-round Feistel network. Each round consists of a keydependent permutation, and a key- and datadependent substitution.
Subkey
The P-array consists of 18 32-bit subkeys: P1, P2,..., P18. There are four 32-bit S-boxes with 256 entries each: S1,0, S1,1,..., S1,255; S2,0, S2,1,..,, S2,255; S3,0, S3,1,..., S3,255; S4,0, S4,1,..,, S4,255.
Encryption Algorithm
The input is a 64-bit data element, x. Divide x into two 32-bit halves: xL, xR For i = 1 to 16:
Encryption Algorithm
xR = xR XOR P17 xL = xL XOR P18 Recombine xL and xR Function F:
Divide xL into four eight-bit quarters: a, b, c, and d F(xL) = ((S1,a + S2,b mod 232) XOR S3,c) + S4, d mod 232
Encryption Algorithm
Begin X/2 = xL and xR For i = 1 to 16 xL = xL XOR Pi xR = F(xL) XOR xR
swap xL and xR
Yes
I < 16
No swap xL and xR xL = xL XOR P17
xR = xR XOR P18
Recombine xL and xR
End
Encryption Algorithm
Begin xL/4 = a, b, c, d where a, b, c, d are 8 bit quarters
F(xL) = ((S1, a + S2, b mod 2^32) XOR S3, c) + S4, d mod 2^23
End
Decryption Algorithm
Decryption is exactly the same as encryption, except that P1, P2,..., P18 are used in the reverse order.