Simplified International Data Encryption Algorithm (IDEA)
Introduction :
The International Data Encryption Algorithm (IDEA) is a symmetric-key block cipher that was first
introduced in 1991. It was designed to provide secure encryption for digital data and is used in a
variety of applications, such as secure communications, financial transactions, and electronic voting
systems.
IDEA uses a block cipher with a block size of 64 bits and a key size of 128 bits. It uses a series of
mathematical operations, including modular arithmetic, bit shifting, and exclusive OR (XOR)
operations, to transform the plaintext into ciphertext. The cipher is designed to be highly secure and
resistant to various types of attacks, including differential and linear cryptanalysis.
One of the strengths of IDEA is its efficient implementation in software and hardware. The algorithm
is relatively fast and requires only a small amount of memory and processing power. This makes it a
popular choice for use in embedded systems and other applications where resources are limited.
IDEA has been widely used in various encryption applications, although it has been largely replaced
by newer encryption algorithms such as AES (Advanced Encryption Standard) in recent years.
However, IDEA is still considered to be a highly secure and effective encryption algorithm, and it
continues to be used in some legacy systems and applications.
In cryptography, block ciphers are very important in the designing of many cryptographic algorithms
and are widely used to encrypt the bulk of data in chunks. By chunks, it means that the cipher takes a
fixed size of the plaintext in the encryption process and generates a fixed size ciphertext using a
fixed-length key. An algorithm’s strength is determined by its key length.
The Simplified International Data Encryption Algorithm (IDEA) is a symmetric key block cipher that:
uses a fixed-length plaintext of 16 bits and
encrypts them in 4 chunks of 4 bits each
to produce 16 bits ciphertext.
The length of the key used is 32 bits.
The key is also divided into 8 blocks of 4 bits each.
This algorithm involves a series of 4 identical complete rounds and 1 half-round. Each complete
round involves a series of 14 steps that includes operations like:
Bitwise XOR
Addition modulo (2^4)
Multiplication modulo (2^4)+1
After 4 complete rounds, the final “half-round” consists of only the first 4 out of the 14 steps
previously used in the full rounds. To perform these rounds, each binary notation must be converted
to its equivalent decimal notation, perform the operation and the result obtained should be
converted back to the binary representation for the final result of that particular step.
Key Schedule: 6 subkeys of 4 bits out of the 8 subkeys are used in each complete round, while 4 are
used in the half-round. So, 4.5 rounds require 28 subkeys. The given key, ‘K’, directly gives the first 8
subkeys. By rotating the main key left by 6 bits between each group of 8, further groups of 8 subkeys
are created, implying less than one rotation per round for the key (3 rotations).
K1 K2 K3 K4 K5 K6
110 011 001
Round 1 1100 1111 1111
1 0 1
010 1001 000 110
Round 2 1011 1111
1 * 1 0
110 011 0111 111
Round 3 0110 0011
1 1 * 1
111 100 110 0110
Round 4 0101 1101
1 1 0 *
Round 111 011
1101 0111
4.5 1 0
* denotes a shift of bits
Notations used in the 14 steps:
Symbol Operation
* Multiplication modulo (2^4) +1
+ Addition modulo (2^4)
^ Bitwise XOR
The 16-bit plaintext can be represented as X1 || X2 || X3 || X4, each of size 4 bits. The 32-bit key is
broken into 8 subkeys denoted as K1 || K2 || K3 || K4 || K5 || K6 || K7 || K8, again of size 4 bits
each. Each round of 14 steps uses the three algebraic operation-Addition modulo (2^4),
Multiplication modulo (2^4)+1 and Bitwise XOR. The steps involved are as follows:
1. X1 * K1
2. X2 + K2
3. X3 + K3
4. X4 * K4
5. Step 1 ^ Step 3
6. Step 2 ^ Step 4
7. Step 5 * K5
8. Step 6 + Step 7
9. Step 8 * K6
10. Step 7 + Step 9
11. Step 1 ^ Step 9
12. Step 3 ^ Step 9
13. Step 2 ^ Step 10
14. Step 4 ^ Step 10
The input to the next round is Step 11 || Step 13 || Step 12 || Step 14, which
becomes X1 || X2 || X3 || X4. This swap between 12 and 13 takes place after
each complete round, except the last complete round (4th round), where the
input to the final half round is Step 11 || Step 12 || Step 13 || Step 14.
After last complete round, the half-round is as follows:
1. X1 * K1
2. X2 + K2
3. X3 + K3
4. X4 * K4
The final output is obtained by concatenating the blocks.
Example:
Key: 1101 1100 0110 1111 0011 1111 0101 1001
Plaintext: 1001 1100 1010 1100
Ciphertext: 1011 1011 0100 1011
Explanation:
The explanation is only for 1st complete round (the remaining can
be implemented similarly) and the last half-round.
Round 1:
From the plaintext: X1 – 1001, X2 – 1100, X3 – 1010, X4 –
1100
From the table above: K1 – 1101, K2 – 1100, K3 – 0110, K4 –
1111, K5 – 0011, K6 – 1111
1. (1001(9) * 1101(13))(mod 17) = 1111(15)
2. (1100(12) + 1100(12))(mod 16) = 1000(8)
3. (1010(10) + 0110(6))(mod 16) = 0000(0)
4. (1100(12) * 1111(15))(mod 17) = 1010(10)
5. (1111(15) ^ 0000(0)) = 1111(15)
6. (1000(8) ^ 1010(10)) = 0010(2)
7. (1111(15) * 0011(3))(mod 17) = 1011(11)
8. (0010(2) + 1011(11))(mod 16) = 1101(13)
9. (1101(13) * 1111(15))(mod 17) = 1000(8)
10. (1011(11) + 1000(8))(mod 16) = 0011(3)
11. (1000(8) ^ 1111(15)) = 0111(7)
12. (1000(8) ^ 0000(0)) = 1000(8)
13. (0011(3) ^ 1000(8)) = 1011(11)
14. (0011(3) ^ 1010(10)) = 1001(9)
Round 1 Output: 0111 1011 1000 1001 (Step 12 and Step 13
results are interchanged)
Round 2:
From Round 1 output: X1 – 0111, X2 – 1011, X3 –
1000, X4 – 1001
From the table above: K1 – 0101, K2 – 1001, K3 –
0001, K4 – 1011, K5 – 1100, K6 – 1111
Round 2 Output: 0110 0110 1110 1100 (Step 12 and
Step 13 results are interchanged)
Round 3:
From Round 2 Output: X1 – 0110, X2 – 0110, X3 –
1110, X4 – 1100
From the table above: K1 – 1101, K2 – 0110, K3 –
0111, K4 – 0111, K5 – 1111, K6 – 0011
Round 3 Output: 0100 1110 1011 0010 (Step 12 and
Step 13 results are interchanged)
Round 4:
From Round 3 Output: X1 – 0100, X2 – 1110, X3 –
1011, X4 – 0010
From the table above: K1 – 1111, K2 – 0101, K3 –
1001, K4 – 1101, K5 – 1100, K6 – 0110
Round 4 Output: 0011 1110 1110 0100 (Step 12 and
Step 13 results are interchanged)
Round 4.5:
From Round 4 Output: X1 – 0011, X2 – 1110, X3 –
1110, X4 – 0100
From the table above: K1 – 1111, K2 – 1101, K3 –
0110, K4 – 0111
Round 4.5 Output: 1011 1011 0100 1011 (Step 2 and
Step 3 results are not interchanged)
(0011(3) * 1111(15))(mod 17) = 1011(11)
(1110(14) + 1101(13))(mod 16) = 1011(11)
(1110(14) + 0110(6))(mod 16) = 0100(4)
(0100(4) * 0111(7))(mod 17) = 1011(11)
Final Ciphertext is 1011 1011 0100 1011
Generate the value of {AB} in S-Box in AES (Advanced Encryption
Standard)
In the context of AES (Advanced Encryption Standard), the S-Box (Substitution Box) is a crucial
component of the encryption process. The S-Box is a fixed substitution table that performs a byte-
wise substitution of the input data. It is used in the SubBytes step of the AES algorithm.
Each byte is replaced with another byte based on the S-Box lookup. The S-Box is a 16x16 matrix
where each entry is a hexadecimal value. The values in the S-Box are the result of applying the
inverse function in the finite field GF(2^8). The element {AB} in the S-Box is obtained by considering
{A} as the row index and {B} as the column index.
Here's how you can find the value of {AB} in the AES S-Box:
1. Split the Hexadecimal Value:
- Let {A} be the first digit and {B} be the second digit of the hexadecimal value.
2. Convert Hex to Decimal:
- Convert {A} and {B} from hexadecimal to decimal. For example, if {A} is 'A' (10 in decimal) and {B}
is 'B' (11 in decimal), you have the row index as 10 and the column index as 11.
3. Lookup in S-Box:
- Look up the value in the AES S-Box at the row index {A} and column index {B}. The result is the
substituted byte.
As an example, let's find the value of {AB} in the AES S-Box:
Let {A} = 'A' (10 in decimal) and {B} = 'B' (11 in decimal).
Looking up the value in the AES S-Box:
S-Box[A][B] = S-Box[10][11]
You would then find the corresponding hexadecimal value in the S-Box at row 10, column 11. The
result is the substituted byte represented by {AB} in the S-Box.