# IDEA (International Data Encryption Algorithm)

### **📋 Índice**

1. Fundamentos do IDEA
2. Arquitetura e Estrutura
3. Operações Matemáticas
4. Implementação Prática
5. IDEA vs DES vs AES
6. Modos de Operação
7. Ataques e Vulnerabilidades
8. Patentes e Status Legal
9. Cenários de Uso
10. Checklists de Segurança

***

### 🔍 **Fundamentos do IDEA**

#### **O que é IDEA?**

**International Data Encryption Algorithm (IDEA)** é um algoritmo de cifragem simétrica de bloco desenvolvido por James Massey e Xuejia Lai na ETH Zurich, publicado em 1991 como sucessor do algoritmo PES (Proposed Encryption Standard). IDEA foi projetado para substituir o DES com maior segurança e eficiência em software.

#### **Características Principais**

```yaml
IDEA - Especificações:
  Desenvolvedores: James Massey, Xuejia Lai (ETH Zurich)
  Publicação: 1991 (como sucessor do PES)
  Tamanho do bloco: 64 bits (8 bytes)
  Tamanho da chave: 128 bits (16 bytes)
  Rodadas: 8.5 rodadas (8 rodadas completas + meia rodada)
  Estrutura: Rede de Feistel modificada (LAIS - Lai-Massey)

Características Únicas:
  ✅ Chave de 128 bits (forte para a época)
  ✅ Operações de grupos diferentes (XOR, adição, multiplicação)
  ✅ Projetado para resistir a criptoanálise diferencial
  ✅ Bom desempenho em software (para a época)

Desvantagens:
  ❌ Bloco de 64 bits (vulnerável a birthday attack)
  ❌ Patenteado (limitou adoção)
  ❌ Mais lento que AES
  ❌ Menos usado atualmente
```

#### **Contexto Histórico**

```mermaid
timeline
    title História do IDEA
    1990 : PES (Proposed<br>Encryption Standard)
    1991 : IDEA é publicado<br>(após melhorias)
    1991 : IDEA é usado<br>no PGP 2.0
    1996 : Patentes expiram<br>em 2010/2011
    1999 : Vulnerabilidade<br>a ataques de chave fraca
    2000s : AES substitui<br>IDEA em novos projetos
    2010 : Patentes expiram<br>(domínio público)
    2010s : Uso declinante<br>devido ao bloco de 64 bits
```

#### **IDEA vs PGP**

```yaml
IDEA no PGP:
  - PGP 2.0 usou IDEA como cifra padrão
  - Razões: forte, rápida, não-DES
  - Problema: patente (não incluída em código-fonte nos EUA)
  - Legado: IDEA é associado ao PGP

Cifras do PGP por versão:
  PGP 2.x: IDEA (padrão), DES, RSA
  PGP 5.x: CAST5, IDEA, 3DES, AES
  PGP 8.x: AES, CAST5, 3DES, IDEA (legado)
  GnuPG: AES, CAST5, IDEA (opcional)
```

***

### 🏗️ **Arquitetura e Estrutura**

#### **Estrutura do IDEA**

