Coder Social home page Coder Social logo

kinap / aes-processor Goto Github PK

View Code? Open in Web Editor NEW
13.0 4.0 9.0 18.22 MB

AES crypto engine written in System Verilog and emulated on the Mentor Veloce. First place winner of Mentor Graphics Need For Speed Emulation Competition 2016.

License: MIT License

SystemVerilog 82.61% Makefile 4.13% C 12.90% Shell 0.36%
system-verilog aes veloce fpga emulation cryptography

aes-processor's People

Contributors

kinap avatar pear7 avatar slawson avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

aes-processor's Issues

Refactor key expansion module to include buffering

Change the way the key expansion module works and the interface to the top level encoder and decoder so that the key expansion module includes the buffering of the round keys and then is responsible for sending the appropriate round key during the correct cycle to the top level modules. The interface between the top level and key expansion would be an array of round key signals, 1 for each round delayed the appropriate number of clock cycles inside the key expansion module.

Add additional background information to the final paper

Add additional information to the final paper, this should cover at least the following:

  1. Add more AES background.
  2. Add background on bottom-to-top verification strategy.
  3. Clean up grammar/misspellings and figure/reference mis-numbering.
  4. Explain charts/graphs better.

Enable Questa Simultion Profiling

Enable Questa simulation profiling and use it with a veloce run to see where the software execution time is being sent. Should be able to identify the bottlenecks by looking at this report.

Update block diagrams

The HVL/transactor have definitely changed. Might need to update based on the instantiation time parameters too.

Improve Round Key pipelining

Issues #11 and #12 need to be resolved first.

Currently, we produce all of the rounds keys upfront and then buffer them between each round. Not all round keys need to be generated upfront and some of them can be delayed until later clock cycles. In addition to improving the number of operations occurring in one clock cycle, this would also improve the amount of data that needs to be buffered.

Improve usage of valid bit propogation through modules

We are only using the valid bit in the submodules for an assertion. It isn't doing anything for the design once it's synthesized.

We have two options:

  1. Remove it
  2. Block off all instances of it's propagation through submodules through #ifdefs that will remove it for synthesis, but keep it for simulation/emulation

I would prefer option 1 to clean it up, and it has debatable value even in simulation - if there is invalid input to a submodule, we will see invalid input for at least one clock cycle, which will be detected by our test bench at the top level.

Add additional assertions

Add assertions that check that the input isn't equivalent to the output of the encoder/decoder and vice versa for the seeded tests that don't directly test the validity of the intermediate data.

Modify seeded testing to use encrypted data

Currently we use only the plain text data to run through the encoder -> decoder and verify the output of the decoder matches the input of the encoder. This task is to add an instantiation of the decoder -> encoder and use the encrypted data as input to these instantiations. In this case we verify the input of the decoder matches the output of the encoder.

Reduce amount of round key data buffered

This depends on resolving issue #11 first.

Currently a round key for each round is buffered after each round and kept around until the last round. This needs to be improved because prior round's round keys aren't needed any longer and no longer need to be buffered.

Investigate "0-in" setup for emulation assertion usage

According to the Veloce Assertions User's Guide, the first step to enabling assertions on the emulator is to setup "0-in" and add additional command line and veloce.config file.

Try running Mentor provided examples.

Change encoder and decoder to be controlled by instantiation parameter

Currently we support compilation time support for choosing between the 3 different AES configurations. Change this to be an instantiation parameter that controls what AES configuration a particular AES encoder and decoder instantiation is using. This is a necessary step to allow for parallel testing of the 3 AES configurations.

Add capability to top level testbench for "seeded tests"

Add capabilities to the transactor and the HVL test bench to support a single "testcase" sent to the emulator to be utilized as the base test case for creating many test cases on the emulator. This will decrease communication overhead and increase the amount of computation to be done on the emulator for a particular test case.

Create non-veloce testbench for AESEncoder and AESDecoder modules

We currently only have a Veloce-based testbench for the top level-modules.

Debugging top-level issues will be easier if we have a testbench that excludes the scemi pipe and veloce complexities. We should also add a "standalone" mode to the makefile that compiles without any of the veloce dependencies.

Change generated vector format

To accommodate the vector permutation scheme designed to improve emulation efficiency, the generator should produce data in the following format:

<128 bit state block (input data)><256-bit key><128 cipher text><192 cipher text><256 cipher text>

The key will be subdivided into smaller key sizes using the appropriate number of least significant bytes.

Add !$isunknown assertions to all module inputs

Our project doesn't have many opportunities for assertion use without reimplementing the AES algorithm in SV assertion language, but we can at least make sure we don't have any unknowns in our design.

Each module should have a !$isunknown on all inputs.

Transactor doesn't properly send valid signals back to hvl

The valid signals go high at the appropriate clock cycle in the xactor, but the testOut structure doesn't have room for them. The top level test bench I don't think ever receives these values (they're always 0, not x, which is curious).

I was also seeing X's for expected data in the top level, but I didn't debug that enough to have confidence that it's not an artifact of another issue.

@pear7

Change transactor to use assertions

Change the transactor to use assertions in the transactor to validate that the output of the encoder and decoder are correct instead of sending the data back to the hvl testbench.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.