opentitan icon indicating copy to clipboard operation
opentitan copied to clipboard

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

Open sriyerg opened this issue 5 years ago • 13 comments

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.

sriyerg avatar Jun 25 '21 17:06 sriyerg

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.

rasmus-madsen avatar Jun 25 '21 20:06 rasmus-madsen

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.

udinator avatar Jun 28 '21 20:06 udinator

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

rasmus-madsen avatar Jun 28 '21 20:06 rasmus-madsen

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.

udinator avatar Jun 28 '21 20:06 udinator

@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

rasmus-madsen avatar Jun 28 '21 20:06 rasmus-madsen

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?

udinator avatar Jun 28 '21 20:06 udinator

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

rasmus-madsen avatar Jun 29 '21 08:06 rasmus-madsen

Reassigning to @cindychip

udinator avatar Oct 08 '21 00:10 udinator

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

moidx avatar Aug 31 '22 13:08 moidx

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.

sriyerg avatar Aug 31 '22 18:08 sriyerg

Sounds good, thanks @sriyerg

moidx avatar Aug 31 '22 19:08 moidx

@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 avatar Jun 14 '24 08:06 johngt

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

johngt avatar Jun 14 '24 08:06 johngt