资源简介
aes加密算法的verilog和c++代码
![](http://www.nz998.com/pic/43505.jpg)
代码片段和文件信息
// Copyright 2007 Altera Corporation. All rights reserved.
// Altera products are protected under numerous U.S. and foreign patents
// maskwork rights copyrights and other intellectual property laws.
//
// This reference design file and your use thereof is subject to and governed
// by the terms and conditions of the applicable Altera Reference Design
// License Agreement (either as signed by you or found at www.altera.com). By
// using this reference design file you indicate your acceptance of such terms
// and conditions between you and Altera Corporation. In the event that you do
// not agree with such terms and conditions you may not use the reference
// design file and please promptly destroy any copies you have made.
//
// This reference design file is being provided on an “as-is“ basis and as an
// accommodation and therefore all warranties representations or guarantees of
// any kind (whether express implied or statutory) including without
// limitation warranties of merchantability non-infringement or fitness for
// a particular purpose are specifically disclaimed. By making this reference
// design file available Altera expressly does not recommend suggest or
// require that this reference design file be used in combination with any
// other product not provided by Altera.
/////////////////////////////////////////////////////////////////////////////
// baeckler - 03-07-2006
// fill in rounds and constants for a pipelined
// Rijndael with 128 bit key (AES128)
//
#include
int rconst[] = {0x10x20x40x80x100x200x400x800x1b0x36};
int main(void)
{
int round;
int n = 0;
fprintf (stdout“// baeckler - 03-07-2006\n\n“);
fprintf (stdout“// pipelined AES / aes encrypt and decrypt units\n\n“);
fprintf (stdout“////////////////////////////////////\n“);
fprintf (stdout“// Encrypt using 128 bit key\n“);
fprintf (stdout“////////////////////////////////////\n“);
fprintf (stdout“module aes_128 (clkclrdat_indat_outkeyinv_key);\n“);
fprintf (stdout“input clkclr;\n“);
fprintf (stdout“input [127:0] dat_in;\n“);
fprintf (stdout“input [127:0] key;\n“);
fprintf (stdout“output [127:0] dat_out;\n“);
fprintf (stdout“output [127:0] inv_key;\n\n“);
fprintf (stdout“parameter LATENCY = 10; // currently allowed 010\n“);
fprintf (stdout“localparam ROUND_LATENCY = (LATENCY == 10 ? 1 : 0);\n“);
fprintf (stdout“wire [127:0] start1start2start3start4start5;\n“);
fprintf (stdout“wire [127:0] start6start7start8start9start10;\n“);
fprintf (stdout“wire [127:0] key1key2key3key4key5;\n“);
fprintf (stdout“wire [127:0] key6key7key8key9key10;\n\n“);
fprintf (stdout“assign start1 = dat_in ^ key;\n“);
fprintf (stdout“assign key1 = key;\n\n“);
for (round=1; round<=10; round++)
{
fprintf (stdout“ aes_round_128 r%d (\n“round);
fprintf (stdout“ .clk(clk).clr(clr)\n“);
fprintf (stdout
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2011-06-16 05:18 aes\
文件 5719 2009-01-06 03:51 aes\aes_128.cpp
文件 7672 2009-01-06 03:51 aes\aes_128.v
文件 4875 2009-01-06 03:51 aes\aes_128_tb.v
文件 6229 2009-01-06 03:51 aes\aes_256.cpp
文件 11075 2009-01-06 03:51 aes\aes_256.v
文件 5833 2009-01-06 03:51 aes\aes_256_tb.v
文件 4454 2009-01-06 03:51 aes\aes_round_128.v
文件 4822 2009-01-06 03:51 aes\aes_round_256.v
文件 9811 2009-01-06 03:51 aes\evolve_key.v
文件 2547 2009-01-06 03:51 aes\evolve_key_256_tb.v
文件 6108 2009-01-06 03:51 aes\mix_columns.v
文件 2139 2009-01-06 03:51 aes\shift_rows.cpp
文件 2323 2009-01-06 03:51 aes\shift_rows.v
文件 10544 2009-01-06 03:51 aes\sub_bytes.cpp
文件 17771 2009-01-06 03:51 aes\sub_bytes.v
- 上一篇:基于VC6.0的Bresenham直线算法
- 下一篇:C++1A2B猜数字游戏
相关资源
- C++中头文件与源文件的作用详解
- C++多线程网络编程Socket
- VC++ 多线程文件读写操作
- 利用C++哈希表的方法实现电话号码查
- 移木块游戏,可以自编自玩,vc6.0编写
- C++纯文字DOS超小RPG游戏
- VC++MFC小游戏实例教程(实例)+MFC类库
- 连铸温度场计算程序(C++)
- 6自由度机器人运动学正反解C++程序
- Em算法(使用C++编写)
- libstdc++-4.4.7-4.el6.i686.rpm
- VC++实现CMD命令执行与获得返回信息
- 白话C++(全)
- C++标准库第1、2
- 大数类c++大数类
- C++语言编写串口调试助手
- c++素数筛选法
- C++ mqtt 用法
- 商品库存管理系统 C++ MFC
- c++ 多功能计算器
- C++17 In Detail
- 嵌入式QtC++编程课件
- 颜色识别形状识别STM103嵌入式代码
- c++ 邮件多附件群发
- c++ 透明代理(hookproxy)
- mfc 调用redis
- FTP客户端源码(c++)
- c++ 画图(14Qt-XPS)
- c++多边形交并差运算
- VC++基于OpenGL模拟的一个3维空间模型
评论
共有 条评论