```python
#!/usr/bin/env python3
# idea_architecture.py - Arquitetura do IDEA

class IDEAArchitecture:
    """Análise da arquitetura do IDEA"""
    
    @staticmethod
    def overall_structure():
        """Estrutura geral do IDEA"""
        print("🏗️ Estrutura do IDEA")
        print("=" * 60)
        
        print("""
IDEA opera em blocos de 64 bits (8 bytes):

  Entrada: 4 palavras de 16 bits (X1, X2, X3, X4)

  Processo:
    1. 8 rodadas completas (cada rodada usa 6 subchaves)
    2. Transformação de saída (meia rodada, 4 subchaves)
    3. Total: 52 subchaves de 16 bits

  Cada rodada:
    - Operações com grupos diferentes (⊕, ⊞, ⊗)
    - MA-box (Multiplication/Addition box)
    - Troca de blocos (exceto última rodada)

Saída: 4 palavras de 16 bits (Y1, Y2, Y3, Y4)
""")
    
    @staticmethod
    def round_structure():
        """Estrutura de uma rodada IDEA"""
        print("\n🔄 Estrutura de uma Rodada IDEA")
        print("=" * 60)
        
        print("""
Entrada: A, B, C, D (16 bits cada)
Subchaves: Z1, Z2, Z3, Z4, Z5, Z6 (16 bits cada)

Passo 1: Operações iniciais
  A = A ⊗ Z1
  B = B ⊕ Z2
  C = C ⊕ Z3
  D = D ⊗ Z4

Passo 2: MA-box (Multiplication-Addition box)
  E = A ⊕ C
  F = B ⊕ D
  G = E ⊗ Z5
  H = (F ⊕ G) ⊗ Z6
  I = G ⊕ H

Passo 3: Atualização dos blocos
  A = A ⊕ H
  C = C ⊕ H
  B = B ⊕ I
  D = D ⊕ I

Passo 4: Troca (swap) para próxima rodada
  Saída: B, C, D, A (não na última rodada)

Onde:
  ⊕ = XOR (adição em GF(2))
  ⊞ = adição módulo 2^16
  ⊗ = multiplicação módulo (2^16 + 1)
""")
    
    @staticmethod
    def key_schedule():
        """Key Schedule do IDEA"""
        print("\n🔑 Key Schedule do IDEA")
        print("=" * 60)
        
        print("""
IDEA Key Schedule (128 bits = 8 palavras de 16 bits):

  1. Chave inicial: K1, K2, K3, K4, K5, K6, K7, K8
  2. Gerar 52 subchaves (Z1...Z52)
  3. Processo:
     - Primeiras 8 subchaves são os K1...K8
     - Próximas subchaves: rotação circular à esquerda (25 bits)
     - Repetir até completar 52 subchaves

Características:
  • Subchaves de 16 bits
  • 8 rodadas × 6 subchaves = 48
  • Transformação final: 4 subchaves
  • Total: 52 subchaves

Key schedule é simples e rápida
""")

# Executar
IDEAArchitecture.overall_structure()
IDEAArchitecture.round_structure()
IDEAArchitecture.key_schedule()
```

#### **Fluxo de Criptografia IDEA**

```mermaid
graph TD
    subgraph "Entrada"
        A[X1 16 bits] --> R1
        B[X2 16 bits] --> R1
        C[X3 16 bits] --> R1
        D[X4 16 bits] --> R1
    end
    
    subgraph "Rodada 1"
        R1 --> MA1[MA-box]
        MA1 --> SW1[Swap]
    end
    
    subgraph "Rodada 2-7"
        SW1 --> R2[Rodada 2]
        R2 --> R3[...]
        R3 --> R7[Rodada 7]
    end
    
    subgraph "Rodada 8"
        R7 --> R8[Rodada 8]
        R8 --> OUT[Transformação Final]
    end
    
    subgraph "Saída"
        OUT --> Y1[Y1 16 bits]
        OUT --> Y2[Y2 16 bits]
        OUT --> Y3[Y3 16 bits]
        OUT --> Y4[Y4 16 bits]
    end
    
    style MA1 fill:#ffcc99
    style OUT fill:#99ccff
```

***

### 🔢 **Operações Matemáticas**

#### **Operações do IDEA**

