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;
/**
* HMAC Key
*
* @see self::setupGCM()
* @var null|string
*/
private $hKey = null;

View File

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

View File

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

View File

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

View File

@ -41,14 +41,19 @@ use phpseclib3\Math\PrimeField;
class KoblitzPrime extends Prime
{
/**
* Basis
*
* @var list<array{a: BigInteger, b: BigInteger}>
*/
public $basis;
/**
* @var object
* Beta
*
* @var PrimeField\Integer
*/
public $beta;
// 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
// purposes).

View File

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

View File

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

View File

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

View File

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