Skip to content

This Repository is a collection of different ethical hacking tools and malware's for penetration testing and research purpose written in python, ruby, rust, c++, go and c.

Create International Data Encryption Algorithm.md

Abdul Wahab Junaid56a4aceb2d34
diff --git a/Cryptography/Cryptography Course/Course/International Data Encryption Algorithm.md b/Cryptography/Cryptography Course/Course/International Data Encryption Algorithm.md
new file mode 100644
index 0000000..d779dd7
--- /dev/null
+++ b/Cryptography/Cryptography Course/Course/International Data Encryption Algorithm.md
@@ -0,0 +1,111 @@
+### **IDEA - International Data Encryption Algorithm**
+
+**IDEA (International Data Encryption Algorithm)** is a symmetric-key block cipher developed by **Xuejia Lai** and **James Massey** in 1991. It is designed to provide a high level of security for encrypting data while being efficient enough to run on typical hardware and software platforms. IDEA became popular due to its robustness and was used in various applications, including secure email (such as **PGP**) and secure file encryption.
+
+IDEA operates on **64-bit blocks** of plaintext and uses a **128-bit key**. It is similar to other well-known block ciphers like **DES** and **Blowfish** but offers better security than DES, mainly due to its more complex key schedule and multiple rounds.
+
+---
+
+### **Key Features of IDEA Algorithm**
+
+1. **Block Size**: IDEA operates on **64-bit blocks** of data. This means that it encrypts 64 bits (or 8 bytes) of plaintext at a time.
+
+2. **Key Size**: The algorithm uses a **128-bit key** (16 bytes), which is considered strong enough to resist brute-force attacks. The 128-bit key size is larger than **DES's 56-bit key**, making IDEA more secure than DES.
+
+3. **Rounds**: IDEA uses **8 rounds** of encryption. Each round involves several operations, including bitwise operations, modular addition, and multiplication, which increase the complexity and security of the algorithm.
+
+4. **Feistel Structure**: IDEA uses a **Feistel-like structure** where the 64-bit data block is split into two 32-bit halves (left and right), and each half is transformed in each round using a combination of operations.
+
+5. **Operations**: The main operations used in IDEA include:
+ - **XOR (exclusive OR)**: A bitwise logical operation used for combining bits.
+ - **Modular Addition**: Adds numbers modulo a certain value, providing a mathematical structure for the cipher.
+ - **Modular Multiplication**: Multiplies numbers modulo a value to introduce non-linearity (confusion) into the encryption process.
+
+6. **Key Schedule**: The 128-bit key is expanded into **52 subkeys**, each 16 bits in length. These subkeys are used in each of the 8 rounds and one final round to generate the ciphertext.
+
+---
+
+### **IDEA Encryption Process**
+
+The encryption process in IDEA is a series of transformations that occur over **8 rounds**. Each round includes a combination of bitwise operations, modular arithmetic, and substitution to provide high security.
+
+1. **Initial Step**:
+ - The 64-bit plaintext is divided into two 32-bit halves: the **left half (L)** and the **right half (R)**.
+
+2. **Rounds (1–8)**:
+ - **Subkey Generation**: For each of the 8 rounds, 6 subkeys (each 16 bits long) are generated from the 128-bit encryption key. These subkeys are applied to the data in each round.
+ - **Round Operations**:
+ - The left and right halves are processed through a combination of **modular addition** and **modular multiplication** (modulo 65537), followed by **XOR** operations.
+ - The round function is applied to both halves of the data block to introduce confusion and diffusion, effectively mixing the input data.
+ - The left and right halves of the data are swapped after each round.
+
+3. **Final Round**:
+ - The final round is slightly different, where the halves are processed using the final subkeys and combined to produce the **ciphertext**.
+
+4. **Final Output**: After completing all rounds, the result is a 64-bit ciphertext.
+
+---
+
+### **IDEA Decryption Process**
+
+IDEA is a symmetric-key cipher, which means the same key is used for both encryption and decryption. However, the decryption process requires the subkeys to be applied in reverse order. Here's how the decryption process works:
+
+1. **Initial Step**:
+ - The 64-bit ciphertext is split into two 32-bit halves: the **left half (L)** and the **right half (R)**.
+
+2. **Round Operations**:
+ - The decryption uses the **inverse of the modular multiplication** used in encryption, and the subkeys are applied in reverse order (from the 52nd subkey to the 1st subkey).
+ - The decryption rounds follow the same steps as encryption, but instead of using the modular multiplication in the forward direction, the inverse is used to "reverse" the encryption process.
+
+3. **Final Step**:
+ - After completing all rounds in reverse order, the left and right halves are recombined to produce the **original plaintext**.
+
+---
+
+### **Security of IDEA**
+
+IDEA is considered a **secure** encryption algorithm. Some of the security characteristics include:
+
+1. **Resistance to Cryptanalysis**: IDEA has been extensively analyzed, and as of now, it remains secure against many known attacks, including **differential cryptanalysis** and **linear cryptanalysis**. The combination of modular addition, multiplication, and XOR operations makes it difficult for attackers to break the algorithm.
+
+2. **Key Size**: The **128-bit key size** provides a high level of security, making brute-force attacks infeasible with modern computational power. The key size is considered comparable to **AES-128**.
+
+3. **Rounds**: The use of **8 rounds** provides a sufficient level of diffusion and confusion, which increases the difficulty of cryptanalysis. The higher the number of rounds, the more difficult it is to break the cipher using attacks like **differential cryptanalysis**.
+
+4. **S-box Design**: IDEA uses a set of **modular multiplication** and **addition** functions in each round, which makes it more resistant to linear and differential cryptanalysis than simpler block ciphers like **DES**.
+
+5. **No Known Weaknesses**: As of now, no significant weaknesses have been found in the IDEA algorithm, and no practical attacks are known to break it. However, like any encryption algorithm, the security of IDEA depends on proper key management and implementation.
+
+---
+
+### **Applications of IDEA**
+
+IDEA has been used in several important cryptographic applications, most notably in **Pretty Good Privacy (PGP)**, a widely-used email encryption software. Other applications include:
+
+1. **PGP (Pretty Good Privacy)**: IDEA was one of the primary algorithms used in **PGP** for encrypting email messages. It was included in PGP until PGP adopted **AES** as its primary encryption standard in the early 2000s.
+
+2. **File and Disk Encryption**: IDEA has been used for encrypting files and entire disk partitions to protect sensitive data. Software applications that require secure file storage may use IDEA as an encryption option.
+
+3. **Virtual Private Networks (VPNs)**: Some VPN protocols and systems have used IDEA for securing network communications.
+
+4. **Secure Messaging**: IDEA is used in secure messaging systems to protect the confidentiality and integrity of communication between parties.
+
+---
+
+### **Comparison with Other Block Ciphers**
+
+When comparing IDEA with other well-known block ciphers, such as **DES**, **AES**, and **Blowfish**, here are some key differences:
+
+- **Block Size**: IDEA uses a **64-bit block size**, which is smaller than **AES** (which uses a **128-bit block size**) but larger than **DES** (which also uses a 64-bit block). AES and Blowfish generally offer better performance with large data sizes because of their larger block sizes.
+
+- **Key Size**: IDEA uses a **128-bit key**, which is comparable to **AES-128** and **Blowfish** (which can use 128-bit keys), but larger than **DES** (which uses a 56-bit key).
+
+- **Rounds**: IDEA uses **8 rounds**, which is fewer than **AES's 10 rounds** for 128-bit encryption but more than **DES's 16 rounds**. More rounds typically lead to more secure ciphers.
+
+- **Adoption**: **AES** is widely adopted and considered the global standard for symmetric encryption, whereas **IDEA** has seen limited adoption outside specific applications like **PGP** and is less commonly used in modern encryption systems.
+
+---
+
+### **Conclusion**
+
+The **IDEA (International Data Encryption Algorithm)** is a strong and efficient symmetric-key block cipher that uses a **128-bit key** and operates on **64-bit blocks**. With **8 rounds** of encryption and a combination of modular addition, multiplication, and XOR operations, IDEA provides a high level of security and has been used in various cryptographic applications, especially **PGP**. While it is secure against known cryptanalytic attacks, it is no longer as widely used as other ciphers like **AES**, which has become the global standard for symmetric encryption. Nonetheless, IDEA remains an important cryptographic algorithm that has contributed significantly to the development of modern encryption techniques.