|  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
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
41 + 33 = ?
Subscribe to this entry?

 [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: Fri Dec 01 07:01:28 2023 UTC