Skip to content

markdave27/curve25519-php

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

curve25519 php

Curve25519 library with Ed25519 signatures extension for PHP. This is used in Chat API

$secureRandom = self::getSecureRandom();
$private = curve25519_private($secureRandom);
$public  = curve25519_public($private);
$keyPair = new ECKeyPair(new DjbECPublicKey($public),new DjbECPrivateKey($private));
        
$agreement = curve25519_shared( $keyPair->getPrivateKey(),$keyPair->getPublicKey());
$signature = curve25519_sign(getSecureRandom(64), $signingKey->getPrivateKey(), $message);
$verified  = curve25519_verify($signingKey->getPublicKey(), $message, $signature) == 0;

Installation

Linux and OS X

phpize
./configure
make
sudo make install

License

MIT

About

Curve25519 extension for PHP

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 94.6%
  • C++ 5.2%
  • M4 0.2%