Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:94041 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 28601 invoked from network); 16 Jun 2016 08:26:37 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 16 Jun 2016 08:26:37 -0000 Authentication-Results: pb1.pair.com smtp.mail=dol+php@snowgarden.ch; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=dol+php@snowgarden.ch; sender-id=pass Received-SPF: pass (pb1.pair.com: domain snowgarden.ch designates 194.126.200.144 as permitted sender) X-PHP-List-Original-Sender: dol+php@snowgarden.ch X-Host-Fingerprint: 194.126.200.144 s34mx.cyon.ch Linux 2.6 Received: from [194.126.200.144] ([194.126.200.144:55606] helo=s34mx.cyon.ch) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id F8/60-25388-BB262675 for ; Thu, 16 Jun 2016 04:26:35 -0400 Received: from [192.168.200.231] (port=50995 helo=mail.cyon.ch) by server34.cyon.ch with esmtpa (Exim 4.86_1) (envelope-from ) id 1bDSdD-000N9m-J6 for internals@lists.php.net; Thu, 16 Jun 2016 10:26:31 +0200 To: internals@lists.php.net References: <57609B96.6080905@snowgarden.ch> Message-ID: <576262B5.4030407@snowgarden.ch> Date: Thu, 16 Jun 2016 10:26:29 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-OutGoing-Spam-Status: No, score=-1.0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - server34.cyon.ch X-AntiAbuse: Original Domain - lists.php.net X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - snowgarden.ch X-Get-Message-Sender-Via: server34.cyon.ch: authenticated_id: d.luechinger@snowgarden.ch X-Authenticated-Sender: server34.cyon.ch: d.luechinger@snowgarden.ch Subject: Re: [PHP-DEV] [OpenSSL] Support for ECC public key generation From: dol+php@snowgarden.ch (Dominic Luechinger) On 15/06/16 03:51, Scott Arciszewski wrote: > While we're at it, can we also add a function to generate (ephemeral) > Elliptic Curve Diffie-Hellman keys, and then use openssl_dh_compute_key() > with ECDH keys? Because that would be a lot saner than having to > shell_exec() to the OpenSSL binary in userland. Thank you for pointing out ECDH. It makes sense to extend the ECC support even further. What do you mean by: > generate (ephemeral) Elliptic Curve Diffie-Hellman keys For a ECDH to be ephemeral you could just create a new ECC key pair. This is now possible with this extension. As you pointed out the missing part is that openssl_dh_compute_key not supporting ECC keys. This was requested in the past [1]. If hacked together a proof of concept for openssl_ecdh_compute_key(). I'll push this update to a new branch. I'll send you an update if the branch is ready for testing. Regards Dominic [1] https://bugs.php.net/bug.php?id=71548