Closed akadlec closed 2 years ago
Hi, when I create private key from secret, EC is modifying it
$secret = random_bytes(32); $ec = new EC('curve25519'); $keyPair = $ec->keyFromPrivate(bin2hex($secret), 16); $keyPair->getPrivate('hex') !== bin2hex($secret);
and I think this secret should be same
private key has to be lower than n, so when you pass random value it is always modified to fit https://github.com/simplito/elliptic-php/blob/master/lib/EC/KeyPair.php#L97
Hi, when I create private key from secret, EC is modifying it
and I think this secret should be same