资源简介
aes加密算法的verilog和c++代码
代码片段和文件信息
// 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++1A2B猜数字游戏
- compat-libstdc++-33-3.2.3
- C++模拟ATM机界面设计
- 三次样条插值算法C++源代码
- 实矩阵与复矩阵的LU分解C++源代码
- 图形化的最小生成树C++原代码
- c/c++程序设计课后答案
- c++实现的免疫算法
- C++的图书管理系统
- C++中探出打开文件夹对话框并获取文
- c++ 用回溯法解决经典的N皇后问题
- C++象棋游戏C++象棋游戏C++象棋游戏
- jpg jpeg 解码 转 bmp RGB vs2013 c++
- c++ builder socket
- 迷宫求解 C++ 完整。。。。。
- C语言实现Linux文件系统模拟文档内有
- VC++ 编写的 Modbus 协议类 并附带串口通
- 《从放弃C语言到使用C++刷算法的简明
- c++读写excel
- BDS/GPS导航定位C/C++从Txt文件读取和写
- 求长方体上任意两点间的最短表面距
- QT调用VS生成的C++库
- VC++ HIDAPI实现USB数据读写
- 武汉大学测绘学院大地测量学编程-
- C++ MFC 放大和缩小图片源码
- N皇后问题构造性方法与启发式修补的
- OLE操作word和excel
- 类似QQ登陆界面c++builder
- mfc邮箱地址管理系统(c++access)
- 解决无法删除microsoft visual c++运行库问
评论
共有 条评论