paragonie / phpecc

Pure PHP Elliptic Curve Cryptography Library
16 stars 3 forks source link

Deterministic ECDSA Signatures (RFC 6979) #27

Open biladina opened 3 months ago

biladina commented 3 months ago

is this issue already accomodated in this fork?? how can I use it??

sc0Vu commented 2 months ago

@biladina

I believe it's HmacRandomNumberGenerator (https://github.com/paragonie/phpecc/blob/6bc975de934f250f8d784207de6113fee7a2fd08/src/Random/HmacRandomNumberGenerator.php), example: https://github.com/paragonie/phpecc/blob/6bc975de934f250f8d784207de6113fee7a2fd08/examples/creating_signature.php

$random = \Mdanter\Ecc\Random\RandomGeneratorFactory::getHmacRandomGenerator($key, $hash, $algorithm);
$randomK = $random->generate($generator->getOrder());