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

Enable additional capabilities for AWS-LC #2386

Merged
merged 4 commits into from
Mar 19, 2025

Conversation

skmcgrail
Copy link
Contributor

This was the follow-up work to the recently merged support for AWS-LC in #1805.

This enables some additional API support in various parts of the openssl crate. This includes some specific AES cipher support likes CFB, CCM, and XTS. Also includes support for SHA3 digests and SHAKE128 and SHAKE256.

@skmcgrail
Copy link
Contributor Author

It looks like everything passed except for one item: https://github.com/sfackler/rust-openssl/actions/runs/13935540844/job/39002532120?pr=2386

This failed with an transient error caused by rustup. Can someone poke the button to retry this failed action? Thanks!

assert_eq!(MessageDigest::shake_128().size(), 16);
#[cfg(awslc)]
assert_eq!(MessageDigest::shake_128().size(), 0);
Copy link
Collaborator

Choose a reason for hiding this comment

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

This seems wrong?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The SHAKE algorithms are extendable output algorithms that don't have an explicit digest output size as it's determined based on the requested output size. So we opt to return 0 in this instance if EVP_MD_size() is called on such an XOF algorithm like SHAKE-128 and SHAKE-256.

Comment on lines 826 to 827
#[cfg(awslc)]
assert_eq!(MessageDigest::shake_128().size(), 0);
Copy link
Collaborator

Choose a reason for hiding this comment

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

This seems both wrong, and a copy-paste error 😂

Copy link
Contributor Author

@skmcgrail skmcgrail Mar 19, 2025

Choose a reason for hiding this comment

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

Ah this one is legitimate mistake, forgot to swap the algorithm.

@alex alex merged commit d4bf071 into sfackler:master Mar 19, 2025
79 checks passed
@skmcgrail skmcgrail deleted the aws-lc-follow-up branch March 24, 2025 23:22
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.

3 participants