资源简介
CCM是CTR加密模式和CMAC认证算法的混合使用,常用在需要同时加密和认证的领域,比如WiFi安全中的WPE协议,它就使用了AES-CCM模式。

代码片段和文件信息
/* This is an independent implementation of the encryption algorithm: */
/* */
/* RIJNDAEL by Joan Daemen and Vincent Rijmen */
/* */
/* which is a candidate algorithm in the Advanced Encryption Standard */
/* programme of the US National Institute of Standards and Technology. */
/* */
/* Copyright in this implementation is held by Dr B R Gladman but I */
/* hereby give permission for its free direct or derivative use subject */
/* to acknowledgment of its origin and compliance with any conditions */
/* that the originators of the algorithm place on its exploitation. */
/* */
/* Dr Brian Gladman (gladman@seven77.demon.co.uk) 14th January 1999 */
#include “aes_defs.h“
/*------------------ DLW debug code */
#if _VERBOSE_
#include
int rNum;
void ShowBlk(const u32b *bint final)
{
int ij;
u32b x;
u08b a;
printf(“%s %2d: “(final) ? “Final“ : “Round“rNum++);
for (i=0;i<4;i++)
{
printf(“ “);
x = b[i]; /* always used internally as “little-endian“ */
for (j=0;j<4;j++)
{
a = byte(xj);
printf(“ %02X“a);
}
}
printf(“\n“);
}
void ShowKeySched(const u32b *keyint cntconst char *hdrMsg)
{
int ij;
u32b x;
u08b a;
printf(“%s\n“hdrMsg);
for (i=0;i<4*cnt;i++)
{
x = key[i]; /* key always used as “little-endian“ */
printf(“ “);
for (j=0;j<4;j++)
{
a = byte(xj);
printf(“ %02X“a);
}
if ((i%4) == 3) printf(“\n“);
}
}
#define SetR(r) { rNum = r; }
#else
#define ShowBlk(bf)
#define SetR(r)
#define ShowKeySched(keycnthdrMsg)
#endif
/*---------------- end of DLW debug */
#define LARGE_TABLES
u08b pow_tab[256];
u08b log_tab[256];
u08b sbx_tab[256];
u08b isb_tab[256];
u32b rco_tab[ 10];
u32b ft_tab[4][256];
u32b it_tab[4][256];
#ifdef LARGE_TABLES
u32b fl_tab[4][256];
u32b il_tab[4][256];
#endif
u32b tab_gen = 0;
u32b k_len;
u32b e_key[60];
u32b d_key[60];
#define ff_mult(ab) (a && b ? pow_tab[(log_tab[a] + log_tab[b]) % 255] : 0)
#define f_rn(bo bi n k) \
bo[n] = ft_tab[0][byte(bi[n]0)] ^ \
ft_tab[1][byte(bi[(n + 1) & 3]1)] ^ \
ft_tab[2][byte(bi[(n + 2) & 3]2)] ^ \
ft_tab[3][byte(bi[(n + 3) & 3]3)] ^ *(k + n)
#define i_rn(bo bi n k) \
bo[n] = it_tab[0][byte(bi[n]0)] ^ \
it_tab[1][byte(bi[(n + 3) & 3]1)] ^ \
it_tab[2][byte(bi[(n + 2) & 3]2)] ^ \
it_tab[3][byte(bi[(n + 1) & 3]3)] ^ *(k + n)
#ifdef LARGE_TABLES
#define ls_box(x) \
(
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 12704 2002-06-26 14:39 aes-ccm-1\aes.cpp
文件 2136 2002-06-26 14:38 aes-ccm-1\aes_defs.h
文件 42825 2002-06-26 10:07 aes-ccm-1\aes_vect.h
文件 12109 2006-07-24 09:53 aes-ccm-1\ccm.cpp
文件 14361 2007-07-04 14:42 aes-ccm-1\m_ccm.c
目录 0 2018-05-30 17:56 aes-ccm-1
----------- --------- ---------- ----- ----
84135 6
相关资源
- RSA AES DES ECC加密算法源码
- 提供几个加密算法的源码
- 联想K29最新1.70BIOS修改版,去白名单验
- 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密文解密 - 手机模组OTP烧录原理及相关知识介绍
- Maccmsv10程序.rar
- AES加解密aes128/192/256 ecb cbc cfb ofb ctr
- AES_加密解密控件源代码Delphi.rar
- AES加密BMP图片
- AIR-WLC2100-K9-7-0-252-0-ER.aes
- AES加解密算法软件程序包含全部模式
- AES加密完整Verilog源码
- AES-128加密解密源码及算法详解。
- 高级加密标准AES算法:Rijndael的设计
- StarCCM+FieldFunction函数建立
- AES加密、解密代码实现C、SV、Verilog
- AES算法的FPGA实现与分析_hao
- star ccm入门
- 联想K29最新1.70BIOS修改版,去白名单验
评论
共有 条评论