-
Notifications
You must be signed in to change notification settings - Fork 2k
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
sys/psa_crypto: one-shot Chacha20 support #20720
sys/psa_crypto: one-shot Chacha20 support #20720
Conversation
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.
Very thorough and well-made glue code implementation, thanks! I have mostly minor comments and some questions below.
#ifdef CPU_NRF52 | ||
#define CHECK_POINTER_DMA_ACCESS(p) ((unsigned int)p >= 0x20000000 ? (unsigned int)p < 0x40000000 : 0) | ||
#endif |
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.
We'll have to remember doing similar checks for all the other cryptocell 310 glue code, too. I'll open a ticket.
pkg/driver_cryptocell_310/psa_cryptocell_310/cipher_chacha_20.c
Outdated
Show resolved
Hide resolved
Some unused parameter warnings which let the CI fail: https://ci.riot-os.org/details/8fd578f3a2364f3abf17716e17dc1bcc |
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.
Nice work, just two more minor suggestions below.
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.
Looks good, please squash :)
f6ac013
to
4a8c63a
Compare
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.
To me this looks pretty good! Just one small thing: could you update the documentation of the available features in sys/psa_crypto/doc.txt
?
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.
Thank you!
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.
After you've squashed the last commit, this is ready to be merged :)
@Wunderbaeumchen99817 @darthdrannel Would you like to squash or should I take over? |
d84fd64
to
b9396c4
Compare
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.
Let's finally get this in :)
Contribution description
This PR adds a new pseudomodule for using the existing chacha20-algorithms in a simpler way.
More specific: It adds gluecode for the PSA Crypto API to access the RIOT implementation of CHACHA20.
Testing procedure
The corresponding tests are located in tests/sys/psa_crypto_hashes/example_cipher_chacha20.c
You can run them the following way:
go to tests/sys/psa_crypto_cipher/
run "make compile-commands"
run "make flash test"
Issues/PRs references
N/A