Skip to content
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

Enabled psa_mac_compute and psa_mac_verify functions. #143

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

mes5k
Copy link

@mes5k mes5k commented Mar 4, 2024

This PR enables the psa_mac_compute and psa_mac_verify functions. I added new tests, fixed doc tests and formatted the code.

Everything seems to work fine, at least to my inexperienced eye. Please review closely and let me know if anything additional is needed.

My only real conceptual question is whether I should be checking if the size > 0 after the called to psa_crypto_sys::PSA_MAC_LENGTH in the mac_length function. This makes sense to me as a belt and suspenders approach to ensuring we don't end up with a 0 size mac buffer. On the other hand, I haven't been able to come up with a test scenario where this might happen, so maybe it's not necessary?

Thanks!

Added new tests, fixed doc tests and formatted code.

Signed-off-by: Mike Smoot <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant