php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #61204 Add elliptic curve support for OpenSSL
Submitted: 2012-02-28 16:58 UTC Modified: 2016-06-26 16:32 UTC
Votes:39
Avg. Score:4.7 ± 0.7
Reproduced:34 of 36 (94.4%)
Same Version:10 (29.4%)
Same OS:13 (38.2%)
From: manuel at mausz dot at Assigned: bukka (profile)
Status: Closed Package: OpenSSL related
PHP Version: trunk-SVN-2012-02-28 (SVN) OS:
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: manuel at mausz dot at
New email:
PHP Version: OS:

 

 [2012-02-28 16:58 UTC] 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).


Patches

php-openssl-ec.patch (last revision 2012-02-28 16:58 UTC by manuel at mausz dot at)

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2014-05-26 04:14 UTC] 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);
 [2016-01-26 15:24 UTC] web at jonathanmartins dot com dot br
since 2012... affff! This should be done years ago. How can I help?
 [2016-02-06 01:20 UTC] mcastelluccio at mozilla dot com
This is needed to implement the Web Push protocol in PHP: https://tools.ietf.org/html/draft-ietf-webpush-encryption-01
 [2016-06-26 16:32 UTC] bukka@php.net
-Assigned To: +Assigned To: bukka
 [2016-06-26 16:32 UTC] bukka@php.net
Merged and will be part of 7.1
 [2016-06-26 16:32 UTC] bukka@php.net
-Status: Assigned +Status: Closed
 [2016-08-26 02:42 UTC] ozgurh at gmail dot com
Is it possible to add this feature to PHP 7.0. Probably it will take some time to release stable version of PHP 7.1. We need this feature to send web push notification via PHP. There are some altenative libraries but they do it so slow. (around 1 second per encryption) and It's take too much time if we try to send mass push notification messages.

Thanks in advance,
Ozgur.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Dec 03 17:01:29 2024 UTC