PHPackages                             querdos/php-dh - 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-dh

ActiveLibrary[Security](/categories/security)

querdos/php-dh
==============

A DiffieHellman implementation in PHP

v1(9y ago)566MITPHP

Since Apr 16Pushed 9y ago1 watchersCompare

[ Source](https://github.com/Querdos/DiffieHellman-PHP)[ Packagist](https://packagist.org/packages/querdos/php-dh)[ RSS](/packages/querdos-php-dh/feed)WikiDiscussions master Synced 4d ago

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

DiffieHellman-PHP
=================

[](#diffiehellman-php)

[![Build Status](https://camo.githubusercontent.com/a3a096f8dada523fd967289d952ccb2f907bdb2317c507f9bf43795b18fb4214/68747470733a2f2f7472617669732d63692e6f72672f51756572646f732f44696666696548656c6c6d616e2d5048502e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/Querdos/DiffieHellman-PHP)

A Diffie Helmann implementation in PHP written by Hamza ESSAYEGH

Installation
------------

[](#installation)

First of all, download and install Composer by following the [official instructions](https://getcomposer.org/download/) and the `php-gmp` library for your distribution

```
# Debian like installation
$ sudo apt-get install php-gmp
```

Then, you can install this implementation by running the following command:

```
$ composer require querdos/php-dh
```

Usage
-----

[](#usage)

Simple example on how to generate a shared secret

```
