diff --git a/src/Crypto/Signature/Signer.php b/src/Crypto/Signature/Signer.php index d15ce60..6dae8c0 100644 --- a/src/Crypto/Signature/Signer.php +++ b/src/Crypto/Signature/Signer.php @@ -63,12 +63,7 @@ public function sign(PrivateKeyInterface $key, GMP $truncatedHash, GMP $randomK) if ($math->equals($r, $zero)) { throw new \RuntimeException("Error: random number R = 0"); } - if ($curve instanceof OptimizedCurveInterface) { - // This will be faster than ConstantTimeMath's - $kInv = $optimized->modInverse($k); - } else { - $kInv = $math->inverseMod($k, $generator->getOrder()); - } + $kInv = $math->inverseMod($k, $generator->getOrder()); // S = (d*R + h) / k (mod P) = (d*R + h) * k^-1 (mod P) $s = $modMath->mul(