PHPackages                             querdos/php-ecdh - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Security](/categories/security)
4. /
5. querdos/php-ecdh

ActiveLibrary[Security](/categories/security)

querdos/php-ecdh
================

An Elliptic Curve Diffie Hellman implementation in PHP

v1(9y ago)2418011[1 issues](https://github.com/Querdos/ECDH-PHP/issues)MITPHPPHP &gt;= 5.6

Since Apr 25Pushed 4y ago1 watchersCompare

[ Source](https://github.com/Querdos/ECDH-PHP)[ Packagist](https://packagist.org/packages/querdos/php-ecdh)[ RSS](/packages/querdos-php-ecdh/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (1)DependenciesVersions (3)Used By (0)

ECDH-PHP
========

[](#ecdh-php)

[![Build Status](https://camo.githubusercontent.com/40405e3efdc9e6a1455a6fe1d636adbd455b3383319c00e002afae74021256ec/68747470733a2f2f7472617669732d63692e6f72672f51756572646f732f454344482d5048502e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/Querdos/ECDH-PHP)[![Latest Stable Version](https://camo.githubusercontent.com/ae729a077cbba71f3a59ccb772b05597f8fdea0a6206a61cfce49923113a86a8/68747470733a2f2f706f7365722e707567782e6f72672f71756572646f732f7068702d656364682f762f737461626c65)](https://packagist.org/packages/querdos/php-ecdh)[![Total Downloads](https://camo.githubusercontent.com/5dc3bd84a216e6f3099283244a38854e466171db07541b75ef0746a6f2dd3eb8/68747470733a2f2f706f7365722e707567782e6f72672f71756572646f732f7068702d656364682f646f776e6c6f616473)](https://packagist.org/packages/querdos/php-ecdh)[![Latest Unstable Version](https://camo.githubusercontent.com/8190f31527655bec6441b965782405b1ae58358233986ef9c22789acd2158c3e/68747470733a2f2f706f7365722e707567782e6f72672f71756572646f732f7068702d656364682f762f756e737461626c65)](https://packagist.org/packages/querdos/php-ecdh)[![License](https://camo.githubusercontent.com/fa11aa01a201bf7a50c8f81f8e08237008080a975b1f3010724d6823b7a57a8d/68747470733a2f2f706f7365722e707567782e6f72672f71756572646f732f7068702d656364682f6c6963656e7365)](https://packagist.org/packages/querdos/php-ecdh)

An Elliptic Curve Diffie Hellman Implementation in PHP.

Domain parameters used are from the [Recommended Elliptic Curve Domain Parameters](http://www.secg.org/sec2-v2.pdf)

Available constants
===================

[](#available-constants)

Here are available standard for the ECDH protocol:

```
    ECDH::SECP192K1 // Recommended Parameters SECP192K1 (192-bit)
    ECDH::SECP192R1 // Recommended Parameters SECP192R1 (192-bit)
    ECDH::SECP224K1 // Recommended Parameters SECP224K1 (224-bit)
    ECDH::SECP224R1 // Recommended Parameters SECP224R1 (224-bit)
    ECDH::SECP256K1 // Recommended Parameters SECP256K1 (256-bit)
    ECDH::SECP256R1 // Recommended Parameters SECP256R1 (256-bit)
    ECDH::SECP384R1 // Recommended Parameters SECP384R1 (384-bit)
    ECDH::SECP521R1 // Recommended Parameters SECP521R1 (521-bit)
```

Problems to Fix
===============

[](#problems-to-fix)

Yet, there are some problems with the signature verification with the following recommended parameters:

- `secp224k1`
- `secp251r1`

Example
=======

[](#example)

```
