-
Notifications
You must be signed in to change notification settings - Fork 2.1k
sys/psa_crypto: Adding aead aes ccm #21455
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
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.
Thanks for doing this! Here's a first round of review. Haven't tested it locally yet.
Oh, and something seems to be off in your automatic backend selection: -- running on worker alien thread 1, build number 13791.
make: Entering directory '/tmp/dwq.0.49495055948356803/0b95bb80d67d834a634a4edd6938ca1d/tests/sys/psa_crypto_aead'
You are going to use the PSA Crypto module, which is only partly implemented and not yet thouroughly tested.\n Please do not use this module in production, as it may introduce security issues!
/tmp/dwq.0.49495055948356803/0b95bb80d67d834a634a4edd6938ca1d/sys/psa_crypto/Makefile.include:111: *** "One (and only one) backend should be selected for psa_aead_aes_128_ccm". Stop.
make: Leaving directory '/tmp/dwq.0.49495055948356803/0b95bb80d67d834a634a4edd6938ca1d/tests/sys/psa_crypto_aead'
make: Entering directory '/tmp/dwq.0.49495055948356803/0b95bb80d67d834a634a4edd6938ca1d/tests/sys/psa_crypto_aead'
You are going to use the PSA Crypto module, which is only partly implemented and not yet thouroughly tested.\n Please do not use this module in production, as it may introduce security issues!
/tmp/dwq.0.49495055948356803/0b95bb80d67d834a634a4edd6938ca1d/sys/psa_crypto/Makefile.include:111: *** "One (and only one) backend should be selected for psa_aead_aes_128_ccm". Stop.
make: Leaving directory '/tmp/dwq.0.49495055948356803/0b95bb80d67d834a634a4edd6938ca1d/tests/sys/psa_crypto_aead'
cat: /tmp/dwq.0.49495055948356803/0b95bb80d67d834a634a4edd6938ca1d/build/test-input-hash.sha1: No such file or directory |
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.
Thanks for this! Feel free to squash directly after adding the missing documentation.
bb55129
to
08ebf6f
Compare
No Problem. Everything should be ready now ;) |
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.
Sorry, one last nit, found while trying to compile with
diff --git a/tests/sys/psa_crypto_aead/Makefile b/tests/sys/psa_crypto_aead/Makefile
index e0fdc67078..5d8f3615e1 100644
--- a/tests/sys/psa_crypto_aead/Makefile
+++ b/tests/sys/psa_crypto_aead/Makefile
@@ -6,6 +6,8 @@ USEMODULE += psa_crypto
USEMODULE += psa_aead
USEMODULE += psa_aead_aes_128_ccm
+USEMODULE += psa_aead_aes_128_ccm_custom_backend
+USEMODULE += psa_aead_aes_128_ccm_backend_tinycrypt
CFLAGS += -DCONFIG_PSA_SINGLE_KEY_COUNT=2
Also, would you mind updating your commit messages and remove all the fixup commit messages? I can show you how to, if needed.
0772148
to
964d071
Compare
964d071
to
13760ae
Compare
Should be all done now. Sorry for the delay |
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.
Thanks!
You'll have to add a BOARD_INSUFFICIENT_MEMORY := \
nucleo-l011k4 \
samd10-xmini \
stm32f030f4-demo \
# |
13760ae
to
406d6dc
Compare
Contribution description
This PR adds AES CCM as the first Authenticated encryption with associated data algorithm to the PSA Certified Crypto API implementation of RIOT.
It comes with three backends:
Cifra
Tinycrypt
Cryptocell 310
Testing procedure
A test is provided in tests/sys/psa_crypto_aead.
Note that the test will fail on tinycrypt because of invalid nonce size.
Issues/PRs references
This is highly inspired by #18547.