-
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: Add generic HMAC implementation #20758
base: master
Are you sure you want to change the base?
Commits on Aug 22, 2024
-
sys/psa_crypto: Fix missing usage flags when creating new keys
The PSA crypto specification states that when creating keys, the usage flags PSA_KEY_USAGE_SIGN_HASH/PSA_KEY_USAGE_VERIFY_HASH automatically set the usage flags PSA_KEY_USAGE_SIGN_MESSAGE/PSA_KEY_USAGE_VERIFY_MESSAGE on the key. Signed-off-by: Armin Wolf <W_Armin@gmx.de>
Configuration menu - View commit details
-
Copy full SHA for c151184 - Browse repository at this point
Copy the full SHA c151184View commit details -
sys/psa_crypto: Wire-up multi-part MAC dispatcher
Prepare to support the multi-part MAC API by creating appropriate dispatchers for both algorithm and location backends. Since there are no supported backends at the moment, the dispatcher always returns PSA_ERROR_NOT_SUPPORTED for now. Signed-off-by: Armin Wolf <W_Armin@gmx.de>
Configuration menu - View commit details
-
Copy full SHA for c790119 - Browse repository at this point
Copy the full SHA c790119View commit details -
sys/psa_crypto: Implement PSA_HASH_BLOCK_LENGTH()
The initial implementation was inspired by MbedTLS, with the addition of the MD2 and MD4 algorithms. Signed-off-by: Armin Wolf <W_Armin@gmx.de>
Configuration menu - View commit details
-
Copy full SHA for 95400a7 - Browse repository at this point
Copy the full SHA 95400a7View commit details -
sys/psa_crypto: Implement PSA_MAC_MAX_SIZE()
This support macro will be needed by the generic hmac implementation. Signed-off-by: Armin Wolf <W_Armin@gmx.de>
Configuration menu - View commit details
-
Copy full SHA for 92fc1de - Browse repository at this point
Copy the full SHA 92fc1deView commit details -
sys/psa_crypto: Add PSA_HMAC_BLOCK_MAX_SIZE()
This additional macro will be used by the generic hmac implementation to calculate the size of the internal buffers. Signed-off-by: Armin Wolf <W_Armin@gmx.de>
Configuration menu - View commit details
-
Copy full SHA for b54214a - Browse repository at this point
Copy the full SHA b54214aView commit details -
sys/psa_crypto: Add generic HMAC implementation
Add a generic HMAC implementation based on the PSA hashing API. In order to support a specific HMAC algorithm, all what has to be implemented is a backend for the PSA hashing API. Signed-off-by: Armin Wolf <W_Armin@gmx.de>
Configuration menu - View commit details
-
Copy full SHA for 476719c - Browse repository at this point
Copy the full SHA 476719cView commit details -
sys/psa_crypto: Wire-up generic HMAC with the dispatcher
The generic HMAC implementation can only be used by going through the dispatcher. Do the necessary wire-up so that applications using the PSA crypto API can use the generic HMAC implementation. Signed-off-by: Armin Wolf <W_Armin@gmx.de>
Configuration menu - View commit details
-
Copy full SHA for b1a6cff - Browse repository at this point
Copy the full SHA b1a6cffView commit details -
sys/psa_crypto: Replace old SHA256 HMAC implemenation with generic HMAC
The old HMAC implementation only supported the SHA256 hashing algorithm and only implemented the single-part MAC function. Replace it with the generic HMAC implementation which supports all hashing algorithms and is already used for the multi-part MAC functions. A side effect of this commit is that the cryptocell HMAC implementation is not used anymore. This will be fixed in a later commit which introduces broad hardare-acceleration for HMAC. Signed-off-by: Armin Wolf <W_Armin@gmx.de>
Configuration menu - View commit details
-
Copy full SHA for ab0ce26 - Browse repository at this point
Copy the full SHA ab0ce26View commit details -
sys/psa_crypto: Implement psa_mac_verify()
Implement the PSA MAC verification API. Currently only the generic HMAC backend is available for MAC verification, but hardware-accelerated backends can be added later. Signed-off-by: Armin Wolf <W_Armin@gmx.de>
Configuration menu - View commit details
-
Copy full SHA for 3573476 - Browse repository at this point
Copy the full SHA 3573476View commit details -
sys/psa_crypto: Document the generic HMAC implementation
Add some documentation regarding the steps for adding support for new HMAC algorithms to the generic HMAC implementation. Signed-off-by: Armin Wolf <W_Armin@gmx.de>
Configuration menu - View commit details
-
Copy full SHA for 5ccb81d - Browse repository at this point
Copy the full SHA 5ccb81dView commit details -
tests/sys/psa_crypto_mac: Add tests for generic HMAC implementations
Add tests for the generic HMAC implementation. Authored-by: Daria Zatokovenko <daria.zatokovenko@gmail.com> Signed-off-by: Armin Wolf <W_Armin@gmx.de>
Configuration menu - View commit details
-
Copy full SHA for 3606e9b - Browse repository at this point
Copy the full SHA 3606e9bView commit details