资源简介
AES加解密算法软件程序(包含全部模式128/256)AES加解密算法软件程序(包含全部模式128/256)AES加解密算法软件程序(包含全部模式128/256)
代码片段和文件信息
/*
---------------------------------------------------------------------------
Copyright (c) 1998-2013 Brian Gladman Worcester UK. All rights reserved.
The redistribution and use of this software (with or without changes)
is allowed without the payment of fees or royalties provided that:
source code distributions include the above copyright notice this
list of conditions and the following disclaimer;
binary distributions include the above copyright notice this list
of conditions and the following disclaimer in their documentation.
This software is provided ‘as is‘ with no explicit or implied warranties
in respect of its operation including but not limited to correctness
and fitness for purpose.
---------------------------------------------------------------------------
Issue Date: 20/12/2007
*/
#ifndef __GNUC__
# include
#endif
#include
#include “aes.h“
#include “aesaux.h“
#include “aestst.h“
#if defined(__cplusplus)
extern “C“
{
#endif
char *st[8] = { “vk“ “vt“ “nk“ “nt“ “me“ “md“ “me“ “md“ };
char *file_name(char* buf size_t len const unsigned long type const unsigned long blen const unsigned long klen)
{ char *sp;
if(len < 12)
return 0;
sp = copy_str(buf (type < 6 ? “ecb“ : “cbc“));
sp = copy_str(sp st[type]);
*sp++ = (‘0‘ + (char)blen / 4);
*sp++ = (‘0‘ + (char)klen / 4);
sp = copy_str(sp “.txt“);
*sp = ‘\0‘;
return buf;
}
const char *pos(const char *s)
{
while(*s++ != ‘=‘)
;
while(*s++ == ‘ ‘)
;
return s - 1;
}
// Strings to locate lines in test vector files
const char *fstr[NO_LTYPES] =
{ BADL_STR BLEN_STR KLEN_STR TEST_STR IV_STR KEY_STR PT_STR CT_STR };
char *hxx = “0123456789abcdef“;
// Hexadecimal conversion from hex character to a number in range 0 <= no <= 15
int to_hex(int ch)
{
return (ch & 15) + (ch >= ‘0‘ && ch <= ‘9‘ ? 0 : 9);
}
int get_line(FILE *inf char s[])
{
if(feof(inf))
return EXIT_FAILURE;
return fgets(s 100 inf) != s ? EXIT_FAILURE : EXIT_SUCCESS;
}
char *copy_str(char *d const char *s)
{
while(*s)
*d++ = *s++;
*d = ‘\0‘;
return d;
}
char *df_string(const char *f)
{ char *p = f *p1 *p2;
p1 = p2 = 0;
while(*p)
if(*p++ == ‘\\‘)
{
p1 = p2; p2 = p;
}
return (p1 ? p1 : p2 ? p2 : f);
}
// Read from a string of hexadecimal digits into an array of 8-bit bytes
// Each pair of hexadecimal digits is used to compile one 8-bit unsigned char and
// the first (last) digit forms the most (least) significant four bits
// of each unsigned char. The hexadecimal digits are read from left (low) to right
// (high) and are placed in increasing index positions in the unsigned char array
int block_in(unsigned char l[] const char *p)
{ int i = 0;
p = pos(p);
while(*p && *(p + 1) && isxdigit(*p) && isxdigit(*(p + 1)))
{
l[i++] = (to_hex(*p) << 4) + to_hex(*(p + 1))
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2017-07-20 22:45 aes-master\
文件 264 2017-07-20 22:45 aes-master\.gitignore
文件 8753 2017-07-20 22:45 aes-master\aes.h
文件 15499 2017-07-20 22:45 aes-master\aes.sln
文件 24096 2017-07-20 22:45 aes-master\aes.txt
文件 27098 2017-07-20 22:45 aes-master\aes_amd64.asm
文件 9144 2017-07-20 22:45 aes-master\aes_avs.c
目录 0 2017-07-20 22:45 aes-master\aes_example\
文件 9850 2017-07-20 22:45 aes-master\aes_example\aes_example.vcxproj
文件 890 2017-07-20 22:45 aes-master\aes_example\aes_example.vcxproj.filters
文件 30605 2017-07-20 22:45 aes-master\aes_modes.c
文件 18105 2017-07-20 22:45 aes-master\aes_ni.c
文件 2519 2017-07-20 22:45 aes-master\aes_ni.h
文件 17027 2017-07-20 22:45 aes-master\aes_via_ace.h
文件 15071 2017-07-20 22:45 aes-master\aes_x86_v1.asm
文件 36462 2017-07-20 22:45 aes-master\aes_x86_v2.asm
文件 10629 2017-07-20 22:45 aes-master\aesaux.c
文件 2749 2017-07-20 22:45 aes-master\aesaux.h
文件 4842 2017-07-20 22:45 aes-master\aescpp.h
文件 10150 2017-07-20 22:45 aes-master\aescrypt.c
文件 20388 2017-07-20 22:45 aes-master\aesgav.c
文件 16030 2017-07-20 22:45 aes-master\aeskey.c
文件 18738 2017-07-20 22:45 aes-master\aeskey2.c
文件 27513 2017-07-20 22:45 aes-master\aesopt.h
文件 11674 2017-07-20 22:45 aes-master\aesrav.c
文件 15839 2017-07-20 22:45 aes-master\aestab.c
文件 5162 2017-07-20 22:45 aes-master\aestab.h
文件 26614 2017-07-20 22:45 aes-master\aestmr.c
文件 6055 2017-07-20 22:45 aes-master\aestst.c
文件 11268 2017-07-20 22:45 aes-master\aestst.h
文件 15224 2017-07-20 22:45 aes-master\aesxam.c
............此处省略172个文件信息
相关资源
- AES for Delphi 加密解密
- aes加密js工具包
- AES高级加密算法的verilog语言实现
- AES 加密工具ECBCBCCMAC
- AES工具 V1.0.2 ,AES计算工具 hex的aes计
- AES加解密工具支持16进制.zip
- STM32 加密算法 源码代码包括AES的5种
- stm32f103AES加密 cbc模式
- Delphi AES加密算法程序.rar
- 金蝶AESB中间件和SOA架构ppt
- AES加解密算法的FPGA优化设计
-
STM32F103C8T6_AES-128-CTR_ba
se64密文解密 - AES加解密aes128/192/256 ecb cbc cfb ofb ctr
- AES_加密解密控件源代码Delphi.rar
- AES加密BMP图片
- AIR-WLC2100-K9-7-0-252-0-ER.aes
- AES加密完整Verilog源码
- AES-128加密解密源码及算法详解。
- 高级加密标准AES算法:Rijndael的设计
- AES加密、解密代码实现C、SV、Verilog
- AES算法的FPGA实现与分析_hao
- 联想K29最新1.70BIOS修改版,去白名单验
- SFCipher加解密工具
- 基于AES和SHA的文件加密系统本科毕业
- 高级加密标准AES算法:Rijndael的设计
- 16字节加解密的AES算法.zip
- mbedtls-2.16.5-apache.tgz
- STM32AES加密程序.zip
- AES加解密-CBC模式-文件操作
- AES加密算法的VHDL实现
评论
共有 条评论