mirror of
https://github.com/phpseclib/phpseclib.git
synced 2025-01-28 01:28:27 +00:00
Merge pull request #1437 from terrafrost/phpseclib3
rename phpseclib/phpseclib to phpseclib/phpseclib3 for 3.0 branch
This commit is contained in:
commit
d35f987cb4
@ -72,7 +72,7 @@
|
||||
"phpseclib/bootstrap.php"
|
||||
],
|
||||
"psr-4": {
|
||||
"phpseclib\\": "phpseclib/"
|
||||
"phpseclib3\\": "phpseclib/"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -13,10 +13,10 @@
|
||||
* @link http://phpseclib.sourceforge.net
|
||||
*/
|
||||
|
||||
namespace phpseclib\Common\Functions;
|
||||
namespace phpseclib3\Common\Functions;
|
||||
|
||||
use phpseclib\Math\BigInteger;
|
||||
use phpseclib\Math\Common\FiniteField;
|
||||
use phpseclib3\Math\BigInteger;
|
||||
use phpseclib3\Math\Common\FiniteField;
|
||||
|
||||
/**
|
||||
* Common String Functions
|
||||
@ -182,7 +182,7 @@ abstract class Strings
|
||||
break;
|
||||
case 'i':
|
||||
if (!$element instanceof BigInteger && !$element instanceof FiniteField\Integer) {
|
||||
throw new \InvalidArgumentException('A phpseclib\Math\BigInteger or phpseclib\Math\Common\FiniteField\Integer object was expected.');
|
||||
throw new \InvalidArgumentException('A phpseclib3\Math\BigInteger or phpseclib3\Math\Common\FiniteField\Integer object was expected.');
|
||||
}
|
||||
$element = $element->toBytes(true);
|
||||
$result.= pack('Na*', strlen($element), $element);
|
||||
|
@ -16,7 +16,7 @@
|
||||
* it'll be null-padded to 192-bits and 192 bits will be the key length until {@link self::setKey() setKey()}
|
||||
* is called, again, at which point, it'll be recalculated.
|
||||
*
|
||||
* Since \phpseclib\Crypt\AES extends \phpseclib\Crypt\Rijndael, some functions are available to be called that, in the context of AES, don't
|
||||
* Since \phpseclib3\Crypt\AES extends \phpseclib3\Crypt\Rijndael, some functions are available to be called that, in the context of AES, don't
|
||||
* make a whole lot of sense. {@link self::setBlockLength() setBlockLength()}, for instance. Calling that function,
|
||||
* however possible, won't do anything (AES has a fixed block length whereas Rijndael has a variable one).
|
||||
*
|
||||
@ -25,7 +25,7 @@
|
||||
* <?php
|
||||
* include 'vendor/autoload.php';
|
||||
*
|
||||
* $aes = new \phpseclib\Crypt\AES();
|
||||
* $aes = new \phpseclib3\Crypt\AES();
|
||||
*
|
||||
* $aes->setKey('abcdefghijklmnop');
|
||||
*
|
||||
@ -47,7 +47,7 @@
|
||||
* @link http://phpseclib.sourceforge.net
|
||||
*/
|
||||
|
||||
namespace phpseclib\Crypt;
|
||||
namespace phpseclib3\Crypt;
|
||||
|
||||
/**
|
||||
* Pure-PHP implementation of AES.
|
||||
@ -61,9 +61,9 @@ class AES extends Rijndael
|
||||
/**
|
||||
* Dummy function
|
||||
*
|
||||
* Since \phpseclib\Crypt\AES extends \phpseclib\Crypt\Rijndael, this function is, technically, available, but it doesn't do anything.
|
||||
* Since \phpseclib3\Crypt\AES extends \phpseclib3\Crypt\Rijndael, this function is, technically, available, but it doesn't do anything.
|
||||
*
|
||||
* @see \phpseclib\Crypt\Rijndael::setBlockLength()
|
||||
* @see \phpseclib3\Crypt\Rijndael::setBlockLength()
|
||||
* @access public
|
||||
* @param int $length
|
||||
* @throws \BadMethodCallException anytime it's called
|
||||
@ -78,7 +78,7 @@ class AES extends Rijndael
|
||||
*
|
||||
* Valid key lengths are 128, 192, and 256. Set the link to bool(false) to disable a fixed key length
|
||||
*
|
||||
* @see \phpseclib\Crypt\Rijndael:setKeyLength()
|
||||
* @see \phpseclib3\Crypt\Rijndael:setKeyLength()
|
||||
* @access public
|
||||
* @param int $length
|
||||
* @throws \LengthException if the key length isn't supported
|
||||
@ -101,7 +101,7 @@ class AES extends Rijndael
|
||||
*
|
||||
* Rijndael supports five different key lengths, AES only supports three.
|
||||
*
|
||||
* @see \phpseclib\Crypt\Rijndael:setKey()
|
||||
* @see \phpseclib3\Crypt\Rijndael:setKey()
|
||||
* @see setKeyLength()
|
||||
* @access public
|
||||
* @param string $key
|
||||
|
@ -16,7 +16,7 @@
|
||||
* <?php
|
||||
* include 'vendor/autoload.php';
|
||||
*
|
||||
* $blowfish = new \phpseclib\Crypt\Blowfish();
|
||||
* $blowfish = new \phpseclib3\Crypt\Blowfish();
|
||||
*
|
||||
* $blowfish->setKey('12345678901234567890123456789012');
|
||||
*
|
||||
@ -35,9 +35,9 @@
|
||||
* @link http://phpseclib.sourceforge.net
|
||||
*/
|
||||
|
||||
namespace phpseclib\Crypt;
|
||||
namespace phpseclib3\Crypt;
|
||||
|
||||
use phpseclib\Crypt\Common\BlockCipher;
|
||||
use phpseclib3\Crypt\Common\BlockCipher;
|
||||
|
||||
/**
|
||||
* Pure-PHP implementation of Blowfish.
|
||||
@ -52,7 +52,7 @@ class Blowfish extends BlockCipher
|
||||
/**
|
||||
* Block Length of the cipher
|
||||
*
|
||||
* @see \phpseclib\Crypt\Common\SymmetricKey::block_size
|
||||
* @see \phpseclib3\Crypt\Common\SymmetricKey::block_size
|
||||
* @var int
|
||||
* @access private
|
||||
*/
|
||||
@ -61,7 +61,7 @@ class Blowfish extends BlockCipher
|
||||
/**
|
||||
* The mcrypt specific name of the cipher
|
||||
*
|
||||
* @see \phpseclib\Crypt\Common\SymmetricKey::cipher_name_mcrypt
|
||||
* @see \phpseclib3\Crypt\Common\SymmetricKey::cipher_name_mcrypt
|
||||
* @var string
|
||||
* @access private
|
||||
*/
|
||||
@ -70,7 +70,7 @@ class Blowfish extends BlockCipher
|
||||
/**
|
||||
* Optimizing value while CFB-encrypting
|
||||
*
|
||||
* @see \phpseclib\Crypt\Common\SymmetricKey::cfb_init_len
|
||||
* @see \phpseclib3\Crypt\Common\SymmetricKey::cfb_init_len
|
||||
* @var int
|
||||
* @access private
|
||||
*/
|
||||
@ -275,7 +275,7 @@ class Blowfish extends BlockCipher
|
||||
/**
|
||||
* The Key Length (in bytes)
|
||||
*
|
||||
* @see \phpseclib\Crypt\Common\SymmetricKey::setKeyLength()
|
||||
* @see \phpseclib3\Crypt\Common\SymmetricKey::setKeyLength()
|
||||
* @var int
|
||||
* @access private
|
||||
* @internal The max value is 256 / 8 = 32, the min value is 128 / 8 = 16. Exists in conjunction with $Nk
|
||||
@ -323,9 +323,9 @@ class Blowfish extends BlockCipher
|
||||
/**
|
||||
* Test for engine validity
|
||||
*
|
||||
* This is mainly just a wrapper to set things up for \phpseclib\Crypt\Common\SymmetricKey::isValidEngine()
|
||||
* This is mainly just a wrapper to set things up for \phpseclib3\Crypt\Common\SymmetricKey::isValidEngine()
|
||||
*
|
||||
* @see \phpseclib\Crypt\Common\SymmetricKey::isValidEngine()
|
||||
* @see \phpseclib3\Crypt\Common\SymmetricKey::isValidEngine()
|
||||
* @param int $engine
|
||||
* @access protected
|
||||
* @return bool
|
||||
@ -349,7 +349,7 @@ class Blowfish extends BlockCipher
|
||||
/**
|
||||
* Setup the key (expansion)
|
||||
*
|
||||
* @see \phpseclib\Crypt\Common\SymmetricKey::_setupKey()
|
||||
* @see \phpseclib3\Crypt\Common\SymmetricKey::_setupKey()
|
||||
* @access private
|
||||
*/
|
||||
protected function setupKey()
|
||||
@ -472,7 +472,7 @@ class Blowfish extends BlockCipher
|
||||
/**
|
||||
* Setup the performance-optimized function for de/encrypt()
|
||||
*
|
||||
* @see \phpseclib\Crypt\Common\SymmetricKey::_setupInlineCrypt()
|
||||
* @see \phpseclib3\Crypt\Common\SymmetricKey::_setupInlineCrypt()
|
||||
* @access private
|
||||
*/
|
||||
protected function setupInlineCrypt()
|
||||
|
@ -13,11 +13,11 @@
|
||||
* @link http://phpseclib.sourceforge.net
|
||||
*/
|
||||
|
||||
namespace phpseclib\Crypt;
|
||||
namespace phpseclib3\Crypt;
|
||||
|
||||
use phpseclib\Crypt\Common\StreamCipher;
|
||||
use phpseclib\Exception\InsufficientSetupException;
|
||||
use phpseclib\Exception\BadDecryptionException;
|
||||
use phpseclib3\Crypt\Common\StreamCipher;
|
||||
use phpseclib3\Exception\InsufficientSetupException;
|
||||
use phpseclib3\Exception\BadDecryptionException;
|
||||
|
||||
/**
|
||||
* Pure-PHP implementation of ChaCha20.
|
||||
@ -38,9 +38,9 @@ class ChaCha20 extends Salsa20
|
||||
/**
|
||||
* Test for engine validity
|
||||
*
|
||||
* This is mainly just a wrapper to set things up for \phpseclib\Crypt\Common\SymmetricKey::isValidEngine()
|
||||
* This is mainly just a wrapper to set things up for \phpseclib3\Crypt\Common\SymmetricKey::isValidEngine()
|
||||
*
|
||||
* @see \phpseclib\Crypt\Common\SymmetricKey::__construct()
|
||||
* @see \phpseclib3\Crypt\Common\SymmetricKey::__construct()
|
||||
* @param int $engine
|
||||
* @access protected
|
||||
* @return bool
|
||||
@ -79,7 +79,7 @@ class ChaCha20 extends Salsa20
|
||||
/**
|
||||
* Encrypts a message.
|
||||
*
|
||||
* @see \phpseclib\Crypt\Common\SymmetricKey::decrypt()
|
||||
* @see \phpseclib3\Crypt\Common\SymmetricKey::decrypt()
|
||||
* @see self::crypt()
|
||||
* @param string $plaintext
|
||||
* @return string $ciphertext
|
||||
@ -101,7 +101,7 @@ class ChaCha20 extends Salsa20
|
||||
* $this->decrypt($this->encrypt($plaintext)) == $this->encrypt($this->encrypt($plaintext)).
|
||||
* At least if the continuous buffer is disabled.
|
||||
*
|
||||
* @see \phpseclib\Crypt\Common\SymmetricKey::encrypt()
|
||||
* @see \phpseclib3\Crypt\Common\SymmetricKey::encrypt()
|
||||
* @see self::crypt()
|
||||
* @param string $ciphertext
|
||||
* @return string $plaintext
|
||||
|
@ -13,15 +13,15 @@
|
||||
* @link http://phpseclib.sourceforge.net
|
||||
*/
|
||||
|
||||
namespace phpseclib\Crypt\Common;
|
||||
namespace phpseclib3\Crypt\Common;
|
||||
|
||||
use phpseclib\Exception\UnsupportedFormatException;
|
||||
use phpseclib\Exception\NoKeyLoadedException;
|
||||
use phpseclib\Math\BigInteger;
|
||||
use phpseclib\Crypt\Hash;
|
||||
use phpseclib\Crypt\RSA;
|
||||
use phpseclib\Crypt\DSA;
|
||||
use phpseclib\Crypt\ECDSA;
|
||||
use phpseclib3\Exception\UnsupportedFormatException;
|
||||
use phpseclib3\Exception\NoKeyLoadedException;
|
||||
use phpseclib3\Math\BigInteger;
|
||||
use phpseclib3\Crypt\Hash;
|
||||
use phpseclib3\Crypt\RSA;
|
||||
use phpseclib3\Crypt\DSA;
|
||||
use phpseclib3\Crypt\ECDSA;
|
||||
|
||||
/**
|
||||
* Base Class for all stream cipher classes
|
||||
@ -34,7 +34,7 @@ abstract class AsymmetricKey
|
||||
/**
|
||||
* Precomputed Zero
|
||||
*
|
||||
* @var \phpseclib\Math\BigInteger
|
||||
* @var \phpseclib3\Math\BigInteger
|
||||
* @access private
|
||||
*/
|
||||
protected static $zero;
|
||||
@ -42,7 +42,7 @@ abstract class AsymmetricKey
|
||||
/**
|
||||
* Precomputed One
|
||||
*
|
||||
* @var \phpseclib\Math\BigInteger
|
||||
* @var \phpseclib3\Math\BigInteger
|
||||
* @access private
|
||||
*/
|
||||
protected static $one;
|
||||
@ -58,7 +58,7 @@ abstract class AsymmetricKey
|
||||
/**
|
||||
* Hash function
|
||||
*
|
||||
* @var \phpseclib\Crypt\Hash
|
||||
* @var \phpseclib3\Crypt\Hash
|
||||
* @access private
|
||||
*/
|
||||
protected $hash;
|
||||
@ -66,7 +66,7 @@ abstract class AsymmetricKey
|
||||
/**
|
||||
* HMAC function
|
||||
*
|
||||
* @var \phpseclib\Crypt\Hash
|
||||
* @var \phpseclib3\Crypt\Hash
|
||||
* @access private
|
||||
*/
|
||||
private $hmac;
|
||||
@ -249,7 +249,7 @@ abstract class AsymmetricKey
|
||||
continue;
|
||||
}
|
||||
$name = $file->getBasename('.php');
|
||||
$type = 'phpseclib\Crypt\\' . static::ALGORITHM . '\\Formats\\' . $format . '\\' . $name;
|
||||
$type = 'phpseclib3\Crypt\\' . static::ALGORITHM . '\\Formats\\' . $format . '\\' . $name;
|
||||
$reflect = new \ReflectionClass($type);
|
||||
if ($reflect->isTrait()) {
|
||||
continue;
|
||||
@ -440,7 +440,7 @@ abstract class AsymmetricKey
|
||||
* Integer to Octet String
|
||||
*
|
||||
* @access private
|
||||
* @param \phpseclib\Math\BigInteger $v
|
||||
* @param \phpseclib3\Math\BigInteger $v
|
||||
* @return string
|
||||
*/
|
||||
private function int2octets($v)
|
||||
@ -461,7 +461,7 @@ abstract class AsymmetricKey
|
||||
*
|
||||
* @access private
|
||||
* @param string $in
|
||||
* @return \phpseclib\Math\BigInteger
|
||||
* @return \phpseclib3\Math\BigInteger
|
||||
*/
|
||||
protected function bits2int($in)
|
||||
{
|
||||
|
@ -14,7 +14,7 @@
|
||||
* @link http://phpseclib.sourceforge.net
|
||||
*/
|
||||
|
||||
namespace phpseclib\Crypt\Common;
|
||||
namespace phpseclib3\Crypt\Common;
|
||||
|
||||
/**
|
||||
* Base Class for all block cipher classes
|
||||
|
@ -15,11 +15,11 @@
|
||||
* @link http://phpseclib.sourceforge.net
|
||||
*/
|
||||
|
||||
namespace phpseclib\Crypt\Common\Formats\Keys;
|
||||
namespace phpseclib3\Crypt\Common\Formats\Keys;
|
||||
|
||||
use ParagonIE\ConstantTime\Base64;
|
||||
use phpseclib\Common\Functions\Strings;
|
||||
use phpseclib\Crypt\Random;
|
||||
use phpseclib3\Common\Functions\Strings;
|
||||
use phpseclib3\Crypt\Random;
|
||||
|
||||
/**
|
||||
* OpenSSH Formatted RSA Key Handler
|
||||
|
@ -13,7 +13,7 @@
|
||||
* @link http://phpseclib.sourceforge.net
|
||||
*/
|
||||
|
||||
namespace phpseclib\Crypt\Common\Formats\Keys;
|
||||
namespace phpseclib3\Crypt\Common\Formats\Keys;
|
||||
|
||||
/**
|
||||
* PKCS1 Formatted Key Handler
|
||||
|
@ -13,16 +13,16 @@
|
||||
* @link http://phpseclib.sourceforge.net
|
||||
*/
|
||||
|
||||
namespace phpseclib\Crypt\Common\Formats\Keys;
|
||||
namespace phpseclib3\Crypt\Common\Formats\Keys;
|
||||
|
||||
use ParagonIE\ConstantTime\Base64;
|
||||
use ParagonIE\ConstantTime\Hex;
|
||||
use phpseclib\Crypt\Random;
|
||||
use phpseclib\Crypt\AES;
|
||||
use phpseclib\Crypt\DES;
|
||||
use phpseclib\Crypt\TripleDES;
|
||||
use phpseclib\File\ASN1;
|
||||
use phpseclib\Exception\UnsupportedAlgorithmException;
|
||||
use phpseclib3\Crypt\Random;
|
||||
use phpseclib3\Crypt\AES;
|
||||
use phpseclib3\Crypt\DES;
|
||||
use phpseclib3\Crypt\TripleDES;
|
||||
use phpseclib3\File\ASN1;
|
||||
use phpseclib3\Exception\UnsupportedAlgorithmException;
|
||||
|
||||
/**
|
||||
* PKCS1 Formatted Key Handler
|
||||
|
@ -25,19 +25,19 @@
|
||||
* @link http://phpseclib.sourceforge.net
|
||||
*/
|
||||
|
||||
namespace phpseclib\Crypt\Common\Formats\Keys;
|
||||
namespace phpseclib3\Crypt\Common\Formats\Keys;
|
||||
|
||||
use ParagonIE\ConstantTime\Base64;
|
||||
use phpseclib\Crypt\DES;
|
||||
use phpseclib\Crypt\RC2;
|
||||
use phpseclib\Crypt\RC4;
|
||||
use phpseclib\Crypt\AES;
|
||||
use phpseclib\Crypt\TripleDES;
|
||||
use phpseclib\Crypt\Random;
|
||||
use phpseclib\Math\BigInteger;
|
||||
use phpseclib\File\ASN1;
|
||||
use phpseclib\File\ASN1\Maps;
|
||||
use phpseclib\Exception\UnsupportedAlgorithmException;
|
||||
use phpseclib3\Crypt\DES;
|
||||
use phpseclib3\Crypt\RC2;
|
||||
use phpseclib3\Crypt\RC4;
|
||||
use phpseclib3\Crypt\AES;
|
||||
use phpseclib3\Crypt\TripleDES;
|
||||
use phpseclib3\Crypt\Random;
|
||||
use phpseclib3\Math\BigInteger;
|
||||
use phpseclib3\File\ASN1;
|
||||
use phpseclib3\File\ASN1\Maps;
|
||||
use phpseclib3\Exception\UnsupportedAlgorithmException;
|
||||
|
||||
/**
|
||||
* PKCS#8 Formatted Key Handler
|
||||
@ -139,7 +139,7 @@ abstract class PKCS8 extends PKCS
|
||||
/**
|
||||
* Returns a SymmetricKey object based on a PBES1 $algo
|
||||
*
|
||||
* @return \phpseclib\Crypt\Common\SymmetricKey
|
||||
* @return \phpseclib3\Crypt\Common\SymmetricKey
|
||||
* @access public
|
||||
* @param string $algo
|
||||
*/
|
||||
|
@ -13,15 +13,15 @@
|
||||
* @link http://phpseclib.sourceforge.net
|
||||
*/
|
||||
|
||||
namespace phpseclib\Crypt\Common\Formats\Keys;
|
||||
namespace phpseclib3\Crypt\Common\Formats\Keys;
|
||||
|
||||
use ParagonIE\ConstantTime\Base64;
|
||||
use ParagonIE\ConstantTime\Hex;
|
||||
use phpseclib\Crypt\AES;
|
||||
use phpseclib\Crypt\Hash;
|
||||
use phpseclib\Crypt\Random;
|
||||
use phpseclib\Common\Functions\Strings;
|
||||
use phpseclib\Exception\UnsupportedAlgorithmException;
|
||||
use phpseclib3\Crypt\AES;
|
||||
use phpseclib3\Crypt\Hash;
|
||||
use phpseclib3\Crypt\Random;
|
||||
use phpseclib3\Common\Functions\Strings;
|
||||
use phpseclib3\Exception\UnsupportedAlgorithmException;
|
||||
|
||||
/**
|
||||
* PuTTY Formatted Key Handler
|
||||
|
@ -15,9 +15,9 @@
|
||||
* @link http://phpseclib.sourceforge.net
|
||||
*/
|
||||
|
||||
namespace phpseclib\Crypt\Common\Formats\Signature;
|
||||
namespace phpseclib3\Crypt\Common\Formats\Signature;
|
||||
|
||||
use phpseclib\Math\BigInteger;
|
||||
use phpseclib3\Math\BigInteger;
|
||||
|
||||
/**
|
||||
* Raw Signature Handler
|
||||
@ -55,8 +55,8 @@ abstract class Raw
|
||||
* Returns a signature in the appropriate format
|
||||
*
|
||||
* @access public
|
||||
* @param \phpseclib\Math\BigInteger $r
|
||||
* @param \phpseclib\Math\BigInteger $s
|
||||
* @param \phpseclib3\Math\BigInteger $r
|
||||
* @param \phpseclib3\Math\BigInteger $s
|
||||
* @return string
|
||||
*/
|
||||
public static function save(BigInteger $r, BigInteger $s)
|
||||
|
@ -11,7 +11,7 @@
|
||||
* @link http://phpseclib.sourceforge.net
|
||||
*/
|
||||
|
||||
namespace phpseclib\Crypt\Common;
|
||||
namespace phpseclib3\Crypt\Common;
|
||||
|
||||
/**
|
||||
* PrivateKey interface
|
||||
|
@ -11,7 +11,7 @@
|
||||
* @link http://phpseclib.sourceforge.net
|
||||
*/
|
||||
|
||||
namespace phpseclib\Crypt\Common;
|
||||
namespace phpseclib3\Crypt\Common;
|
||||
|
||||
/**
|
||||
* PublicKey interface
|
||||
|
@ -14,7 +14,7 @@
|
||||
* @link http://phpseclib.sourceforge.net
|
||||
*/
|
||||
|
||||
namespace phpseclib\Crypt\Common;
|
||||
namespace phpseclib3\Crypt\Common;
|
||||
|
||||
/**
|
||||
* Base Class for all stream cipher classes
|
||||
|
@ -1,14 +1,14 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Base Class for all \phpseclib\Crypt\* cipher classes
|
||||
* Base Class for all \phpseclib3\Crypt\* cipher classes
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
* Internally for phpseclib developers:
|
||||
* If you plan to add a new cipher class, please note following rules:
|
||||
*
|
||||
* - The new \phpseclib\Crypt\* cipher class should extend \phpseclib\Crypt\Common\SymmetricKey
|
||||
* - The new \phpseclib3\Crypt\* cipher class should extend \phpseclib3\Crypt\Common\SymmetricKey
|
||||
*
|
||||
* - Following methods are then required to be overridden/overloaded:
|
||||
*
|
||||
@ -20,7 +20,7 @@
|
||||
*
|
||||
* - All other methods are optional to be overridden/overloaded
|
||||
*
|
||||
* - Look at the source code of the current ciphers how they extend \phpseclib\Crypt\Common\SymmetricKey
|
||||
* - Look at the source code of the current ciphers how they extend \phpseclib3\Crypt\Common\SymmetricKey
|
||||
* and take one of them as a start up for the new cipher class.
|
||||
*
|
||||
* - Please read all the other comments/notes/hints here also for each class var/method
|
||||
@ -34,21 +34,21 @@
|
||||
* @link http://phpseclib.sourceforge.net
|
||||
*/
|
||||
|
||||
namespace phpseclib\Crypt\Common;
|
||||
namespace phpseclib3\Crypt\Common;
|
||||
|
||||
use phpseclib\Crypt\Hash;
|
||||
use phpseclib\Common\Functions\Strings;
|
||||
use phpseclib\Math\BigInteger;
|
||||
use phpseclib\Math\BinaryField;
|
||||
use phpseclib\Math\PrimeField;
|
||||
use phpseclib\Exception\BadDecryptionException;
|
||||
use phpseclib\Exception\BadModeException;
|
||||
use phpseclib\Exception\InconsistentSetupException;
|
||||
use phpseclib\Exception\InsufficientSetupException;
|
||||
use phpseclib\Exception\UnsupportedAlgorithmException;
|
||||
use phpseclib3\Crypt\Hash;
|
||||
use phpseclib3\Common\Functions\Strings;
|
||||
use phpseclib3\Math\BigInteger;
|
||||
use phpseclib3\Math\BinaryField;
|
||||
use phpseclib3\Math\PrimeField;
|
||||
use phpseclib3\Exception\BadDecryptionException;
|
||||
use phpseclib3\Exception\BadModeException;
|
||||
use phpseclib3\Exception\InconsistentSetupException;
|
||||
use phpseclib3\Exception\InsufficientSetupException;
|
||||
use phpseclib3\Exception\UnsupportedAlgorithmException;
|
||||
|
||||
/**
|
||||
* Base Class for all \phpseclib\Crypt\* cipher classes
|
||||
* Base Class for all \phpseclib3\Crypt\* cipher classes
|
||||
*
|
||||
* @package Base
|
||||
* @author Jim Wigginton <terrafrost@php.net>
|
||||
@ -58,8 +58,8 @@ abstract class SymmetricKey
|
||||
{
|
||||
/**#@+
|
||||
* @access public
|
||||
* @see \phpseclib\Crypt\Common\SymmetricKey::encrypt()
|
||||
* @see \phpseclib\Crypt\Common\SymmetricKey::decrypt()
|
||||
* @see \phpseclib3\Crypt\Common\SymmetricKey::encrypt()
|
||||
* @see \phpseclib3\Crypt\Common\SymmetricKey::decrypt()
|
||||
*/
|
||||
/**
|
||||
* Encrypt / decrypt using the Counter mode.
|
||||
@ -113,7 +113,7 @@ abstract class SymmetricKey
|
||||
* Mode Map
|
||||
*
|
||||
* @access private
|
||||
* @see \phpseclib\Crypt\Common\SymmetricKey::__construct()
|
||||
* @see \phpseclib3\Crypt\Common\SymmetricKey::__construct()
|
||||
*/
|
||||
const MODE_MAP = [
|
||||
'ctr' => self::MODE_CTR,
|
||||
@ -128,7 +128,7 @@ abstract class SymmetricKey
|
||||
|
||||
/**#@+
|
||||
* @access private
|
||||
* @see \phpseclib\Crypt\Common\SymmetricKey::__construct()
|
||||
* @see \phpseclib3\Crypt\Common\SymmetricKey::__construct()
|
||||
*/
|
||||
/**
|
||||
* Base value for the internal implementation $engine switch
|
||||
@ -160,7 +160,7 @@ abstract class SymmetricKey
|
||||
* Engine Reverse Map
|
||||
*
|
||||
* @access private
|
||||
* @see \phpseclib\Crypt\Common\SymmetricKey::getEngine()
|
||||
* @see \phpseclib3\Crypt\Common\SymmetricKey::getEngine()
|
||||
*/
|
||||
const ENGINE_MAP = [
|
||||
self::ENGINE_INTERNAL => 'PHP',
|
||||
@ -282,8 +282,8 @@ abstract class SymmetricKey
|
||||
/**
|
||||
* Does the enmcrypt resource need to be (re)initialized?
|
||||
*
|
||||
* @see \phpseclib\Crypt\Twofish::setKey()
|
||||
* @see \phpseclib\Crypt\Twofish::setIV()
|
||||
* @see \phpseclib3\Crypt\Twofish::setKey()
|
||||
* @see \phpseclib3\Crypt\Twofish::setIV()
|
||||
* @var bool
|
||||
* @access private
|
||||
*/
|
||||
@ -292,8 +292,8 @@ abstract class SymmetricKey
|
||||
/**
|
||||
* Does the demcrypt resource need to be (re)initialized?
|
||||
*
|
||||
* @see \phpseclib\Crypt\Twofish::setKey()
|
||||
* @see \phpseclib\Crypt\Twofish::setIV()
|
||||
* @see \phpseclib3\Crypt\Twofish::setKey()
|
||||
* @see \phpseclib3\Crypt\Twofish::setIV()
|
||||
* @var bool
|
||||
* @access private
|
||||
*/
|
||||
@ -1028,7 +1028,7 @@ abstract class SymmetricKey
|
||||
* @see self::setPassword()
|
||||
* @access private
|
||||
* @param int $n
|
||||
* @param \phpseclib\Crypt\Hash $hashObj
|
||||
* @param \phpseclib3\Crypt\Hash $hashObj
|
||||
* @param string $i
|
||||
* @param string $d
|
||||
* @param int $count
|
||||
@ -2068,7 +2068,7 @@ abstract class SymmetricKey
|
||||
* outputs. The reason is due to the fact that the initialization vector's change after every encryption /
|
||||
* decryption round when the continuous buffer is enabled. When it's disabled, they remain constant.
|
||||
*
|
||||
* Put another way, when the continuous buffer is enabled, the state of the \phpseclib\Crypt\*() object changes after each
|
||||
* Put another way, when the continuous buffer is enabled, the state of the \phpseclib3\Crypt\*() object changes after each
|
||||
* encryption / decryption round, whereas otherwise, it'd remain constant. For this reason, it's recommended that
|
||||
* continuous buffers not be used. They do offer better security and are, in fact, sometimes required (SSH uses them),
|
||||
* however, they are also less intuitive and more likely to cause you problems.
|
||||
@ -2283,7 +2283,7 @@ abstract class SymmetricKey
|
||||
/**
|
||||
* Encrypts a block
|
||||
*
|
||||
* Note: Must be extended by the child \phpseclib\Crypt\* class
|
||||
* Note: Must be extended by the child \phpseclib3\Crypt\* class
|
||||
*
|
||||
* @access private
|
||||
* @param string $in
|
||||
@ -2294,7 +2294,7 @@ abstract class SymmetricKey
|
||||
/**
|
||||
* Decrypts a block
|
||||
*
|
||||
* Note: Must be extended by the child \phpseclib\Crypt\* class
|
||||
* Note: Must be extended by the child \phpseclib3\Crypt\* class
|
||||
*
|
||||
* @access private
|
||||
* @param string $in
|
||||
@ -2307,7 +2307,7 @@ abstract class SymmetricKey
|
||||
*
|
||||
* Only used if $engine == self::ENGINE_INTERNAL
|
||||
*
|
||||
* Note: Must extend by the child \phpseclib\Crypt\* class
|
||||
* Note: Must extend by the child \phpseclib3\Crypt\* class
|
||||
*
|
||||
* @see self::setup()
|
||||
* @access private
|
||||
@ -2522,7 +2522,7 @@ abstract class SymmetricKey
|
||||
* - short (as good as possible)
|
||||
*
|
||||
* Note: - _setupInlineCrypt() is using _createInlineCryptFunction() to create the full callback function code.
|
||||
* - In case of using inline crypting, _setupInlineCrypt() must extend by the child \phpseclib\Crypt\* class.
|
||||
* - In case of using inline crypting, _setupInlineCrypt() must extend by the child \phpseclib3\Crypt\* class.
|
||||
* - The following variable names are reserved:
|
||||
* - $_* (all variable names prefixed with an underscore)
|
||||
* - $self (object reference to it self. Do not use $this, but $self instead)
|
||||
@ -2629,7 +2629,7 @@ abstract class SymmetricKey
|
||||
* +----------------------------------------------------------------------------------------------+
|
||||
* </code>
|
||||
*
|
||||
* See also the \phpseclib\Crypt\*::_setupInlineCrypt()'s for
|
||||
* See also the \phpseclib3\Crypt\*::_setupInlineCrypt()'s for
|
||||
* productive inline $cipher_code's how they works.
|
||||
*
|
||||
* Structure of:
|
||||
@ -2706,10 +2706,10 @@ abstract class SymmetricKey
|
||||
if (strlen($_block) > strlen($_buffer["ciphertext"])) {
|
||||
$in = $_xor;
|
||||
'.$encrypt_block.'
|
||||
\phpseclib\Common\Functions\Strings::increment_str($_xor);
|
||||
\phpseclib3\Common\Functions\Strings::increment_str($_xor);
|
||||
$_buffer["ciphertext"].= $in;
|
||||
}
|
||||
$_key = \phpseclib\Common\Functions\Strings::shift($_buffer["ciphertext"], '.$block_size.');
|
||||
$_key = \phpseclib3\Common\Functions\Strings::shift($_buffer["ciphertext"], '.$block_size.');
|
||||
$_ciphertext.= $_block ^ $_key;
|
||||
}
|
||||
} else {
|
||||
@ -2717,7 +2717,7 @@ abstract class SymmetricKey
|
||||
$_block = substr($_text, $_i, '.$block_size.');
|
||||
$in = $_xor;
|
||||
'.$encrypt_block.'
|
||||
\phpseclib\Common\Functions\Strings::increment_str($_xor);
|
||||
\phpseclib3\Common\Functions\Strings::increment_str($_xor);
|
||||
$_key = $in;
|
||||
$_ciphertext.= $_block ^ $_key;
|
||||
}
|
||||
@ -2744,10 +2744,10 @@ abstract class SymmetricKey
|
||||
if (strlen($_block) > strlen($_buffer["ciphertext"])) {
|
||||
$in = $_xor;
|
||||
'.$encrypt_block.'
|
||||
\phpseclib\Common\Functions\Strings::increment_str($_xor);
|
||||
\phpseclib3\Common\Functions\Strings::increment_str($_xor);
|
||||
$_buffer["ciphertext"].= $in;
|
||||
}
|
||||
$_key = \phpseclib\Common\Functions\Strings::shift($_buffer["ciphertext"], '.$block_size.');
|
||||
$_key = \phpseclib3\Common\Functions\Strings::shift($_buffer["ciphertext"], '.$block_size.');
|
||||
$_plaintext.= $_block ^ $_key;
|
||||
}
|
||||
} else {
|
||||
@ -2755,7 +2755,7 @@ abstract class SymmetricKey
|
||||
$_block = substr($_text, $_i, '.$block_size.');
|
||||
$in = $_xor;
|
||||
'.$encrypt_block.'
|
||||
\phpseclib\Common\Functions\Strings::increment_str($_xor);
|
||||
\phpseclib3\Common\Functions\Strings::increment_str($_xor);
|
||||
$_key = $in;
|
||||
$_plaintext.= $_block ^ $_key;
|
||||
}
|
||||
@ -2931,7 +2931,7 @@ abstract class SymmetricKey
|
||||
$_xor = $in;
|
||||
$_buffer["xor"].= $_xor;
|
||||
}
|
||||
$_key = \phpseclib\Common\Functions\Strings::shift($_buffer["xor"], '.$block_size.');
|
||||
$_key = \phpseclib3\Common\Functions\Strings::shift($_buffer["xor"], '.$block_size.');
|
||||
$_ciphertext.= $_block ^ $_key;
|
||||
}
|
||||
} else {
|
||||
@ -2967,7 +2967,7 @@ abstract class SymmetricKey
|
||||
$_xor = $in;
|
||||
$_buffer["xor"].= $_xor;
|
||||
}
|
||||
$_key = \phpseclib\Common\Functions\Strings::shift($_buffer["xor"], '.$block_size.');
|
||||
$_key = \phpseclib3\Common\Functions\Strings::shift($_buffer["xor"], '.$block_size.');
|
||||
$_plaintext.= $_block ^ $_key;
|
||||
}
|
||||
} else {
|
||||
|
@ -13,9 +13,9 @@
|
||||
* @link http://phpseclib.sourceforge.net
|
||||
*/
|
||||
|
||||
namespace phpseclib\Crypt\Common\Traits;
|
||||
namespace phpseclib3\Crypt\Common\Traits;
|
||||
|
||||
use phpseclib\Crypt\Hash;
|
||||
use phpseclib3\Crypt\Hash;
|
||||
|
||||
/**
|
||||
* Fingerprint Trait for Private Keys
|
||||
|
@ -13,7 +13,7 @@
|
||||
* @link http://phpseclib.sourceforge.net
|
||||
*/
|
||||
|
||||
namespace phpseclib\Crypt\Common\Traits;
|
||||
namespace phpseclib3\Crypt\Common\Traits;
|
||||
|
||||
/**
|
||||
* Password Protected Trait for Private Keys
|
||||
|
@ -18,7 +18,7 @@
|
||||
* <?php
|
||||
* include 'vendor/autoload.php';
|
||||
*
|
||||
* $des = new \phpseclib\Crypt\DES();
|
||||
* $des = new \phpseclib3\Crypt\DES();
|
||||
*
|
||||
* $des->setKey('abcdefgh');
|
||||
*
|
||||
@ -40,10 +40,10 @@
|
||||
* @link http://phpseclib.sourceforge.net
|
||||
*/
|
||||
|
||||
namespace phpseclib\Crypt;
|
||||
namespace phpseclib3\Crypt;
|
||||
|
||||
use phpseclib\Crypt\Common\BlockCipher;
|
||||
use phpseclib\Exception\BadModeException;
|
||||
use phpseclib3\Crypt\Common\BlockCipher;
|
||||
use phpseclib3\Exception\BadModeException;
|
||||
|
||||
/**
|
||||
* Pure-PHP implementation of DES.
|
||||
@ -56,8 +56,8 @@ class DES extends BlockCipher
|
||||
{
|
||||
/**#@+
|
||||
* @access private
|
||||
* @see \phpseclib\Crypt\DES::setupKey()
|
||||
* @see \phpseclib\Crypt\DES::processBlock()
|
||||
* @see \phpseclib3\Crypt\DES::setupKey()
|
||||
* @see \phpseclib3\Crypt\DES::processBlock()
|
||||
*/
|
||||
/**
|
||||
* Contains $keys[self::ENCRYPT]
|
||||
@ -72,7 +72,7 @@ class DES extends BlockCipher
|
||||
/**
|
||||
* Block Length of the cipher
|
||||
*
|
||||
* @see \phpseclib\Crypt\Common\SymmetricKey::block_size
|
||||
* @see \phpseclib3\Crypt\Common\SymmetricKey::block_size
|
||||
* @var int
|
||||
* @access private
|
||||
*/
|
||||
@ -81,7 +81,7 @@ class DES extends BlockCipher
|
||||
/**
|
||||
* Key Length (in bytes)
|
||||
*
|
||||
* @see \phpseclib\Crypt\Common\SymmetricKey::setKeyLength()
|
||||
* @see \phpseclib3\Crypt\Common\SymmetricKey::setKeyLength()
|
||||
* @var int
|
||||
* @access private
|
||||
*/
|
||||
@ -90,7 +90,7 @@ class DES extends BlockCipher
|
||||
/**
|
||||
* The mcrypt specific name of the cipher
|
||||
*
|
||||
* @see \phpseclib\Crypt\Common\SymmetricKey::cipher_name_mcrypt
|
||||
* @see \phpseclib3\Crypt\Common\SymmetricKey::cipher_name_mcrypt
|
||||
* @var string
|
||||
* @access private
|
||||
*/
|
||||
@ -99,7 +99,7 @@ class DES extends BlockCipher
|
||||
/**
|
||||
* The OpenSSL names of the cipher / modes
|
||||
*
|
||||
* @see \phpseclib\Crypt\Common\SymmetricKey::openssl_mode_names
|
||||
* @see \phpseclib3\Crypt\Common\SymmetricKey::openssl_mode_names
|
||||
* @var array
|
||||
* @access private
|
||||
*/
|
||||
@ -114,7 +114,7 @@ class DES extends BlockCipher
|
||||
/**
|
||||
* Optimizing value while CFB-encrypting
|
||||
*
|
||||
* @see \phpseclib\Crypt\Common\SymmetricKey::cfb_init_len
|
||||
* @see \phpseclib3\Crypt\Common\SymmetricKey::cfb_init_len
|
||||
* @var int
|
||||
* @access private
|
||||
*/
|
||||
@ -600,9 +600,9 @@ class DES extends BlockCipher
|
||||
/**
|
||||
* Test for engine validity
|
||||
*
|
||||
* This is mainly just a wrapper to set things up for \phpseclib\Crypt\Common\SymmetricKey::isValidEngine()
|
||||
* This is mainly just a wrapper to set things up for \phpseclib3\Crypt\Common\SymmetricKey::isValidEngine()
|
||||
*
|
||||
* @see \phpseclib\Crypt\Common\SymmetricKey::isValidEngine()
|
||||
* @see \phpseclib3\Crypt\Common\SymmetricKey::isValidEngine()
|
||||
* @param int $engine
|
||||
* @access protected
|
||||
* @return bool
|
||||
@ -626,7 +626,7 @@ class DES extends BlockCipher
|
||||
*
|
||||
* DES also requires that every eighth bit be a parity bit, however, we'll ignore that.
|
||||
*
|
||||
* @see \phpseclib\Crypt\Common\SymmetricKey::setKey()
|
||||
* @see \phpseclib3\Crypt\Common\SymmetricKey::setKey()
|
||||
* @access public
|
||||
* @param string $key
|
||||
*/
|
||||
@ -643,8 +643,8 @@ class DES extends BlockCipher
|
||||
/**
|
||||
* Encrypts a block
|
||||
*
|
||||
* @see \phpseclib\Crypt\Common\SymmetricKey::encryptBlock()
|
||||
* @see \phpseclib\Crypt\Common\SymmetricKey::encrypt()
|
||||
* @see \phpseclib3\Crypt\Common\SymmetricKey::encryptBlock()
|
||||
* @see \phpseclib3\Crypt\Common\SymmetricKey::encrypt()
|
||||
* @see self::encrypt()
|
||||
* @access private
|
||||
* @param string $in
|
||||
@ -658,8 +658,8 @@ class DES extends BlockCipher
|
||||
/**
|
||||
* Decrypts a block
|
||||
*
|
||||
* @see \phpseclib\Crypt\Common\SymmetricKey::decryptBlock()
|
||||
* @see \phpseclib\Crypt\Common\SymmetricKey::decrypt()
|
||||
* @see \phpseclib3\Crypt\Common\SymmetricKey::decryptBlock()
|
||||
* @see \phpseclib3\Crypt\Common\SymmetricKey::decrypt()
|
||||
* @see self::decrypt()
|
||||
* @access private
|
||||
* @param string $in
|
||||
@ -762,7 +762,7 @@ class DES extends BlockCipher
|
||||
/**
|
||||
* Creates the key schedule
|
||||
*
|
||||
* @see \phpseclib\Crypt\Common\SymmetricKey::setupKey()
|
||||
* @see \phpseclib3\Crypt\Common\SymmetricKey::setupKey()
|
||||
* @access private
|
||||
*/
|
||||
protected function setupKey()
|
||||
@ -1297,7 +1297,7 @@ class DES extends BlockCipher
|
||||
/**
|
||||
* Setup the performance-optimized function for de/encrypt()
|
||||
*
|
||||
* @see \phpseclib\Crypt\Common\SymmetricKey::setupInlineCrypt()
|
||||
* @see \phpseclib3\Crypt\Common\SymmetricKey::setupInlineCrypt()
|
||||
* @access private
|
||||
*/
|
||||
protected function setupInlineCrypt()
|
||||
|
@ -10,7 +10,7 @@
|
||||
* <?php
|
||||
* include 'vendor/autoload.php';
|
||||
*
|
||||
* $ourPrivate = \phpseclib\Crypt\DH::createKey();
|
||||
* $ourPrivate = \phpseclib3\Crypt\DH::createKey();
|
||||
* $secret = DH::computeSecret($ourPrivate, $theirPublic);
|
||||
*
|
||||
* ?>
|
||||
@ -24,15 +24,15 @@
|
||||
* @link http://phpseclib.sourceforge.net
|
||||
*/
|
||||
|
||||
namespace phpseclib\Crypt;
|
||||
namespace phpseclib3\Crypt;
|
||||
|
||||
use phpseclib\Exception\NoKeyLoadedException;
|
||||
use phpseclib\Exception\UnsupportedOperationException;
|
||||
use phpseclib\Crypt\Common\AsymmetricKey;
|
||||
use phpseclib\Crypt\DH\PrivateKey;
|
||||
use phpseclib\Crypt\DH\PublicKey;
|
||||
use phpseclib\Crypt\DH\Parameters;
|
||||
use phpseclib\Math\BigInteger;
|
||||
use phpseclib3\Exception\NoKeyLoadedException;
|
||||
use phpseclib3\Exception\UnsupportedOperationException;
|
||||
use phpseclib3\Crypt\Common\AsymmetricKey;
|
||||
use phpseclib3\Crypt\DH\PrivateKey;
|
||||
use phpseclib3\Crypt\DH\PublicKey;
|
||||
use phpseclib3\Crypt\DH\Parameters;
|
||||
use phpseclib3\Math\BigInteger;
|
||||
|
||||
/**
|
||||
* Pure-PHP (EC)DH implementation
|
||||
@ -54,7 +54,7 @@ abstract class DH extends AsymmetricKey
|
||||
/**
|
||||
* DH prime
|
||||
*
|
||||
* @var \phpseclib\Math\BigInteger
|
||||
* @var \phpseclib3\Math\BigInteger
|
||||
* @access private
|
||||
*/
|
||||
protected $prime;
|
||||
@ -64,7 +64,7 @@ abstract class DH extends AsymmetricKey
|
||||
*
|
||||
* Prime divisor of p-1
|
||||
*
|
||||
* @var \phpseclib\Math\BigInteger
|
||||
* @var \phpseclib3\Math\BigInteger
|
||||
* @access private
|
||||
*/
|
||||
protected $base;
|
||||
@ -78,7 +78,7 @@ abstract class DH extends AsymmetricKey
|
||||
* - a string (eg. diffie-hellman-group14-sha1)
|
||||
*
|
||||
* @access public
|
||||
* @return \phpseclib\Crypt\DH|bool
|
||||
* @return \phpseclib3\Crypt\DH|bool
|
||||
*/
|
||||
public static function createParameters(...$args)
|
||||
{
|
||||
|
@ -21,12 +21,12 @@
|
||||
* @link http://phpseclib.sourceforge.net
|
||||
*/
|
||||
|
||||
namespace phpseclib\Crypt\DH\Formats\Keys;
|
||||
namespace phpseclib3\Crypt\DH\Formats\Keys;
|
||||
|
||||
use phpseclib\Math\BigInteger;
|
||||
use phpseclib\Crypt\Common\Formats\Keys\PKCS1 as Progenitor;
|
||||
use phpseclib\File\ASN1;
|
||||
use phpseclib\File\ASN1\Maps;
|
||||
use phpseclib3\Math\BigInteger;
|
||||
use phpseclib3\Crypt\Common\Formats\Keys\PKCS1 as Progenitor;
|
||||
use phpseclib3\File\ASN1;
|
||||
use phpseclib3\File\ASN1\Maps;
|
||||
|
||||
/**
|
||||
* "PKCS1" Formatted DH Key Handler
|
||||
|
@ -19,12 +19,12 @@
|
||||
* @link http://phpseclib.sourceforge.net
|
||||
*/
|
||||
|
||||
namespace phpseclib\Crypt\DH\Formats\Keys;
|
||||
namespace phpseclib3\Crypt\DH\Formats\Keys;
|
||||
|
||||
use phpseclib\Math\BigInteger;
|
||||
use phpseclib\Crypt\Common\Formats\Keys\PKCS8 as Progenitor;
|
||||
use phpseclib\File\ASN1;
|
||||
use phpseclib\File\ASN1\Maps;
|
||||
use phpseclib3\Math\BigInteger;
|
||||
use phpseclib3\Crypt\Common\Formats\Keys\PKCS8 as Progenitor;
|
||||
use phpseclib3\File\ASN1;
|
||||
use phpseclib3\File\ASN1\Maps;
|
||||
|
||||
/**
|
||||
* PKCS#8 Formatted DH Key Handler
|
||||
@ -112,10 +112,10 @@ abstract class PKCS8 extends Progenitor
|
||||
* Convert a private key to the appropriate format.
|
||||
*
|
||||
* @access public
|
||||
* @param \phpseclib\Math\BigInteger $prime
|
||||
* @param \phpseclib\Math\BigInteger $base
|
||||
* @param \phpseclib\Math\BigInteger $privateKey
|
||||
* @param \phpseclib\Math\BigInteger $publicKey
|
||||
* @param \phpseclib3\Math\BigInteger $prime
|
||||
* @param \phpseclib3\Math\BigInteger $base
|
||||
* @param \phpseclib3\Math\BigInteger $privateKey
|
||||
* @param \phpseclib3\Math\BigInteger $publicKey
|
||||
* @param string $password optional
|
||||
* @param array $options optional
|
||||
* @return string
|
||||
@ -136,9 +136,9 @@ abstract class PKCS8 extends Progenitor
|
||||
* Convert a public key to the appropriate format
|
||||
*
|
||||
* @access public
|
||||
* @param \phpseclib\Math\BigInteger $prime
|
||||
* @param \phpseclib\Math\BigInteger $base
|
||||
* @param \phpseclib\Math\BigInteger $publicKey
|
||||
* @param \phpseclib3\Math\BigInteger $prime
|
||||
* @param \phpseclib3\Math\BigInteger $base
|
||||
* @param \phpseclib3\Math\BigInteger $publicKey
|
||||
* @param array $options optional
|
||||
* @return string
|
||||
*/
|
||||
|
@ -11,9 +11,9 @@
|
||||
* @link http://phpseclib.sourceforge.net
|
||||
*/
|
||||
|
||||
namespace phpseclib\Crypt\DH;
|
||||
namespace phpseclib3\Crypt\DH;
|
||||
|
||||
use phpseclib\Crypt\DH;
|
||||
use phpseclib3\Crypt\DH;
|
||||
|
||||
/**
|
||||
* DH Parameters
|
||||
|
@ -11,10 +11,10 @@
|
||||
* @link http://phpseclib.sourceforge.net
|
||||
*/
|
||||
|
||||
namespace phpseclib\Crypt\DH;
|
||||
namespace phpseclib3\Crypt\DH;
|
||||
|
||||
use phpseclib\Crypt\DH;
|
||||
use phpseclib\Crypt\Common;
|
||||
use phpseclib3\Crypt\DH;
|
||||
use phpseclib3\Crypt\Common;
|
||||
|
||||
/**
|
||||
* DH Private Key
|
||||
@ -30,7 +30,7 @@ class PrivateKey extends DH
|
||||
/**
|
||||
* Private Key
|
||||
*
|
||||
* @var \phpseclib\Math\BigInteger
|
||||
* @var \phpseclib3\Math\BigInteger
|
||||
* @access private
|
||||
*/
|
||||
protected $privateKey;
|
||||
@ -38,7 +38,7 @@ class PrivateKey extends DH
|
||||
/**
|
||||
* Public Key
|
||||
*
|
||||
* @var \phpseclib\Math\BigInteger
|
||||
* @var \phpseclib3\Math\BigInteger
|
||||
* @access private
|
||||
*/
|
||||
protected $publicKey;
|
||||
|
@ -11,10 +11,10 @@
|
||||
* @link http://phpseclib.sourceforge.net
|
||||
*/
|
||||
|
||||
namespace phpseclib\Crypt\DH;
|
||||
namespace phpseclib3\Crypt\DH;
|
||||
|
||||
use phpseclib\Crypt\DH;
|
||||
use phpseclib\Crypt\Common;
|
||||
use phpseclib3\Crypt\DH;
|
||||
use phpseclib3\Crypt\Common;
|
||||
|
||||
/**
|
||||
* DH Public Key
|
||||
@ -44,7 +44,7 @@ class PublicKey extends DH
|
||||
/**
|
||||
* Returns the public key as a BigInteger
|
||||
*
|
||||
* @return \phpseclib\Math\BigInteger
|
||||
* @return \phpseclib3\Math\BigInteger
|
||||
*/
|
||||
public function toBigInteger()
|
||||
{
|
||||
|
@ -10,7 +10,7 @@
|
||||
* <?php
|
||||
* include 'vendor/autoload.php';
|
||||
*
|
||||
* $private = \phpseclib\Crypt\DSA::createKey();
|
||||
* $private = \phpseclib3\Crypt\DSA::createKey();
|
||||
* $public = $private->getPublicKey();
|
||||
*
|
||||
* $plaintext = 'terrafrost';
|
||||
@ -29,14 +29,14 @@
|
||||
* @link http://phpseclib.sourceforge.net
|
||||
*/
|
||||
|
||||
namespace phpseclib\Crypt;
|
||||
namespace phpseclib3\Crypt;
|
||||
|
||||
use phpseclib\Crypt\Common\AsymmetricKey;
|
||||
use phpseclib\Crypt\DSA\PrivateKey;
|
||||
use phpseclib\Crypt\DSA\PublicKey;
|
||||
use phpseclib\Crypt\DSA\Parameters;
|
||||
use phpseclib\Math\BigInteger;
|
||||
use phpseclib\Exception\InsufficientSetupException;
|
||||
use phpseclib3\Crypt\Common\AsymmetricKey;
|
||||
use phpseclib3\Crypt\DSA\PrivateKey;
|
||||
use phpseclib3\Crypt\DSA\PublicKey;
|
||||
use phpseclib3\Crypt\DSA\Parameters;
|
||||
use phpseclib3\Math\BigInteger;
|
||||
use phpseclib3\Exception\InsufficientSetupException;
|
||||
|
||||
/**
|
||||
* Pure-PHP FIPS 186-4 compliant implementation of DSA.
|
||||
@ -58,7 +58,7 @@ abstract class DSA extends AsymmetricKey
|
||||
/**
|
||||
* DSA Prime P
|
||||
*
|
||||
* @var \phpseclib\Math\BigInteger
|
||||
* @var \phpseclib3\Math\BigInteger
|
||||
* @access private
|
||||
*/
|
||||
protected $p;
|
||||
@ -68,7 +68,7 @@ abstract class DSA extends AsymmetricKey
|
||||
*
|
||||
* Prime divisor of p-1
|
||||
*
|
||||
* @var \phpseclib\Math\BigInteger
|
||||
* @var \phpseclib3\Math\BigInteger
|
||||
* @access private
|
||||
*/
|
||||
protected $q;
|
||||
@ -76,7 +76,7 @@ abstract class DSA extends AsymmetricKey
|
||||
/**
|
||||
* DSA Group Generator G
|
||||
*
|
||||
* @var \phpseclib\Math\BigInteger
|
||||
* @var \phpseclib3\Math\BigInteger
|
||||
* @access private
|
||||
*/
|
||||
protected $g;
|
||||
@ -84,7 +84,7 @@ abstract class DSA extends AsymmetricKey
|
||||
/**
|
||||
* DSA public key value y
|
||||
*
|
||||
* @var \phpseclib\Math\BigInteger
|
||||
* @var \phpseclib3\Math\BigInteger
|
||||
* @access private
|
||||
*/
|
||||
protected $y;
|
||||
@ -111,7 +111,7 @@ abstract class DSA extends AsymmetricKey
|
||||
* @access public
|
||||
* @param int $L
|
||||
* @param int $N
|
||||
* @return \phpseclib\Crypt\DSA|bool
|
||||
* @return \phpseclib3\Crypt\DSA|bool
|
||||
*/
|
||||
public static function createParameters($L = 2048, $N = 224)
|
||||
{
|
||||
|
@ -15,12 +15,12 @@
|
||||
* @link http://phpseclib.sourceforge.net
|
||||
*/
|
||||
|
||||
namespace phpseclib\Crypt\DSA\Formats\Keys;
|
||||
namespace phpseclib3\Crypt\DSA\Formats\Keys;
|
||||
|
||||
use ParagonIE\ConstantTime\Base64;
|
||||
use phpseclib\Math\BigInteger;
|
||||
use phpseclib\Common\Functions\Strings;
|
||||
use phpseclib\Crypt\Common\Formats\Keys\OpenSSH as Progenitor;
|
||||
use phpseclib3\Math\BigInteger;
|
||||
use phpseclib3\Common\Functions\Strings;
|
||||
use phpseclib3\Crypt\Common\Formats\Keys\OpenSSH as Progenitor;
|
||||
|
||||
/**
|
||||
* OpenSSH Formatted DSA Key Handler
|
||||
@ -72,10 +72,10 @@ abstract class OpenSSH extends Progenitor
|
||||
* Convert a public key to the appropriate format
|
||||
*
|
||||
* @access public
|
||||
* @param \phpseclib\Math\BigInteger $p
|
||||
* @param \phpseclib\Math\BigInteger $q
|
||||
* @param \phpseclib\Math\BigInteger $g
|
||||
* @param \phpseclib\Math\BigInteger $y
|
||||
* @param \phpseclib3\Math\BigInteger $p
|
||||
* @param \phpseclib3\Math\BigInteger $q
|
||||
* @param \phpseclib3\Math\BigInteger $g
|
||||
* @param \phpseclib3\Math\BigInteger $y
|
||||
* @param array $options optional
|
||||
* @return string
|
||||
*/
|
||||
@ -107,11 +107,11 @@ abstract class OpenSSH extends Progenitor
|
||||
* Convert a private key to the appropriate format.
|
||||
*
|
||||
* @access public
|
||||
* @param \phpseclib\Math\BigInteger $p
|
||||
* @param \phpseclib\Math\BigInteger $q
|
||||
* @param \phpseclib\Math\BigInteger $g
|
||||
* @param \phpseclib\Math\BigInteger $x
|
||||
* @param \phpseclib\Math\BigInteger $y
|
||||
* @param \phpseclib3\Math\BigInteger $p
|
||||
* @param \phpseclib3\Math\BigInteger $q
|
||||
* @param \phpseclib3\Math\BigInteger $g
|
||||
* @param \phpseclib3\Math\BigInteger $x
|
||||
* @param \phpseclib3\Math\BigInteger $y
|
||||
* @param string $password optional
|
||||
* @param array $options optional
|
||||
* @return string
|
||||
|
@ -27,12 +27,12 @@
|
||||
* @link http://phpseclib.sourceforge.net
|
||||
*/
|
||||
|
||||
namespace phpseclib\Crypt\DSA\Formats\Keys;
|
||||
namespace phpseclib3\Crypt\DSA\Formats\Keys;
|
||||
|
||||
use phpseclib\Math\BigInteger;
|
||||
use phpseclib\Crypt\Common\Formats\Keys\PKCS1 as Progenitor;
|
||||
use phpseclib\File\ASN1;
|
||||
use phpseclib\File\ASN1\Maps;
|
||||
use phpseclib3\Math\BigInteger;
|
||||
use phpseclib3\Crypt\Common\Formats\Keys\PKCS1 as Progenitor;
|
||||
use phpseclib3\File\ASN1;
|
||||
use phpseclib3\File\ASN1\Maps;
|
||||
use ParagonIE\ConstantTime\Base64;
|
||||
|
||||
/**
|
||||
@ -83,9 +83,9 @@ abstract class PKCS1 extends Progenitor
|
||||
* Convert DSA parameters to the appropriate format
|
||||
*
|
||||
* @access public
|
||||
* @param \phpseclib\Math\BigInteger $p
|
||||
* @param \phpseclib\Math\BigInteger $q
|
||||
* @param \phpseclib\Math\BigInteger $g
|
||||
* @param \phpseclib3\Math\BigInteger $p
|
||||
* @param \phpseclib3\Math\BigInteger $q
|
||||
* @param \phpseclib3\Math\BigInteger $g
|
||||
* @return string
|
||||
*/
|
||||
public static function saveParameters(BigInteger $p, BigInteger $q, BigInteger $g)
|
||||
@ -107,11 +107,11 @@ abstract class PKCS1 extends Progenitor
|
||||
* Convert a private key to the appropriate format.
|
||||
*
|
||||
* @access public
|
||||
* @param \phpseclib\Math\BigInteger $p
|
||||
* @param \phpseclib\Math\BigInteger $q
|
||||
* @param \phpseclib\Math\BigInteger $g
|
||||
* @param \phpseclib\Math\BigInteger $x
|
||||
* @param \phpseclib\Math\BigInteger $y
|
||||
* @param \phpseclib3\Math\BigInteger $p
|
||||
* @param \phpseclib3\Math\BigInteger $q
|
||||
* @param \phpseclib3\Math\BigInteger $g
|
||||
* @param \phpseclib3\Math\BigInteger $x
|
||||
* @param \phpseclib3\Math\BigInteger $y
|
||||
* @param string $password optional
|
||||
* @param array $options optional
|
||||
* @return string
|
||||
@ -136,10 +136,10 @@ abstract class PKCS1 extends Progenitor
|
||||
* Convert a public key to the appropriate format
|
||||
*
|
||||
* @access public
|
||||
* @param \phpseclib\Math\BigInteger $p
|
||||
* @param \phpseclib\Math\BigInteger $q
|
||||
* @param \phpseclib\Math\BigInteger $g
|
||||
* @param \phpseclib\Math\BigInteger $y
|
||||
* @param \phpseclib3\Math\BigInteger $p
|
||||
* @param \phpseclib3\Math\BigInteger $q
|
||||
* @param \phpseclib3\Math\BigInteger $g
|
||||
* @param \phpseclib3\Math\BigInteger $y
|
||||
* @return string
|
||||
*/
|
||||
public static function savePublicKey(BigInteger $p, BigInteger $q, BigInteger $g, BigInteger $y)
|
||||
|
@ -23,12 +23,12 @@
|
||||
* @link http://phpseclib.sourceforge.net
|
||||
*/
|
||||
|
||||
namespace phpseclib\Crypt\DSA\Formats\Keys;
|
||||
namespace phpseclib3\Crypt\DSA\Formats\Keys;
|
||||
|
||||
use phpseclib\Math\BigInteger;
|
||||
use phpseclib\Crypt\Common\Formats\Keys\PKCS8 as Progenitor;
|
||||
use phpseclib\File\ASN1;
|
||||
use phpseclib\File\ASN1\Maps;
|
||||
use phpseclib3\Math\BigInteger;
|
||||
use phpseclib3\Crypt\Common\Formats\Keys\PKCS8 as Progenitor;
|
||||
use phpseclib3\File\ASN1;
|
||||
use phpseclib3\File\ASN1\Maps;
|
||||
|
||||
/**
|
||||
* PKCS#8 Formatted DSA Key Handler
|
||||
@ -121,11 +121,11 @@ abstract class PKCS8 extends Progenitor
|
||||
* Convert a private key to the appropriate format.
|
||||
*
|
||||
* @access public
|
||||
* @param \phpseclib\Math\BigInteger $p
|
||||
* @param \phpseclib\Math\BigInteger $q
|
||||
* @param \phpseclib\Math\BigInteger $g
|
||||
* @param \phpseclib\Math\BigInteger $x
|
||||
* @param \phpseclib\Math\BigInteger $y
|
||||
* @param \phpseclib3\Math\BigInteger $p
|
||||
* @param \phpseclib3\Math\BigInteger $q
|
||||
* @param \phpseclib3\Math\BigInteger $g
|
||||
* @param \phpseclib3\Math\BigInteger $x
|
||||
* @param \phpseclib3\Math\BigInteger $y
|
||||
* @param string $password optional
|
||||
* @param array $options optional
|
||||
* @return string
|
||||
@ -147,10 +147,10 @@ abstract class PKCS8 extends Progenitor
|
||||
* Convert a public key to the appropriate format
|
||||
*
|
||||
* @access public
|
||||
* @param \phpseclib\Math\BigInteger $p
|
||||
* @param \phpseclib\Math\BigInteger $q
|
||||
* @param \phpseclib\Math\BigInteger $g
|
||||
* @param \phpseclib\Math\BigInteger $y
|
||||
* @param \phpseclib3\Math\BigInteger $p
|
||||
* @param \phpseclib3\Math\BigInteger $q
|
||||
* @param \phpseclib3\Math\BigInteger $g
|
||||
* @param \phpseclib3\Math\BigInteger $y
|
||||
* @param array $options optional
|
||||
* @return string
|
||||
*/
|
||||
|
@ -18,11 +18,11 @@
|
||||
* @link http://phpseclib.sourceforge.net
|
||||
*/
|
||||
|
||||
namespace phpseclib\Crypt\DSA\Formats\Keys;
|
||||
namespace phpseclib3\Crypt\DSA\Formats\Keys;
|
||||
|
||||
use phpseclib\Math\BigInteger;
|
||||
use phpseclib\Common\Functions\Strings;
|
||||
use phpseclib\Crypt\Common\Formats\Keys\PuTTY as Progenitor;
|
||||
use phpseclib3\Math\BigInteger;
|
||||
use phpseclib3\Common\Functions\Strings;
|
||||
use phpseclib3\Crypt\Common\Formats\Keys\PuTTY as Progenitor;
|
||||
|
||||
/**
|
||||
* PuTTY Formatted DSA Key Handler
|
||||
@ -39,7 +39,7 @@ abstract class PuTTY extends Progenitor
|
||||
* @var string
|
||||
* @access private
|
||||
*/
|
||||
const PUBLIC_HANDLER = 'phpseclib\Crypt\DSA\Formats\Keys\OpenSSH';
|
||||
const PUBLIC_HANDLER = 'phpseclib3\Crypt\DSA\Formats\Keys\OpenSSH';
|
||||
|
||||
/**
|
||||
* Algorithm Identifier
|
||||
@ -76,11 +76,11 @@ abstract class PuTTY extends Progenitor
|
||||
* Convert a private key to the appropriate format.
|
||||
*
|
||||
* @access public
|
||||
* @param \phpseclib\Math\BigInteger $p
|
||||
* @param \phpseclib\Math\BigInteger $q
|
||||
* @param \phpseclib\Math\BigInteger $g
|
||||
* @param \phpseclib\Math\BigInteger $y
|
||||
* @param \phpseclib\Math\BigInteger $x
|
||||
* @param \phpseclib3\Math\BigInteger $p
|
||||
* @param \phpseclib3\Math\BigInteger $q
|
||||
* @param \phpseclib3\Math\BigInteger $g
|
||||
* @param \phpseclib3\Math\BigInteger $y
|
||||
* @param \phpseclib3\Math\BigInteger $x
|
||||
* @param string $password optional
|
||||
* @param array $options optional
|
||||
* @return string
|
||||
@ -101,10 +101,10 @@ abstract class PuTTY extends Progenitor
|
||||
* Convert a public key to the appropriate format
|
||||
*
|
||||
* @access public
|
||||
* @param \phpseclib\Math\BigInteger $p
|
||||
* @param \phpseclib\Math\BigInteger $q
|
||||
* @param \phpseclib\Math\BigInteger $g
|
||||
* @param \phpseclib\Math\BigInteger $y
|
||||
* @param \phpseclib3\Math\BigInteger $p
|
||||
* @param \phpseclib3\Math\BigInteger $q
|
||||
* @param \phpseclib3\Math\BigInteger $g
|
||||
* @param \phpseclib3\Math\BigInteger $y
|
||||
* @return string
|
||||
*/
|
||||
public static function savePublicKey(BigInteger $p, BigInteger $q, BigInteger $g, BigInteger $y)
|
||||
|
@ -15,9 +15,9 @@
|
||||
* @link http://phpseclib.sourceforge.net
|
||||
*/
|
||||
|
||||
namespace phpseclib\Crypt\DSA\Formats\Keys;
|
||||
namespace phpseclib3\Crypt\DSA\Formats\Keys;
|
||||
|
||||
use phpseclib\Math\BigInteger;
|
||||
use phpseclib3\Math\BigInteger;
|
||||
|
||||
/**
|
||||
* Raw DSA Key Handler
|
||||
@ -62,11 +62,11 @@ abstract class Raw
|
||||
* Convert a private key to the appropriate format.
|
||||
*
|
||||
* @access public
|
||||
* @param \phpseclib\Math\BigInteger $p
|
||||
* @param \phpseclib\Math\BigInteger $q
|
||||
* @param \phpseclib\Math\BigInteger $g
|
||||
* @param \phpseclib\Math\BigInteger $y
|
||||
* @param \phpseclib\Math\BigInteger $x
|
||||
* @param \phpseclib3\Math\BigInteger $p
|
||||
* @param \phpseclib3\Math\BigInteger $q
|
||||
* @param \phpseclib3\Math\BigInteger $g
|
||||
* @param \phpseclib3\Math\BigInteger $y
|
||||
* @param \phpseclib3\Math\BigInteger $x
|
||||
* @param string $password optional
|
||||
* @return string
|
||||
*/
|
||||
@ -79,10 +79,10 @@ abstract class Raw
|
||||
* Convert a public key to the appropriate format
|
||||
*
|
||||
* @access public
|
||||
* @param \phpseclib\Math\BigInteger $p
|
||||
* @param \phpseclib\Math\BigInteger $q
|
||||
* @param \phpseclib\Math\BigInteger $g
|
||||
* @param \phpseclib\Math\BigInteger $y
|
||||
* @param \phpseclib3\Math\BigInteger $p
|
||||
* @param \phpseclib3\Math\BigInteger $q
|
||||
* @param \phpseclib3\Math\BigInteger $g
|
||||
* @param \phpseclib3\Math\BigInteger $y
|
||||
* @return string
|
||||
*/
|
||||
public static function savePublicKey(BigInteger $p, BigInteger $q, BigInteger $g, BigInteger $y)
|
||||
|
@ -19,10 +19,10 @@
|
||||
* @link http://phpseclib.sourceforge.net
|
||||
*/
|
||||
|
||||
namespace phpseclib\Crypt\DSA\Formats\Keys;
|
||||
namespace phpseclib3\Crypt\DSA\Formats\Keys;
|
||||
|
||||
use ParagonIE\ConstantTime\Base64;
|
||||
use phpseclib\Math\BigInteger;
|
||||
use phpseclib3\Math\BigInteger;
|
||||
|
||||
/**
|
||||
* XML Formatted DSA Key Handler
|
||||
@ -114,10 +114,10 @@ abstract class XML
|
||||
* See https://www.w3.org/TR/xmldsig-core/#sec-DSAKeyValue
|
||||
*
|
||||
* @access public
|
||||
* @param \phpseclib\Math\BigInteger $p
|
||||
* @param \phpseclib\Math\BigInteger $q
|
||||
* @param \phpseclib\Math\BigInteger $g
|
||||
* @param \phpseclib\Math\BigInteger $y
|
||||
* @param \phpseclib3\Math\BigInteger $p
|
||||
* @param \phpseclib3\Math\BigInteger $q
|
||||
* @param \phpseclib3\Math\BigInteger $g
|
||||
* @param \phpseclib3\Math\BigInteger $y
|
||||
* @return string
|
||||
*/
|
||||
public static function savePublicKey(BigInteger $p, BigInteger $q, BigInteger $g, BigInteger $y)
|
||||
|
@ -16,11 +16,11 @@
|
||||
* @link http://phpseclib.sourceforge.net
|
||||
*/
|
||||
|
||||
namespace phpseclib\Crypt\DSA\Formats\Signature;
|
||||
namespace phpseclib3\Crypt\DSA\Formats\Signature;
|
||||
|
||||
use phpseclib\Math\BigInteger;
|
||||
use phpseclib\File\ASN1 as Encoder;
|
||||
use phpseclib\File\ASN1\Maps;
|
||||
use phpseclib3\Math\BigInteger;
|
||||
use phpseclib3\File\ASN1 as Encoder;
|
||||
use phpseclib3\File\ASN1\Maps;
|
||||
|
||||
/**
|
||||
* ASN1 Signature Handler
|
||||
@ -57,8 +57,8 @@ abstract class ASN1
|
||||
* Returns a signature in the appropriate format
|
||||
*
|
||||
* @access public
|
||||
* @param \phpseclib\Math\BigInteger $r
|
||||
* @param \phpseclib\Math\BigInteger $s
|
||||
* @param \phpseclib3\Math\BigInteger $r
|
||||
* @param \phpseclib3\Math\BigInteger $s
|
||||
* @return string
|
||||
*/
|
||||
public static function save(BigInteger $r, BigInteger $s)
|
||||
|
@ -13,9 +13,9 @@
|
||||
* @link http://phpseclib.sourceforge.net
|
||||
*/
|
||||
|
||||
namespace phpseclib\Crypt\DSA\Formats\Signature;
|
||||
namespace phpseclib3\Crypt\DSA\Formats\Signature;
|
||||
|
||||
use phpseclib\Crypt\Common\Formats\Signature\Raw as Progenitor;
|
||||
use phpseclib3\Crypt\Common\Formats\Signature\Raw as Progenitor;
|
||||
|
||||
/**
|
||||
* Raw DSA Signature Handler
|
||||
|
@ -15,10 +15,10 @@
|
||||
* @link http://phpseclib.sourceforge.net
|
||||
*/
|
||||
|
||||
namespace phpseclib\Crypt\DSA\Formats\Signature;
|
||||
namespace phpseclib3\Crypt\DSA\Formats\Signature;
|
||||
|
||||
use phpseclib\Math\BigInteger;
|
||||
use phpseclib\Common\Functions\Strings;
|
||||
use phpseclib3\Math\BigInteger;
|
||||
use phpseclib3\Common\Functions\Strings;
|
||||
|
||||
/**
|
||||
* SSH2 Signature Handler
|
||||
@ -61,8 +61,8 @@ abstract class SSH2
|
||||
* Returns a signature in the appropriate format
|
||||
*
|
||||
* @access public
|
||||
* @param \phpseclib\Math\BigInteger $r
|
||||
* @param \phpseclib\Math\BigInteger $s
|
||||
* @param \phpseclib3\Math\BigInteger $r
|
||||
* @param \phpseclib3\Math\BigInteger $s
|
||||
* @return string
|
||||
*/
|
||||
public static function save(BigInteger $r, BigInteger $s)
|
||||
|
@ -11,9 +11,9 @@
|
||||
* @link http://phpseclib.sourceforge.net
|
||||
*/
|
||||
|
||||
namespace phpseclib\Crypt\DSA;
|
||||
namespace phpseclib3\Crypt\DSA;
|
||||
|
||||
use phpseclib\Crypt\DSA;
|
||||
use phpseclib3\Crypt\DSA;
|
||||
|
||||
/**
|
||||
* DSA Parameters
|
||||
|
@ -11,12 +11,12 @@
|
||||
* @link http://phpseclib.sourceforge.net
|
||||
*/
|
||||
|
||||
namespace phpseclib\Crypt\DSA;
|
||||
namespace phpseclib3\Crypt\DSA;
|
||||
|
||||
use phpseclib\Crypt\DSA;
|
||||
use phpseclib\Crypt\DSA\Formats\Signature\ASN1 as ASN1Signature;
|
||||
use phpseclib\Math\BigInteger;
|
||||
use phpseclib\Crypt\Common;
|
||||
use phpseclib3\Crypt\DSA;
|
||||
use phpseclib3\Crypt\DSA\Formats\Signature\ASN1 as ASN1Signature;
|
||||
use phpseclib3\Math\BigInteger;
|
||||
use phpseclib3\Crypt\Common;
|
||||
|
||||
/**
|
||||
* DSA Private Key
|
||||
@ -32,7 +32,7 @@ class PrivateKey extends DSA implements Common\PrivateKey
|
||||
/**
|
||||
* DSA secret exponent x
|
||||
*
|
||||
* @var \phpseclib\Math\BigInteger
|
||||
* @var \phpseclib3\Math\BigInteger
|
||||
* @access private
|
||||
*/
|
||||
protected $x;
|
||||
|
@ -11,11 +11,11 @@
|
||||
* @link http://phpseclib.sourceforge.net
|
||||
*/
|
||||
|
||||
namespace phpseclib\Crypt\DSA;
|
||||
namespace phpseclib3\Crypt\DSA;
|
||||
|
||||
use phpseclib\Crypt\DSA;
|
||||
use phpseclib\Crypt\DSA\Formats\Signature\ASN1 as ASN1Signature;
|
||||
use phpseclib\Crypt\Common;
|
||||
use phpseclib3\Crypt\DSA;
|
||||
use phpseclib3\Crypt\DSA\Formats\Signature\ASN1 as ASN1Signature;
|
||||
use phpseclib3\Crypt\Common;
|
||||
|
||||
/**
|
||||
* DSA Public Key
|
||||
|
@ -10,7 +10,7 @@
|
||||
* <?php
|
||||
* include 'vendor/autoload.php';
|
||||
*
|
||||
* $private = \phpseclib\Crypt\EC::createKey('secp256k1');
|
||||
* $private = \phpseclib3\Crypt\EC::createKey('secp256k1');
|
||||
* $public = $private->getPublicKey();
|
||||
*
|
||||
* $plaintext = 'terrafrost';
|
||||
@ -29,24 +29,24 @@
|
||||
* @link http://phpseclib.sourceforge.net
|
||||
*/
|
||||
|
||||
namespace phpseclib\Crypt;
|
||||
namespace phpseclib3\Crypt;
|
||||
|
||||
use phpseclib\Crypt\Common\AsymmetricKey;
|
||||
use phpseclib\Crypt\EC\PrivateKey;
|
||||
use phpseclib\Crypt\EC\PublicKey;
|
||||
use phpseclib\Crypt\EC\Parameters;
|
||||
use phpseclib\Crypt\EC\BaseCurves\TwistedEdwards as TwistedEdwardsCurve;
|
||||
use phpseclib\Crypt\EC\BaseCurves\Montgomery as MontgomeryCurve;
|
||||
use phpseclib\Crypt\EC\Curves\Curve25519;
|
||||
use phpseclib\Crypt\EC\Curves\Ed25519;
|
||||
use phpseclib\Crypt\EC\Curves\Ed448;
|
||||
use phpseclib\Crypt\EC\Formats\Keys\PKCS1;
|
||||
use phpseclib\File\ASN1\Maps\ECParameters;
|
||||
use phpseclib\File\ASN1;
|
||||
use phpseclib\Math\BigInteger;
|
||||
use phpseclib\Exception\UnsupportedCurveException;
|
||||
use phpseclib\Exception\UnsupportedAlgorithmException;
|
||||
use phpseclib\Exception\UnsupportedOperationException;
|
||||
use phpseclib3\Crypt\Common\AsymmetricKey;
|
||||
use phpseclib3\Crypt\EC\PrivateKey;
|
||||
use phpseclib3\Crypt\EC\PublicKey;
|
||||
use phpseclib3\Crypt\EC\Parameters;
|
||||
use phpseclib3\Crypt\EC\BaseCurves\TwistedEdwards as TwistedEdwardsCurve;
|
||||
use phpseclib3\Crypt\EC\BaseCurves\Montgomery as MontgomeryCurve;
|
||||
use phpseclib3\Crypt\EC\Curves\Curve25519;
|
||||
use phpseclib3\Crypt\EC\Curves\Ed25519;
|
||||
use phpseclib3\Crypt\EC\Curves\Ed448;
|
||||
use phpseclib3\Crypt\EC\Formats\Keys\PKCS1;
|
||||
use phpseclib3\File\ASN1\Maps\ECParameters;
|
||||
use phpseclib3\File\ASN1;
|
||||
use phpseclib3\Math\BigInteger;
|
||||
use phpseclib3\Exception\UnsupportedCurveException;
|
||||
use phpseclib3\Exception\UnsupportedAlgorithmException;
|
||||
use phpseclib3\Exception\UnsupportedOperationException;
|
||||
|
||||
/**
|
||||
* Pure-PHP implementation of EC.
|
||||
@ -75,7 +75,7 @@ abstract class EC extends AsymmetricKey
|
||||
/**
|
||||
* Curve
|
||||
*
|
||||
* @var \phpseclib\Crypt\EC\BaseCurves\Base
|
||||
* @var \phpseclib3\Crypt\EC\BaseCurves\Base
|
||||
*/
|
||||
protected $curve;
|
||||
|
||||
@ -107,7 +107,7 @@ abstract class EC extends AsymmetricKey
|
||||
*
|
||||
* Used for deterministic ECDSA
|
||||
*
|
||||
* @var \phpseclib\Math\BigInteger
|
||||
* @var \phpseclib3\Math\BigInteger
|
||||
*/
|
||||
protected $q;
|
||||
|
||||
@ -119,7 +119,7 @@ abstract class EC extends AsymmetricKey
|
||||
* 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
|
||||
* @var \phpseclib3\Math\BigInteger
|
||||
*/
|
||||
protected $x;
|
||||
|
||||
@ -135,7 +135,7 @@ abstract class EC extends AsymmetricKey
|
||||
*
|
||||
* @access public
|
||||
* @param string $curve
|
||||
* @return \phpseclib\Crypt\EC\PrivateKey
|
||||
* @return \phpseclib3\Crypt\EC\PrivateKey
|
||||
*/
|
||||
public static function createKey($curve)
|
||||
{
|
||||
@ -161,10 +161,10 @@ abstract class EC extends AsymmetricKey
|
||||
$privatekey = new PrivateKey;
|
||||
|
||||
$curveName = $curve;
|
||||
$curve = '\phpseclib\Crypt\EC\Curves\\' . $curveName;
|
||||
$curve = '\phpseclib3\Crypt\EC\Curves\\' . $curveName;
|
||||
if (!class_exists($curve)) {
|
||||
$curveName = ucfirst($curveName);
|
||||
$curve = '\phpseclib\Crypt\EC\Curves\\' . $curveName;
|
||||
$curve = '\phpseclib3\Crypt\EC\Curves\\' . $curveName;
|
||||
if (!class_exists($curve)) {
|
||||
throw new UnsupportedCurveException('Named Curve of ' . $curveName . ' is not supported');
|
||||
}
|
||||
|
@ -13,10 +13,10 @@
|
||||
* @link http://pear.php.net/package/Math_BigInteger
|
||||
*/
|
||||
|
||||
namespace phpseclib\Crypt\EC\BaseCurves;
|
||||
namespace phpseclib3\Crypt\EC\BaseCurves;
|
||||
|
||||
use phpseclib\Math\Common\FiniteField;
|
||||
use phpseclib\Math\BigInteger;
|
||||
use phpseclib3\Math\Common\FiniteField;
|
||||
use phpseclib3\Math\BigInteger;
|
||||
|
||||
/**
|
||||
* Base
|
||||
@ -51,7 +51,7 @@ abstract class Base
|
||||
/**
|
||||
* Finite Field Integer factory
|
||||
*
|
||||
* @var \phpseclib\Math\FiniteField\Integer
|
||||
* @var \phpseclib3\Math\FiniteField\Integer
|
||||
*/
|
||||
protected $factory;
|
||||
|
||||
@ -149,7 +149,7 @@ abstract class Base
|
||||
/**
|
||||
* Returns the Order
|
||||
*
|
||||
* @return \phpseclib\Math\BigInteger
|
||||
* @return \phpseclib3\Math\BigInteger
|
||||
*/
|
||||
public function getOrder()
|
||||
{
|
||||
|
@ -21,12 +21,12 @@
|
||||
* @link http://pear.php.net/package/Math_BigInteger
|
||||
*/
|
||||
|
||||
namespace phpseclib\Crypt\EC\BaseCurves;
|
||||
namespace phpseclib3\Crypt\EC\BaseCurves;
|
||||
|
||||
use phpseclib\Common\Functions\Strings;
|
||||
use phpseclib\Math\BinaryField;
|
||||
use phpseclib\Math\BigInteger;
|
||||
use phpseclib\Math\BinaryField\Integer as BinaryInteger;
|
||||
use phpseclib3\Common\Functions\Strings;
|
||||
use phpseclib3\Math\BinaryField;
|
||||
use phpseclib3\Math\BigInteger;
|
||||
use phpseclib3\Math\BinaryField\Integer as BinaryInteger;
|
||||
|
||||
/**
|
||||
* Curves over y^2 + x*y = x^3 + a*x^2 + b
|
||||
@ -40,7 +40,7 @@ class Binary extends Base
|
||||
/**
|
||||
* Binary Field Integer factory
|
||||
*
|
||||
* @var \phpseclib\Math\BinaryFields
|
||||
* @var \phpseclib3\Math\BinaryFields
|
||||
*/
|
||||
protected $factory;
|
||||
|
||||
@ -310,7 +310,7 @@ class Binary extends Base
|
||||
/**
|
||||
* Returns the modulo
|
||||
*
|
||||
* @return \phpseclib\Math\BigInteger
|
||||
* @return \phpseclib3\Math\BigInteger
|
||||
*/
|
||||
public function getModulo()
|
||||
{
|
||||
@ -320,7 +320,7 @@ class Binary extends Base
|
||||
/**
|
||||
* Returns the a coefficient
|
||||
*
|
||||
* @return \phpseclib\Math\PrimeField\Integer
|
||||
* @return \phpseclib3\Math\PrimeField\Integer
|
||||
*/
|
||||
public function getA()
|
||||
{
|
||||
@ -330,7 +330,7 @@ class Binary extends Base
|
||||
/**
|
||||
* Returns the a coefficient
|
||||
*
|
||||
* @return \phpseclib\Math\PrimeField\Integer
|
||||
* @return \phpseclib3\Math\PrimeField\Integer
|
||||
*/
|
||||
public function getB()
|
||||
{
|
||||
@ -344,7 +344,7 @@ class Binary extends Base
|
||||
* To convert a Jacobian Coordinate to an Affine Point
|
||||
* you do (x / z^2, y / z^3)
|
||||
*
|
||||
* @return \phpseclib\Math\PrimeField\Integer[]
|
||||
* @return \phpseclib3\Math\PrimeField\Integer[]
|
||||
*/
|
||||
public function convertToAffine(array $p)
|
||||
{
|
||||
@ -363,7 +363,7 @@ class Binary extends Base
|
||||
/**
|
||||
* Converts an affine point to a jacobian coordinate
|
||||
*
|
||||
* @return \phpseclib\Math\PrimeField\Integer[]
|
||||
* @return \phpseclib3\Math\PrimeField\Integer[]
|
||||
*/
|
||||
public function convertToInternal(array $p)
|
||||
{
|
||||
|
@ -28,12 +28,12 @@
|
||||
* @link http://pear.php.net/package/Math_BigInteger
|
||||
*/
|
||||
|
||||
namespace phpseclib\Crypt\EC\BaseCurves;
|
||||
namespace phpseclib3\Crypt\EC\BaseCurves;
|
||||
|
||||
use phpseclib\Common\Functions\Strings;
|
||||
use phpseclib\Math\PrimeField;
|
||||
use phpseclib\Math\BigInteger;
|
||||
use phpseclib\Math\PrimeField\Integer as PrimeInteger;
|
||||
use phpseclib3\Common\Functions\Strings;
|
||||
use phpseclib3\Math\PrimeField;
|
||||
use phpseclib3\Math\BigInteger;
|
||||
use phpseclib3\Math\PrimeField\Integer as PrimeInteger;
|
||||
|
||||
/**
|
||||
* Curves over y^2 = x^3 + b
|
||||
|
@ -24,14 +24,14 @@
|
||||
* @link http://pear.php.net/package/Math_BigInteger
|
||||
*/
|
||||
|
||||
namespace phpseclib\Crypt\EC\BaseCurves;
|
||||
namespace phpseclib3\Crypt\EC\BaseCurves;
|
||||
|
||||
use phpseclib\Math\Common\FiniteField\Integer;
|
||||
use phpseclib\Common\Functions\Strings;
|
||||
use phpseclib\Math\PrimeField;
|
||||
use phpseclib\Math\BigInteger;
|
||||
use phpseclib\Crypt\EC\Curves\Curve25519;
|
||||
use phpseclib\Math\PrimeField\Integer as PrimeInteger;
|
||||
use phpseclib3\Math\Common\FiniteField\Integer;
|
||||
use phpseclib3\Common\Functions\Strings;
|
||||
use phpseclib3\Math\PrimeField;
|
||||
use phpseclib3\Math\BigInteger;
|
||||
use phpseclib3\Crypt\EC\Curves\Curve25519;
|
||||
use phpseclib3\Math\PrimeField\Integer as PrimeInteger;
|
||||
|
||||
/**
|
||||
* Curves over y^2 = x^3 + a*x + x
|
||||
@ -45,7 +45,7 @@ class Montgomery extends Base
|
||||
/**
|
||||
* Prime Field Integer factory
|
||||
*
|
||||
* @var \phpseclib\Math\PrimeFields
|
||||
* @var \phpseclib3\Math\PrimeFields
|
||||
*/
|
||||
protected $factory;
|
||||
|
||||
@ -252,7 +252,7 @@ class Montgomery extends Base
|
||||
*
|
||||
* x=X/Z
|
||||
*
|
||||
* @return \phpseclib\Math\PrimeField\Integer[]
|
||||
* @return \phpseclib3\Math\PrimeField\Integer[]
|
||||
*/
|
||||
public function convertToInternal(array $p)
|
||||
{
|
||||
@ -272,7 +272,7 @@ class Montgomery extends Base
|
||||
/**
|
||||
* Returns the affine point
|
||||
*
|
||||
* @return \phpseclib\Math\PrimeField\Integer[]
|
||||
* @return \phpseclib3\Math\PrimeField\Integer[]
|
||||
*/
|
||||
public function convertToAffine(array $p)
|
||||
{
|
||||
|
@ -21,13 +21,13 @@
|
||||
* @link http://pear.php.net/package/Math_BigInteger
|
||||
*/
|
||||
|
||||
namespace phpseclib\Crypt\EC\BaseCurves;
|
||||
namespace phpseclib3\Crypt\EC\BaseCurves;
|
||||
|
||||
use phpseclib\Math\Common\FiniteField\Integer;
|
||||
use phpseclib\Common\Functions\Strings;
|
||||
use phpseclib\Math\PrimeField;
|
||||
use phpseclib\Math\BigInteger;
|
||||
use phpseclib\Math\PrimeField\Integer as PrimeInteger;
|
||||
use phpseclib3\Math\Common\FiniteField\Integer;
|
||||
use phpseclib3\Common\Functions\Strings;
|
||||
use phpseclib3\Math\PrimeField;
|
||||
use phpseclib3\Math\BigInteger;
|
||||
use phpseclib3\Math\PrimeField\Integer as PrimeInteger;
|
||||
|
||||
/**
|
||||
* Curves over y^2 = x^3 + a*x + b
|
||||
@ -41,7 +41,7 @@ class Prime extends Base
|
||||
/**
|
||||
* Prime Field Integer factory
|
||||
*
|
||||
* @var \phpseclib\Math\PrimeFields
|
||||
* @var \phpseclib3\Math\PrimeFields
|
||||
*/
|
||||
protected $factory;
|
||||
|
||||
@ -475,7 +475,7 @@ class Prime extends Base
|
||||
/**
|
||||
* Returns the modulo
|
||||
*
|
||||
* @return \phpseclib\Math\BigInteger
|
||||
* @return \phpseclib3\Math\BigInteger
|
||||
*/
|
||||
public function getModulo()
|
||||
{
|
||||
@ -485,7 +485,7 @@ class Prime extends Base
|
||||
/**
|
||||
* Returns the a coefficient
|
||||
*
|
||||
* @return \phpseclib\Math\PrimeField\Integer
|
||||
* @return \phpseclib3\Math\PrimeField\Integer
|
||||
*/
|
||||
public function getA()
|
||||
{
|
||||
@ -495,7 +495,7 @@ class Prime extends Base
|
||||
/**
|
||||
* Returns the a coefficient
|
||||
*
|
||||
* @return \phpseclib\Math\PrimeField\Integer
|
||||
* @return \phpseclib3\Math\PrimeField\Integer
|
||||
*/
|
||||
public function getB()
|
||||
{
|
||||
@ -740,7 +740,7 @@ class Prime extends Base
|
||||
* To convert a Jacobian Coordinate to an Affine Point
|
||||
* you do (x / z^2, y / z^3)
|
||||
*
|
||||
* @return \phpseclib\Math\PrimeField\Integer[]
|
||||
* @return \phpseclib3\Math\PrimeField\Integer[]
|
||||
*/
|
||||
public function convertToAffine(array $p)
|
||||
{
|
||||
@ -759,7 +759,7 @@ class Prime extends Base
|
||||
/**
|
||||
* Converts an affine point to a jacobian coordinate
|
||||
*
|
||||
* @return \phpseclib\Math\PrimeField\Integer[]
|
||||
* @return \phpseclib3\Math\PrimeField\Integer[]
|
||||
*/
|
||||
public function convertToInternal(array $p)
|
||||
{
|
||||
|
@ -26,11 +26,11 @@
|
||||
* @link http://pear.php.net/package/Math_BigInteger
|
||||
*/
|
||||
|
||||
namespace phpseclib\Crypt\EC\BaseCurves;
|
||||
namespace phpseclib3\Crypt\EC\BaseCurves;
|
||||
|
||||
use phpseclib\Math\PrimeField;
|
||||
use phpseclib\Math\BigInteger;
|
||||
use phpseclib\Math\PrimeField\Integer as PrimeInteger;
|
||||
use phpseclib3\Math\PrimeField;
|
||||
use phpseclib3\Math\BigInteger;
|
||||
use phpseclib3\Math\PrimeField\Integer as PrimeInteger;
|
||||
|
||||
/**
|
||||
* Curves over a*x^2 + y^2 = 1 + d*x^2*y^2
|
||||
@ -137,7 +137,7 @@ class TwistedEdwards extends Base
|
||||
/**
|
||||
* Returns the a coefficient
|
||||
*
|
||||
* @return \phpseclib\Math\PrimeField\Integer
|
||||
* @return \phpseclib3\Math\PrimeField\Integer
|
||||
*/
|
||||
public function getA()
|
||||
{
|
||||
@ -147,7 +147,7 @@ class TwistedEdwards extends Base
|
||||
/**
|
||||
* Returns the a coefficient
|
||||
*
|
||||
* @return \phpseclib\Math\PrimeField\Integer
|
||||
* @return \phpseclib3\Math\PrimeField\Integer
|
||||
*/
|
||||
public function getD()
|
||||
{
|
||||
@ -175,7 +175,7 @@ class TwistedEdwards extends Base
|
||||
/**
|
||||
* Returns the affine point
|
||||
*
|
||||
* @return \phpseclib\Math\PrimeField\Integer[]
|
||||
* @return \phpseclib3\Math\PrimeField\Integer[]
|
||||
*/
|
||||
public function convertToAffine(array $p)
|
||||
{
|
||||
@ -193,7 +193,7 @@ class TwistedEdwards extends Base
|
||||
/**
|
||||
* Returns the modulo
|
||||
*
|
||||
* @return \phpseclib\Math\BigInteger
|
||||
* @return \phpseclib3\Math\BigInteger
|
||||
*/
|
||||
public function getModulo()
|
||||
{
|
||||
|
@ -13,11 +13,11 @@
|
||||
* @link http://pear.php.net/package/Math_BigInteger
|
||||
*/
|
||||
|
||||
namespace phpseclib\Crypt\EC\Curves;
|
||||
namespace phpseclib3\Crypt\EC\Curves;
|
||||
|
||||
use phpseclib\Math\Common\FiniteField\Integer;
|
||||
use phpseclib\Crypt\EC\BaseCurves\Montgomery;
|
||||
use phpseclib\Math\BigInteger;
|
||||
use phpseclib3\Math\Common\FiniteField\Integer;
|
||||
use phpseclib3\Crypt\EC\BaseCurves\Montgomery;
|
||||
use phpseclib3\Math\BigInteger;
|
||||
|
||||
class Curve25519 extends Montgomery
|
||||
{
|
||||
|
@ -13,11 +13,11 @@
|
||||
* @link http://pear.php.net/package/Math_BigInteger
|
||||
*/
|
||||
|
||||
namespace phpseclib\Crypt\EC\Curves;
|
||||
namespace phpseclib3\Crypt\EC\Curves;
|
||||
|
||||
use phpseclib\Math\Common\FiniteField\Integer;
|
||||
use phpseclib\Crypt\EC\BaseCurves\Montgomery;
|
||||
use phpseclib\Math\BigInteger;
|
||||
use phpseclib3\Math\Common\FiniteField\Integer;
|
||||
use phpseclib3\Crypt\EC\BaseCurves\Montgomery;
|
||||
use phpseclib3\Math\BigInteger;
|
||||
|
||||
class Curve448 extends Montgomery
|
||||
{
|
||||
|
@ -12,12 +12,12 @@
|
||||
* @license http://www.opensource.org/licenses/mit-license.html MIT License
|
||||
*/
|
||||
|
||||
namespace phpseclib\Crypt\EC\Curves;
|
||||
namespace phpseclib3\Crypt\EC\Curves;
|
||||
|
||||
use phpseclib\Crypt\EC\BaseCurves\TwistedEdwards;
|
||||
use phpseclib\Math\BigInteger;
|
||||
use phpseclib\Crypt\Hash;
|
||||
use phpseclib\Crypt\Random;
|
||||
use phpseclib3\Crypt\EC\BaseCurves\TwistedEdwards;
|
||||
use phpseclib3\Math\BigInteger;
|
||||
use phpseclib3\Crypt\Hash;
|
||||
use phpseclib3\Crypt\Random;
|
||||
|
||||
class Ed25519 extends TwistedEdwards
|
||||
{
|
||||
@ -158,7 +158,7 @@ class Ed25519 extends TwistedEdwards
|
||||
* Used by the various key handlers
|
||||
*
|
||||
* @param string $str
|
||||
* @return \phpseclib\Math\PrimeField\Integer
|
||||
* @return \phpseclib3\Math\PrimeField\Integer
|
||||
*/
|
||||
public function extractSecret($str)
|
||||
{
|
||||
@ -208,7 +208,7 @@ class Ed25519 extends TwistedEdwards
|
||||
/**
|
||||
* Creates a random scalar multiplier
|
||||
*
|
||||
* @return \phpseclib\Math\PrimeField\Integer
|
||||
* @return \phpseclib3\Math\PrimeField\Integer
|
||||
*/
|
||||
public function createRandomMultiplier()
|
||||
{
|
||||
@ -223,7 +223,7 @@ class Ed25519 extends TwistedEdwards
|
||||
* A point (x,y) is represented in extended homogeneous coordinates (X, Y, Z, T),
|
||||
* with x = X/Z, y = Y/Z, x * y = T/Z.
|
||||
*
|
||||
* @return \phpseclib\Math\PrimeField\Integer[]
|
||||
* @return \phpseclib3\Math\PrimeField\Integer[]
|
||||
*/
|
||||
public function convertToInternal(array $p)
|
||||
{
|
||||
|
@ -12,12 +12,12 @@
|
||||
* @license http://www.opensource.org/licenses/mit-license.html MIT License
|
||||
*/
|
||||
|
||||
namespace phpseclib\Crypt\EC\Curves;
|
||||
namespace phpseclib3\Crypt\EC\Curves;
|
||||
|
||||
use phpseclib\Crypt\EC\BaseCurves\TwistedEdwards;
|
||||
use phpseclib\Math\BigInteger;
|
||||
use phpseclib\Crypt\Hash;
|
||||
use phpseclib\Crypt\Random;
|
||||
use phpseclib3\Crypt\EC\BaseCurves\TwistedEdwards;
|
||||
use phpseclib3\Math\BigInteger;
|
||||
use phpseclib3\Crypt\Hash;
|
||||
use phpseclib3\Crypt\Random;
|
||||
|
||||
class Ed448 extends TwistedEdwards
|
||||
{
|
||||
@ -95,7 +95,7 @@ class Ed448 extends TwistedEdwards
|
||||
* Used by the various key handlers
|
||||
*
|
||||
* @param string $str
|
||||
* @return \phpseclib\Math\PrimeField\Integer
|
||||
* @return \phpseclib3\Math\PrimeField\Integer
|
||||
*/
|
||||
public function extractSecret($str)
|
||||
{
|
||||
@ -145,7 +145,7 @@ class Ed448 extends TwistedEdwards
|
||||
/**
|
||||
* Creates a random scalar multiplier
|
||||
*
|
||||
* @return \phpseclib\Math\PrimeField\Integer
|
||||
* @return \phpseclib3\Math\PrimeField\Integer
|
||||
*/
|
||||
public function createRandomMultiplier()
|
||||
{
|
||||
@ -160,7 +160,7 @@ class Ed448 extends TwistedEdwards
|
||||
* A point (x,y) is represented in extended homogeneous coordinates (X, Y, Z, T),
|
||||
* with x = X/Z, y = Y/Z, x * y = T/Z.
|
||||
*
|
||||
* @return \phpseclib\Math\PrimeField\Integer[]
|
||||
* @return \phpseclib3\Math\PrimeField\Integer[]
|
||||
*/
|
||||
public function convertToInternal(array $p)
|
||||
{
|
||||
|
@ -13,10 +13,10 @@
|
||||
* @link http://pear.php.net/package/Math_BigInteger
|
||||
*/
|
||||
|
||||
namespace phpseclib\Crypt\EC\Curves;
|
||||
namespace phpseclib3\Crypt\EC\Curves;
|
||||
|
||||
use phpseclib\Crypt\EC\BaseCurves\Prime;
|
||||
use phpseclib\Math\BigInteger;
|
||||
use phpseclib3\Crypt\EC\BaseCurves\Prime;
|
||||
use phpseclib3\Math\BigInteger;
|
||||
|
||||
class brainpoolP160r1 extends Prime
|
||||
{
|
||||
|
@ -26,10 +26,10 @@
|
||||
* @link http://pear.php.net/package/Math_BigInteger
|
||||
*/
|
||||
|
||||
namespace phpseclib\Crypt\EC\Curves;
|
||||
namespace phpseclib3\Crypt\EC\Curves;
|
||||
|
||||
use phpseclib\Crypt\EC\BaseCurves\Prime;
|
||||
use phpseclib\Math\BigInteger;
|
||||
use phpseclib3\Crypt\EC\BaseCurves\Prime;
|
||||
use phpseclib3\Math\BigInteger;
|
||||
|
||||
class brainpoolP160t1 extends Prime
|
||||
{
|
||||
|
@ -13,10 +13,10 @@
|
||||
* @link http://pear.php.net/package/Math_BigInteger
|
||||
*/
|
||||
|
||||
namespace phpseclib\Crypt\EC\Curves;
|
||||
namespace phpseclib3\Crypt\EC\Curves;
|
||||
|
||||
use phpseclib\Crypt\EC\BaseCurves\Prime;
|
||||
use phpseclib\Math\BigInteger;
|
||||
use phpseclib3\Crypt\EC\BaseCurves\Prime;
|
||||
use phpseclib3\Math\BigInteger;
|
||||
|
||||
class brainpoolP192r1 extends Prime
|
||||
{
|
||||
|
@ -13,10 +13,10 @@
|
||||
* @link http://pear.php.net/package/Math_BigInteger
|
||||
*/
|
||||
|
||||
namespace phpseclib\Crypt\EC\Curves;
|
||||
namespace phpseclib3\Crypt\EC\Curves;
|
||||
|
||||
use phpseclib\Crypt\EC\BaseCurves\Prime;
|
||||
use phpseclib\Math\BigInteger;
|
||||
use phpseclib3\Crypt\EC\BaseCurves\Prime;
|
||||
use phpseclib3\Math\BigInteger;
|
||||
|
||||
class brainpoolP192t1 extends Prime
|
||||
{
|
||||
|
@ -13,10 +13,10 @@
|
||||
* @link http://pear.php.net/package/Math_BigInteger
|
||||
*/
|
||||
|
||||
namespace phpseclib\Crypt\EC\Curves;
|
||||
namespace phpseclib3\Crypt\EC\Curves;
|
||||
|
||||
use phpseclib\Crypt\EC\BaseCurves\Prime;
|
||||
use phpseclib\Math\BigInteger;
|
||||
use phpseclib3\Crypt\EC\BaseCurves\Prime;
|
||||
use phpseclib3\Math\BigInteger;
|
||||
|
||||
class brainpoolP224r1 extends Prime
|
||||
{
|
||||
|
@ -13,10 +13,10 @@
|
||||
* @link http://pear.php.net/package/Math_BigInteger
|
||||
*/
|
||||
|
||||
namespace phpseclib\Crypt\EC\Curves;
|
||||
namespace phpseclib3\Crypt\EC\Curves;
|
||||
|
||||
use phpseclib\Crypt\EC\BaseCurves\Prime;
|
||||
use phpseclib\Math\BigInteger;
|
||||
use phpseclib3\Crypt\EC\BaseCurves\Prime;
|
||||
use phpseclib3\Math\BigInteger;
|
||||
|
||||
class brainpoolP224t1 extends Prime
|
||||
{
|
||||
|
@ -13,10 +13,10 @@
|
||||
* @link http://pear.php.net/package/Math_BigInteger
|
||||
*/
|
||||
|
||||
namespace phpseclib\Crypt\EC\Curves;
|
||||
namespace phpseclib3\Crypt\EC\Curves;
|
||||
|
||||
use phpseclib\Crypt\EC\BaseCurves\Prime;
|
||||
use phpseclib\Math\BigInteger;
|
||||
use phpseclib3\Crypt\EC\BaseCurves\Prime;
|
||||
use phpseclib3\Math\BigInteger;
|
||||
|
||||
class brainpoolP256r1 extends Prime
|
||||
{
|
||||
|
@ -13,10 +13,10 @@
|
||||
* @link http://pear.php.net/package/Math_BigInteger
|
||||
*/
|
||||
|
||||
namespace phpseclib\Crypt\EC\Curves;
|
||||
namespace phpseclib3\Crypt\EC\Curves;
|
||||
|
||||
use phpseclib\Crypt\EC\BaseCurves\Prime;
|
||||
use phpseclib\Math\BigInteger;
|
||||
use phpseclib3\Crypt\EC\BaseCurves\Prime;
|
||||
use phpseclib3\Math\BigInteger;
|
||||
|
||||
class brainpoolP256t1 extends Prime
|
||||
{
|
||||
|
@ -13,10 +13,10 @@
|
||||
* @link http://pear.php.net/package/Math_BigInteger
|
||||
*/
|
||||
|
||||
namespace phpseclib\Crypt\EC\Curves;
|
||||
namespace phpseclib3\Crypt\EC\Curves;
|
||||
|
||||
use phpseclib\Crypt\EC\BaseCurves\Prime;
|
||||
use phpseclib\Math\BigInteger;
|
||||
use phpseclib3\Crypt\EC\BaseCurves\Prime;
|
||||
use phpseclib3\Math\BigInteger;
|
||||
|
||||
class brainpoolP320r1 extends Prime
|
||||
{
|
||||
|
@ -13,10 +13,10 @@
|
||||
* @link http://pear.php.net/package/Math_BigInteger
|
||||
*/
|
||||
|
||||
namespace phpseclib\Crypt\EC\Curves;
|
||||
namespace phpseclib3\Crypt\EC\Curves;
|
||||
|
||||
use phpseclib\Crypt\EC\BaseCurves\Prime;
|
||||
use phpseclib\Math\BigInteger;
|
||||
use phpseclib3\Crypt\EC\BaseCurves\Prime;
|
||||
use phpseclib3\Math\BigInteger;
|
||||
|
||||
class brainpoolP320t1 extends Prime
|
||||
{
|
||||
|
@ -13,10 +13,10 @@
|
||||
* @link http://pear.php.net/package/Math_BigInteger
|
||||
*/
|
||||
|
||||
namespace phpseclib\Crypt\EC\Curves;
|
||||
namespace phpseclib3\Crypt\EC\Curves;
|
||||
|
||||
use phpseclib\Crypt\EC\BaseCurves\Prime;
|
||||
use phpseclib\Math\BigInteger;
|
||||
use phpseclib3\Crypt\EC\BaseCurves\Prime;
|
||||
use phpseclib3\Math\BigInteger;
|
||||
|
||||
class brainpoolP384r1 extends Prime
|
||||
{
|
||||
|
@ -13,10 +13,10 @@
|
||||
* @link http://pear.php.net/package/Math_BigInteger
|
||||
*/
|
||||
|
||||
namespace phpseclib\Crypt\EC\Curves;
|
||||
namespace phpseclib3\Crypt\EC\Curves;
|
||||
|
||||
use phpseclib\Crypt\EC\BaseCurves\Prime;
|
||||
use phpseclib\Math\BigInteger;
|
||||
use phpseclib3\Crypt\EC\BaseCurves\Prime;
|
||||
use phpseclib3\Math\BigInteger;
|
||||
|
||||
class brainpoolP384t1 extends Prime
|
||||
{
|
||||
|
@ -13,10 +13,10 @@
|
||||
* @link http://pear.php.net/package/Math_BigInteger
|
||||
*/
|
||||
|
||||
namespace phpseclib\Crypt\EC\Curves;
|
||||
namespace phpseclib3\Crypt\EC\Curves;
|
||||
|
||||
use phpseclib\Crypt\EC\BaseCurves\Prime;
|
||||
use phpseclib\Math\BigInteger;
|
||||
use phpseclib3\Crypt\EC\BaseCurves\Prime;
|
||||
use phpseclib3\Math\BigInteger;
|
||||
|
||||
class brainpoolP512r1 extends Prime
|
||||
{
|
||||
|
@ -13,10 +13,10 @@
|
||||
* @link http://pear.php.net/package/Math_BigInteger
|
||||
*/
|
||||
|
||||
namespace phpseclib\Crypt\EC\Curves;
|
||||
namespace phpseclib3\Crypt\EC\Curves;
|
||||
|
||||
use phpseclib\Crypt\EC\BaseCurves\Prime;
|
||||
use phpseclib\Math\BigInteger;
|
||||
use phpseclib3\Crypt\EC\BaseCurves\Prime;
|
||||
use phpseclib3\Math\BigInteger;
|
||||
|
||||
class brainpoolP512t1 extends Prime
|
||||
{
|
||||
|
@ -13,7 +13,7 @@
|
||||
* @link http://pear.php.net/package/Math_BigInteger
|
||||
*/
|
||||
|
||||
namespace phpseclib\Crypt\EC\Curves;
|
||||
namespace phpseclib3\Crypt\EC\Curves;
|
||||
|
||||
final class nistb233 extends sect233r1
|
||||
{
|
||||
|
@ -13,7 +13,7 @@
|
||||
* @link http://pear.php.net/package/Math_BigInteger
|
||||
*/
|
||||
|
||||
namespace phpseclib\Crypt\EC\Curves;
|
||||
namespace phpseclib3\Crypt\EC\Curves;
|
||||
|
||||
final class nistb409 extends sect409r1
|
||||
{
|
||||
|
@ -13,7 +13,7 @@
|
||||
* @link http://pear.php.net/package/Math_BigInteger
|
||||
*/
|
||||
|
||||
namespace phpseclib\Crypt\EC\Curves;
|
||||
namespace phpseclib3\Crypt\EC\Curves;
|
||||
|
||||
final class nistk163 extends sect163k1
|
||||
{
|
||||
|
@ -13,7 +13,7 @@
|
||||
* @link http://pear.php.net/package/Math_BigInteger
|
||||
*/
|
||||
|
||||
namespace phpseclib\Crypt\EC\Curves;
|
||||
namespace phpseclib3\Crypt\EC\Curves;
|
||||
|
||||
final class nistk233 extends sect233k1
|
||||
{
|
||||
|
@ -13,7 +13,7 @@
|
||||
* @link http://pear.php.net/package/Math_BigInteger
|
||||
*/
|
||||
|
||||
namespace phpseclib\Crypt\EC\Curves;
|
||||
namespace phpseclib3\Crypt\EC\Curves;
|
||||
|
||||
final class nistk283 extends sect283k1
|
||||
{
|
||||
|
@ -13,7 +13,7 @@
|
||||
* @link http://pear.php.net/package/Math_BigInteger
|
||||
*/
|
||||
|
||||
namespace phpseclib\Crypt\EC\Curves;
|
||||
namespace phpseclib3\Crypt\EC\Curves;
|
||||
|
||||
final class nistk409 extends sect409k1
|
||||
{
|
||||
|
@ -13,7 +13,7 @@
|
||||
* @link http://pear.php.net/package/Math_BigInteger
|
||||
*/
|
||||
|
||||
namespace phpseclib\Crypt\EC\Curves;
|
||||
namespace phpseclib3\Crypt\EC\Curves;
|
||||
|
||||
final class nistp192 extends secp192r1
|
||||
{
|
||||
|
@ -13,7 +13,7 @@
|
||||
* @link http://pear.php.net/package/Math_BigInteger
|
||||
*/
|
||||
|
||||
namespace phpseclib\Crypt\EC\Curves;
|
||||
namespace phpseclib3\Crypt\EC\Curves;
|
||||
|
||||
final class nistp224 extends secp224r1
|
||||
{
|
||||
|
@ -13,7 +13,7 @@
|
||||
* @link http://pear.php.net/package/Math_BigInteger
|
||||
*/
|
||||
|
||||
namespace phpseclib\Crypt\EC\Curves;
|
||||
namespace phpseclib3\Crypt\EC\Curves;
|
||||
|
||||
final class nistp256 extends secp256r1
|
||||
{
|
||||
|
@ -13,7 +13,7 @@
|
||||
* @link http://pear.php.net/package/Math_BigInteger
|
||||
*/
|
||||
|
||||
namespace phpseclib\Crypt\EC\Curves;
|
||||
namespace phpseclib3\Crypt\EC\Curves;
|
||||
|
||||
final class nistp384 extends secp384r1
|
||||
{
|
||||
|
@ -13,7 +13,7 @@
|
||||
* @link http://pear.php.net/package/Math_BigInteger
|
||||
*/
|
||||
|
||||
namespace phpseclib\Crypt\EC\Curves;
|
||||
namespace phpseclib3\Crypt\EC\Curves;
|
||||
|
||||
final class nistp521 extends secp521r1
|
||||
{
|
||||
|
@ -13,7 +13,7 @@
|
||||
* @link http://pear.php.net/package/Math_BigInteger
|
||||
*/
|
||||
|
||||
namespace phpseclib\Crypt\EC\Curves;
|
||||
namespace phpseclib3\Crypt\EC\Curves;
|
||||
|
||||
final class nistt571 extends sect571k1
|
||||
{
|
||||
|
@ -13,7 +13,7 @@
|
||||
* @link http://pear.php.net/package/Math_BigInteger
|
||||
*/
|
||||
|
||||
namespace phpseclib\Crypt\EC\Curves;
|
||||
namespace phpseclib3\Crypt\EC\Curves;
|
||||
|
||||
final class prime192v1 extends secp192r1
|
||||
{
|
||||
|
@ -13,10 +13,10 @@
|
||||
* @link http://pear.php.net/package/Math_BigInteger
|
||||
*/
|
||||
|
||||
namespace phpseclib\Crypt\EC\Curves;
|
||||
namespace phpseclib3\Crypt\EC\Curves;
|
||||
|
||||
use phpseclib\Crypt\EC\BaseCurves\Prime;
|
||||
use phpseclib\Math\BigInteger;
|
||||
use phpseclib3\Crypt\EC\BaseCurves\Prime;
|
||||
use phpseclib3\Math\BigInteger;
|
||||
|
||||
class prime192v2 extends Prime
|
||||
{
|
||||
|
@ -13,10 +13,10 @@
|
||||
* @link http://pear.php.net/package/Math_BigInteger
|
||||
*/
|
||||
|
||||
namespace phpseclib\Crypt\EC\Curves;
|
||||
namespace phpseclib3\Crypt\EC\Curves;
|
||||
|
||||
use phpseclib\Crypt\EC\BaseCurves\Prime;
|
||||
use phpseclib\Math\BigInteger;
|
||||
use phpseclib3\Crypt\EC\BaseCurves\Prime;
|
||||
use phpseclib3\Math\BigInteger;
|
||||
|
||||
class prime192v3 extends Prime
|
||||
{
|
||||
|
@ -13,10 +13,10 @@
|
||||
* @link http://pear.php.net/package/Math_BigInteger
|
||||
*/
|
||||
|
||||
namespace phpseclib\Crypt\EC\Curves;
|
||||
namespace phpseclib3\Crypt\EC\Curves;
|
||||
|
||||
use phpseclib\Crypt\EC\BaseCurves\Prime;
|
||||
use phpseclib\Math\BigInteger;
|
||||
use phpseclib3\Crypt\EC\BaseCurves\Prime;
|
||||
use phpseclib3\Math\BigInteger;
|
||||
|
||||
class prime239v1 extends Prime
|
||||
{
|
||||
|
@ -13,10 +13,10 @@
|
||||
* @link http://pear.php.net/package/Math_BigInteger
|
||||
*/
|
||||
|
||||
namespace phpseclib\Crypt\EC\Curves;
|
||||
namespace phpseclib3\Crypt\EC\Curves;
|
||||
|
||||
use phpseclib\Crypt\EC\BaseCurves\Prime;
|
||||
use phpseclib\Math\BigInteger;
|
||||
use phpseclib3\Crypt\EC\BaseCurves\Prime;
|
||||
use phpseclib3\Math\BigInteger;
|
||||
|
||||
class prime239v2 extends Prime
|
||||
{
|
||||
|
@ -13,10 +13,10 @@
|
||||
* @link http://pear.php.net/package/Math_BigInteger
|
||||
*/
|
||||
|
||||
namespace phpseclib\Crypt\EC\Curves;
|
||||
namespace phpseclib3\Crypt\EC\Curves;
|
||||
|
||||
use phpseclib\Crypt\EC\BaseCurves\Prime;
|
||||
use phpseclib\Math\BigInteger;
|
||||
use phpseclib3\Crypt\EC\BaseCurves\Prime;
|
||||
use phpseclib3\Math\BigInteger;
|
||||
|
||||
class prime239v3 extends Prime
|
||||
{
|
||||
|
@ -13,7 +13,7 @@
|
||||
* @link http://pear.php.net/package/Math_BigInteger
|
||||
*/
|
||||
|
||||
namespace phpseclib\Crypt\EC\Curves;
|
||||
namespace phpseclib3\Crypt\EC\Curves;
|
||||
|
||||
final class prime256v1 extends secp256r1
|
||||
{
|
||||
|
@ -13,10 +13,10 @@
|
||||
* @link http://pear.php.net/package/Math_BigInteger
|
||||
*/
|
||||
|
||||
namespace phpseclib\Crypt\EC\Curves;
|
||||
namespace phpseclib3\Crypt\EC\Curves;
|
||||
|
||||
use phpseclib\Crypt\EC\BaseCurves\Prime;
|
||||
use phpseclib\Math\BigInteger;
|
||||
use phpseclib3\Crypt\EC\BaseCurves\Prime;
|
||||
use phpseclib3\Math\BigInteger;
|
||||
|
||||
class secp112r1 extends Prime
|
||||
{
|
||||
|
@ -13,10 +13,10 @@
|
||||
* @link http://pear.php.net/package/Math_BigInteger
|
||||
*/
|
||||
|
||||
namespace phpseclib\Crypt\EC\Curves;
|
||||
namespace phpseclib3\Crypt\EC\Curves;
|
||||
|
||||
use phpseclib\Crypt\EC\BaseCurves\Prime;
|
||||
use phpseclib\Math\BigInteger;
|
||||
use phpseclib3\Crypt\EC\BaseCurves\Prime;
|
||||
use phpseclib3\Math\BigInteger;
|
||||
|
||||
class secp112r2 extends Prime
|
||||
{
|
||||
|
@ -13,10 +13,10 @@
|
||||
* @link http://pear.php.net/package/Math_BigInteger
|
||||
*/
|
||||
|
||||
namespace phpseclib\Crypt\EC\Curves;
|
||||
namespace phpseclib3\Crypt\EC\Curves;
|
||||
|
||||
use phpseclib\Crypt\EC\BaseCurves\Prime;
|
||||
use phpseclib\Math\BigInteger;
|
||||
use phpseclib3\Crypt\EC\BaseCurves\Prime;
|
||||
use phpseclib3\Math\BigInteger;
|
||||
|
||||
class secp128r1 extends Prime
|
||||
{
|
||||
|
@ -13,10 +13,10 @@
|
||||
* @link http://pear.php.net/package/Math_BigInteger
|
||||
*/
|
||||
|
||||
namespace phpseclib\Crypt\EC\Curves;
|
||||
namespace phpseclib3\Crypt\EC\Curves;
|
||||
|
||||
use phpseclib\Crypt\EC\BaseCurves\Prime;
|
||||
use phpseclib\Math\BigInteger;
|
||||
use phpseclib3\Crypt\EC\BaseCurves\Prime;
|
||||
use phpseclib3\Math\BigInteger;
|
||||
|
||||
class secp128r2 extends Prime
|
||||
{
|
||||
|
@ -13,10 +13,10 @@
|
||||
* @link http://pear.php.net/package/Math_BigInteger
|
||||
*/
|
||||
|
||||
namespace phpseclib\Crypt\EC\Curves;
|
||||
namespace phpseclib3\Crypt\EC\Curves;
|
||||
|
||||
use phpseclib\Crypt\EC\BaseCurves\KoblitzPrime;
|
||||
use phpseclib\Math\BigInteger;
|
||||
use phpseclib3\Crypt\EC\BaseCurves\KoblitzPrime;
|
||||
use phpseclib3\Math\BigInteger;
|
||||
|
||||
class secp160k1 extends KoblitzPrime
|
||||
{
|
||||
|
@ -13,10 +13,10 @@
|
||||
* @link http://pear.php.net/package/Math_BigInteger
|
||||
*/
|
||||
|
||||
namespace phpseclib\Crypt\EC\Curves;
|
||||
namespace phpseclib3\Crypt\EC\Curves;
|
||||
|
||||
use phpseclib\Crypt\EC\BaseCurves\Prime;
|
||||
use phpseclib\Math\BigInteger;
|
||||
use phpseclib3\Crypt\EC\BaseCurves\Prime;
|
||||
use phpseclib3\Math\BigInteger;
|
||||
|
||||
class secp160r1 extends Prime
|
||||
{
|
||||
|
@ -13,10 +13,10 @@
|
||||
* @link http://pear.php.net/package/Math_BigInteger
|
||||
*/
|
||||
|
||||
namespace phpseclib\Crypt\EC\Curves;
|
||||
namespace phpseclib3\Crypt\EC\Curves;
|
||||
|
||||
use phpseclib\Crypt\EC\BaseCurves\Prime;
|
||||
use phpseclib\Math\BigInteger;
|
||||
use phpseclib3\Crypt\EC\BaseCurves\Prime;
|
||||
use phpseclib3\Math\BigInteger;
|
||||
|
||||
class secp160r2 extends Prime
|
||||
{
|
||||
|
@ -13,10 +13,10 @@
|
||||
* @link http://pear.php.net/package/Math_BigInteger
|
||||
*/
|
||||
|
||||
namespace phpseclib\Crypt\EC\Curves;
|
||||
namespace phpseclib3\Crypt\EC\Curves;
|
||||
|
||||
use phpseclib\Crypt\EC\BaseCurves\KoblitzPrime;
|
||||
use phpseclib\Math\BigInteger;
|
||||
use phpseclib3\Crypt\EC\BaseCurves\KoblitzPrime;
|
||||
use phpseclib3\Math\BigInteger;
|
||||
|
||||
class secp192k1 extends KoblitzPrime
|
||||
{
|
||||
|
@ -15,10 +15,10 @@
|
||||
* @link http://pear.php.net/package/Math_BigInteger
|
||||
*/
|
||||
|
||||
namespace phpseclib\Crypt\EC\Curves;
|
||||
namespace phpseclib3\Crypt\EC\Curves;
|
||||
|
||||
use phpseclib\Crypt\EC\BaseCurves\Prime;
|
||||
use phpseclib\Math\BigInteger;
|
||||
use phpseclib3\Crypt\EC\BaseCurves\Prime;
|
||||
use phpseclib3\Math\BigInteger;
|
||||
|
||||
class secp192r1 extends Prime
|
||||
{
|
||||
|
@ -13,10 +13,10 @@
|
||||
* @link http://pear.php.net/package/Math_BigInteger
|
||||
*/
|
||||
|
||||
namespace phpseclib\Crypt\EC\Curves;
|
||||
namespace phpseclib3\Crypt\EC\Curves;
|
||||
|
||||
use phpseclib\Crypt\EC\BaseCurves\KoblitzPrime;
|
||||
use phpseclib\Math\BigInteger;
|
||||
use phpseclib3\Crypt\EC\BaseCurves\KoblitzPrime;
|
||||
use phpseclib3\Math\BigInteger;
|
||||
|
||||
class secp224k1 extends KoblitzPrime
|
||||
{
|
||||
|
@ -13,10 +13,10 @@
|
||||
* @link http://pear.php.net/package/Math_BigInteger
|
||||
*/
|
||||
|
||||
namespace phpseclib\Crypt\EC\Curves;
|
||||
namespace phpseclib3\Crypt\EC\Curves;
|
||||
|
||||
use phpseclib\Crypt\EC\BaseCurves\Prime;
|
||||
use phpseclib\Math\BigInteger;
|
||||
use phpseclib3\Crypt\EC\BaseCurves\Prime;
|
||||
use phpseclib3\Math\BigInteger;
|
||||
|
||||
class secp224r1 extends Prime
|
||||
{
|
||||
|
@ -15,11 +15,11 @@
|
||||
* @link http://pear.php.net/package/Math_BigInteger
|
||||
*/
|
||||
|
||||
namespace phpseclib\Crypt\EC\Curves;
|
||||
namespace phpseclib3\Crypt\EC\Curves;
|
||||
|
||||
//use phpseclib\Crypt\EC\BaseCurves\Prime;
|
||||
use phpseclib\Crypt\EC\BaseCurves\KoblitzPrime;
|
||||
use phpseclib\Math\BigInteger;
|
||||
//use phpseclib3\Crypt\EC\BaseCurves\Prime;
|
||||
use phpseclib3\Crypt\EC\BaseCurves\KoblitzPrime;
|
||||
use phpseclib3\Math\BigInteger;
|
||||
|
||||
//class secp256k1 extends Prime
|
||||
class secp256k1 extends KoblitzPrime
|
||||
|
@ -13,10 +13,10 @@
|
||||
* @link http://pear.php.net/package/Math_BigInteger
|
||||
*/
|
||||
|
||||
namespace phpseclib\Crypt\EC\Curves;
|
||||
namespace phpseclib3\Crypt\EC\Curves;
|
||||
|
||||
use phpseclib\Crypt\EC\BaseCurves\Prime;
|
||||
use phpseclib\Math\BigInteger;
|
||||
use phpseclib3\Crypt\EC\BaseCurves\Prime;
|
||||
use phpseclib3\Math\BigInteger;
|
||||
|
||||
class secp256r1 extends Prime
|
||||
{
|
||||
|
@ -13,10 +13,10 @@
|
||||
* @link http://pear.php.net/package/Math_BigInteger
|
||||
*/
|
||||
|
||||
namespace phpseclib\Crypt\EC\Curves;
|
||||
namespace phpseclib3\Crypt\EC\Curves;
|
||||
|
||||
use phpseclib\Crypt\EC\BaseCurves\Prime;
|
||||
use phpseclib\Math\BigInteger;
|
||||
use phpseclib3\Crypt\EC\BaseCurves\Prime;
|
||||
use phpseclib3\Math\BigInteger;
|
||||
|
||||
class secp384r1 extends Prime
|
||||
{
|
||||
|
@ -13,10 +13,10 @@
|
||||
* @link http://pear.php.net/package/Math_BigInteger
|
||||
*/
|
||||
|
||||
namespace phpseclib\Crypt\EC\Curves;
|
||||
namespace phpseclib3\Crypt\EC\Curves;
|
||||
|
||||
use phpseclib\Crypt\EC\BaseCurves\Prime;
|
||||
use phpseclib\Math\BigInteger;
|
||||
use phpseclib3\Crypt\EC\BaseCurves\Prime;
|
||||
use phpseclib3\Math\BigInteger;
|
||||
|
||||
class secp521r1 extends Prime
|
||||
{
|
||||
|
@ -13,10 +13,10 @@
|
||||
* @link http://pear.php.net/package/Math_BigInteger
|
||||
*/
|
||||
|
||||
namespace phpseclib\Crypt\EC\Curves;
|
||||
namespace phpseclib3\Crypt\EC\Curves;
|
||||
|
||||
use phpseclib\Crypt\EC\BaseCurves\Binary;
|
||||
use phpseclib\Math\BigInteger;
|
||||
use phpseclib3\Crypt\EC\BaseCurves\Binary;
|
||||
use phpseclib3\Math\BigInteger;
|
||||
|
||||
class sect113r1 extends Binary
|
||||
{
|
||||
|
@ -13,10 +13,10 @@
|
||||
* @link http://pear.php.net/package/Math_BigInteger
|
||||
*/
|
||||
|
||||
namespace phpseclib\Crypt\EC\Curves;
|
||||
namespace phpseclib3\Crypt\EC\Curves;
|
||||
|
||||
use phpseclib\Crypt\EC\BaseCurves\Binary;
|
||||
use phpseclib\Math\BigInteger;
|
||||
use phpseclib3\Crypt\EC\BaseCurves\Binary;
|
||||
use phpseclib3\Math\BigInteger;
|
||||
|
||||
class sect113r2 extends Binary
|
||||
{
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user