|   | php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
| 
  [2016-12-23 19:23 UTC] anthon dot pang at gmail dot com
 Description: ------------ openssl_decrypt with a cipher of 'aes-128-ccm' currently enforces an iv length of 12 octets or 96 bits. According to various RFCs, the iv length has an allowable range of 7 to 13 octets. https://tools.ietf.org/html/rfc3610 https://tools.ietf.org/html/rfc5084 "aes-nonce OCTET STRING (SIZE(7..13))," Expected result: ---------------- In php_openssl_validate_iv(), when mode->is_aead, treat iv_required_len as a recommendation; do a range check instead. PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits             | |||||||||||||||||||||||||||
|  Copyright © 2001-2025 The PHP Group All rights reserved. | Last updated: Fri Oct 31 23:00:01 2025 UTC | 
IV length can be set. You can try var_dump(openssl_encrypt('data', 'aes-256-ccm', 'password', 0, '1234567', $tag)); or just see https://3v4l.org/5Vdo3 The only thing that is wrong is a warning that specifies default length which doesn't make much sense because it can be a range so the message should be definitely stripped. I'll fix it as part of this bug (that's why I renamed it...)