Skip to content

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

Open
@hendi

Description

@hendi

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions