lowRISC / opentitan

OpenTitan: Open source silicon root of trust
https://www.opentitan.org
Apache License 2.0
2.57k stars 771 forks source link

[dv, test_vectors] Integrate AES test vectors into existing NIST vector testing package #7143

Open sriyerg opened 3 years ago

sriyerg commented 3 years ago

The test_vectors area currently cater to SHA256, HMAC, SHAKE and KMAC vectors from NIST. For AES, a separate solution is being developed in PR #6981. Ideally, it should integrate a flow for all AES modes / length as well.

rasmus-madsen commented 3 years ago

Ideally this should handle the read of a full-text file so one does not have to copy by hand. I have a python script that generated the current aes nist vector systemverilog code.

Also the functions for printing the vectors should be adobted.

udinator commented 3 years ago

I took a quick look at the linked PR, and it doesn't seem like a massive amount of work to add AES vectors to the existing package.

@rasmus-madsen can you add your local python script to the linked PR so I can take a look and adapt it to fit our other test vectors also?

I can definitely also add better vector logging as well.

rasmus-madsen commented 3 years ago

@udinator sure where would be a good place to put the script?

udinator commented 3 years ago

hw/dv/sv/test_vectors would be a good starting place, I think - this is where the existing test vector collateral is located. No need to worry about adapting it right now, I'll take care of that part.

rasmus-madsen commented 3 years ago

@udinator I have added it to the PR in a separate commit. I apologize for the raw format. at some point I am planning to add input arguments and a help

udinator commented 3 years ago

Thanks Rasmus! I'll take a more detailed look at the PR when I have some time - maybe you can make a follow-up PR to #6981 to add the input arguments and tidy it up some more?

rasmus-madsen commented 3 years ago

Thanks Rasmus! I'll take a more detailed look at the PR when I have some time - maybe you can make a follow-up PR to #6981 to add the input arguments and tidy it up some more?

I will try to get to that asap, as everybody else I am currently swamped

udinator commented 3 years ago

Reassigning to @cindychip

moidx commented 2 years ago

Hi @cindychip, I assigned this to M2 but please move to Backlog if it makes more sense.

sriyerg commented 2 years ago

Hi @cindychip, I assigned this to M2 but please move to Backlog if it makes more sense.

This is a low priority item. Maybe M3 or future cleanup.

moidx commented 2 years ago

Sounds good, thanks @sriyerg

johngt commented 4 months ago

@vogelpi / @moidx - I'm not sure if this is relevant any more. I think that @RyanTorok and @milesdai have worked on something that supersedes this.

If this is deprecated - please tag the PR that adds in the relevant test vectors and close this issue. TIA

johngt commented 4 months ago

@RyanTorok / @milesdai work is at top level. This is for block level testing. Don't know if this will get done in time