跳到主要内容
Z

AES 加密与解密

使用 AES-256-GCM 和密码对文本进行加密与解密。通过 PBKDF2-SHA256 派生密钥,全部计算在浏览器本地完成。

免费 无需注册 客户端运行 注重隐私 Updated

强度:

处理中…

使用方法

  1. 1 选择 Encrypt(加密)或 Decrypt(解密)。
  2. 2 输入密码——可参考强度指示条(strength meter)作为提示。
  3. 3 加密时粘贴明文,解密时粘贴 Base64 密文,然后点击操作按钮。
  4. 4 复制输出结果。密码始终不会离开你的浏览器。

为什么使用此工具

  • AES-256-GCM 带认证加密——任何篡改都会被检测到,这一点优于普通的 AES-CBC。
  • PBKDF2-SHA256 迭代 100,000 次,可有效拖慢针对弱密码的离线暴力破解攻击。
  • 每次加密都使用随机的 16 字节盐值和 12 字节 IV——相同的明文加密码每次都会得到不同的结果。
  • 纯 WebCrypto 实现——直接在浏览器中运行,任何服务器都无法看到密码或明文。

常见问题

我的数据会离开浏览器吗?

不会。本工具使用浏览器原生的 WebCrypto API,你的密码和明文永远不会传输到我们的服务器。

为什么使用 AES-GCM 而不是 CBC?

GCM 属于带认证加密——解密时能检测出密文(或 IV/盐值)是否被篡改。CBC 本身不具备认证能力,如果不额外配合独立的 MAC 使用会非常危险。

为什么 PBKDF2 使用 100,000 次迭代?

这是 OWASP 针对 PBKDF2-SHA256 推荐的基础水平,能够拖慢针对弱密码的暴力破解尝试——但无法替代一个足够强的密码本身。若涉及真正敏感的数据,建议使用 600,000 次以上迭代,或改用 Argon2。

输出结果是什么格式?

输出为 Base64 编码字符串,由盐值(16 字节)、IV(12 字节)以及密文+认证标签依次拼接而成。解密时工具会拆分出各部分以重新构建密钥。

忘记密码会丢失数据吗?

会。没有任何恢复方式——这正是设计初衷。请选择一个自己容易记住的密码,并妥善保存在密码管理器中。

什么是 AES 加密与解密?

AES 加密与解密工具可使用用户提供的密码,基于 AES-256-GCM 对文本进行加密和解密。工具通过 PBKDF2 配合 SHA-256 从密码派生加密密钥,实现带认证的加密(authenticated encryption),能够检测数据是否被篡改。所有加密运算都完全在浏览器端本地执行,因此明文、密码和密文都不会被发送到服务器。

功能特性

AES-256-GCM

Authenticated encryption: any change to the ciphertext is detected on decrypt, so tampering fails loudly.

PBKDF2 key derivation

Your password is stretched into a 256-bit key with PBKDF2-SHA-256 and a random salt.

100% client-side

Uses the native Web Crypto API — nothing is uploaded, logged, or escrowed.

示例

Input

Plaintext "hello" + password "s3cret"

Output

Base64 envelope: salt ‖ IV ‖ ciphertext ‖ GCM tag (differs every run due to a random salt/IV; the same password decrypts it back to "hello").

常见使用场景

  1. 1

    Share a secret safely

    Encrypt a note or credential and send the ciphertext; the recipient decrypts with the shared password.

  2. 2

    Store sensitive text

    Keep an encrypted blob in notes or a repo instead of plaintext.

  3. 3

    Learn authenticated encryption

    See how salt, IV, ciphertext, and the GCM tag combine — and why a wrong password fails.

概要

Zerethon's AES tool encrypts and decrypts text with AES-256-GCM and a password, entirely in your browser via the Web Crypto API. The key is derived from the password with PBKDF2-SHA-256, and GCM provides authenticated encryption that detects tampering. Plaintext, password, and ciphertext never leave your device.

分类
开发者
价格
免费
隐私
基于浏览器
注册
无需

References

隐私

除非另有说明,否则你的数据永远不会离开浏览器。AES 加密与解密 完全在客户端运行 — 无需上传服务器,不记录日志,不追踪你输入的内容。

相关工具

在 Zerethon Social 上创作、分享与成长

免费注册。赚取积分,收集成就,与全球创作者建立联系。

免费试用 Zerethon