Skip to content

Enabled psa_mac_compute and psa_mac_verify functions. - #143

Merged
hug-dev merged 7 commits into
parallaxsecond:mainfrom
mes5k:add_mac
Jan 20, 2026
Merged

hug-dev merged 7 commits into
parallaxsecond:mainfrom
mes5k:add_mac

Conversation

@mes5k

@mes5k mes5k commented Mar 4, 2024

Copy link
Copy Markdown
Contributor

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 <mes@aescon.com>
mes5k added 4 commits March 5, 2024 20:04
Signed-off-by: Mike Smoot <mes@aescon.com>
Signed-off-by: Mike Smoot <mes@aescon.com>
Signed-off-by: Mike Smoot <mes@aescon.com>
Signed-off-by: Mike Smoot <mes@aescon.com>
@hug-dev

hug-dev commented Jan 14, 2026

Copy link
Copy Markdown
Member

Sorry for having left this on the side! If you would like to rebase to re-trigger CI I would be happy to merge 🙏

Signed-off-by: Mike Smoot <mes@aescon.com>
@mes5k

mes5k commented Jan 17, 2026

Copy link
Copy Markdown
Contributor Author

Thanks @hug-dev, just pushed the updates.

hug-dev
hug-dev previously approved these changes Jan 19, 2026

@hug-dev hug-dev left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this! Nice formatting and tests too 👍

Comment thread psa-crypto/src/operations/mac.rs Outdated
Comment thread psa-crypto/src/types/key.rs
Signed-off-by: Mike Smoot <mes@aescon.com>

@hug-dev hug-dev left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@hug-dev
hug-dev merged commit fd36223 into parallaxsecond:main Jan 20, 2026
3 checks passed
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.

2 participants