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

"AES Authenticated Encryption example" is wrong and insecure #2512

Open
hendi opened this issue Jun 5, 2023 · 0 comments
Open

"AES Authenticated Encryption example" is wrong and insecure #2512

hendi opened this issue Jun 5, 2023 · 0 comments
Labels

Comments

@hendi
Copy link

hendi commented Jun 5, 2023

From manual page: https://php.net/function.openssl-encrypt

The example "Example #2 AES Authenticated Encryption example prior to PHP 7.1" is wrong and insecure, in the way that the hmac doesn't consider the IV. That means that it's possible take an encrypted and authenticated value, change its IV (the first bytes) and still pass the hmac check.

@Girgias Girgias added the Extension: openssl OpenSSL label Jul 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants