久久久久久久999_99精品久久精品一区二区爱城_成人欧美一区二区三区在线播放_国产精品日本一区二区不卡视频_国产午夜视频_欧美精品在线观看免费

 找回密碼
 立即注冊

QQ登錄

只需一步,快速開始

搜索
查看: 3387|回復: 0
收起左側

AES-T900源碼下載

[復制鏈接]
ID:315078 發表于 2018-4-24 09:27 | 顯示全部樓層 |閱讀模式
1.Home directory includes:

1.1 src
    ---Codes for the AES algorithm, the test bench, and the Trojan

2.Trojan
Trojan Description
    After each 128'hFFFF_FFFF_FFFF_FFFF_FFFF_FFFF_FFFF_FFFF encryptions, the Trojan gets activated and leaks the secret
    key from a cryptographic chip  running the AES algorithm through a covert channel. The channel adapts the concepts
    from spread spectrum communications (also known as Code-Division Multiple Access (CDMA)) to distribute the leakage
    of single bits over many clock cycles. The Trojan employs this method by using a pseudo-random number generator (PRNG)
    to create a CDMA code sequence, the PRNG initialized to a predefined value. The code sequence is then used to
    XOR modulate the secret information bits. The modulated sequence is forwarded to a leakage circuit (LC) to set up
    a covert CDMA channel in the power side-channel. The LC is realized by connecting eight identical flip-flop elements
    to the single output of the XOR gate to mimic a large capacitance [1].


Trojan Taxonomy
    Insertion phase: Design
    Abstraction level: Register Transfer level  
    Activation mechanism: Triggered Internally
    Effects: Leak Information
    Location: Processor
    Physical characteristics: Functional


[1] L. Lin, M. Kasper, T. G黱eysu, C. Paar and W. Burleson, "Trojan Side-Channels: Lightweight Hardware Trojans
through Side-Channel Engineering," 11th International Workshop Cryptographic Hardware and Embedded Systems (CHES),
pp.382-395, 2009.

0.jpg

How to start the simulation

1. simulation.do
----------------
This file is a batch file for Modelsim to compile the HDL files, setup the wave file, and begin function simulation.
The working directory of Modelsim must be the same directory of the batch file.

2. test_aes_128.v
----------------------
This file is the main test bench.
It is self-checked. It feeds input data to the core and compare the correct result with the output of the core.
If the output is wrong, the test bench will display an error message.

單片機源程序如下:
  1. /*
  2. * Copyright 2012, Homer Hsing <homer.hsing@gmail.com>
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */

  16. `timescale 1ns / 1ps

  17. module test_aes_128;

  18.         // Inputs
  19.         reg clk;
  20.         reg [127:0] state;
  21.         reg [127:0] key;

  22.         // Outputs
  23.         wire [127:0] out;

  24.         // Instantiate the Unit Under Test (UUT)
  25.         aes_128 uut (
  26.                 .clk(clk),
  27.                 .state(state),
  28.                 .key(key),
  29.                 .out(out)
  30.         );

  31.         initial begin
  32.                 clk = 0;
  33.                 state = 0;
  34.                 key = 0;

  35.                 #100;
  36.         /*
  37.          * TIMEGRP "key" OFFSET = IN 6.4 ns VALID 6 ns AFTER "clk" HIGH;
  38.          * TIMEGRP "state" OFFSET = IN 6.4 ns VALID 6 ns AFTER "clk" HIGH;
  39.          * TIMEGRP "out" OFFSET = OUT 2.2 ns BEFORE "clk" HIGH;
  40.          */
  41.         @ (negedge clk);
  42.         # 2;
  43.         state = 128'h3243f6a8_885a308d_313198a2_e0370734;
  44.         key   = 128'h2b7e1516_28aed2a6_abf71588_09cf4f3c;
  45.         #10;
  46.         state = 128'h00112233_44556677_8899aabb_ccddeeff;
  47.         key   = 128'h00010203_04050607_08090a0b_0c0d0e0f;
  48.         #10;
  49.         state = 128'h0;
  50.         key   = 128'h0;
  51.         #10;
  52.         state = 128'h0;
  53.         key   = 128'h1;
  54.         #10;
  55.         state = 128'h1;
  56.         key   = 128'h0;
  57.         #170;
  58.         if (out !== 128'h3925841d02dc09fbdc118597196a0b32)
  59.           begin $display("E"); $finish; end
  60.         #10;
  61.         if (out !== 128'h69_c4_e0_d8_6a_7b_04_30_d8_cd_b7_80_70_b4_c5_5a)
  62.           begin $display("E"); $finish; end
  63.         #10;
  64.         if (out !== 128'h66_e9_4b_d4_ef_8a_2c_3b_88_4c_fa_59_ca_34_2b_2e)
  65.           begin $display("E"); $finish; end
  66.         #10;
  67.         if (out !== 128'h05_45_aa_d5_6d_a2_a9_7c_36_63_d1_43_2a_3d_1c_84)
  68.           begin $display("E"); $finish; end
  69.         #10;
  70.         if (out !== 128'h58_e2_fc_ce_fa_7e_30_61_36_7f_1d_57_a4_e7_45_5a)
  71.           begin $display("E"); $finish; end
  72.         $display("Good.");
  73.         $finish;
  74.         end
  75.       
  76.     always #5 clk = ~clk;
  77. endmodule

復制代碼
0.jpg

所有資料51hei提供下載:
AES-T900.zip (77.72 KB, 下載次數: 8)




回復

使用道具 舉報

您需要登錄后才可以回帖 登錄 | 立即注冊

本版積分規則

小黑屋|51黑電子論壇 |51黑電子論壇6群 QQ 管理員QQ:125739409;技術交流QQ群281945664

Powered by 單片機教程網

快速回復 返回頂部 返回列表
主站蜘蛛池模板: 久热久| 深夜福利av | 欧美成人精品一区 | a视频在线免费观看 | 天天插天天爽 | 波多野吉衣一二三区乱码 | 国产精品久久久久久久久 | 91一区二区 | 久久久久网站 | 亚洲视频一区二区三区 | 国产精品久久久久久久久久久久久久久 | 亚洲欧美在线观看 | 91片黄在线观看 | 成人欧美一区二区三区黑人孕妇 | 日韩午夜片 | 99精品国产一区二区 | 中文字幕国产在线 | 高清一区二区三区 | 亚洲国产精品久久久久久久 | 亚洲男人av | 一二三四区在线观看 | 一区二区高清 | 日韩成人中文字幕 | 欧美一级淫片bbb一84 | 久草资源网 | 国产美女91呻吟求 | 精品免费视频 | 亚洲最新视频 | 欧美成人一区二区三区 | 国产精品久久久久久久久久 | 国产一区久久 | 国产精品伦理一区 | 亚洲高清视频在线 | 99久久精品国产亚洲 | www.黄色片| 欧美成人精品一区二区 | 国产91精品在线观看 | 欧洲美一区二区三区亚洲 | 欧美激情自拍 | 日韩大片在线观看 | 日本在线小视频 |