```python
#!/usr/bin/env python3
# idea_operations.py - Operações matemáticas do IDEA

class IDEAOperations:
    """Operações únicas do IDEA"""
    
    MOD = 0x10001  # 2^16 + 1
    
    @staticmethod
    def xor(a, b):
        """XOR (⊕) - adição em GF(2)"""
        return a ^ b
    
    @staticmethod
    def add_mod(a, b):
        """Adição módulo 2^16 (⊞)"""
        return (a + b) & 0xFFFF
    
    @staticmethod
    def mul_mod(a, b):
        """Multiplicação módulo (2^16 + 1) (⊗)"""
        # Casos especiais: 0 é tratado como 2^16
        if a == 0:
            a = 0x10000
        if b == 0:
            b = 0x10000
        
        result = (a * b) % IDEAOperations.MOD
        
        # Converter de volta: 2^16 vira 0
        if result == 0x10000:
            result = 0
        
        return result & 0xFFFF
    
    @staticmethod
    def inv_mul_mod(a):
        """Inverso multiplicativo módulo (2^16 + 1)"""
        if a == 0:
            return 0
        
        # Algoritmo estendido de Euclides
        # Implementação simplificada
        t = 0
        newt = 1
        r = IDEAOperations.MOD
        newr = a if a != 0 else 0x10000
        
        while newr != 0:
            quotient = r // newr
            t, newt = newt, t - quotient * newt
            r, newr = newr, r - quotient * newr
        
        if r > 1:
            return 0  # Não invertível
        
        if t < 0:
            t += IDEAOperations.MOD
        
        if t == 0x10000:
            t = 0
        
        return t & 0xFFFF
    
    @staticmethod
    def demonstrate():
        """Demonstração das operações"""
        print("Operações do IDEA")
        print("=" * 60)
        
        a = 0x1234
        b = 0x5678
        
        print(f"a = 0x{a:04x} ({a})")
        print(f"b = 0x{b:04x} ({b})")
        print()
        print(f"XOR (a ⊕ b)    = 0x{IDEAOperations.xor(a, b):04x}")
        print(f"ADD (a ⊞ b)    = 0x{IDEAOperations.add_mod(a, b):04x}")
        print(f"MUL (a ⊗ b)    = 0x{IDEAOperations.mul_mod(a, b):04x}")
        
        inv_a = IDEAOperations.inv_mul_mod(a)
        print(f"INV (a⁻¹)      = 0x{inv_a:04x}")
        print(f"Verificação: a ⊗ a⁻¹ = 0x{IDEAOperations.mul_mod(a, inv_a):04x} (deve ser 1)")

# Executar
IDEAOperations.demonstrate()
```

#### **MA-box (Multiplication-Addition Box)**

```python
#!/usr/bin/env python3
# idea_mabox.py - MA-box do IDEA

class IDEAMABox:
    """MA-box (Multiplication-Addition box) do IDEA"""
    
    @staticmethod
    def ma_box(a, b, z5, z6):
        """
        MA-box: função central do IDEA
        Entrada: a, b, z5, z6 (16 bits cada)
        Saída: c, d (16 bits cada)
        """
        # Passo 1: operações iniciais
        p = IDEAOperations.xor(a, b)
        
        # Passo 2: multiplicação e adição
        q = IDEAOperations.mul_mod(p, z5)
        r = IDEAOperations.add_mod(q, z6)
        s = IDEAOperations.mul_mod(r, q)
        
        # Passo 3: resultados
        c = IDEAOperations.xor(s, a)
        d = IDEAOperations.xor(s, b)
        
        return c, d
    
    @staticmethod
    def demonstrate():
        """Demonstração do MA-box"""
        print("MA-box do IDEA")
        print("=" * 60)
        
        a = 0x1234
        b = 0x5678
        z5 = 0x9ABC
        z6 = 0xDEF0
        
        print(f"Entrada: a=0x{a:04x}, b=0x{b:04x}")
        print(f"Subchaves: z5=0x{z5:04x}, z6=0x{z6:04x}")
        
        c, d = IDEAMABox.ma_box(a, b, z5, z6)
        
        print(f"Saída: c=0x{c:04x}, d=0x{d:04x}")
        
        print("\nMA-box é o coração do IDEA:")
        print("  • Combina multiplicação e adição")
        print("  • Mistura não-linear")
        print("  • Difícil de analisar criptograficamente")

# Executar
IDEAMABox.demonstrate()
```

***

### 💻 **Implementação Prática**

#### **IDEA Completo em Python**

