php.net |  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: bukka@php.net Assigned: bukka (profile)
Status: Closed Package: OpenSSL related
PHP Version: 7.0.0RC2 OS: any
Private report: No CVE-ID: None
 [2015-09-06 17:16 UTC] bukka@php.net
Description:
------------
The openssl_seal and openssl_open cannot be used with cipher algorithms requiring IV (e.g. AES-128-CBC)

Test script:
---------------
<?php
$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.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2015-09-06 17:17 UTC] bukka@php.net
-Status: Open +Status: Assigned -Assigned To: +Assigned To: bukka
 [2015-09-06 18:15 UTC] bukka@php.net
-Status: Assigned +Status: Closed
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Mar 19 11:01:28 2024 UTC