php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #62924 Add Curve25519 support to PHP
Submitted: 2012-08-24 14:15 UTC Modified: 2015-01-11 17:53 UTC
Votes:12
Avg. Score:4.9 ± 0.3
Reproduced:2 of 2 (100.0%)
Same Version:2 (100.0%)
Same OS:2 (100.0%)
From: riptide dot tempora at opinehub dot com Assigned: danack (profile)
Status: Closed Package: *Encryption and hash functions
PHP Version: Irrelevant OS: Any
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: riptide dot tempora at opinehub dot com
New email:
PHP Version: OS:

 

 [2012-08-24 14:15 UTC] riptide dot tempora at opinehub dot com
Description:
------------
Curve25519 is an elliptic curve variant of Diffie-Hellman key exchanging.

The author of Curve25519 (which is the chosen public key protocol for DNSCurve http://dnscurve.org) has released a public domain C library on his website: http://cr.yp.to/ecdh.html



Test script:
---------------
Desired functionality would be something like this:
<?
$private = openssl_random_pseudo_bytes(32);
$private[0] &= 248;
$private[31] &= 127;
$private[31] |= 64;
$public = curve25519_get_public($private);
// Get Bob's public key here somehow
$shared = curve25519_get_secret($private, $bobPublic);
// Symmetric key ciphers here
?>


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-09-27 20:15 UTC] riptide dot tempora at opinehub dot com
http://matejdanter.com/2010/12/elliptic-curve-php-oop-dsa-and-diffie-hellman/
 [2014-03-08 02:19 UTC] scott at arciszewski dot me
So, who would be the correct person to assign to this? :/
 [2014-12-22 16:33 UTC] scott at arciszewski dot me
I believe this can be closed since these features are available with the PECL libsodium package.

pecl install libsodium
 [2015-01-11 17:53 UTC] danack@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: danack
 [2015-01-11 17:53 UTC] danack@php.net
Closed since these features are apparently available with the PECL libsodium package.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed Jul 02 14:01:36 2025 UTC