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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: bukka@php.net
New email:
PHP Version: OS:

 

 [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

Pull Requests

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: Thu Nov 21 14:01:29 2024 UTC