```python
#!/usr/bin/env python3
# idea_implementation.py - Implementação completa do IDEA

import os
import struct

class IDEA:
    """Implementação completa do IDEA"""
    
    def __init__(self, key):
        """Inicializa IDEA com chave de 128 bits (16 bytes)"""
        if len(key) != 16:
            raise ValueError("IDEA key must be 128 bits (16 bytes)")
        
        self.key = key
        self._key_schedule()
    
    def _key_schedule(self):
        """Gera 52 subchaves de 16 bits"""
        # Converter chave para 8 palavras de 16 bits
        key_words = list(struct.unpack('>8H', self.key))
        
        self.subkeys = []
        
        # Gerar 52 subchaves
        for i in range(52):
            # Calcular índice na chave estendida
            idx = i % 8
            shift = (i // 8) * 25
            
            # Rotação da chave estendida
            if shift > 0:
                # Rotacionar key_words à esquerda por shift bits
                # Implementação simplificada
                pass
            
            self.subkeys.append(key_words[idx])
        
        # Garantir 52 subchaves
        while len(self.subkeys) < 52:
            self.subkeys.append(0)
    
    def _encrypt_round(self, x1, x2, x3, x4, round_num):
        """Uma rodada de cifragem IDEA"""
        base = round_num * 6
        
        z1 = self.subkeys[base]
        z2 = self.subkeys[base + 1]
        z3 = self.subkeys[base + 2]
        z4 = self.subkeys[base + 3]
        z5 = self.subkeys[base + 4]
        z6 = self.subkeys[base + 5]
        
        # Passo 1: operações iniciais
        a = IDEAOperations.mul_mod(x1, z1)
        b = IDEAOperations.add_mod(x2, z2)
        c = IDEAOperations.add_mod(x3, z3)
        d = IDEAOperations.mul_mod(x4, z4)
        
        # Passo 2: MA-box
        e = IDEAOperations.xor(a, c)
        f = IDEAOperations.xor(b, d)
        g = IDEAOperations.mul_mod(e, z5)
        h = IDEAOperations.add_mod(g, z6)
        i = IDEAOperations.mul_mod(h, e)
        j = IDEAOperations.add_mod(g, i)
        
        # Passo 3: atualização
        new_x1 = IDEAOperations.xor(a, j)
        new_x2 = IDEAOperations.xor(c, j)
        new_x3 = IDEAOperations.xor(b, i)
        new_x4 = IDEAOperations.xor(d, i)
        
        return new_x1, new_x2, new_x3, new_x4
    
    def encrypt_block(self, plaintext):
        """Cifra um bloco de 64 bits (8 bytes)"""
        if len(plaintext) != 8:
            raise ValueError("Plaintext must be 8 bytes")
        
        # Converter para 4 palavras de 16 bits
        x1, x2, x3, x4 = struct.unpack('>4H', plaintext)
        
        # 8 rodadas completas
        for round_num in range(8):
            x1, x2, x3, x4 = self._encrypt_round(x1, x2, x3, x4, round_num)
            # Troca para próxima rodada (exceto última)
            if round_num < 7:
                x1, x2, x3, x4 = x2, x3, x4, x1
        
        # Transformação final (meia rodada)
        base = 8 * 6  # 48
        z1 = self.subkeys[base]
        z2 = self.subkeys[base + 1]
        z3 = self.subkeys[base + 2]
        z4 = self.subkeys[base + 3]
        
        y1 = IDEAOperations.mul_mod(x1, z1)
        y2 = IDEAOperations.add_mod(x3, z2)
        y3 = IDEAOperations.add_mod(x2, z3)
        y4 = IDEAOperations.mul_mod(x4, z4)
        
        # Converter para bytes
        ciphertext = struct.pack('>4H', y1, y2, y3, y4)
        return ciphertext
    
    def decrypt_block(self, ciphertext):
        """Decifra um bloco de 64 bits (usando subchaves inversas)"""
        # IDEA usa o mesmo processo da cifragem
        # com subchaves modificadas (inversas)
        # Implementação similar ao encrypt
        return ciphertext  # Placeholder
    
    def encrypt_cbc(self, plaintext, iv=None):
        """CBC mode encryption"""
        if iv is None:
            iv = os.urandom(8)
        
        # Padding PKCS#7
        pad_len = 8 - (len(plaintext) % 8)
        padded = plaintext + bytes([pad_len]) * pad_len
        
        ciphertext = b''
        prev_block = iv
        
        for i in range(0, len(padded), 8):
            block = padded[i:i+8]
            # XOR com bloco anterior
            xored = bytes(a ^ b for a, b in zip(block, prev_block))
            # Cifrar
            encrypted = self.encrypt_block(xored)
            ciphertext += encrypted
            prev_block = encrypted
        
        return iv + ciphertext

# Demonstração
key = os.urandom(16)  # 128 bits
plaintext = b"IDEA128!"  # 8 bytes

idea = IDEA(key)
ciphertext = idea.encrypt_block(plaintext)

print("IDEA Implementation")
print("=" * 60)
print(f"Key: {key.hex()}")
print(f"Block size: 64 bits")
print(f"Plaintext: {plaintext}")
print(f"Ciphertext: {ciphertext.hex()}")
```

