Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Properly initialize AEAD cipher flags in OpenSSL backend #20853

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

Open
jordikroon wants to merge 5 commits into php:master
base: master
Choose a base branch
Loading
from jordikroon:fix/gh20851

Conversation

@jordikroon
Copy link
Contributor

@jordikroon jordikroon commented Jan 6, 2026
edited
Loading

Fixes #20851

Add support for AEAD ciphers like AES-SIV by detecting and initializing AEAD flags during cipher mode loading.
Includes test case for AES-256-SIV encryption/decryption roundtrip.

@jordikroon jordikroon changed the title (削除) properly initialize AEAD cipher flags in OpenSSL backend (削除ここまで) (追記) Properly initialize AEAD cipher flags in OpenSSL backend (追記ここまで) Jan 6, 2026
Copy link
Contributor Author

Please review commits 1 by 1 since I am not sure if the change from string $aad = "" to ?string $aad = "" is acceptable.
The first commit only fixes SIV Synthetic Initialization Vector where it generates its own IV. It was not respected.

The second commit allows AAD to be null since it behaves differently than when only an empty string is given. The matches other implementations like cryptography in python.

Copy link
Member

@bukka bukka left a comment

Choose a reason for hiding this comment

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

This looks reasonable. Just some minor things really.

Copy link
Member

@bukka bukka left a comment

Choose a reason for hiding this comment

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

It looks good now. It would be just nice to convert the test so it's consistent with other AEAD tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@bukka bukka bukka left review comments

@kocsismate kocsismate Awaiting requested review from kocsismate kocsismate is a code owner

Assignees

No one assigned

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AES SIV cipher algorithms implemented incorrectly in openssl module

2 participants

AltStyle によって変換されたページ (->オリジナル) /