Table of content

  1. List of test vectors for AES/ECB encryption mode

  2. List of test vectors for AES/CBC encryption mode
  3. List of test vectors for AES/CFB encryption mode
  4. List of test vectors for AES/OFB encryption mode
  5. List of test vectors for AES/CRT encryption mode
  6. References

Introduction

Advanced Encryption Standard is a block cipher adopted as an encryption standard by U.S. Government. It's a block and symmetrical cipher which can operate in following modes:

To check implementation of AES algorithm you can use "test vectors", a set of known ciphers for a given input and Key. The article contains list of vectors to test AES encryption/decryption algorithm implementation (NIST Special Publication 800-38A). You can read more about AES encryption in Wikipedia (http://en.wikipedia.org/wiki/Advanced_Encryption_Standard). To get additional information about AES encryption modes, please visit Wikipedia (http://en.wikipedia.org/wiki/Block_cipher_modes_of_operation).

List of test vectors for AES/ECB encryption mode

AES ECB 128-bit encryption mode

Encryption key: 2b7e151628aed2a6abf7158809cf4f3c

Initialization vector: not necessary

Test vector
Cipher text

6bc1bee22e409f96e93d7e117393172a

3ad77bb40d7a3660a89ecaf32466ef97

ae2d8a571e03ac9c9eb76fac45af8e51

f5d3d58503b9699de785895a96fdbaaf

30c81c46a35ce411e5fbc1191a0a52ef

43b1cd7f598ece23881b00e3ed030688

f69f2445df4f9b17ad2b417be66c3710

7b0c785e27e8ad3f8223207104725dd4

AES ECB 192-bit encryption mode

Encryption key: 8e73b0f7da0e6452c810f32b809079e562f8ead2522c6b7b

Initialization vector: not necessary

Test vector 
Cipher text 
6bc1bee22e409f96e93d7e117393172a bd334f1d6e45f25ff712a214571fa5cc
ae2d8a571e03ac9c9eb76fac45af8e51 974104846d0ad3ad7734ecb3ecee4eef
30c81c46a35ce411e5fbc1191a0a52ef ef7afd2270e2e60adce0ba2face6444e
f69f2445df4f9b17ad2b417be66c3710 9a4b41ba738d6c72fb16691603c18e0e

AES ECB 256-bit encryption mode

Encryption key: 603deb1015ca71be2b73aef0857d77811f352c073b6108d72d9810a30914dff4

Initialization vector: not necessary

Test vector 
Cipher text 
6bc1bee22e409f96e93d7e117393172a f3eed1bdb5d2a03c064b5a7e3db181f8
ae2d8a571e03ac9c9eb76fac45af8e51 591ccb10d410ed26dc5ba74a31362870
30c81c46a35ce411e5fbc1191a0a52ef b6ed21b99ca6f4f9f153e7b1beafed1d
f69f2445df4f9b17ad2b417be66c3710 23304b7a39f9f3ff067d8d8f9e24ecc7

List of test vectors for AES/CBC encryption mode

AES CBC 128-bit encryption mode

Encryption key: 2b7e151628aed2a6abf7158809cf4f3c

Initialization vector Test vector 
Cipher text 
000102030405060708090A0B0C0D0E0F 6bc1bee22e409f96e93d7e117393172a 7649abac8119b246cee98e9b12e9197d
7649ABAC8119B246CEE98E9B12E9197D ae2d8a571e03ac9c9eb76fac45af8e51 5086cb9b507219ee95db113a917678b2
5086CB9B507219EE95DB113A917678B2 30c81c46a35ce411e5fbc1191a0a52ef 73bed6b8e3c1743b7116e69e22229516
73BED6B8E3C1743B7116E69E22229516 f69f2445df4f9b17ad2b417be66c3710 3ff1caa1681fac09120eca307586e1a7

AES CBC 192-bit encryption mode

Encryption key: 8e73b0f7da0e6452c810f32b809079e562f8ead2522c6b7b

Initialization vector Test vector 
Cipher text 
000102030405060708090A0B0C0D0E0F 6bc1bee22e409f96e93d7e117393172a 4f021db243bc633d7178183a9fa071e8
4F021DB243BC633D7178183A9FA071E8 ae2d8a571e03ac9c9eb76fac45af8e51 b4d9ada9ad7dedf4e5e738763f69145a
B4D9ADA9AD7DEDF4E5E738763F69145A 30c81c46a35ce411e5fbc1191a0a52ef 571b242012fb7ae07fa9baac3df102e0
571B242012FB7AE07FA9BAAC3DF102E0 f69f2445df4f9b17ad2b417be66c3710 08b0e27988598881d920a9e64f5615cd

AES CBC 256-bit encryption mode

Encryption key: 603deb1015ca71be2b73aef0857d77811f352c073b6108d72d9810a30914dff4

Initialization vector Test vector 
Cipher text 
000102030405060708090A0B0C0D0E0F 6bc1bee22e409f96e93d7e117393172a f58c4c04d6e5f1ba779eabfb5f7bfbd6
F58C4C04D6E5F1BA779EABFB5F7BFBD6 ae2d8a571e03ac9c9eb76fac45af8e51 9cfc4e967edb808d679f777bc6702c7d
9CFC4E967EDB808D679F777BC6702C7D 30c81c46a35ce411e5fbc1191a0a52ef 39f23369a9d9bacfa530e26304231461
39F23369A9D9BACFA530E26304231461 f69f2445df4f9b17ad2b417be66c3710 b2eb05e2c39be9fcda6c19078c6a9d1b

List of test vectors for AES/CFB encryption mode

AES CFB128 128-bit encryption mode

Encryption key: 2b7e151628aed2a6abf7158809cf4f3c

Initialization vector Test vector
Cipher text 
000102030405060708090a0b0c0d0e0f 6bc1bee22e409f96e93d7e117393172a 3b3fd92eb72dad20333449f8e83cfb4a
3B3FD92EB72DAD20333449F8E83CFB4A ae2d8a571e03ac9c9eb76fac45af8e51 c8a64537a0b3a93fcde3cdad9f1ce58b
C8A64537A0B3A93FCDE3CDAD9F1CE58B 30c81c46a35ce411e5fbc1191a0a52ef 26751f67a3cbb140b1808cf187a4f4df
26751F67A3CBB140B1808CF187A4F4DF f69f2445df4f9b17ad2b417be66c3710 c04b05357c5d1c0eeac4c66f9ff7f2e6

AES CFB128 192-bit encryption mode

Encryption key: 8e73b0f7da0e6452c810f32b809079e562f8ead2522c6b7b

Initialization vector Test vector
Cipher text 
000102030405060708090A0B0C0D0E0F 6bc1bee22e409f96e93d7e117393172a cdc80d6fddf18cab34c25909c99a4174
CDC80D6FDDF18CAB34C25909C99A4174 ae2d8a571e03ac9c9eb76fac45af8e51 67ce7f7f81173621961a2b70171d3d7a
67CE7F7F81173621961A2B70171D3D7A 30c81c46a35ce411e5fbc1191a0a52ef 2e1e8a1dd59b88b1c8e60fed1efac4c9
2E1E8A1DD59B88B1C8E60FED1EFAC4C9 f69f2445df4f9b17ad2b417be66c3710 c05f9f9ca9834fa042ae8fba584b09ff

AES CFB128 256-bit encryption mode

Encryption key: 603deb1015ca71be2b73aef0857d77811f352c073b6108d72d9810a30914dff4

Initialization vector Test vector
Cipher text 
000102030405060708090A0B0C0D0E0F 6bc1bee22e409f96e93d7e117393172a DC7E84BFDA79164B7ECD8486985D3860
DC7E84BFDA79164B7ECD8486985D3860 ae2d8a571e03ac9c9eb76fac45af8e51 39ffed143b28b1c832113c6331e5407b
39FFED143B28B1C832113C6331E5407B 30c81c46a35ce411e5fbc1191a0a52ef df10132415e54b92a13ed0a8267ae2f9
DF10132415E54B92A13ED0A8267AE2F9 f69f2445df4f9b17ad2b417be66c3710 75a385741ab9cef82031623d55b1e471

List of test vectors for AES/OFB encryption mode

AES OFB 128-bit encryption mode

Encryption key: 2b7e151628aed2a6abf7158809cf4f3c

Initialization vector Test vector
Cipher text 
000102030405060708090A0B0C0D0E0F 6bc1bee22e409f96e93d7e117393172a 3b3fd92eb72dad20333449f8e83cfb4a
50FE67CC996D32B6DA0937E99BAFEC60 ae2d8a571e03ac9c9eb76fac45af8e51 7789508d16918f03f53c52dac54ed825
D9A4DADA0892239F6B8B3D7680E15674 30c81c46a35ce411e5fbc1191a0a52ef 9740051e9c5fecf64344f7a82260edcc
A78819583F0308E7A6BF36B1386ABF23 f69f2445df4f9b17ad2b417be66c3710 304c6528f659c77866a510d9c1d6ae5e

AES OFB 192-bit encryption mode

Encryption key: 8e73b0f7da0e6452c810f32b809079e562f8ead2522c6b7b

Initialization vector Test vector
Cipher text 
000102030405060708090A0B0C0D0E0F 6bc1bee22e409f96e93d7e117393172a cdc80d6fddf18cab34c25909c99a4174
A609B38DF3B1133DDDFF2718BA09565E ae2d8a571e03ac9c9eb76fac45af8e51 fcc28b8d4c63837c09e81700c1100401
52EF01DA52602FE0975F78AC84BF8A50 30c81c46a35ce411e5fbc1191a0a52ef 8d9a9aeac0f6596f559c6d4daf59a5f2
BD5286AC63AABD7EB067AC54B553F71D f69f2445df4f9b17ad2b417be66c3710 6d9f200857ca6c3e9cac524bd9acc92a

AES OFB 256-bit encryption mode

Encryption key: 603deb1015ca71be2b73aef0857d77811f352c073b6108d72d9810a30914dff4

Initialization vector Test vector
Cipher text 
000102030405060708090A0B0C0D0E0F 6bc1bee22e409f96e93d7e117393172a dc7e84bfda79164b7ecd8486985d3860
B7BF3A5DF43989DD97F0FA97EBCE2F4A ae2d8a571e03ac9c9eb76fac45af8e51 4febdc6740d20b3ac88f6ad82a4fb08d
E1C656305ED1A7A6563805746FE03EDC 30c81c46a35ce411e5fbc1191a0a52ef 71ab47a086e86eedf39d1c5bba97c408
41635BE625B48AFC1666DD42A09D96E7 f69f2445df4f9b17ad2b417be66c3710 0126141d67f37be8538f5a8be740e484

List of test vectors for AES/CTR encryption mode

AES CTR 128-bit encryption mode

Encryption key: 2b7e151628aed2a6abf7158809cf4f3c
Initialization vector: f0f1f2f3f4f5f6f7f8f9fafbfcfdfeff

Test vector 

Cipher text 

6bc1bee22e409f96e93d7e117393172a

874d6191b620e3261bef6864990db6ce

ae2d8a571e03ac9c9eb76fac45af8e51

9806f66b7970fdff8617187bb9fffdff

30c81c46a35ce411e5fbc1191a0a52ef

5ae4df3edbd5d35e5b4f09020db03eab

f69f2445df4f9b17ad2b417be66c3710

1e031dda2fbe03d1792170a0f3009cee

AES CTR 192-bit encryption mode

Encryption key: 8e73b0f7da0e6452c810f32b809079e562f8ead2522c6b7b
Initialization vector: f0f1f2f3f4f5f6f7f8f9fafbfcfdfeff

Test vector 
Cipher text 
6bc1bee22e409f96e93d7e117393172a 1abc932417521ca24f2b0459fe7e6e0b
ae2d8a571e03ac9c9eb76fac45af8e51 090339ec0aa6faefd5ccc2c6f4ce8e94
30c81c46a35ce411e5fbc1191a0a52ef 1e36b26bd1ebc670d1bd1d665620abf7
f69f2445df4f9b17ad2b417be66c3710 4f78a7f6d29809585a97daec58c6b050

AES CTR 256-bit encryption mode

Encryption key: 603deb1015ca71be2b73aef0857d77811f352c073b6108d72d9810a30914dff4
Initialization vector: f0f1f2f3f4f5f6f7f8f9fafbfcfdfeff

Test vector 
Cipher text 
6bc1bee22e409f96e93d7e117393172a 601ec313775789a5b7a7f504bbf3d228
ae2d8a571e03ac9c9eb76fac45af8e51 f443e3ca4d62b59aca84e990cacaf5c5
30c81c46a35ce411e5fbc1191a0a52ef 2b0930daa23de94ce87017ba2d84988d
f69f2445df4f9b17ad2b417be66c3710 dfc9c58db67aada613c2dd08457941a6

References

See NIST Special Publication 800-38A as official reference to AES test vectors.

AES Test vectors的更多相关文章

  1. aes加密C语言

    /** * \file aes.h * * \brief AES block cipher * * Copyright (C) 2006-2010, Brainspark B.V. * * This ...

  2. AES advanced encryption standard 2

    /* * FIPS-197 compliant AES implementation * * Copyright (C) 2006-2007 Christophe Devine * * Redistr ...

  3. [非原创] 常用加密算法整理 AES/SSL(一)

    前言: 在伟大的计算机科学家研究下,发明了许多的加密算法,以下做个简答的描述: 一.分类 加密算法分为两种:单向加密.双向加密. 单向加密,不可逆的加密算法,只能加密不能解密: 双向加密,由对称性加密 ...

  4. 关于CryptoJS中md5加密以及aes加密的随笔

    最近项目中用到了各种加密,其中就包括从没有接触过得aes加密,因此从网上各种查,官方的一种说法: 高级加密标准(英语:Advanced Encryption Standard,缩写:AES),在密码学 ...

  5. AES加密

    package com.edu.hpu; import java.math.BigInteger; import java.security.MessageDigest; import java.se ...

  6. Android数据加密之Aes加密

    前言: 项目中除了登陆,支付等接口采用rsa非对称加密,之外的采用aes对称加密,今天我们来认识一下aes加密. 其他几种加密方式: Android数据加密之Rsa加密 Android数据加密之Aes ...

  7. 密码学应用(DES,AES, MD5, SHA1, RSA, Salt, Pkcs8)

    目录 一.数据加密标准 - Data Encryption Standard(DES) 二.高级加密标准 - Advanced Encryption Standard(AES) 三.消息摘要算法第五版 ...

  8. android AES 加密

    import javax.crypto.Cipher;import javax.crypto.KeyGenerator;import javax.crypto.SecretKey;import jav ...

  9. When I see you again(加密原理介绍,代码实现DES、AES、RSA、Base64、MD5)

    关于网络安全的数据加密部分,本来打算总结一篇博客搞定,没想到东西太多,这已是第三篇了,而且这篇写了多次,熬了多次夜,真是again and again.起个名字:数据加密三部曲,前两部链接如下: 整体 ...

随机推荐

  1. c++刷题(30/100)

    题目一:合并两个排序的链表 输入两个单调递增的链表,输出两个链表合成后的链表,当然我们需要合成后的链表满足单调不减规则. 思路:利用两个指针cur1,cur2来指分别向两个链表中当前较小的和当前较大的 ...

  2. linux下搭建我的世界spongeforge 服务器 (海绵端)

    以下我用的都是1.10.2版本 且以下用的服务器连接管理软件有WinSCP.Xshell 5 首先,去下载一个MC1.10.2的纯净服务端,这个不会很难,百度一下! 比如我下的文件就叫minecraf ...

  3. 分模块开发创建dao子模块——(七)

    1.选中父工程右键新建maven module

  4. 在pycharm和tensorflow环境下运行nmt

    目的是在pycharm中调试nmt代码,主要做了如下工作: 配置pycharm编译环境 在File->Settings->Project->Project Interpreter 设 ...

  5. 二维码扫描开源库ZXing定制化【转】

    转自:http://www.cnblogs.com/sickworm/p/4562081.html 最近在用ZXing这个开源库做二维码的扫描模块,开发过程的一些代码修改和裁剪的经验和大家分享一下. ...

  6. orm 缺点

    背景 提起orm,在我开发这几年可是阴魂不散,因为我的开发没人带,全是自己琢磨,好处是很多东西都懂,都理解的透彻,缺点是见得少,接触少.而我一直没用orm,但是又到处听说orm,但我总想不明白有啥用处 ...

  7. jstack查看Java堆栈信息

    命令 jps 查看进程id jstack 1234 查看该进程的线程堆栈信息 对于每个线程,都有如下信息: 线程名,如“main”线程属性(如果是Daemon线程,会有Daemon标识,否则,什么都没 ...

  8. 六、vue路由Vue Router

    一.基本概念 route, routes, router 1, route,它是一条路由,由这个英文单词也可以看出来,它是单数, Home按钮  => home内容, 这是一条route,  a ...

  9. 钉钉机器人-实现监控通知功能-python

    1. 首先得创建有 一个 钉钉群.(因为只能发群通知) 2. 添加机器人,得到一个url: 3. 开始写Python脚本: # -*- coding: utf-8 -*- ""&q ...

  10. mkfs

    mkfs 命令  linux格式化磁盘命令 指令:mkfs 使用权限 : 超级使用者 使用方式 : mkfs [-V] [-t fstype] [fs-options] filesys [blocks ...