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

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to