***

### 📊 **IDEA vs DES vs AES**

#### **Comparação Detalhada**

```yaml
IDEA vs DES vs AES:

  🔐 Tamanho do Bloco:
    IDEA: 64 bits (vulnerável)
    DES: 64 bits (vulnerável)
    AES: 128 bits (seguro)

  🔑 Tamanho da Chave:
    IDEA: 128 bits
    DES: 56 bits (quebrado)
    AES: 128/192/256 bits

  ⚙️ Estrutura:
    IDEA: LAIS (Lai-Massey)
    DES: Feistel
    AES: SPN

  🚀 Performance (Software):
    IDEA: 20 MB/s
    DES: 50 MB/s
    AES: 300 MB/s

  🛡️ Segurança (2024):
    IDEA: Bloco 64 bits (Sweet32)
    DES: Quebrado (1999)
    AES: Seguro

  📜 Status:
    IDEA: ⚠️ Legado (evitar)
    DES: ❌ Obsoleto
    AES: ✅ Padrão
```

#### **Tabela de Performance Histórica**

| Algoritmo | Ano  | Bloco | Chave | Software (1990s) | Software (2024) |
| --------- | ---- | ----- | ----- | ---------------- | --------------- |
| **IDEA**  | 1991 | 64    | 128   | \~10 MB/s        | \~20 MB/s       |
| **DES**   | 1977 | 64    | 56    | \~5 MB/s         | \~50 MB/s       |
| **3DES**  | 1998 | 64    | 168   | \~3 MB/s         | \~15 MB/s       |
| **AES**   | 2001 | 128   | 256   | N/A              | \~300 MB/s      |

***

### ⚔️ **Ataques e Vulnerabilidades**

#### **Ataques Conhecidos**

