diff --git a/phpseclib/Crypt/Common/SymmetricKey.php b/phpseclib/Crypt/Common/SymmetricKey.php index ea3a4c27..63e1381a 100644 --- a/phpseclib/Crypt/Common/SymmetricKey.php +++ b/phpseclib/Crypt/Common/SymmetricKey.php @@ -263,6 +263,11 @@ abstract class SymmetricKey */ protected $debuffer; + /** + * @var array + */ + protected $buffer; + /** * Does internal cipher state need to be (re)initialized? * diff --git a/phpseclib/Crypt/DES.php b/phpseclib/Crypt/DES.php index c7d089dc..ee2f04ee 100644 --- a/phpseclib/Crypt/DES.php +++ b/phpseclib/Crypt/DES.php @@ -124,6 +124,11 @@ class DES extends BlockCipher */ private $keys; + /** + * @var array + */ + private $kl; + /** * Shuffle table. * diff --git a/phpseclib/Crypt/DH/PublicKey.php b/phpseclib/Crypt/DH/PublicKey.php index b52b3d78..583b3b2e 100644 --- a/phpseclib/Crypt/DH/PublicKey.php +++ b/phpseclib/Crypt/DH/PublicKey.php @@ -15,6 +15,7 @@ namespace phpseclib3\Crypt\DH; use phpseclib3\Crypt\Common; use phpseclib3\Crypt\DH; +use phpseclib3\Math\BigInteger; /** * DH Public Key @@ -25,6 +26,13 @@ class PublicKey extends DH { use Common\Traits\Fingerprint; + /** + * Public Key + * + * @var BigInteger + */ + protected $publicKey; + /** * Returns the public key * @@ -40,7 +48,7 @@ class PublicKey extends DH /** * Returns the public key as a BigInteger */ - public function toBigInteger(): \phpseclib3\Math\BigInteger + public function toBigInteger(): BigInteger { return $this->publicKey; } diff --git a/phpseclib/Crypt/EC.php b/phpseclib/Crypt/EC.php index 3f61916d..835d75fe 100644 --- a/phpseclib/Crypt/EC.php +++ b/phpseclib/Crypt/EC.php @@ -125,6 +125,11 @@ abstract class EC extends AsymmetricKey */ protected $context; + /** + * @var string + */ + protected $sigFormat; + /** * Create public / private key pair. */ diff --git a/phpseclib/Crypt/EC/Curves/secp160k1.php b/phpseclib/Crypt/EC/Curves/secp160k1.php index 6a4d273c..02a461a5 100644 --- a/phpseclib/Crypt/EC/Curves/secp160k1.php +++ b/phpseclib/Crypt/EC/Curves/secp160k1.php @@ -20,6 +20,10 @@ use phpseclib3\Math\BigInteger; class secp160k1 extends KoblitzPrime { + public $basis; + + public $beta; + public function __construct() { // same as secp160r2 diff --git a/phpseclib/Crypt/EC/Curves/secp192k1.php b/phpseclib/Crypt/EC/Curves/secp192k1.php index 952c56e0..ee97b193 100644 --- a/phpseclib/Crypt/EC/Curves/secp192k1.php +++ b/phpseclib/Crypt/EC/Curves/secp192k1.php @@ -20,6 +20,10 @@ use phpseclib3\Math\BigInteger; class secp192k1 extends KoblitzPrime { + public $basis; + + public $beta; + public function __construct() { $this->setModulo(new BigInteger('FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFEE37', 16)); diff --git a/phpseclib/Crypt/EC/Curves/secp224k1.php b/phpseclib/Crypt/EC/Curves/secp224k1.php index bf45dc82..f62df8cf 100644 --- a/phpseclib/Crypt/EC/Curves/secp224k1.php +++ b/phpseclib/Crypt/EC/Curves/secp224k1.php @@ -20,6 +20,10 @@ use phpseclib3\Math\BigInteger; class secp224k1 extends KoblitzPrime { + public $basis; + + public $beta; + public function __construct() { $this->setModulo(new BigInteger('FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFE56D', 16)); diff --git a/phpseclib/Crypt/EC/Curves/secp256k1.php b/phpseclib/Crypt/EC/Curves/secp256k1.php index e886e592..6463727c 100644 --- a/phpseclib/Crypt/EC/Curves/secp256k1.php +++ b/phpseclib/Crypt/EC/Curves/secp256k1.php @@ -24,6 +24,10 @@ use phpseclib3\Math\BigInteger; //class secp256k1 extends Prime class secp256k1 extends KoblitzPrime { + public $basis; + + public $beta; + public function __construct() { $this->setModulo(new BigInteger('FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFC2F', 16)); diff --git a/phpseclib/Crypt/Hash.php b/phpseclib/Crypt/Hash.php index 5efacabb..af270574 100644 --- a/phpseclib/Crypt/Hash.php +++ b/phpseclib/Crypt/Hash.php @@ -170,6 +170,11 @@ class Hash */ private $pad; + /** + * @var int + */ + private $blockSize; + /**#@+ * UMAC variables * diff --git a/phpseclib/Crypt/RSA/PrivateKey.php b/phpseclib/Crypt/RSA/PrivateKey.php index e7e618e6..a7dcad6a 100644 --- a/phpseclib/Crypt/RSA/PrivateKey.php +++ b/phpseclib/Crypt/RSA/PrivateKey.php @@ -55,6 +55,11 @@ class PrivateKey extends RSA implements Common\PrivateKey */ protected $publicExponent = false; + /** + * Private Exponent + */ + protected $privateExponent; + /** * RSADP * diff --git a/phpseclib/Crypt/RSA/PublicKey.php b/phpseclib/Crypt/RSA/PublicKey.php index c20f08fd..0b9e39f2 100644 --- a/phpseclib/Crypt/RSA/PublicKey.php +++ b/phpseclib/Crypt/RSA/PublicKey.php @@ -34,6 +34,16 @@ class PublicKey extends RSA implements Common\PublicKey { use Common\Traits\Fingerprint; + /** + * Public Exponent + */ + protected $publicExponent = false; + + /** + * Private Exponent + */ + protected $privateExponent; + /** * Exponentiate */ diff --git a/phpseclib/Math/BigInteger.php b/phpseclib/Math/BigInteger.php index 88860838..8b3e7e76 100644 --- a/phpseclib/Math/BigInteger.php +++ b/phpseclib/Math/BigInteger.php @@ -79,6 +79,11 @@ class BigInteger implements \JsonSerializable */ private $precision; + /** + * @var string + */ + public $secret; + /** * Sets engine type. * diff --git a/phpseclib/Math/BigInteger/Engines/PHP/Reductions/EvalBarrett.php b/phpseclib/Math/BigInteger/Engines/PHP/Reductions/EvalBarrett.php index ce709785..607dd060 100644 --- a/phpseclib/Math/BigInteger/Engines/PHP/Reductions/EvalBarrett.php +++ b/phpseclib/Math/BigInteger/Engines/PHP/Reductions/EvalBarrett.php @@ -57,7 +57,7 @@ abstract class EvalBarrett extends Base $lhs->value = $x; $rhs = new ' . $class . '(); $rhs->value = [' . - implode(',', array_map('self::float2string', $m->value)) . ']; + implode(',', array_map(self::class . '::float2string', $m->value)) . ']; list(, $temp) = $lhs->divide($rhs); return $temp->value; '; @@ -98,7 +98,7 @@ abstract class EvalBarrett extends Base $rhs = new ' . $class . '(); $lhs->value = $n; $rhs->value = [' . - implode(',', array_map('self::float2string', $m)) . ']; + implode(',', array_map(self::class . '::float2string', $m)) . ']; list(, $temp) = $lhs->divide($rhs); return $temp->value; } diff --git a/phpseclib/Math/BinaryField/Integer.php b/phpseclib/Math/BinaryField/Integer.php index b6bb12c8..40750b22 100644 --- a/phpseclib/Math/BinaryField/Integer.php +++ b/phpseclib/Math/BinaryField/Integer.php @@ -62,6 +62,11 @@ class Integer extends Base */ protected static $reduce; + /** + * @var bool|string + */ + public $key; + /** * Default constructor */ diff --git a/phpseclib/Math/PrimeField.php b/phpseclib/Math/PrimeField.php index 0b21a82b..0b49c517 100644 --- a/phpseclib/Math/PrimeField.php +++ b/phpseclib/Math/PrimeField.php @@ -41,6 +41,11 @@ class PrimeField extends FiniteField */ protected $instanceID; + /** + * @var BigInteger + */ + protected $modulo; + /** * Default constructor */