Req #61204 [Com]: Add elliptic curve support for OpenSSL
| From: | mcastelluccio at mozilla dot com | Date: | Sat, 06 Feb 2016 01:20:53 +0000 |
| Subject: | Req #61204 [Com]: Add elliptic curve support for OpenSSL | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-199075@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=61204&edit=1
ID: 61204
Comment by: mcastelluccio at mozilla dot com
Reported by: manuel at mausz dot at
Summary: Add elliptic curve support for OpenSSL
Status: Open
Type: Feature/Change Request
Package: OpenSSL related
PHP Version: trunk-SVN-2012-02-28 (SVN)
Block user comment: N
Private report: N
New Comment:
This is needed to implement the Web Push protocol in PHP: https://tools.ietf.org/html/draft-ietf-webpush-encryption-01
Previous Comments:
------------------------------------------------------------------------
[2016-01-26 15:24:07] web at jonathanmartins dot com dot br
since 2012... affff! This should be done years ago. How can I help?
------------------------------------------------------------------------
[2014-05-26 04:14:16] daniel at morante dot net
Has this been added? I see this is over 2 years old but I am getting "Unsupported private key
type" with the following code:
$config = array(
"private_key_type" => OPENSSL_KEYTYPE_EC,
);
$res = openssl_pkey_new($config);
------------------------------------------------------------------------
[2012-02-28 16:58:26] manuel at mausz dot at
Description:
------------
It's not possible to generate private keys using elliptic curve cryptography.
Expected result:
----------------
Attached is a patch for svn trunk to implement basic support for ec.
In order to determine which specific curve to use I've expanded the configuration array with a
new key "ec_group_name". There's no openssl.conf equivalent (or at least I don't
know).
If you prefer an other name or method to pass the curve name to the methods just drop me a note.
Additional I've added a new method openssl_get_curve_names() which gets a list of all available
elliptic curves (their short names only).
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=61204&edit=1