ID:               26664
 Updated by:       [EMAIL PROTECTED]
 Reported By:      fch at hexanet dot fr
-Status:           No Feedback
+Status:           Bogus
 Bug Type:         OpenSSL related
 Operating System: windows 98 and FreeBSD 4.9
 PHP Version:      4.3.3
 New Comment:

That's the way that RSA works; you need to create a bigger key to be
able to encrypt bigger chunks of data; the error message is quite
clear.
Not a PHP bug.


Previous Comments:
------------------------------------------------------------------------

[2004-11-11 06:53:30] pigo at pchome dot com dot tw

The same problem too.
RedHat 8.0 , OpenSSL 0.9.6b , PHP 4.3.9 !

------------------------------------------------------------------------

[2004-01-01 20:48:32] [EMAIL PROTECTED]

No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.



------------------------------------------------------------------------

[2003-12-19 07:57:22] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php4-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-STABLE-latest.zip



------------------------------------------------------------------------

[2003-12-19 04:36:09] fch at hexanet dot fr

Description:
------------
openssl_encrypt function refuse to encrypt data larger than key size.

Then I try, open_ssl_encrypt say :

> error:0406C06E:rsa routines:RSA_padding_add_PKCS1_type_1:data too
large for key size

Openssl support is enabled and I am using OpenSSL 0.9.7c 30 Sep 2003.

Reproduce code:
---------------
#GET PRIVATE KEY PREVIOUSLY GENERATED
$private_key =
openssl_get_privatekey('file:///var/tmp/pkey.pem','r0bert');

$data =
"abcdefghijiklmnopqrstuvwxyzabcdefghijiklmnopqrstuvwxyzabcdefghijiklmnopqrstuvwxyzabcdefghijiklmnopqrstuvwxyzabcdefghijiklmnopqrstuv";

openssl_private_encrypt($data, $crypted_text, $private_key);


Expected result:
----------------
I expect crypted data in $crypted_text.

Actual result:
--------------
error:0406C06E:rsa routines:RSA_padding_add_PKCS1_type_1:data too large
for key size


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=26664&edit=1

Reply via email to