-
Notifications
You must be signed in to change notification settings - Fork 747
nRF52 AES Improvements #3448
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
nRF52 AES Improvements #3448
Conversation
// test::aes_test::run_aes128_ctr(&base_peripherals.ecb); | ||
// test::aes_test::run_aes128_cbc(&base_peripherals.ecb); | ||
// test::aes_test::run_aes128_ecb(&base_peripherals.ecb); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not use the unit test framework to run these instead of commenting them out?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's the right thing to do but not something I'm going to take on right now.
We can store the results in-place in the output buffer, removing the artificial limit in the driver implementation.
Rebased. Ready to go again. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's unfortunate that the use of a static mut buffer for DMA also means those array accesses also end up in the unsafe block, but I don't think things are any meaningfully worse than before. Added some explainer comments for the unsafe
's
Pull Request Overview
This pull request:
Adds the userspace AES driver to the nRF52840dk board.Note, the nRF52 ECB module does not support decryption, so the ECB and CBC decryption tests fail.
This pull request is me getting familiar with the AES support on the nRF52 in hopes of using it for the Tock Tutorial.
Testing Strategy
Running the kernel AES tests.
TODO or Help Wanted
When I run the libtock-c/aes test app, I get:
So the AES CTR works, but the CCM does not. I did not change any of the CCM code. Do we know if that test is supposed to work? I believe the userland test app uses a different size IV than the in-kernel CCM test.Nevermind, since we don't have GCM we cannot use the userspace driver.
Documentation Updated
/docs
, or no updates are required.Formatting
make prepush
.