CS tweaks

This commit is contained in:
terrafrost 2022-08-23 21:26:31 -05:00
parent feb5fad15d
commit 62f7c8aa10
9 changed files with 29 additions and 8 deletions

View File

@ -213,6 +213,9 @@ abstract class SymmetricKey
protected $key = false; protected $key = false;
/** /**
* HMAC Key
*
* @see self::setupGCM()
* @var null|string * @var null|string
*/ */
private $hKey = null; private $hKey = null;

View File

@ -125,6 +125,9 @@ class DES extends BlockCipher
private $keys; private $keys;
/** /**
* Key Cache "key"
*
* @see self::setupKey()
* @var array * @var array
*/ */
private $kl; private $kl;

View File

@ -65,6 +65,8 @@ abstract class DH extends AsymmetricKey
protected $base; protected $base;
/** /**
* Public Key
*
* @var BigInteger * @var BigInteger
*/ */
protected $publicKey; protected $publicKey;

View File

@ -126,6 +126,8 @@ abstract class EC extends AsymmetricKey
protected $context; protected $context;
/** /**
* Signature Format
*
* @var string * @var string
*/ */
protected $sigFormat; protected $sigFormat;

View File

@ -41,14 +41,19 @@ use phpseclib3\Math\PrimeField;
class KoblitzPrime extends Prime class KoblitzPrime extends Prime
{ {
/** /**
* Basis
*
* @var list<array{a: BigInteger, b: BigInteger}> * @var list<array{a: BigInteger, b: BigInteger}>
*/ */
public $basis; public $basis;
/** /**
* @var object * Beta
*
* @var PrimeField\Integer
*/ */
public $beta; public $beta;
// don't overwrite setCoefficients() with one that only accepts one parameter so that // don't overwrite setCoefficients() with one that only accepts one parameter so that
// one might be able to switch between KoblitzPrime and Prime more easily (for benchmarking // one might be able to switch between KoblitzPrime and Prime more easily (for benchmarking
// purposes). // purposes).

View File

@ -49,7 +49,7 @@ class PrivateKey extends EC implements Common\PrivateKey
/** /**
* @var string * @var string
*/ */
protected $secret = ''; protected $secret;
/** /**
* Multiplies an encoded point by the private key * Multiplies an encoded point by the private key

View File

@ -171,6 +171,8 @@ class Hash
private $pad; private $pad;
/** /**
* Block Size
*
* @var int * @var int
*/ */
private $blockSize; private $blockSize;

View File

@ -253,13 +253,10 @@ abstract class RSA extends AsymmetricKey
/** /**
* Public Exponent * Public Exponent
*
* @var BigInteger
*/ */
protected $publicExponent = false; protected $publicExponent;
/**
* Private Exponent
*/
protected $privateExponent = null;
/** /**
* Sets the public exponent for key generation * Sets the public exponent for key generation

View File

@ -50,6 +50,13 @@ class PrivateKey extends RSA implements Common\PrivateKey
*/ */
protected $coefficients; protected $coefficients;
/**
* Private Exponent
*
* @var BigInteger
*/
protected $privateExponent;
/** /**
* RSADP * RSADP
* *