Idea Data encryption Algorithm _idea

Source: Internet
Author: User
Tags key loop rounds

1. Introduction

idea is the abbreviation of International Data encryption algorithm, the recommended standard algorithm proposed by the Swiss Federal Institute of Technology in 1990 to learn Jia X.j.lai and Massey is called PES (proposed encryption Standard). Lai and Massey were improved in 1992 to enhance the ability to resist differential analysis. It's also a packet encryption algorithm for 64bit size block encryption. The key length is 128 bits. It is based on "mixed operations on different algebraic groups" The design idea algorithm is easy to implement with hardware and software and is much faster than des in implementation. IDEA since its inception, has undergone a large number of detailed review, the password analysis has a strong resistance to the use of a variety of commercial products.

This algorithm is developed on the basis of the DES algorithm, similar to the Triple DES. Development idea is also because of the feeling that Des has a key too short, such as shortcomings, has become obsolete. Idea has a key of 128 bits, so long keys should be safe for several years to come.

Similar to the Des,idea algorithm is a data block encryption algorithm that designs a series of cryptographic rounds, each using a child key generated from the full encryption key. The difference with DES is that it is as fast as software implementation and hardware implementation.

Since idea is proposed and developed outside the United States and avoids the many limitations of American law on cryptography, books on idea algorithm and technology can be freely published and exchanged, which can greatly promote the development and perfection of idea.

2, the algorithm detailed:

2.1 Generating key

The algorithm uses 52 sub keys (6 for each round in the 8 wheel and 4 for the output). First, the 128-bit key is divided into 8 16-seat keys. These are the first 8 sub keys of the algorithm (first round six, second round). The key then moves the x bit to the Zoo and divides into 8 sub keys. The first 4 were used in the second round, and the back 4 were used in the third round. The key again moves 25 bits to the Zoo to produce another 8 subkeys, so that until the algorithm is finished. The details are:

Idea has a total of 8 rounds of iterations, 6 subkeys per round, and 4 additional subkeys, so a total of 52 subkeys are required, and the 52 subkeys are extended from 128-bit keys.

First, the input key is divided into 8 16-bit keys, 1~6 the chant key for the first round of encryption use, 7~8 chant key for the second round, and then the 128-bit key cycle left 25 digits, such key = K26k27k28.k24k25.

The newly generated key is divided into 8 16-bit 1~4 keys for use in the second round of encryption (two previously provided) 5~8 the chant key for use in the third round of encryption. So we've got 16 subkeys, so continue, when the loop moves left 5 times, 48 subkeys have been generated, and four additional subkeys need to be generated, and the key loop left 25 again. Select the first 4 of the divided 8 16-bit subkeys as the 4 additional cryptographic keys. The 52 subkeys used for encryption are generated.

The input 64-bit data groupings are divided into 4 16-seat groupings: Xl,x2,x3 and X4. These 4 subgroups become the first-round input of the algorithm, with a total of 8 rounds. In each round, the 4 subgroups are different or, add, multiply, and are different or, together, multiplied by 6 16-seat keys. Between the wheel and the wheel, the second and third sub groups are exchanged. Finally, 4 subgroups and 4 sub keys are calculated in the output transformation.

2.2 Plus, decryption process

In each round, the order of execution is as follows:

(1) X1 is multiplied by the first child key.

(2) X2 and the second child key are added.

(3) X3 and the third child key are added.

(4) Multiply the X4 and the fourth sub key.

(5) The results of steps (1) and (3) are different or ...

(6) The results of steps (2) and (4) are different or.

(7) Multiplies the result of step (5) With the fifth child key.

(8) Add the results of step (6) and step (7).

(9) Multiplies the result of step (8) with the sixth child key.

(10) Add the results of step (7) and step (9).

(11) The results of steps (1) and (9) are different or.

(12) The results of Steps (3) and (9) are different or.

(13) The results of steps (2) and (10) are different or.

(14) The results of steps (4) and (10) are different or.

The output of each round is the 4 subgroups formed by the results of the steps (11), (12), (13), and (14). Swap the middle two packet groups (except the last round) for the next round of input.

After 8 rounds of operation, there is a final output transformation:

(1) X1 is multiplied by the first child key.

(2) X2 and the second child key are added.

(3) X3 and the third child key are added.

(4) Multiply the X4 and the fourth sub key.

Finally, the 4 subgroups are reconnected together to produce the ciphertext.

2.3 Key Correspondence diagram

2.4 Encryption Process Diagram

2.5 Decryption Process Diagram

3. Evaluation:

The idea algorithm has a key length of 128 digits. The designer tries his best to make the algorithm unaffected by the differential cryptanalysis, and mathematicians have proved that the idea algorithm is not affected by differential cryptanalysis after the 4th lap of its 8-loop iteration. Assuming that the exhaustive attack is effective, it will take 1013 years to solve the problem, even if you design a special chip that can test 1 billion keys per second, and use 1 billion of these chips for this work, and, on the other hand, if you use 1024 chips like this, it's possible to find the key in one day, But people still can't find enough silicon atoms to make such a machine. At present, there is not a publicly published article trying to password-analyze idea. So for now, it should be said that idea is very safe.

Moreover, the idea data compare the RSA algorithm to add, the solution speed is much faster, also compared to the DES algorithm to be relatively safe.

4. Reference documents:

"Applied Cryptography (Protocol algorithm and C source program)": Machinery Industry Press

5, Source code:


trackback:http://tb.blog.csdn.net/trackback.aspx?postid=1109279

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.