資源簡介
基于C語言實現的AES_ECB模式加密,代碼為.c和.h文件,方便移植,代碼實現過程清晰明了,注釋豐富。上傳文件為VS2010工程文件,若沒有安裝VS2010,可將.c和.h文件復制到其他工程,添加后即可使用。
代碼片段和文件信息
#include?“AES.h“
/**
?*?密鑰擴展要用到的矩陣
?**/
static?const?int?RCON[10][4]=
{
0x010x000x000x00
0x020x000x000x00
0x040x000x000x00
0x080x000x000x00
0x100x000x000x00
0x200x000x000x00
0x400x000x000x00
0x800x000x000x00
0x1B0x000x000x00
0x360x000x000x00
};
/**
?*?列混合要用到的矩陣
?**/
static?const?unsigned?char?colM[4][4]?=?
{?
????0x02?0x03?0x01?0x01
????0x01?0x02?0x03?0x01
????0x01?0x01?0x02?0x03
????0x03?0x01?0x01?0x02?
};
/**
?*?逆列混合用到的矩陣
?*/
static?const?unsigned?char?deColM[4][4]?=?
{???0xe?0xb?0xd?0x9
0x9?0xe?0xb?0xd
0xd?0x9?0xe?0xb
0xb?0xd?0x9?0xe
};
/**
?*?S盒
?**/
static?const?unsigned?char?S_box[16][16]=?
{?
????0x63?0x7c?0x77?0x7b?0xf2?0x6b?0x6f?0xc5?0x30?
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件??????14175??2019-03-11?22:25??AES_ECB_encrypt\AES_ECB_encrypt\AES.cpp
?????文件???????1763??2019-03-11?22:16??AES_ECB_encrypt\AES_ECB_encrypt\AES.h
?????文件???????2162??2019-03-11?22:36??AES_ECB_encrypt\AES_ECB_encrypt\AES_ECB_encrypt.cpp
?????文件???????4459??2019-03-11?22:36??AES_ECB_encrypt\AES_ECB_encrypt\AES_ECB_encrypt.vcxproj
?????文件???????1491??2019-03-11?22:36??AES_ECB_encrypt\AES_ECB_encrypt\AES_ECB_encrypt.vcxproj.filters
?????文件????????143??2019-03-11?22:34??AES_ECB_encrypt\AES_ECB_encrypt\AES_ECB_encrypt.vcxproj.user
?????文件??????32096??2019-03-11?22:36??AES_ECB_encrypt\AES_ECB_encrypt\Debug\AES.obj
?????文件???????2495??2019-03-11?22:36??AES_ECB_encrypt\AES_ECB_encrypt\Debug\AES_ECB_encrypt.Build.CppClean.log
?????文件????????406??2019-03-11?22:36??AES_ECB_encrypt\AES_ECB_encrypt\Debug\AES_ECB_encrypt.exe.em
?????文件????????472??2019-03-11?22:36??AES_ECB_encrypt\AES_ECB_encrypt\Debug\AES_ECB_encrypt.exe.em
?????文件????????381??2019-03-11?22:36??AES_ECB_encrypt\AES_ECB_encrypt\Debug\AES_ECB_encrypt.exe.intermediate.manifest
?????文件?????????53??2019-03-11?22:36??AES_ECB_encrypt\AES_ECB_encrypt\Debug\AES_ECB_encrypt.lastbuildstate
?????文件???????6167??2019-03-11?22:36??AES_ECB_encrypt\AES_ECB_encrypt\Debug\AES_ECB_encrypt.log
?????文件???????9678??2019-03-11?22:36??AES_ECB_encrypt\AES_ECB_encrypt\Debug\AES_ECB_encrypt.obj
?????文件????1179648??2019-03-11?22:36??AES_ECB_encrypt\AES_ECB_encrypt\Debug\AES_ECB_encrypt.pch
?????文件??????????0??2019-03-11?22:36??AES_ECB_encrypt\AES_ECB_encrypt\Debug\AES_ECB_encrypt.write.1.tlog
?????文件????????220??2019-03-11?22:36??AES_ECB_encrypt\AES_ECB_encrypt\Debug\AES_ECB_encrypt_manifest.rc
?????文件???????2096??2019-03-11?22:36??AES_ECB_encrypt\AES_ECB_encrypt\Debug\cl.command.1.tlog
?????文件???????4668??2019-03-11?22:36??AES_ECB_encrypt\AES_ECB_encrypt\Debug\CL.read.1.tlog
?????文件???????1436??2019-03-11?22:36??AES_ECB_encrypt\AES_ECB_encrypt\Debug\CL.write.1.tlog
?????文件??????????2??2019-03-11?22:36??AES_ECB_encrypt\AES_ECB_encrypt\Debug\li
?????文件??????????2??2019-03-11?22:36??AES_ECB_encrypt\AES_ECB_encrypt\Debug\li
?????文件??????????2??2019-03-11?22:36??AES_ECB_encrypt\AES_ECB_encrypt\Debug\li
?????文件??????????2??2019-03-11?22:36??AES_ECB_encrypt\AES_ECB_encrypt\Debug\li
?????文件??????????2??2019-03-11?22:36??AES_ECB_encrypt\AES_ECB_encrypt\Debug\li
?????文件??????????2??2019-03-11?22:36??AES_ECB_encrypt\AES_ECB_encrypt\Debug\li
?????文件???????1872??2019-03-11?22:36??AES_ECB_encrypt\AES_ECB_encrypt\Debug\li
?????文件???????3710??2019-03-11?22:36??AES_ECB_encrypt\AES_ECB_encrypt\Debug\li
?????文件???????1046??2019-03-11?22:36??AES_ECB_encrypt\AES_ECB_encrypt\Debug\li
?????文件????????434??2019-03-11?22:36??AES_ECB_encrypt\AES_ECB_encrypt\Debug\mt.command.1.tlog
............此處省略28個文件信息
- 上一篇:51單片機樓梯照明燈程序
- 下一篇:MFC多功能按鈕
評論
共有 條評論