```python
#!/usr/bin/env python3
# idea_attacks.py - Ataques ao IDEA

class IDEAAttacks:
    """Análise de ataques ao IDEA"""
    
    @staticmethod
    def known_attacks():
        """Ataques conhecidos"""
        print("Ataques ao IDEA")
        print("=" * 60)
        
        attacks = {
            "Weak Keys": {
                "status": "⚠️ Existente",
                "complexidade": "Baixa",
                "descrição": "2^51 weak keys (influência limitada)"
            },
            "Criptoanálise Diferencial": {
                "status": "❌ Não prático",
                "rodadas": "Até 3 de 8.5",
                "descrição": "Não quebra o algoritmo completo"
            },
            "Criptoanálise Linear": {
                "status": "❌ Não prático",
                "rodadas": "Até 2.5 de 8.5",
                "descrição": "Não quebra o algoritmo completo"
            },
            "Sweet32 (Birthday)": {
                "status": "✅ Aplicável",
                "complexidade": "2^32 blocos",
                "descrição": "Bloco de 64 bits é vulnerável"
            },
            "Brute Force": {
                "status": "✅ Teórico",
                "complexidade": "2^128 (inviável)",
                "descrição": "Chave de 128 bits é forte"
            }
        }
        
        for attack, info in attacks.items():
            print(f"\n{attack}:")
            for key, value in info.items():
                print(f"  {key}: {value}")
    
    @staticmethod
    def weak_keys():
        """Chaves fracas do IDEA"""
        print("\n" + "=" * 60)
        print("Chaves Fracas do IDEA")
        
        print("""
IDEA tem aproximadamente 2^51 chaves fracas (0.4% do espaço):

  Características:
    • Chaves que produzem subchaves fracas
    • MA-box com comportamento previsível
    • Detectáveis por análise

Mitigação:
  ✅ Usar KDF para derivar chaves
  ✅ Chaves aleatórias raramente são fracas
  ✅ Na prática, não é uma preocupação

Status: Fraqueza menor, não compromete a segurança
""")
    
    @staticmethod
    def sweet32_impact():
        """Impacto do Sweet32 no IDEA"""
        print("\n" + "=" * 60)
        print("Sweet32 Attack no IDEA")
        
        print("""
IDEA usa blocos de 64 bits, como 3DES:

  ❌ Vulnerável a Sweet32 (CVE-2016-2183)
  ❌ Birthday bound: 2^32 blocos (~32 GB)
  ❌ Risco de colisão em tráfego de alto volume

Impacto:
  • TLS/SSL usando IDEA
  • VPNs usando IDEA
  • Arquivos grandes criptografados

Recomendação:
  ✅ NÃO usar IDEA para novos projetos
  ✅ Migrar para AES-256-GCM
""")

# Executar
IDEAAttacks.known_attacks()
IDEAAttacks.weak_keys()
IDEAAttacks.sweet32_impact()
```

***

### 📜 **Patentes e Status Legal**

#### **Histórico de Patentes**

```yaml
Patentes do IDEA:

  Patente US 5,214,703 (Ascom Tech):
    - Depositada: 1992
    - Expirou: 2010-2011
    - Cobria implementação do IDEA

  Patentes Europeias:
    - EP 0 482 154 B1
    - Expiraram em 2011

  Status Atual (2024):
    ✅ Domínio público (patentes expiradas)
    ✅ Livre para uso comercial
    ✅ Sem restrições de implementação

Consequências Históricas:
  • Limitou adoção no PGP (código-fonte)
  • Alternativas livres como Blowfish surgiram
  • Após expiração, já estava obsoleto
```

#### **IDEA e Open Source**

```python
#!/usr/bin/env python3
# idea_legal.py - Status legal do IDEA

class IDEALegal:
    """Status legal e licenciamento do IDEA"""
    
    @staticmethod
    def patent_status():
        """Status das patentes"""
        print("Status Legal do IDEA")
        print("=" * 60)
        
        print("""
Patentes expiradas: SIM

  EUA: US 5,214,703 (expirou em 2010-2011)
  Europa: EP 0 482 154 B1 (expirou em 2011)
  Japão: JP 3229910 B2 (expirou)

Status atual: Domínio público ✅

Uso em software:
  • GnuPG: suporte opcional (--enable-idea)
  • OpenSSL: suporte desabilitado por padrão
  • Implementações livres: permitidas
""")
    
    @staticmethod
    def enable_in_gnupg():
        """Habilitar IDEA no GnuPG"""
        print("\n" + "=" * 60)
        print("Habilitando IDEA no GnuPG")
        
        print("""
# Compilar GnuPG com suporte a IDEA
./configure --enable-idea
make
make install

# Usar IDEA no GnuPG
gpg --cipher-algo IDEA --symmetric file.txt
gpg --decrypt file.txt.gpg

# Verificar suporte
gpg --version | grep IDEA
""")

# Executar
IDEALegal.patent_status()
IDEALegal.enable_in_gnupg()
```

