Saltar al contenido
uencoder

Cifrar a large file with AES in chunks

Cifrar files too large for a single AES operation by processing them in chunks with a streaming mode, then decrypt to recover.

  1. 1

    For large files (hundreds of MB or GB), loading everything into memory for a single AES call is impractical. Process the file in fixed-size chunks (e.g. 1 MiB), each with its own IV, and concatenate the ciphertext chunks.

  2. 2
    Cifrador AES →

    For each chunk: derive the key once (from passphrase), generate a fresh IV per chunk, encrypt, and output IV || ciphertext for that chunk. The key derivation is amortized — do it once.

  3. 3
    Descifrador AES →

    To decrypt: for each IV || ciphertext chunk, decrypt with the same key and IV, then concatenate the plaintext chunks in order.

  4. 4
    Codificador Base64 →

    If the encrypted output must be text-safe (for JSON or email), Base64-encode each chunk or the full ciphertext.

  5. 5

    Use GCM or CTR mode for streaming — they do not require padding and support parallel encryption. Never use ECB. For authenticated streaming, use GCM per chunk or encrypt-then-MAC the whole file.

Preguntas frecuentes

Why generate a new IV for each chunk?
Reusing an IV with the same key in GCM or CTR mode is catastrophic — it reveals XOR of plaintexts. A fresh random IV per chunk (stored with the ciphertext) prevents this. In CBC, IV reuse leaks the XOR of the first blocks.
How do I verify the decrypted file matches the original?
Calcular a SHA-256 hash of the original before encryption and of the decrypted result. If the hashes match, the round-trip is lossless. For tamper detection, store the hash alongside the ciphertext.

Flujos que resuelven esta tarea

Convertir Ascii85 a Base64
Decodificar Ascii85 y recodificar como Base64 para mayor compatibilidad.
CANALIZACIÓN
Convertir Base2048 a Base64
Decodificar Base2048 (emoji) y recodificar como Base64 para transporte estándar.
CANALIZACIÓN
Convertir Base32 a Base64
Decodificar una cadena codificada en Base32 a bytes y recodificar como Base64 para una representación más compacta.
CANALIZACIÓN
Convertir Base58 a Base64
Decodificar Base58 y recodificar como Base64 para compatibilidad estándar.
CANALIZACIÓN
Codificar en Base64 y decodificar para verificar ida y vuelta
Codificar texto a Base64 y decodificarlo para verificar que el recorrido de ida y vuelta preserva los datos originales.
CANALIZACIÓN
Blowfish cifrar y luego Base64
Cifrar con Blowfish y luego codificar en Base64 para transporte seguro en texto.
CANALIZACIÓN
DES cifrar y luego Base64
Cifrar con DES y luego codificar en Base64 para compatibilidad heredada.
CANALIZACIÓN
Codificar un payload JSON para transporte por URL
Preparar un documento JSON para un parámetro URL: embellecer, codificar en Base64, luego codificar por ciento — el inverso exacto de la cadena de decodificación de parámetros anidados.
CANALIZACIÓN
AES cifrar y luego codificar en Base64
Cifrar texto plano con AES y codificar el texto cifrado como Base64 para transporte seguro en texto.
CANALIZACIÓN
Hash contenido y codificar como Base64
Calcular un hash de la entrada y codificar el resumen como Base64 para transporte compacto.
CANALIZACIÓN
Convertir Hex a Base64
Decodificar una cadena Hex a bytes y recodificarla como Base64 para transporte compacto.
CANALIZACIÓN
Firmar HMAC y luego codificar en Base64
Generar firma HMAC y luego codificar en Base64 para encabezados de autenticación de API.
CANALIZACIÓN
Codificar Morse y transporte Base64
Codificar texto como código Morse y luego codificar en Base64 para transporte digital.
CANALIZACIÓN
RC4 cifrar y luego Base64
Cifrar con RC4 y luego codificar en Base64 para transporte.
CANALIZACIÓN
Hash RIPEMD-160 y luego Base64
Calcular hash RIPEMD-160 y luego codificar en Base64 para transporte.
CANALIZACIÓN
Barajar texto y codificar Base64
Barajar caracteres de texto y luego codificar en Base64 el resultado.
CANALIZACIÓN
Escape Unicode y codificar Base64
Escapar texto Unicode y luego codificar en Base64 para transporte seguro en ASCII.
CANALIZACIÓN
Codificar URL y luego doble Base64
Codificar URL y luego codificar en Base64 para doble codificacion en payloads API.
CANALIZACIÓN
UUencode y luego Base64
Codificar texto con UUencode y luego codificar en Base64 el resultado para doble codificacion.
CANALIZACIÓN
Generar UUID y codificar Base64
Generar un UUID y codificarlo en Base64 para almacenamiento compacto.
CANALIZACIÓN

Herramientas relacionadas