|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #70438 Add IV parameter for openssl_seal and openssl_open
Submitted: 2015-09-06 17:16 UTC Modified: 2015-09-06 18:15 UTC
From: Assigned: bukka (profile)
Status: Closed Package: OpenSSL related
PHP Version: 7.0.0RC2 OS: any
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
New email:
PHP Version: OS:


 [2015-09-06 17:16 UTC]
The openssl_seal and openssl_open cannot be used with cipher algorithms requiring IV (e.g. AES-128-CBC)

Test script:
$data = "openssl_seal() test";
$cipher = 'AES-128-CBC';
// if in ext/openssl/tests
$pub_key = "file://" . dirname(__FILE__) . "/public.key";
$priv_key = "file://" . dirname(__FILE__) . "/private.key";

openssl_seal($data, $sealed, $ekeys, array($pub_key, $pub_key), $cipher, $iv);   
openssl_open($sealed, $decrypted, $ekeys[0], $priv_key, $cipher, $iv);
echo $decrypted;

Expected result:
openssl_seal() test

Actual result:
Warning that ciphers with IV are not supported.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2015-09-06 17:17 UTC]
-Status: Open +Status: Assigned -Assigned To: +Assigned To: bukka
 [2015-09-06 18:15 UTC]
-Status: Assigned +Status: Closed
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Thu Dec 07 08:01:28 2023 UTC