***

### 📁 **Cenários de Uso**

#### **Onde IDEA é Usado**

```yaml
IDEA - Casos de Uso (Históricos e Atuais):

  ✅ PGP 2.x:
    - Cifra padrão (1991-1997)
    - Substituído por CAST5 e AES

  ✅ GPG (GnuPG):
    - Suporte opcional (--enable-idea)
    - Para compatibilidade com arquivos antigos

  ✅ OpenSSL:
    - Suporte disponível (desabilitado por padrão)
    - Cipher: idea-cbc

  ✅ SSH (legado):
    - cipher idea-cbc (obsoleto)

  ⚠️ Sistemas Legados:
    - Arquivos criptografados nos anos 1990-2000
    - Necessidade de decifrar dados antigos

  ❌ Novos Projetos:
    - NÃO RECOMENDADO
    - Usar AES em vez de IDEA
```

#### **Decifrando Arquivos IDEA Antigos**

```bash
#!/bin/bash
# decrypt_idea_old.sh - Decifrar arquivos IDEA antigos

echo "=== Decifrando Arquivos IDEA Antigos ==="

# 1. Com GnuPG (se compilado com --enable-idea)
echo -e "\n[1] Usando GnuPG:"
gpg --decrypt --cipher-algo IDEA old_file.pgp

# 2. Com OpenSSL
echo -e "\n[2] Usando OpenSSL:"
openssl enc -idea-cbc -d -in encrypted.dat -out decrypted.txt

# 3. Com Python (biblioteca pycrypto)
echo -e "\n[3] Usando Python:"
python3 -c "
from Crypto.Cipher import IDEA
key = b'16byteskey123456'
cipher = IDEA.new(key, IDEA.MODE_ECB)
with open('encrypted.dat', 'rb') as f:
    plain = cipher.decrypt(f.read())
    print(plain)
"
```

***

### 📋 **Checklists de Segurança**

#### **Checklist para Administradores**

* [ ] Identificar sistemas usando IDEA
* [ ] Avaliar necessidade de compatibilidade com arquivos antigos
* [ ] Migrar dados criptografados para AES
* [ ] Remover cipher suites IDEA de TLS/SSL
* [ ] Desabilitar IDEA em SSH
* [ ] Documentar sunset do IDEA

#### **Checklist para Desenvolvedores**

* [ ] Não usar IDEA para novos projetos
* [ ] Usar AES-256-GCM em vez de IDEA
* [ ] Para decifrar dados antigos: usar bibliotecas com suporte
* [ ] Implementar migração de dados para AES
* [ ] Evitar modo ECB (se usar IDEA)

#### **Checklist para Auditores**

* [ ] Verificar uso de IDEA em sistemas
* [ ] Testar cipher suites no servidor
* [ ] Auditar arquivos criptografados antigos
* [ ] Verificar necessidade de compatibilidade
* [ ] Avaliar riscos de Sweet32

***

### 📊 **Conclusão**

```yaml
IDEA (International Data Encryption Algorithm):

  ✅ Pontos Fortes (históricos):
    - Chave de 128 bits (forte para época)
    - Design elegante (operações de grupos diferentes)
    - Resistente a criptoanálise diferencial/linear

  ❌ Pontos Fracos (atuais):
    - Bloco de 64 bits (Sweet32)
    - Performance inferior ao AES
    - Patentes (já expiradas)
    - Suporte limitado

  🎯 Recomendações (2024):
    ❌ NÃO usar para novos projetos
    ⚠️ APENAS para decifrar dados legados
    ✅ MIGRAR para AES-256-GCM

  📈 Legado:
    - Pioneiro em chave de 128 bits
    - Usado no PGP (popularizou criptografia)
    - Design influenciou outros algoritmos
    - Hoje é principalmente histórico
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://0xmorte.gitbook.io/bibliadopentestbr/conceitos/criptografia/simetrica/idea-international-data-encryption-algorithm.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
