跳到主要内容
uencoder

AES

AES(高级加密标准)是 NIST 于 2001 年确立的对称分组密码,支持 128/192/256 位密钥,是现代加密的事实标准。

用途

取代 DES(密钥过短),提供安全、高效且适用于硬件加速的对称加密方案。

机制

在 128 位分组上执行若干轮变换:SubBytes(S 盒替换)、ShiftRows(行移位)、MixColumns(列混淆)、AddRoundKey(轮密钥异或)。轮数由密钥长度决定(10/12/14 轮)。密钥扩展生成各轮密钥。

用例

  • TLS 数据加密
  • 文件与磁盘加密(LUKS、FileVault)
  • VPN 隧道(IPsec/IKE)
  • 数据库字段加密

示例

  • 输入
    key=256bit, data="hello"
    输出
    ciphertext in 16-byte blocks

    Requires a mode of operation and an IV

常见错误

Using ECB mode makes identical plaintext blocks produce identical ciphertext blocks
Use GCM, or CBC with a random IV

相关词条

相关工具

参考链接