Probador de cifrado AES-256-GCM

Prueba AES-256-GCM en el navegador con una frase y derivación PBKDF2.

// about

Sobre esta herramienta

La herramienta cifra con AES-256-GCM y deriva una clave mediante PBKDF2-SHA-256. Sirve para aprender y probar localmente, no sustituye la gestión de claves en producción.

Cómo usarla

  1. Escribe el texto o pega los datos que quieres descifrar.
  2. Escribe la misma frase y elige Cifrar o Descifrar.
  3. Copia el resultado y no reutilices secretos de producción.

Por qué usar esta herramienta

  • Prueba AES sin subir texto plano.
  • Usa una frase y un número de iteraciones PBKDF2 ajustable.
  • La salida contiene la información necesaria para descifrar.

Preguntas frecuentes (FAQ)

¿Sirve para secretos de producción?

No. Usa un diseño criptográfico revisado y almacenamiento de claves gestionado.

Guías · Seguridad · 8 min de lectura

Funciones hash explicadas de forma sencilla: MD5, SHA-1 o SHA-256 y cómo usarlas

Las sumas de comprobación de descargas, los ID de commit de Git y las direcciones de blockchain son valores hash. Esta guía explica en qué se diferencia el hash del cifrado y qué algoritmo elegir para cada tarea.

Una función hash toma una entrada de cualquier longitud y produce un valor corto de longitud fija, llamado hash o resumen. Tanto si aplicas el hash a una palabra como a un vídeo de varios gigabytes, SHA-256 siempre devuelve 256 bits, es decir, 64 caracteres hexadecimales.

SHA-256("hello")  = 2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824
SHA-256("hello!") = ce06092fb948d9ffac7d1a376e404b26b7575bcc11ee05a4615fef4fec3a308b
MD5("hello")      = 5d41402abc4b2a76b9719d911017c592
Las propiedades de un buen hash, por qué MD5 y SHA-1 ya no son seguros y cómo usar hashes para la integridad de archivos y las contraseñas.
Leer guía →
Créalo con IA

Crea esta herramienta tú mismo con IA

¿Quieres tu propia versión? Copia el prompt en un chat de IA o guarda el archivo de skill para un agente de programación. Incluyen las funciones, casos límite y pruebas que usamos al crearla.

El prompt y la skill están en inglés, que las herramientas de IA entienden perfectamente.

Prompt de instrucciones para IA

Pégalo tal cual en Claude, ChatGPT o Gemini.

You are an experienced full-stack web developer. Build a web tool called "Probador de cifrado AES" that meets the requirements below.

## Goal

Build a tester that encrypts and decrypts text with AES-256-GCM using a password.

## Core features

- Encrypt and decrypt modes
- Derive the key from the password with PBKDF2 and a high iteration count
- Random salt and 12-byte IV for every encryption
- Output salt + IV + ciphertext as one Base64 string
- Copy result

## Inputs

- Plain text or Base64 ciphertext
- Password

## Outputs

- Base64 ciphertext or decrypted plain text
- Summary of algorithm and parameters

## Edge cases and handling rules

- Show 'authentication failed' for a wrong password or tampered ciphertext
- Reject empty passwords
- Explain that the same plain text encrypts differently each time
- Use the Web Crypto API so keys and text never leave the browser

## Implementation requirements

- Build it as a single page (HTML, CSS, JavaScript) that runs entirely in the browser, and never send the user's input to a server.
- Make the UI responsive and easy to use on mobile; label every input and keep everything keyboard accessible.
- Add a Copy button for results and show clear, friendly error messages for invalid input.
- Keep the core logic in functions separate from the UI so it can be unit-tested.

## Definition of done (test cases)

- Encrypt then decrypt with the same password returns the original
- Changing one character of the ciphertext makes decryption fail
- Encrypting the same input twice gives different output

First outline your implementation plan in at most five lines, then write the complete code, and finally explain how to check the test cases above.

Skill (SKILL.md)

Guárdalo como .claude/skills/build-encryption-tester/SKILL.md para que agentes como Claude Code lo reutilicen cada vez que crees o cambies la herramienta.

---
name: build-encryption-tester
description: Use when building or changing a Probador de cifrado AES tool. Build a tester that encrypts and decrypts text with AES-256-GCM using a password.
---

# Build: Probador de cifrado AES

## Goal

Build a tester that encrypts and decrypts text with AES-256-GCM using a password.

## Workflow

1. Review the required features, inputs and outputs below and ask about anything missing first.
2. Implement the core logic as pure functions separate from the UI.
3. Check the logic against the test cases in the verification list.
4. Build a responsive UI with an input form, a result area and a Copy button.
5. Reproduce each edge case listed under Rules and refine the error messages.

## Core features

- Encrypt and decrypt modes
- Derive the key from the password with PBKDF2 and a high iteration count
- Random salt and 12-byte IV for every encryption
- Output salt + IV + ciphertext as one Base64 string
- Copy result

## Inputs

- Plain text or Base64 ciphertext
- Password

## Outputs

- Base64 ciphertext or decrypted plain text
- Summary of algorithm and parameters

## Rules

- Show 'authentication failed' for a wrong password or tampered ciphertext
- Reject empty passwords
- Explain that the same plain text encrypts differently each time
- Use the Web Crypto API so keys and text never leave the browser
- Build it as a single page (HTML, CSS, JavaScript) that runs entirely in the browser, and never send the user's input to a server.

## Verification

- [ ] Encrypt then decrypt with the same password returns the original
- [ ] Changing one character of the ciphertext makes decryption fail
- [ ] Encrypting the same input twice gives different output

Consejos para trabajar con IA

  • Indica tu stack (React, Vue o HTML puro) en la primera línea para obtener código adecuado.
  • Pide que ejecute las pruebas listadas y muestre los resultados antes de aceptar el código.
  • No pegues contraseñas reales, datos de clientes ni claves de API; usa valores de ejemplo.