Skip to content

Conversation

@mamckee
Copy link
Collaborator

@mamckee mamckee commented Mar 19, 2025

The SymCrypt unit tests with OpenSSL and SCOSSL revealed an edge case when calling EVP_CipherInit_ex2 and passing the IV length as a parameter alongside the IV. The SCOSSL implementation unconditionally freed the set IV if an IV length was set, even if the IV length did not change. If the IV length matches what's set, then the IV should not be reset.

This PR also adds state checks for the IV and tag in CCM to bring the behavior and failure points more in line with the default provider.

Copy link
Contributor

@samuel-lee-msft samuel-lee-msft left a comment

Choose a reason for hiding this comment

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

LGTM modulo comments

@mamckee mamckee merged commit c4aac63 into main Mar 27, 2025
1 check passed
@mamckee mamckee deleted the mamckee-aead-state-checks branch April 8, 2025 17:57
This was referenced May 7, 2025
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