From e06f7335281f9c9461d2d5ac90036ea0fe992db1 Mon Sep 17 00:00:00 2001 From: terrafrost Date: Tue, 21 May 2019 00:03:21 -0500 Subject: [PATCH] ECDSA: add missing class variables for deterministic ECDSA --- phpseclib/Crypt/ECDSA.php | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/phpseclib/Crypt/ECDSA.php b/phpseclib/Crypt/ECDSA.php index 1587c583..cd0b05aa 100644 --- a/phpseclib/Crypt/ECDSA.php +++ b/phpseclib/Crypt/ECDSA.php @@ -98,6 +98,27 @@ abstract class ECDSA extends AsymmetricKey */ private $curveName; + /** + * Curve Order + * + * Used for deterministic ECDSA + * + * @var \phpseclib\Math\BigInteger + */ + protected $q; + + /** + * Alias for the private key + * + * Used for deterministic ECDSA. AsymmetricKey expects $x. I don't like x because + * with x you have x * the base point yielding an (x, y)-coordinate that is the + * public key. But the x is different depending on which side of the equal sign + * you're on. It's less ambiguous if you do dA * base point = (x, y)-coordinate. + * + * @var \phpseclib\Math\BigInteger + */ + protected $x; + /** * Context *