Тестер шифрования AES-256-GCM

Тестируйте AES-256-GCM в браузере с парольной фразой и PBKDF2.

// about

Об этом инструменте

Инструмент использует AES-256-GCM и выводит ключ из фразы через PBKDF2-SHA-256. Он предназначен для обучения и локальных тестов, а не для продакшена.

Как использовать

  1. Введите текст для шифрования или данные для расшифровки.
  2. Введите ту же фразу и выберите действие.
  3. Скопируйте результат и не используйте секреты продакшена повторно.

Зачем используют этот инструмент

  • Проверяйте AES, не загружая открытый текст.
  • Используйте фразу и настраиваемое число итераций PBKDF2.
  • Результат содержит данные для последующей расшифровки.

Часто задаваемые вопросы (FAQ)

Подходит ли инструмент для продакшена?

Нет. Используйте проверенную криптографическую схему и управляемое хранилище ключей.

Руководства · Безопасность · 7 мин чтения

Хеш-функции простыми словами: MD5, SHA-1 или SHA-256 и как их применять

Контрольные суммы загрузок, идентификаторы коммитов Git и адреса в блокчейне — всё это хеш-значения. В руководстве объясняется, чем хеширование отличается от шифрования и какой алгоритм выбрать для каждой задачи.

Хеш-функция принимает входные данные любой длины и выдаёт короткое значение фиксированной длины — хеш, или дайджест. Хешируете ли вы одно слово или видео на несколько гигабайт, SHA-256 всегда выдаёт 256 бит, то есть 64 шестнадцатеричных символа.

SHA-256("hello")  = 2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824
SHA-256("hello!") = ce06092fb948d9ffac7d1a376e404b26b7575bcc11ee05a4615fef4fec3a308b
MD5("hello")      = 5d41402abc4b2a76b9719d911017c592
Свойства хорошей хеш-функции, почему MD5 и SHA-1 устарели и как правильно применять хеши для проверки файлов и хранения паролей.
Читать →
Сделать с ИИ

Создайте этот инструмент сами с помощью ИИ

Нужна своя версия? Скопируйте промпт в чат с ИИ или сохраните файл навыка для ИИ-агента. В них описаны функции, особые случаи и тесты, которые мы использовали.

Промпт и навык даны на английском — ИИ-инструменты хорошо его понимают.

Промпт-задание для ИИ

Вставьте как есть в Claude, ChatGPT или Gemini.

You are an experienced full-stack web developer. Build a web tool called "Тестер шифрования 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.md)

Сохраните как .claude/skills/build-encryption-tester/SKILL.md, чтобы агенты вроде Claude Code использовали его при каждой доработке инструмента.

---
name: build-encryption-tester
description: Use when building or changing a Тестер шифрования AES tool. Build a tester that encrypts and decrypts text with AES-256-GCM using a password.
---

# Build: Тестер шифрования 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

Советы по работе с ИИ

  • Укажите стек (React, Vue или чистый HTML) в первой строке, чтобы код подошёл к проекту.
  • Попросите ИИ выполнить перечисленные тесты и показать результаты до принятия кода.
  • Не вставляйте настоящие пароли, данные клиентов и API-ключи; используйте примеры.