-
Notifications
You must be signed in to change notification settings - Fork 164
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
aes_shift_rows_fwd and aes_shift_rows_inv do not match crypto spec. #280
Comments
Is this observable for the scalar crypto instructions that use this (surely yes?), and if so, does the fact this made it into the Sail model mean there was a testing gap? Either way, yes, filing a PR to fix a bug makes sense, it'll just need a clear commit message explaining how the problem manifests in the scalar crypto code, or, if it doesn't, that it's a non-functional change for the scalar crypto code that enables upcoming vector crypto code to use it. |
Turns out these functions aren't used in any of the scalar instructions (and aren't even called anywhere yet), but they still show up in the scalar crypto spec I think because the spec links directly to the file containing these functions (riscv_insts_zvkned.sail) in Sail itself, so fixing the functions here should fix the scalar spec for the next release. |
#234 uses these instructions for the vector spec. @charmitro Please review (and provide information on the test status for vector-crypto). |
PR #281 fixes any remaining issues between SAIL & Spike, all Zvkned ACT tests from riscv-non-isa/riscv-arch-test#333 are now passing. Given that the @mlawson-tt due to the fact that the Zvk* Pull Requests are created from |
@charmitro I think there still may be one more issue with |
On Mon Jul 3, 2023 at 6:56 PM EEST, Matt Lawson wrote:
@charmitro I think there still may be one more issue with `vaeskf2.vi` because we're matching with Sail but mismatching with Spike when running those tests you linked (but all of the rest match), and I think it's an issue with the spec. I filed riscv/riscv-crypto#336, and it looks like the pseudocode is going to change slightly (via riscv/riscv-crypto#337), so just a heads up on that change just in case you're seeing it too.
Yes, saw it when I was testing and already changed it to match Spike.
|
An issue was discovered a few months ago in the vector crypto spec (riscv/riscv-crypto#268) that caused a fix for
aes_shift_rows_fwd
andaes_shift_rows_inv
(riscv/riscv-crypto@a19ae20), but the changes have not yet been incorporated here.This section in
aes_shift_rows_fwd
:should be:
and this section in
aes_shift_rows_inv
:should be:
I have these changes on a local branch and confirmed that Sail now matches Spike for these functions, so I can submit a PR if it makes sense to do so.
The text was updated successfully, but these errors were encountered: