• 大小: 1.01MB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2021-01-09
  • 语言: C/C++
  • 标签: AES  ECB  VS2010  

资源简介

基于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.embed.manifest

     文件        472  2019-03-11 22:36  AES_ECB_encrypt\AES_ECB_encrypt\Debug\AES_ECB_encrypt.exe.embed.manifest.res

     文件        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\link-cvtres.read.1.tlog

     文件          2  2019-03-11 22:36  AES_ECB_encrypt\AES_ECB_encrypt\Debug\link-cvtres.write.1.tlog

     文件          2  2019-03-11 22:36  AES_ECB_encrypt\AES_ECB_encrypt\Debug\link.3876-cvtres.read.1.tlog

     文件          2  2019-03-11 22:36  AES_ECB_encrypt\AES_ECB_encrypt\Debug\link.3876-cvtres.write.1.tlog

     文件          2  2019-03-11 22:36  AES_ECB_encrypt\AES_ECB_encrypt\Debug\link.3876.read.1.tlog

     文件          2  2019-03-11 22:36  AES_ECB_encrypt\AES_ECB_encrypt\Debug\link.3876.write.1.tlog

     文件       1872  2019-03-11 22:36  AES_ECB_encrypt\AES_ECB_encrypt\Debug\link.command.1.tlog

     文件       3710  2019-03-11 22:36  AES_ECB_encrypt\AES_ECB_encrypt\Debug\link.read.1.tlog

     文件       1046  2019-03-11 22:36  AES_ECB_encrypt\AES_ECB_encrypt\Debug\link.write.1.tlog

     文件        434  2019-03-11 22:36  AES_ECB_encrypt\AES_ECB_encrypt\Debug\mt.command.1.tlog

............此处省略28个文件信息

评论

共有 条评论