From 289ae55f9fcfe4d0d1ce72ff4f85e3f69fd1e7d7 Mon Sep 17 00:00:00 2001 From: terrafrost Date: Thu, 27 Jun 2019 19:10:40 -0500 Subject: [PATCH] rename ECDSA -> EC --- .../Crypt/DSA/Formats/Signature/ASN1.php | 2 +- phpseclib/Crypt/DSA/PrivateKey.php | 2 +- phpseclib/Crypt/DSA/PublicKey.php | 2 +- phpseclib/Crypt/{ECDSA.php => EC.php} | 40 ++++++++--------- .../Crypt/{ECDSA => EC}/BaseCurves/Base.php | 4 +- .../Crypt/{ECDSA => EC}/BaseCurves/Binary.php | 4 +- .../{ECDSA => EC}/BaseCurves/KoblitzPrime.php | 4 +- .../Crypt/{ECDSA => EC}/BaseCurves/Prime.php | 4 +- .../BaseCurves/TwistedEdwards.php | 4 +- .../Crypt/{ECDSA => EC}/Curves/Ed25519.php | 8 ++-- .../Crypt/{ECDSA => EC}/Curves/Ed448.php | 8 ++-- .../{ECDSA => EC}/Curves/brainpoolP160r1.php | 6 +-- .../{ECDSA => EC}/Curves/brainpoolP160t1.php | 6 +-- .../{ECDSA => EC}/Curves/brainpoolP192r1.php | 6 +-- .../{ECDSA => EC}/Curves/brainpoolP192t1.php | 6 +-- .../{ECDSA => EC}/Curves/brainpoolP224r1.php | 6 +-- .../{ECDSA => EC}/Curves/brainpoolP224t1.php | 6 +-- .../{ECDSA => EC}/Curves/brainpoolP256r1.php | 6 +-- .../{ECDSA => EC}/Curves/brainpoolP256t1.php | 6 +-- .../{ECDSA => EC}/Curves/brainpoolP320r1.php | 6 +-- .../{ECDSA => EC}/Curves/brainpoolP320t1.php | 6 +-- .../{ECDSA => EC}/Curves/brainpoolP384r1.php | 6 +-- .../{ECDSA => EC}/Curves/brainpoolP384t1.php | 6 +-- .../{ECDSA => EC}/Curves/brainpoolP512r1.php | 6 +-- .../{ECDSA => EC}/Curves/brainpoolP512t1.php | 6 +-- .../Crypt/{ECDSA => EC}/Curves/nistb233.php | 4 +- .../Crypt/{ECDSA => EC}/Curves/nistb409.php | 4 +- .../Crypt/{ECDSA => EC}/Curves/nistk163.php | 4 +- .../Crypt/{ECDSA => EC}/Curves/nistk233.php | 4 +- .../Crypt/{ECDSA => EC}/Curves/nistk283.php | 4 +- .../Crypt/{ECDSA => EC}/Curves/nistk409.php | 4 +- .../Crypt/{ECDSA => EC}/Curves/nistp192.php | 4 +- .../Crypt/{ECDSA => EC}/Curves/nistp224.php | 4 +- .../Crypt/{ECDSA => EC}/Curves/nistp256.php | 4 +- .../Crypt/{ECDSA => EC}/Curves/nistp384.php | 4 +- .../Crypt/{ECDSA => EC}/Curves/nistp521.php | 4 +- .../Crypt/{ECDSA => EC}/Curves/nistt571.php | 4 +- .../Crypt/{ECDSA => EC}/Curves/prime192v1.php | 4 +- .../Crypt/{ECDSA => EC}/Curves/prime192v2.php | 6 +-- .../Crypt/{ECDSA => EC}/Curves/prime192v3.php | 6 +-- .../Crypt/{ECDSA => EC}/Curves/prime239v1.php | 6 +-- .../Crypt/{ECDSA => EC}/Curves/prime239v2.php | 6 +-- .../Crypt/{ECDSA => EC}/Curves/prime239v3.php | 6 +-- .../Crypt/{ECDSA => EC}/Curves/prime256v1.php | 4 +- .../Crypt/{ECDSA => EC}/Curves/secp112r1.php | 6 +-- .../Crypt/{ECDSA => EC}/Curves/secp112r2.php | 6 +-- .../Crypt/{ECDSA => EC}/Curves/secp128r1.php | 6 +-- .../Crypt/{ECDSA => EC}/Curves/secp128r2.php | 6 +-- .../Crypt/{ECDSA => EC}/Curves/secp160k1.php | 6 +-- .../Crypt/{ECDSA => EC}/Curves/secp160r1.php | 6 +-- .../Crypt/{ECDSA => EC}/Curves/secp160r2.php | 6 +-- .../Crypt/{ECDSA => EC}/Curves/secp192k1.php | 6 +-- .../Crypt/{ECDSA => EC}/Curves/secp192r1.php | 6 +-- .../Crypt/{ECDSA => EC}/Curves/secp224k1.php | 6 +-- .../Crypt/{ECDSA => EC}/Curves/secp224r1.php | 6 +-- .../Crypt/{ECDSA => EC}/Curves/secp256k1.php | 8 ++-- .../Crypt/{ECDSA => EC}/Curves/secp256r1.php | 6 +-- .../Crypt/{ECDSA => EC}/Curves/secp384r1.php | 6 +-- .../Crypt/{ECDSA => EC}/Curves/secp521r1.php | 6 +-- .../Crypt/{ECDSA => EC}/Curves/sect113r1.php | 6 +-- .../Crypt/{ECDSA => EC}/Curves/sect113r2.php | 6 +-- .../Crypt/{ECDSA => EC}/Curves/sect131r1.php | 6 +-- .../Crypt/{ECDSA => EC}/Curves/sect131r2.php | 6 +-- .../Crypt/{ECDSA => EC}/Curves/sect163k1.php | 6 +-- .../Crypt/{ECDSA => EC}/Curves/sect163r1.php | 6 +-- .../Crypt/{ECDSA => EC}/Curves/sect163r2.php | 6 +-- .../Crypt/{ECDSA => EC}/Curves/sect193r1.php | 6 +-- .../Crypt/{ECDSA => EC}/Curves/sect193r2.php | 6 +-- .../Crypt/{ECDSA => EC}/Curves/sect233k1.php | 6 +-- .../Crypt/{ECDSA => EC}/Curves/sect233r1.php | 6 +-- .../Crypt/{ECDSA => EC}/Curves/sect239k1.php | 6 +-- .../Crypt/{ECDSA => EC}/Curves/sect283k1.php | 6 +-- .../Crypt/{ECDSA => EC}/Curves/sect283r1.php | 6 +-- .../Crypt/{ECDSA => EC}/Curves/sect409k1.php | 6 +-- .../Crypt/{ECDSA => EC}/Curves/sect409r1.php | 6 +-- .../Crypt/{ECDSA => EC}/Curves/sect571k1.php | 6 +-- .../Crypt/{ECDSA => EC}/Curves/sect571r1.php | 6 +-- .../{ECDSA => EC}/Formats/Keys/Common.php | 34 +++++++------- .../{ECDSA => EC}/Formats/Keys/OpenSSH.php | 22 +++++----- .../{ECDSA => EC}/Formats/Keys/PKCS1.php | 18 ++++---- .../{ECDSA => EC}/Formats/Keys/PKCS8.php | 24 +++++----- .../{ECDSA => EC}/Formats/Keys/PuTTY.php | 22 +++++----- .../Crypt/{ECDSA => EC}/Formats/Keys/XML.php | 36 +++++++-------- .../{ECDSA => EC}/Formats/Keys/libsodium.php | 14 +++--- .../{ECDSA => EC}/Formats/Signature/ASN1.php | 2 +- .../{ECDSA => EC}/Formats/Signature/Raw.php | 6 +-- .../{ECDSA => EC}/Formats/Signature/SSH2.php | 2 +- phpseclib/Crypt/{ECDSA => EC}/Parameters.php | 14 +++--- phpseclib/Crypt/{ECDSA => EC}/PrivateKey.php | 26 +++++------ phpseclib/Crypt/{ECDSA => EC}/PublicKey.php | 24 +++++----- phpseclib/Crypt/PublicKeyLoader.php | 2 +- phpseclib/File/X509.php | 14 +++--- phpseclib/Net/SSH2.php | 8 ++-- tests/Unit/Crypt/{ECDSA => EC}/CurveTest.php | 44 +++++++++---------- tests/Unit/Crypt/{ECDSA => EC}/KeyTest.php | 18 ++++---- tests/Unit/File/X509/X509Test.php | 4 +- 96 files changed, 393 insertions(+), 393 deletions(-) rename phpseclib/Crypt/{ECDSA.php => EC.php} (91%) rename phpseclib/Crypt/{ECDSA => EC}/BaseCurves/Base.php (98%) rename phpseclib/Crypt/{ECDSA => EC}/BaseCurves/Binary.php (99%) rename phpseclib/Crypt/{ECDSA => EC}/BaseCurves/KoblitzPrime.php (99%) rename phpseclib/Crypt/{ECDSA => EC}/BaseCurves/Prime.php (99%) rename phpseclib/Crypt/{ECDSA => EC}/BaseCurves/TwistedEdwards.php (98%) rename phpseclib/Crypt/{ECDSA => EC}/Curves/Ed25519.php (98%) rename phpseclib/Crypt/{ECDSA => EC}/Curves/Ed448.php (94%) rename phpseclib/Crypt/{ECDSA => EC}/Curves/brainpoolP160r1.php (87%) rename phpseclib/Crypt/{ECDSA => EC}/Curves/brainpoolP160t1.php (91%) rename phpseclib/Crypt/{ECDSA => EC}/Curves/brainpoolP192r1.php (88%) rename phpseclib/Crypt/{ECDSA => EC}/Curves/brainpoolP192t1.php (88%) rename phpseclib/Crypt/{ECDSA => EC}/Curves/brainpoolP224r1.php (88%) rename phpseclib/Crypt/{ECDSA => EC}/Curves/brainpoolP224t1.php (88%) rename phpseclib/Crypt/{ECDSA => EC}/Curves/brainpoolP256r1.php (91%) rename phpseclib/Crypt/{ECDSA => EC}/Curves/brainpoolP256t1.php (91%) rename phpseclib/Crypt/{ECDSA => EC}/Curves/brainpoolP320r1.php (90%) rename phpseclib/Crypt/{ECDSA => EC}/Curves/brainpoolP320t1.php (90%) rename phpseclib/Crypt/{ECDSA => EC}/Curves/brainpoolP384r1.php (91%) rename phpseclib/Crypt/{ECDSA => EC}/Curves/brainpoolP384t1.php (93%) rename phpseclib/Crypt/{ECDSA => EC}/Curves/brainpoolP512r1.php (91%) rename phpseclib/Crypt/{ECDSA => EC}/Curves/brainpoolP512t1.php (91%) rename phpseclib/Crypt/{ECDSA => EC}/Curves/nistb233.php (84%) rename phpseclib/Crypt/{ECDSA => EC}/Curves/nistb409.php (84%) rename phpseclib/Crypt/{ECDSA => EC}/Curves/nistk163.php (84%) rename phpseclib/Crypt/{ECDSA => EC}/Curves/nistk233.php (84%) rename phpseclib/Crypt/{ECDSA => EC}/Curves/nistk283.php (85%) rename phpseclib/Crypt/{ECDSA => EC}/Curves/nistk409.php (84%) rename phpseclib/Crypt/{ECDSA => EC}/Curves/nistp192.php (84%) rename phpseclib/Crypt/{ECDSA => EC}/Curves/nistp224.php (84%) rename phpseclib/Crypt/{ECDSA => EC}/Curves/nistp256.php (84%) rename phpseclib/Crypt/{ECDSA => EC}/Curves/nistp384.php (84%) rename phpseclib/Crypt/{ECDSA => EC}/Curves/nistp521.php (84%) rename phpseclib/Crypt/{ECDSA => EC}/Curves/nistt571.php (84%) rename phpseclib/Crypt/{ECDSA => EC}/Curves/prime192v1.php (85%) rename phpseclib/Crypt/{ECDSA => EC}/Curves/prime192v2.php (90%) rename phpseclib/Crypt/{ECDSA => EC}/Curves/prime192v3.php (90%) rename phpseclib/Crypt/{ECDSA => EC}/Curves/prime239v1.php (91%) rename phpseclib/Crypt/{ECDSA => EC}/Curves/prime239v2.php (91%) rename phpseclib/Crypt/{ECDSA => EC}/Curves/prime239v3.php (91%) rename phpseclib/Crypt/{ECDSA => EC}/Curves/prime256v1.php (85%) rename phpseclib/Crypt/{ECDSA => EC}/Curves/secp112r1.php (89%) rename phpseclib/Crypt/{ECDSA => EC}/Curves/secp112r2.php (90%) rename phpseclib/Crypt/{ECDSA => EC}/Curves/secp128r1.php (89%) rename phpseclib/Crypt/{ECDSA => EC}/Curves/secp128r2.php (90%) rename phpseclib/Crypt/{ECDSA => EC}/Curves/secp160k1.php (93%) rename phpseclib/Crypt/{ECDSA => EC}/Curves/secp160r1.php (90%) rename phpseclib/Crypt/{ECDSA => EC}/Curves/secp160r2.php (90%) rename phpseclib/Crypt/{ECDSA => EC}/Curves/secp192k1.php (93%) rename phpseclib/Crypt/{ECDSA => EC}/Curves/secp192r1.php (96%) rename phpseclib/Crypt/{ECDSA => EC}/Curves/secp224k1.php (93%) rename phpseclib/Crypt/{ECDSA => EC}/Curves/secp224r1.php (91%) rename phpseclib/Crypt/{ECDSA => EC}/Curves/secp256k1.php (91%) rename phpseclib/Crypt/{ECDSA => EC}/Curves/secp256r1.php (91%) rename phpseclib/Crypt/{ECDSA => EC}/Curves/secp384r1.php (93%) rename phpseclib/Crypt/{ECDSA => EC}/Curves/secp521r1.php (94%) rename phpseclib/Crypt/{ECDSA => EC}/Curves/sect113r1.php (88%) rename phpseclib/Crypt/{ECDSA => EC}/Curves/sect113r2.php (88%) rename phpseclib/Crypt/{ECDSA => EC}/Curves/sect131r1.php (88%) rename phpseclib/Crypt/{ECDSA => EC}/Curves/sect131r2.php (88%) rename phpseclib/Crypt/{ECDSA => EC}/Curves/sect163k1.php (89%) rename phpseclib/Crypt/{ECDSA => EC}/Curves/sect163r1.php (89%) rename phpseclib/Crypt/{ECDSA => EC}/Curves/sect163r2.php (85%) rename phpseclib/Crypt/{ECDSA => EC}/Curves/sect193r1.php (86%) rename phpseclib/Crypt/{ECDSA => EC}/Curves/sect193r2.php (86%) rename phpseclib/Crypt/{ECDSA => EC}/Curves/sect233k1.php (86%) rename phpseclib/Crypt/{ECDSA => EC}/Curves/sect233r1.php (86%) rename phpseclib/Crypt/{ECDSA => EC}/Curves/sect239k1.php (87%) rename phpseclib/Crypt/{ECDSA => EC}/Curves/sect283k1.php (87%) rename phpseclib/Crypt/{ECDSA => EC}/Curves/sect283r1.php (87%) rename phpseclib/Crypt/{ECDSA => EC}/Curves/sect409k1.php (89%) rename phpseclib/Crypt/{ECDSA => EC}/Curves/sect409r1.php (89%) rename phpseclib/Crypt/{ECDSA => EC}/Curves/sect571k1.php (90%) rename phpseclib/Crypt/{ECDSA => EC}/Curves/sect571r1.php (90%) rename phpseclib/Crypt/{ECDSA => EC}/Formats/Keys/Common.php (96%) rename phpseclib/Crypt/{ECDSA => EC}/Formats/Keys/OpenSSH.php (92%) rename phpseclib/Crypt/{ECDSA => EC}/Formats/Keys/PKCS1.php (90%) rename phpseclib/Crypt/{ECDSA => EC}/Formats/Keys/PKCS8.php (93%) rename phpseclib/Crypt/{ECDSA => EC}/Formats/Keys/PuTTY.php (88%) rename phpseclib/Crypt/{ECDSA => EC}/Formats/Keys/XML.php (94%) rename phpseclib/Crypt/{ECDSA => EC}/Formats/Keys/libsodium.php (91%) rename phpseclib/Crypt/{ECDSA => EC}/Formats/Signature/ASN1.php (96%) rename phpseclib/Crypt/{ECDSA => EC}/Formats/Signature/Raw.php (83%) rename phpseclib/Crypt/{ECDSA => EC}/Formats/Signature/SSH2.php (97%) rename phpseclib/Crypt/{ECDSA => EC}/Parameters.php (80%) rename phpseclib/Crypt/{ECDSA => EC}/PrivateKey.php (92%) rename phpseclib/Crypt/{ECDSA => EC}/PublicKey.php (90%) rename tests/Unit/Crypt/{ECDSA => EC}/CurveTest.php (95%) rename tests/Unit/Crypt/{ECDSA => EC}/KeyTest.php (98%) diff --git a/phpseclib/Crypt/DSA/Formats/Signature/ASN1.php b/phpseclib/Crypt/DSA/Formats/Signature/ASN1.php index 701db5ee..9a6cbc56 100644 --- a/phpseclib/Crypt/DSA/Formats/Signature/ASN1.php +++ b/phpseclib/Crypt/DSA/Formats/Signature/ASN1.php @@ -63,6 +63,6 @@ abstract class ASN1 */ public static function save(BigInteger $r, BigInteger $s) { - return ASN1::encodeDER(compact('r', 's'), Maps\DssSigValue::MAP); + return Encoder::encodeDER(compact('r', 's'), Maps\DssSigValue::MAP); } } diff --git a/phpseclib/Crypt/DSA/PrivateKey.php b/phpseclib/Crypt/DSA/PrivateKey.php index cd43a698..cf0272cb 100644 --- a/phpseclib/Crypt/DSA/PrivateKey.php +++ b/phpseclib/Crypt/DSA/PrivateKey.php @@ -14,7 +14,7 @@ namespace phpseclib\Crypt\DSA; use phpseclib\Crypt\DSA; -use phpseclib\Crypt\ECDSA\Formats\Signature\ASN1 as ASN1Signature; +use phpseclib\Crypt\DSA\Formats\Signature\ASN1 as ASN1Signature; use phpseclib\Math\BigInteger; use phpseclib\Crypt\Common; diff --git a/phpseclib/Crypt/DSA/PublicKey.php b/phpseclib/Crypt/DSA/PublicKey.php index ee3aeedc..580abf03 100644 --- a/phpseclib/Crypt/DSA/PublicKey.php +++ b/phpseclib/Crypt/DSA/PublicKey.php @@ -14,7 +14,7 @@ namespace phpseclib\Crypt\DSA; use phpseclib\Crypt\DSA; -use phpseclib\Crypt\ECDSA\Formats\Signature\ASN1 as ASN1Signature; +use phpseclib\Crypt\DSA\Formats\Signature\ASN1 as ASN1Signature; use phpseclib\Crypt\Common; /** diff --git a/phpseclib/Crypt/ECDSA.php b/phpseclib/Crypt/EC.php similarity index 91% rename from phpseclib/Crypt/ECDSA.php rename to phpseclib/Crypt/EC.php index 02980471..f86795f7 100644 --- a/phpseclib/Crypt/ECDSA.php +++ b/phpseclib/Crypt/EC.php @@ -1,7 +1,7 @@ getPublicKey(); * * $plaintext = 'terrafrost'; @@ -22,7 +22,7 @@ * * * @category Crypt - * @package ECDSA + * @package EC * @author Jim Wigginton * @copyright 2016 Jim Wigginton * @license http://www.opensource.org/licenses/mit-license.html MIT License @@ -32,26 +32,26 @@ namespace phpseclib\Crypt; use phpseclib\Crypt\Common\AsymmetricKey; -use phpseclib\Crypt\ECDSA\PrivateKey; -use phpseclib\Crypt\ECDSA\PublicKey; -use phpseclib\Crypt\ECDSA\Parameters; -use phpseclib\Crypt\ECDSA\BaseCurves\TwistedEdwards as TwistedEdwardsCurve; -use phpseclib\Crypt\ECDSA\Curves\Ed25519; -use phpseclib\Crypt\ECDSA\Curves\Ed448; -use phpseclib\Crypt\ECDSA\Formats\Keys\PKCS1; +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\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\Exception\UnsupportedCurveException; use phpseclib\Exception\UnsupportedAlgorithmException; /** - * Pure-PHP implementation of ECDSA. + * Pure-PHP implementation of EC. * - * @package ECDSA + * @package EC * @author Jim Wigginton * @access public */ -abstract class ECDSA extends AsymmetricKey +abstract class EC extends AsymmetricKey { /** * Algorithm Name @@ -59,7 +59,7 @@ abstract class ECDSA extends AsymmetricKey * @var string * @access private */ - const ALGORITHM = 'ECDSA'; + const ALGORITHM = 'EC'; /** * Public Key QA @@ -71,7 +71,7 @@ abstract class ECDSA extends AsymmetricKey /** * Curve * - * @var \phpseclib\Crypt\ECDSA\BaseCurves\Base + * @var \phpseclib\Crypt\EC\BaseCurves\Base */ protected $curve; @@ -131,7 +131,7 @@ abstract class ECDSA extends AsymmetricKey * * @access public * @param string $curve - * @return \phpseclib\Crypt\ECDSA\PrivateKey + * @return \phpseclib\Crypt\EC\PrivateKey */ public static function createKey($curve) { @@ -145,8 +145,8 @@ abstract class ECDSA extends AsymmetricKey if (self::$engines['libsodium'] && $curve == 'ed25519' && function_exists('sodium_crypto_sign_keypair')) { $kp = sodium_crypto_sign_keypair(); - $privatekey = ECDSA::load(sodium_crypto_sign_secretkey($kp), 'libsodium'); - //$publickey = ECDSA::load(sodium_crypto_sign_publickey($kp), 'libsodium'); + $privatekey = EC::load(sodium_crypto_sign_secretkey($kp), 'libsodium'); + //$publickey = EC::load(sodium_crypto_sign_publickey($kp), 'libsodium'); $privatekey->curveName = 'Ed25519'; //$publickey->curveName = $curve; @@ -157,7 +157,7 @@ abstract class ECDSA extends AsymmetricKey $privatekey = new PrivateKey; $curveName = $curve; - $curve = '\phpseclib\Crypt\ECDSA\Curves\\' . $curve; + $curve = '\phpseclib\Crypt\EC\Curves\\' . $curve; if (!class_exists($curve)) { throw new UnsupportedCurveException('Named Curve of ' . $curveName . ' is not supported'); } @@ -331,7 +331,7 @@ abstract class ECDSA extends AsymmetricKey $key = $type::saveParameters($this->curve); - return ECDSA::load($key, 'PKCS1') + return EC::load($key, 'PKCS1') ->withHash($this->hash->getHash()) ->withSignatureFormat($this->shortFormat); } diff --git a/phpseclib/Crypt/ECDSA/BaseCurves/Base.php b/phpseclib/Crypt/EC/BaseCurves/Base.php similarity index 98% rename from phpseclib/Crypt/ECDSA/BaseCurves/Base.php rename to phpseclib/Crypt/EC/BaseCurves/Base.php index 53cd59c5..b094e012 100644 --- a/phpseclib/Crypt/ECDSA/BaseCurves/Base.php +++ b/phpseclib/Crypt/EC/BaseCurves/Base.php @@ -6,14 +6,14 @@ * PHP version 5 and 7 * * @category Crypt - * @package ECDSA + * @package EC * @author Jim Wigginton * @copyright 2017 Jim Wigginton * @license http://www.opensource.org/licenses/mit-license.html MIT License * @link http://pear.php.net/package/Math_BigInteger */ -namespace phpseclib\Crypt\ECDSA\BaseCurves; +namespace phpseclib\Crypt\EC\BaseCurves; use phpseclib\Math\Common\FiniteField; use phpseclib\Math\BigInteger; diff --git a/phpseclib/Crypt/ECDSA/BaseCurves/Binary.php b/phpseclib/Crypt/EC/BaseCurves/Binary.php similarity index 99% rename from phpseclib/Crypt/ECDSA/BaseCurves/Binary.php rename to phpseclib/Crypt/EC/BaseCurves/Binary.php index bbfeb8c1..99e9f91a 100644 --- a/phpseclib/Crypt/ECDSA/BaseCurves/Binary.php +++ b/phpseclib/Crypt/EC/BaseCurves/Binary.php @@ -14,14 +14,14 @@ * PHP version 5 and 7 * * @category Crypt - * @package ECDSA + * @package EC * @author Jim Wigginton * @copyright 2017 Jim Wigginton * @license http://www.opensource.org/licenses/mit-license.html MIT License * @link http://pear.php.net/package/Math_BigInteger */ -namespace phpseclib\Crypt\ECDSA\BaseCurves; +namespace phpseclib\Crypt\EC\BaseCurves; use phpseclib\Common\Functions\Strings; use phpseclib\Math\BinaryField; diff --git a/phpseclib/Crypt/ECDSA/BaseCurves/KoblitzPrime.php b/phpseclib/Crypt/EC/BaseCurves/KoblitzPrime.php similarity index 99% rename from phpseclib/Crypt/ECDSA/BaseCurves/KoblitzPrime.php rename to phpseclib/Crypt/EC/BaseCurves/KoblitzPrime.php index f6a680a0..2310da06 100644 --- a/phpseclib/Crypt/ECDSA/BaseCurves/KoblitzPrime.php +++ b/phpseclib/Crypt/EC/BaseCurves/KoblitzPrime.php @@ -21,14 +21,14 @@ * PHP version 5 and 7 * * @category Crypt - * @package ECDSA + * @package EC * @author Jim Wigginton * @copyright 2017 Jim Wigginton * @license http://www.opensource.org/licenses/mit-license.html MIT License * @link http://pear.php.net/package/Math_BigInteger */ -namespace phpseclib\Crypt\ECDSA\BaseCurves; +namespace phpseclib\Crypt\EC\BaseCurves; use phpseclib\Common\Functions\Strings; use phpseclib\Math\PrimeField; diff --git a/phpseclib/Crypt/ECDSA/BaseCurves/Prime.php b/phpseclib/Crypt/EC/BaseCurves/Prime.php similarity index 99% rename from phpseclib/Crypt/ECDSA/BaseCurves/Prime.php rename to phpseclib/Crypt/EC/BaseCurves/Prime.php index dde84ce7..f1c413f9 100644 --- a/phpseclib/Crypt/ECDSA/BaseCurves/Prime.php +++ b/phpseclib/Crypt/EC/BaseCurves/Prime.php @@ -14,14 +14,14 @@ * PHP version 5 and 7 * * @category Crypt - * @package ECDSA + * @package EC * @author Jim Wigginton * @copyright 2017 Jim Wigginton * @license http://www.opensource.org/licenses/mit-license.html MIT License * @link http://pear.php.net/package/Math_BigInteger */ -namespace phpseclib\Crypt\ECDSA\BaseCurves; +namespace phpseclib\Crypt\EC\BaseCurves; use phpseclib\Math\Common\FiniteField\Integer; use phpseclib\Common\Functions\Strings; diff --git a/phpseclib/Crypt/ECDSA/BaseCurves/TwistedEdwards.php b/phpseclib/Crypt/EC/BaseCurves/TwistedEdwards.php similarity index 98% rename from phpseclib/Crypt/ECDSA/BaseCurves/TwistedEdwards.php rename to phpseclib/Crypt/EC/BaseCurves/TwistedEdwards.php index 4cd0d246..8c6d1e33 100644 --- a/phpseclib/Crypt/ECDSA/BaseCurves/TwistedEdwards.php +++ b/phpseclib/Crypt/EC/BaseCurves/TwistedEdwards.php @@ -19,14 +19,14 @@ * PHP version 5 and 7 * * @category Crypt - * @package ECDSA + * @package EC * @author Jim Wigginton * @copyright 2017 Jim Wigginton * @license http://www.opensource.org/licenses/mit-license.html MIT License * @link http://pear.php.net/package/Math_BigInteger */ -namespace phpseclib\Crypt\ECDSA\BaseCurves; +namespace phpseclib\Crypt\EC\BaseCurves; use phpseclib\Math\PrimeField; use phpseclib\Math\BigInteger; diff --git a/phpseclib/Crypt/ECDSA/Curves/Ed25519.php b/phpseclib/Crypt/EC/Curves/Ed25519.php similarity index 98% rename from phpseclib/Crypt/ECDSA/Curves/Ed25519.php rename to phpseclib/Crypt/EC/Curves/Ed25519.php index 837a0053..98e474a9 100644 --- a/phpseclib/Crypt/ECDSA/Curves/Ed25519.php +++ b/phpseclib/Crypt/EC/Curves/Ed25519.php @@ -6,15 +6,15 @@ * PHP version 5 and 7 * * @category Crypt - * @package ECDSA + * @package EC * @author Jim Wigginton * @copyright 2017 Jim Wigginton * @license http://www.opensource.org/licenses/mit-license.html MIT License */ -namespace phpseclib\Crypt\ECDSA\Curves; +namespace phpseclib\Crypt\EC\Curves; -use phpseclib\Crypt\ECDSA\BaseCurves\TwistedEdwards; +use phpseclib\Crypt\EC\BaseCurves\TwistedEdwards; use phpseclib\Math\BigInteger; use phpseclib\Crypt\Hash; use phpseclib\Crypt\Random; @@ -100,7 +100,7 @@ class Ed25519 extends TwistedEdwards * * Implements steps 2-4 at https://tools.ietf.org/html/rfc8032#section-5.1.3 * - * Used by ECDSA\Keys\Common.php + * Used by EC\Keys\Common.php * * @param BigInteger $x * @param boolean $sign diff --git a/phpseclib/Crypt/ECDSA/Curves/Ed448.php b/phpseclib/Crypt/EC/Curves/Ed448.php similarity index 94% rename from phpseclib/Crypt/ECDSA/Curves/Ed448.php rename to phpseclib/Crypt/EC/Curves/Ed448.php index 554c5d03..168b83f4 100644 --- a/phpseclib/Crypt/ECDSA/Curves/Ed448.php +++ b/phpseclib/Crypt/EC/Curves/Ed448.php @@ -6,15 +6,15 @@ * PHP version 5 and 7 * * @category Crypt - * @package ECDSA + * @package EC * @author Jim Wigginton * @copyright 2017 Jim Wigginton * @license http://www.opensource.org/licenses/mit-license.html MIT License */ -namespace phpseclib\Crypt\ECDSA\Curves; +namespace phpseclib\Crypt\EC\Curves; -use phpseclib\Crypt\ECDSA\BaseCurves\TwistedEdwards; +use phpseclib\Crypt\EC\BaseCurves\TwistedEdwards; use phpseclib\Math\BigInteger; use phpseclib\Crypt\Hash; use phpseclib\Crypt\Random; @@ -52,7 +52,7 @@ class Ed448 extends TwistedEdwards * * Implements steps 2-4 at https://tools.ietf.org/html/rfc8032#section-5.2.3 * - * Used by ECDSA\Keys\Common.php + * Used by EC\Keys\Common.php * * @param BigInteger $x * @param boolean $sign diff --git a/phpseclib/Crypt/ECDSA/Curves/brainpoolP160r1.php b/phpseclib/Crypt/EC/Curves/brainpoolP160r1.php similarity index 87% rename from phpseclib/Crypt/ECDSA/Curves/brainpoolP160r1.php rename to phpseclib/Crypt/EC/Curves/brainpoolP160r1.php index bc07369b..0f5b6a27 100644 --- a/phpseclib/Crypt/ECDSA/Curves/brainpoolP160r1.php +++ b/phpseclib/Crypt/EC/Curves/brainpoolP160r1.php @@ -6,16 +6,16 @@ * PHP version 5 and 7 * * @category Crypt - * @package ECDSA + * @package EC * @author Jim Wigginton * @copyright 2017 Jim Wigginton * @license http://www.opensource.org/licenses/mit-license.html MIT License * @link http://pear.php.net/package/Math_BigInteger */ -namespace phpseclib\Crypt\ECDSA\Curves; +namespace phpseclib\Crypt\EC\Curves; -use phpseclib\Crypt\ECDSA\BaseCurves\Prime; +use phpseclib\Crypt\EC\BaseCurves\Prime; use phpseclib\Math\BigInteger; class brainpoolP160r1 extends Prime diff --git a/phpseclib/Crypt/ECDSA/Curves/brainpoolP160t1.php b/phpseclib/Crypt/EC/Curves/brainpoolP160t1.php similarity index 91% rename from phpseclib/Crypt/ECDSA/Curves/brainpoolP160t1.php rename to phpseclib/Crypt/EC/Curves/brainpoolP160t1.php index 55ac37fa..8f3a598d 100644 --- a/phpseclib/Crypt/ECDSA/Curves/brainpoolP160t1.php +++ b/phpseclib/Crypt/EC/Curves/brainpoolP160t1.php @@ -19,16 +19,16 @@ * PHP version 5 and 7 * * @category Crypt - * @package ECDSA + * @package EC * @author Jim Wigginton * @copyright 2017 Jim Wigginton * @license http://www.opensource.org/licenses/mit-license.html MIT License * @link http://pear.php.net/package/Math_BigInteger */ -namespace phpseclib\Crypt\ECDSA\Curves; +namespace phpseclib\Crypt\EC\Curves; -use phpseclib\Crypt\ECDSA\BaseCurves\Prime; +use phpseclib\Crypt\EC\BaseCurves\Prime; use phpseclib\Math\BigInteger; class brainpoolP160t1 extends Prime diff --git a/phpseclib/Crypt/ECDSA/Curves/brainpoolP192r1.php b/phpseclib/Crypt/EC/Curves/brainpoolP192r1.php similarity index 88% rename from phpseclib/Crypt/ECDSA/Curves/brainpoolP192r1.php rename to phpseclib/Crypt/EC/Curves/brainpoolP192r1.php index c6308d4a..505aaa1b 100644 --- a/phpseclib/Crypt/ECDSA/Curves/brainpoolP192r1.php +++ b/phpseclib/Crypt/EC/Curves/brainpoolP192r1.php @@ -6,16 +6,16 @@ * PHP version 5 and 7 * * @category Crypt - * @package ECDSA + * @package EC * @author Jim Wigginton * @copyright 2017 Jim Wigginton * @license http://www.opensource.org/licenses/mit-license.html MIT License * @link http://pear.php.net/package/Math_BigInteger */ -namespace phpseclib\Crypt\ECDSA\Curves; +namespace phpseclib\Crypt\EC\Curves; -use phpseclib\Crypt\ECDSA\BaseCurves\Prime; +use phpseclib\Crypt\EC\BaseCurves\Prime; use phpseclib\Math\BigInteger; class brainpoolP192r1 extends Prime diff --git a/phpseclib/Crypt/ECDSA/Curves/brainpoolP192t1.php b/phpseclib/Crypt/EC/Curves/brainpoolP192t1.php similarity index 88% rename from phpseclib/Crypt/ECDSA/Curves/brainpoolP192t1.php rename to phpseclib/Crypt/EC/Curves/brainpoolP192t1.php index 89d8f0c2..5e647837 100644 --- a/phpseclib/Crypt/ECDSA/Curves/brainpoolP192t1.php +++ b/phpseclib/Crypt/EC/Curves/brainpoolP192t1.php @@ -6,16 +6,16 @@ * PHP version 5 and 7 * * @category Crypt - * @package ECDSA + * @package EC * @author Jim Wigginton * @copyright 2017 Jim Wigginton * @license http://www.opensource.org/licenses/mit-license.html MIT License * @link http://pear.php.net/package/Math_BigInteger */ -namespace phpseclib\Crypt\ECDSA\Curves; +namespace phpseclib\Crypt\EC\Curves; -use phpseclib\Crypt\ECDSA\BaseCurves\Prime; +use phpseclib\Crypt\EC\BaseCurves\Prime; use phpseclib\Math\BigInteger; class brainpoolP192t1 extends Prime diff --git a/phpseclib/Crypt/ECDSA/Curves/brainpoolP224r1.php b/phpseclib/Crypt/EC/Curves/brainpoolP224r1.php similarity index 88% rename from phpseclib/Crypt/ECDSA/Curves/brainpoolP224r1.php rename to phpseclib/Crypt/EC/Curves/brainpoolP224r1.php index d74bddcc..da919576 100644 --- a/phpseclib/Crypt/ECDSA/Curves/brainpoolP224r1.php +++ b/phpseclib/Crypt/EC/Curves/brainpoolP224r1.php @@ -6,16 +6,16 @@ * PHP version 5 and 7 * * @category Crypt - * @package ECDSA + * @package EC * @author Jim Wigginton * @copyright 2017 Jim Wigginton * @license http://www.opensource.org/licenses/mit-license.html MIT License * @link http://pear.php.net/package/Math_BigInteger */ -namespace phpseclib\Crypt\ECDSA\Curves; +namespace phpseclib\Crypt\EC\Curves; -use phpseclib\Crypt\ECDSA\BaseCurves\Prime; +use phpseclib\Crypt\EC\BaseCurves\Prime; use phpseclib\Math\BigInteger; class brainpoolP224r1 extends Prime diff --git a/phpseclib/Crypt/ECDSA/Curves/brainpoolP224t1.php b/phpseclib/Crypt/EC/Curves/brainpoolP224t1.php similarity index 88% rename from phpseclib/Crypt/ECDSA/Curves/brainpoolP224t1.php rename to phpseclib/Crypt/EC/Curves/brainpoolP224t1.php index 7293b693..281fef2d 100644 --- a/phpseclib/Crypt/ECDSA/Curves/brainpoolP224t1.php +++ b/phpseclib/Crypt/EC/Curves/brainpoolP224t1.php @@ -6,16 +6,16 @@ * PHP version 5 and 7 * * @category Crypt - * @package ECDSA + * @package EC * @author Jim Wigginton * @copyright 2017 Jim Wigginton * @license http://www.opensource.org/licenses/mit-license.html MIT License * @link http://pear.php.net/package/Math_BigInteger */ -namespace phpseclib\Crypt\ECDSA\Curves; +namespace phpseclib\Crypt\EC\Curves; -use phpseclib\Crypt\ECDSA\BaseCurves\Prime; +use phpseclib\Crypt\EC\BaseCurves\Prime; use phpseclib\Math\BigInteger; class brainpoolP224t1 extends Prime diff --git a/phpseclib/Crypt/ECDSA/Curves/brainpoolP256r1.php b/phpseclib/Crypt/EC/Curves/brainpoolP256r1.php similarity index 91% rename from phpseclib/Crypt/ECDSA/Curves/brainpoolP256r1.php rename to phpseclib/Crypt/EC/Curves/brainpoolP256r1.php index f9307800..5116e974 100644 --- a/phpseclib/Crypt/ECDSA/Curves/brainpoolP256r1.php +++ b/phpseclib/Crypt/EC/Curves/brainpoolP256r1.php @@ -6,16 +6,16 @@ * PHP version 5 and 7 * * @category Crypt - * @package ECDSA + * @package EC * @author Jim Wigginton * @copyright 2017 Jim Wigginton * @license http://www.opensource.org/licenses/mit-license.html MIT License * @link http://pear.php.net/package/Math_BigInteger */ -namespace phpseclib\Crypt\ECDSA\Curves; +namespace phpseclib\Crypt\EC\Curves; -use phpseclib\Crypt\ECDSA\BaseCurves\Prime; +use phpseclib\Crypt\EC\BaseCurves\Prime; use phpseclib\Math\BigInteger; class brainpoolP256r1 extends Prime diff --git a/phpseclib/Crypt/ECDSA/Curves/brainpoolP256t1.php b/phpseclib/Crypt/EC/Curves/brainpoolP256t1.php similarity index 91% rename from phpseclib/Crypt/ECDSA/Curves/brainpoolP256t1.php rename to phpseclib/Crypt/EC/Curves/brainpoolP256t1.php index deef2eba..50846a4b 100644 --- a/phpseclib/Crypt/ECDSA/Curves/brainpoolP256t1.php +++ b/phpseclib/Crypt/EC/Curves/brainpoolP256t1.php @@ -6,16 +6,16 @@ * PHP version 5 and 7 * * @category Crypt - * @package ECDSA + * @package EC * @author Jim Wigginton * @copyright 2017 Jim Wigginton * @license http://www.opensource.org/licenses/mit-license.html MIT License * @link http://pear.php.net/package/Math_BigInteger */ -namespace phpseclib\Crypt\ECDSA\Curves; +namespace phpseclib\Crypt\EC\Curves; -use phpseclib\Crypt\ECDSA\BaseCurves\Prime; +use phpseclib\Crypt\EC\BaseCurves\Prime; use phpseclib\Math\BigInteger; class brainpoolP256t1 extends Prime diff --git a/phpseclib/Crypt/ECDSA/Curves/brainpoolP320r1.php b/phpseclib/Crypt/EC/Curves/brainpoolP320r1.php similarity index 90% rename from phpseclib/Crypt/ECDSA/Curves/brainpoolP320r1.php rename to phpseclib/Crypt/EC/Curves/brainpoolP320r1.php index d9469a06..88f48588 100644 --- a/phpseclib/Crypt/ECDSA/Curves/brainpoolP320r1.php +++ b/phpseclib/Crypt/EC/Curves/brainpoolP320r1.php @@ -6,16 +6,16 @@ * PHP version 5 and 7 * * @category Crypt - * @package ECDSA + * @package EC * @author Jim Wigginton * @copyright 2017 Jim Wigginton * @license http://www.opensource.org/licenses/mit-license.html MIT License * @link http://pear.php.net/package/Math_BigInteger */ -namespace phpseclib\Crypt\ECDSA\Curves; +namespace phpseclib\Crypt\EC\Curves; -use phpseclib\Crypt\ECDSA\BaseCurves\Prime; +use phpseclib\Crypt\EC\BaseCurves\Prime; use phpseclib\Math\BigInteger; class brainpoolP320r1 extends Prime diff --git a/phpseclib/Crypt/ECDSA/Curves/brainpoolP320t1.php b/phpseclib/Crypt/EC/Curves/brainpoolP320t1.php similarity index 90% rename from phpseclib/Crypt/ECDSA/Curves/brainpoolP320t1.php rename to phpseclib/Crypt/EC/Curves/brainpoolP320t1.php index 54bb626a..d83cee3d 100644 --- a/phpseclib/Crypt/ECDSA/Curves/brainpoolP320t1.php +++ b/phpseclib/Crypt/EC/Curves/brainpoolP320t1.php @@ -6,16 +6,16 @@ * PHP version 5 and 7 * * @category Crypt - * @package ECDSA + * @package EC * @author Jim Wigginton * @copyright 2017 Jim Wigginton * @license http://www.opensource.org/licenses/mit-license.html MIT License * @link http://pear.php.net/package/Math_BigInteger */ -namespace phpseclib\Crypt\ECDSA\Curves; +namespace phpseclib\Crypt\EC\Curves; -use phpseclib\Crypt\ECDSA\BaseCurves\Prime; +use phpseclib\Crypt\EC\BaseCurves\Prime; use phpseclib\Math\BigInteger; class brainpoolP320t1 extends Prime diff --git a/phpseclib/Crypt/ECDSA/Curves/brainpoolP384r1.php b/phpseclib/Crypt/EC/Curves/brainpoolP384r1.php similarity index 91% rename from phpseclib/Crypt/ECDSA/Curves/brainpoolP384r1.php rename to phpseclib/Crypt/EC/Curves/brainpoolP384r1.php index 534f1c67..86a4b20f 100644 --- a/phpseclib/Crypt/ECDSA/Curves/brainpoolP384r1.php +++ b/phpseclib/Crypt/EC/Curves/brainpoolP384r1.php @@ -6,16 +6,16 @@ * PHP version 5 and 7 * * @category Crypt - * @package ECDSA + * @package EC * @author Jim Wigginton * @copyright 2017 Jim Wigginton * @license http://www.opensource.org/licenses/mit-license.html MIT License * @link http://pear.php.net/package/Math_BigInteger */ -namespace phpseclib\Crypt\ECDSA\Curves; +namespace phpseclib\Crypt\EC\Curves; -use phpseclib\Crypt\ECDSA\BaseCurves\Prime; +use phpseclib\Crypt\EC\BaseCurves\Prime; use phpseclib\Math\BigInteger; class brainpoolP384r1 extends Prime diff --git a/phpseclib/Crypt/ECDSA/Curves/brainpoolP384t1.php b/phpseclib/Crypt/EC/Curves/brainpoolP384t1.php similarity index 93% rename from phpseclib/Crypt/ECDSA/Curves/brainpoolP384t1.php rename to phpseclib/Crypt/EC/Curves/brainpoolP384t1.php index 85e1885a..2e7d5d91 100644 --- a/phpseclib/Crypt/ECDSA/Curves/brainpoolP384t1.php +++ b/phpseclib/Crypt/EC/Curves/brainpoolP384t1.php @@ -6,16 +6,16 @@ * PHP version 5 and 7 * * @category Crypt - * @package ECDSA + * @package EC * @author Jim Wigginton * @copyright 2017 Jim Wigginton * @license http://www.opensource.org/licenses/mit-license.html MIT License * @link http://pear.php.net/package/Math_BigInteger */ -namespace phpseclib\Crypt\ECDSA\Curves; +namespace phpseclib\Crypt\EC\Curves; -use phpseclib\Crypt\ECDSA\BaseCurves\Prime; +use phpseclib\Crypt\EC\BaseCurves\Prime; use phpseclib\Math\BigInteger; class brainpoolP384t1 extends Prime diff --git a/phpseclib/Crypt/ECDSA/Curves/brainpoolP512r1.php b/phpseclib/Crypt/EC/Curves/brainpoolP512r1.php similarity index 91% rename from phpseclib/Crypt/ECDSA/Curves/brainpoolP512r1.php rename to phpseclib/Crypt/EC/Curves/brainpoolP512r1.php index 140f6205..9b6904cf 100644 --- a/phpseclib/Crypt/ECDSA/Curves/brainpoolP512r1.php +++ b/phpseclib/Crypt/EC/Curves/brainpoolP512r1.php @@ -6,16 +6,16 @@ * PHP version 5 and 7 * * @category Crypt - * @package ECDSA + * @package EC * @author Jim Wigginton * @copyright 2017 Jim Wigginton * @license http://www.opensource.org/licenses/mit-license.html MIT License * @link http://pear.php.net/package/Math_BigInteger */ -namespace phpseclib\Crypt\ECDSA\Curves; +namespace phpseclib\Crypt\EC\Curves; -use phpseclib\Crypt\ECDSA\BaseCurves\Prime; +use phpseclib\Crypt\EC\BaseCurves\Prime; use phpseclib\Math\BigInteger; class brainpoolP512r1 extends Prime diff --git a/phpseclib/Crypt/ECDSA/Curves/brainpoolP512t1.php b/phpseclib/Crypt/EC/Curves/brainpoolP512t1.php similarity index 91% rename from phpseclib/Crypt/ECDSA/Curves/brainpoolP512t1.php rename to phpseclib/Crypt/EC/Curves/brainpoolP512t1.php index 50432b07..83b5126d 100644 --- a/phpseclib/Crypt/ECDSA/Curves/brainpoolP512t1.php +++ b/phpseclib/Crypt/EC/Curves/brainpoolP512t1.php @@ -6,16 +6,16 @@ * PHP version 5 and 7 * * @category Crypt - * @package ECDSA + * @package EC * @author Jim Wigginton * @copyright 2017 Jim Wigginton * @license http://www.opensource.org/licenses/mit-license.html MIT License * @link http://pear.php.net/package/Math_BigInteger */ -namespace phpseclib\Crypt\ECDSA\Curves; +namespace phpseclib\Crypt\EC\Curves; -use phpseclib\Crypt\ECDSA\BaseCurves\Prime; +use phpseclib\Crypt\EC\BaseCurves\Prime; use phpseclib\Math\BigInteger; class brainpoolP512t1 extends Prime diff --git a/phpseclib/Crypt/ECDSA/Curves/nistb233.php b/phpseclib/Crypt/EC/Curves/nistb233.php similarity index 84% rename from phpseclib/Crypt/ECDSA/Curves/nistb233.php rename to phpseclib/Crypt/EC/Curves/nistb233.php index db93276e..4420bc38 100644 --- a/phpseclib/Crypt/ECDSA/Curves/nistb233.php +++ b/phpseclib/Crypt/EC/Curves/nistb233.php @@ -6,14 +6,14 @@ * PHP version 5 and 7 * * @category Crypt - * @package ECDSA + * @package EC * @author Jim Wigginton * @copyright 2017 Jim Wigginton * @license http://www.opensource.org/licenses/mit-license.html MIT License * @link http://pear.php.net/package/Math_BigInteger */ -namespace phpseclib\Crypt\ECDSA\Curves; +namespace phpseclib\Crypt\EC\Curves; final class nistb233 extends sect233r1 { diff --git a/phpseclib/Crypt/ECDSA/Curves/nistb409.php b/phpseclib/Crypt/EC/Curves/nistb409.php similarity index 84% rename from phpseclib/Crypt/ECDSA/Curves/nistb409.php rename to phpseclib/Crypt/EC/Curves/nistb409.php index 79e1f2a9..3441de97 100644 --- a/phpseclib/Crypt/ECDSA/Curves/nistb409.php +++ b/phpseclib/Crypt/EC/Curves/nistb409.php @@ -6,14 +6,14 @@ * PHP version 5 and 7 * * @category Crypt - * @package ECDSA + * @package EC * @author Jim Wigginton * @copyright 2017 Jim Wigginton * @license http://www.opensource.org/licenses/mit-license.html MIT License * @link http://pear.php.net/package/Math_BigInteger */ -namespace phpseclib\Crypt\ECDSA\Curves; +namespace phpseclib\Crypt\EC\Curves; final class nistb409 extends sect409r1 { diff --git a/phpseclib/Crypt/ECDSA/Curves/nistk163.php b/phpseclib/Crypt/EC/Curves/nistk163.php similarity index 84% rename from phpseclib/Crypt/ECDSA/Curves/nistk163.php rename to phpseclib/Crypt/EC/Curves/nistk163.php index 57bd4950..01677ce7 100644 --- a/phpseclib/Crypt/ECDSA/Curves/nistk163.php +++ b/phpseclib/Crypt/EC/Curves/nistk163.php @@ -6,14 +6,14 @@ * PHP version 5 and 7 * * @category Crypt - * @package ECDSA + * @package EC * @author Jim Wigginton * @copyright 2017 Jim Wigginton * @license http://www.opensource.org/licenses/mit-license.html MIT License * @link http://pear.php.net/package/Math_BigInteger */ -namespace phpseclib\Crypt\ECDSA\Curves; +namespace phpseclib\Crypt\EC\Curves; final class nistk163 extends sect163k1 { diff --git a/phpseclib/Crypt/ECDSA/Curves/nistk233.php b/phpseclib/Crypt/EC/Curves/nistk233.php similarity index 84% rename from phpseclib/Crypt/ECDSA/Curves/nistk233.php rename to phpseclib/Crypt/EC/Curves/nistk233.php index a6b1ab80..3f00cf01 100644 --- a/phpseclib/Crypt/ECDSA/Curves/nistk233.php +++ b/phpseclib/Crypt/EC/Curves/nistk233.php @@ -6,14 +6,14 @@ * PHP version 5 and 7 * * @category Crypt - * @package ECDSA + * @package EC * @author Jim Wigginton * @copyright 2017 Jim Wigginton * @license http://www.opensource.org/licenses/mit-license.html MIT License * @link http://pear.php.net/package/Math_BigInteger */ -namespace phpseclib\Crypt\ECDSA\Curves; +namespace phpseclib\Crypt\EC\Curves; final class nistk233 extends sect233k1 { diff --git a/phpseclib/Crypt/ECDSA/Curves/nistk283.php b/phpseclib/Crypt/EC/Curves/nistk283.php similarity index 85% rename from phpseclib/Crypt/ECDSA/Curves/nistk283.php rename to phpseclib/Crypt/EC/Curves/nistk283.php index c4ce0f92..b30fa8f9 100644 --- a/phpseclib/Crypt/ECDSA/Curves/nistk283.php +++ b/phpseclib/Crypt/EC/Curves/nistk283.php @@ -6,14 +6,14 @@ * PHP version 5 and 7 * * @category Crypt - * @package ECDSA + * @package EC * @author Jim Wigginton * @copyright 2017 Jim Wigginton * @license http://www.opensource.org/licenses/mit-license.html MIT License * @link http://pear.php.net/package/Math_BigInteger */ -namespace phpseclib\Crypt\ECDSA\Curves; +namespace phpseclib\Crypt\EC\Curves; final class nistk283 extends sect283k1 { diff --git a/phpseclib/Crypt/ECDSA/Curves/nistk409.php b/phpseclib/Crypt/EC/Curves/nistk409.php similarity index 84% rename from phpseclib/Crypt/ECDSA/Curves/nistk409.php rename to phpseclib/Crypt/EC/Curves/nistk409.php index 03a56cb5..839e331e 100644 --- a/phpseclib/Crypt/ECDSA/Curves/nistk409.php +++ b/phpseclib/Crypt/EC/Curves/nistk409.php @@ -6,14 +6,14 @@ * PHP version 5 and 7 * * @category Crypt - * @package ECDSA + * @package EC * @author Jim Wigginton * @copyright 2017 Jim Wigginton * @license http://www.opensource.org/licenses/mit-license.html MIT License * @link http://pear.php.net/package/Math_BigInteger */ -namespace phpseclib\Crypt\ECDSA\Curves; +namespace phpseclib\Crypt\EC\Curves; final class nistk409 extends sect409k1 { diff --git a/phpseclib/Crypt/ECDSA/Curves/nistp192.php b/phpseclib/Crypt/EC/Curves/nistp192.php similarity index 84% rename from phpseclib/Crypt/ECDSA/Curves/nistp192.php rename to phpseclib/Crypt/EC/Curves/nistp192.php index bcb9c7dd..b5df3539 100644 --- a/phpseclib/Crypt/ECDSA/Curves/nistp192.php +++ b/phpseclib/Crypt/EC/Curves/nistp192.php @@ -6,14 +6,14 @@ * PHP version 5 and 7 * * @category Crypt - * @package ECDSA + * @package EC * @author Jim Wigginton * @copyright 2017 Jim Wigginton * @license http://www.opensource.org/licenses/mit-license.html MIT License * @link http://pear.php.net/package/Math_BigInteger */ -namespace phpseclib\Crypt\ECDSA\Curves; +namespace phpseclib\Crypt\EC\Curves; final class nistp192 extends secp192r1 { diff --git a/phpseclib/Crypt/ECDSA/Curves/nistp224.php b/phpseclib/Crypt/EC/Curves/nistp224.php similarity index 84% rename from phpseclib/Crypt/ECDSA/Curves/nistp224.php rename to phpseclib/Crypt/EC/Curves/nistp224.php index e7598e8a..286ffde8 100644 --- a/phpseclib/Crypt/ECDSA/Curves/nistp224.php +++ b/phpseclib/Crypt/EC/Curves/nistp224.php @@ -6,14 +6,14 @@ * PHP version 5 and 7 * * @category Crypt - * @package ECDSA + * @package EC * @author Jim Wigginton * @copyright 2017 Jim Wigginton * @license http://www.opensource.org/licenses/mit-license.html MIT License * @link http://pear.php.net/package/Math_BigInteger */ -namespace phpseclib\Crypt\ECDSA\Curves; +namespace phpseclib\Crypt\EC\Curves; final class nistp224 extends secp224r1 { diff --git a/phpseclib/Crypt/ECDSA/Curves/nistp256.php b/phpseclib/Crypt/EC/Curves/nistp256.php similarity index 84% rename from phpseclib/Crypt/ECDSA/Curves/nistp256.php rename to phpseclib/Crypt/EC/Curves/nistp256.php index 73613bcb..c6a092d6 100644 --- a/phpseclib/Crypt/ECDSA/Curves/nistp256.php +++ b/phpseclib/Crypt/EC/Curves/nistp256.php @@ -6,14 +6,14 @@ * PHP version 5 and 7 * * @category Crypt - * @package ECDSA + * @package EC * @author Jim Wigginton * @copyright 2017 Jim Wigginton * @license http://www.opensource.org/licenses/mit-license.html MIT License * @link http://pear.php.net/package/Math_BigInteger */ -namespace phpseclib\Crypt\ECDSA\Curves; +namespace phpseclib\Crypt\EC\Curves; final class nistp256 extends secp256r1 { diff --git a/phpseclib/Crypt/ECDSA/Curves/nistp384.php b/phpseclib/Crypt/EC/Curves/nistp384.php similarity index 84% rename from phpseclib/Crypt/ECDSA/Curves/nistp384.php rename to phpseclib/Crypt/EC/Curves/nistp384.php index a30e88ee..8bfad34e 100644 --- a/phpseclib/Crypt/ECDSA/Curves/nistp384.php +++ b/phpseclib/Crypt/EC/Curves/nistp384.php @@ -6,14 +6,14 @@ * PHP version 5 and 7 * * @category Crypt - * @package ECDSA + * @package EC * @author Jim Wigginton * @copyright 2017 Jim Wigginton * @license http://www.opensource.org/licenses/mit-license.html MIT License * @link http://pear.php.net/package/Math_BigInteger */ -namespace phpseclib\Crypt\ECDSA\Curves; +namespace phpseclib\Crypt\EC\Curves; final class nistp384 extends secp384r1 { diff --git a/phpseclib/Crypt/ECDSA/Curves/nistp521.php b/phpseclib/Crypt/EC/Curves/nistp521.php similarity index 84% rename from phpseclib/Crypt/ECDSA/Curves/nistp521.php rename to phpseclib/Crypt/EC/Curves/nistp521.php index 22a53758..6cab5569 100644 --- a/phpseclib/Crypt/ECDSA/Curves/nistp521.php +++ b/phpseclib/Crypt/EC/Curves/nistp521.php @@ -6,14 +6,14 @@ * PHP version 5 and 7 * * @category Crypt - * @package ECDSA + * @package EC * @author Jim Wigginton * @copyright 2017 Jim Wigginton * @license http://www.opensource.org/licenses/mit-license.html MIT License * @link http://pear.php.net/package/Math_BigInteger */ -namespace phpseclib\Crypt\ECDSA\Curves; +namespace phpseclib\Crypt\EC\Curves; final class nistp521 extends secp521r1 { diff --git a/phpseclib/Crypt/ECDSA/Curves/nistt571.php b/phpseclib/Crypt/EC/Curves/nistt571.php similarity index 84% rename from phpseclib/Crypt/ECDSA/Curves/nistt571.php rename to phpseclib/Crypt/EC/Curves/nistt571.php index 9f30686b..cf7ea5d9 100644 --- a/phpseclib/Crypt/ECDSA/Curves/nistt571.php +++ b/phpseclib/Crypt/EC/Curves/nistt571.php @@ -6,14 +6,14 @@ * PHP version 5 and 7 * * @category Crypt - * @package ECDSA + * @package EC * @author Jim Wigginton * @copyright 2017 Jim Wigginton * @license http://www.opensource.org/licenses/mit-license.html MIT License * @link http://pear.php.net/package/Math_BigInteger */ -namespace phpseclib\Crypt\ECDSA\Curves; +namespace phpseclib\Crypt\EC\Curves; final class nistt571 extends sect571k1 { diff --git a/phpseclib/Crypt/ECDSA/Curves/prime192v1.php b/phpseclib/Crypt/EC/Curves/prime192v1.php similarity index 85% rename from phpseclib/Crypt/ECDSA/Curves/prime192v1.php rename to phpseclib/Crypt/EC/Curves/prime192v1.php index 4a5ef8a6..d641aeb4 100644 --- a/phpseclib/Crypt/ECDSA/Curves/prime192v1.php +++ b/phpseclib/Crypt/EC/Curves/prime192v1.php @@ -6,14 +6,14 @@ * PHP version 5 and 7 * * @category Crypt - * @package ECDSA + * @package EC * @author Jim Wigginton * @copyright 2017 Jim Wigginton * @license http://www.opensource.org/licenses/mit-license.html MIT License * @link http://pear.php.net/package/Math_BigInteger */ -namespace phpseclib\Crypt\ECDSA\Curves; +namespace phpseclib\Crypt\EC\Curves; final class prime192v1 extends secp192r1 { diff --git a/phpseclib/Crypt/ECDSA/Curves/prime192v2.php b/phpseclib/Crypt/EC/Curves/prime192v2.php similarity index 90% rename from phpseclib/Crypt/ECDSA/Curves/prime192v2.php rename to phpseclib/Crypt/EC/Curves/prime192v2.php index f3aa260f..ffd8a6ec 100644 --- a/phpseclib/Crypt/ECDSA/Curves/prime192v2.php +++ b/phpseclib/Crypt/EC/Curves/prime192v2.php @@ -6,16 +6,16 @@ * PHP version 5 and 7 * * @category Crypt - * @package ECDSA + * @package EC * @author Jim Wigginton * @copyright 2017 Jim Wigginton * @license http://www.opensource.org/licenses/mit-license.html MIT License * @link http://pear.php.net/package/Math_BigInteger */ -namespace phpseclib\Crypt\ECDSA\Curves; +namespace phpseclib\Crypt\EC\Curves; -use phpseclib\Crypt\ECDSA\BaseCurves\Prime; +use phpseclib\Crypt\EC\BaseCurves\Prime; use phpseclib\Math\BigInteger; class prime192v2 extends Prime diff --git a/phpseclib/Crypt/ECDSA/Curves/prime192v3.php b/phpseclib/Crypt/EC/Curves/prime192v3.php similarity index 90% rename from phpseclib/Crypt/ECDSA/Curves/prime192v3.php rename to phpseclib/Crypt/EC/Curves/prime192v3.php index 4b0855d4..bc745502 100644 --- a/phpseclib/Crypt/ECDSA/Curves/prime192v3.php +++ b/phpseclib/Crypt/EC/Curves/prime192v3.php @@ -6,16 +6,16 @@ * PHP version 5 and 7 * * @category Crypt - * @package ECDSA + * @package EC * @author Jim Wigginton * @copyright 2017 Jim Wigginton * @license http://www.opensource.org/licenses/mit-license.html MIT License * @link http://pear.php.net/package/Math_BigInteger */ -namespace phpseclib\Crypt\ECDSA\Curves; +namespace phpseclib\Crypt\EC\Curves; -use phpseclib\Crypt\ECDSA\BaseCurves\Prime; +use phpseclib\Crypt\EC\BaseCurves\Prime; use phpseclib\Math\BigInteger; class prime192v3 extends Prime diff --git a/phpseclib/Crypt/ECDSA/Curves/prime239v1.php b/phpseclib/Crypt/EC/Curves/prime239v1.php similarity index 91% rename from phpseclib/Crypt/ECDSA/Curves/prime239v1.php rename to phpseclib/Crypt/EC/Curves/prime239v1.php index 2ee69197..473106dd 100644 --- a/phpseclib/Crypt/ECDSA/Curves/prime239v1.php +++ b/phpseclib/Crypt/EC/Curves/prime239v1.php @@ -6,16 +6,16 @@ * PHP version 5 and 7 * * @category Crypt - * @package ECDSA + * @package EC * @author Jim Wigginton * @copyright 2017 Jim Wigginton * @license http://www.opensource.org/licenses/mit-license.html MIT License * @link http://pear.php.net/package/Math_BigInteger */ -namespace phpseclib\Crypt\ECDSA\Curves; +namespace phpseclib\Crypt\EC\Curves; -use phpseclib\Crypt\ECDSA\BaseCurves\Prime; +use phpseclib\Crypt\EC\BaseCurves\Prime; use phpseclib\Math\BigInteger; class prime239v1 extends Prime diff --git a/phpseclib/Crypt/ECDSA/Curves/prime239v2.php b/phpseclib/Crypt/EC/Curves/prime239v2.php similarity index 91% rename from phpseclib/Crypt/ECDSA/Curves/prime239v2.php rename to phpseclib/Crypt/EC/Curves/prime239v2.php index 4d32a2b6..1cd52dd8 100644 --- a/phpseclib/Crypt/ECDSA/Curves/prime239v2.php +++ b/phpseclib/Crypt/EC/Curves/prime239v2.php @@ -6,16 +6,16 @@ * PHP version 5 and 7 * * @category Crypt - * @package ECDSA + * @package EC * @author Jim Wigginton * @copyright 2017 Jim Wigginton * @license http://www.opensource.org/licenses/mit-license.html MIT License * @link http://pear.php.net/package/Math_BigInteger */ -namespace phpseclib\Crypt\ECDSA\Curves; +namespace phpseclib\Crypt\EC\Curves; -use phpseclib\Crypt\ECDSA\BaseCurves\Prime; +use phpseclib\Crypt\EC\BaseCurves\Prime; use phpseclib\Math\BigInteger; class prime239v2 extends Prime diff --git a/phpseclib/Crypt/ECDSA/Curves/prime239v3.php b/phpseclib/Crypt/EC/Curves/prime239v3.php similarity index 91% rename from phpseclib/Crypt/ECDSA/Curves/prime239v3.php rename to phpseclib/Crypt/EC/Curves/prime239v3.php index 0afbfee4..162143cc 100644 --- a/phpseclib/Crypt/ECDSA/Curves/prime239v3.php +++ b/phpseclib/Crypt/EC/Curves/prime239v3.php @@ -6,16 +6,16 @@ * PHP version 5 and 7 * * @category Crypt - * @package ECDSA + * @package EC * @author Jim Wigginton * @copyright 2017 Jim Wigginton * @license http://www.opensource.org/licenses/mit-license.html MIT License * @link http://pear.php.net/package/Math_BigInteger */ -namespace phpseclib\Crypt\ECDSA\Curves; +namespace phpseclib\Crypt\EC\Curves; -use phpseclib\Crypt\ECDSA\BaseCurves\Prime; +use phpseclib\Crypt\EC\BaseCurves\Prime; use phpseclib\Math\BigInteger; class prime239v3 extends Prime diff --git a/phpseclib/Crypt/ECDSA/Curves/prime256v1.php b/phpseclib/Crypt/EC/Curves/prime256v1.php similarity index 85% rename from phpseclib/Crypt/ECDSA/Curves/prime256v1.php rename to phpseclib/Crypt/EC/Curves/prime256v1.php index 29fb1ab4..8c249d6c 100644 --- a/phpseclib/Crypt/ECDSA/Curves/prime256v1.php +++ b/phpseclib/Crypt/EC/Curves/prime256v1.php @@ -6,14 +6,14 @@ * PHP version 5 and 7 * * @category Crypt - * @package ECDSA + * @package EC * @author Jim Wigginton * @copyright 2017 Jim Wigginton * @license http://www.opensource.org/licenses/mit-license.html MIT License * @link http://pear.php.net/package/Math_BigInteger */ -namespace phpseclib\Crypt\ECDSA\Curves; +namespace phpseclib\Crypt\EC\Curves; final class prime256v1 extends secp256r1 { diff --git a/phpseclib/Crypt/ECDSA/Curves/secp112r1.php b/phpseclib/Crypt/EC/Curves/secp112r1.php similarity index 89% rename from phpseclib/Crypt/ECDSA/Curves/secp112r1.php rename to phpseclib/Crypt/EC/Curves/secp112r1.php index dfbabe89..317a6c71 100644 --- a/phpseclib/Crypt/ECDSA/Curves/secp112r1.php +++ b/phpseclib/Crypt/EC/Curves/secp112r1.php @@ -6,16 +6,16 @@ * PHP version 5 and 7 * * @category Crypt - * @package ECDSA + * @package EC * @author Jim Wigginton * @copyright 2017 Jim Wigginton * @license http://www.opensource.org/licenses/mit-license.html MIT License * @link http://pear.php.net/package/Math_BigInteger */ -namespace phpseclib\Crypt\ECDSA\Curves; +namespace phpseclib\Crypt\EC\Curves; -use phpseclib\Crypt\ECDSA\BaseCurves\Prime; +use phpseclib\Crypt\EC\BaseCurves\Prime; use phpseclib\Math\BigInteger; class secp112r1 extends Prime diff --git a/phpseclib/Crypt/ECDSA/Curves/secp112r2.php b/phpseclib/Crypt/EC/Curves/secp112r2.php similarity index 90% rename from phpseclib/Crypt/ECDSA/Curves/secp112r2.php rename to phpseclib/Crypt/EC/Curves/secp112r2.php index f536a02b..13ab2141 100644 --- a/phpseclib/Crypt/ECDSA/Curves/secp112r2.php +++ b/phpseclib/Crypt/EC/Curves/secp112r2.php @@ -6,16 +6,16 @@ * PHP version 5 and 7 * * @category Crypt - * @package ECDSA + * @package EC * @author Jim Wigginton * @copyright 2017 Jim Wigginton * @license http://www.opensource.org/licenses/mit-license.html MIT License * @link http://pear.php.net/package/Math_BigInteger */ -namespace phpseclib\Crypt\ECDSA\Curves; +namespace phpseclib\Crypt\EC\Curves; -use phpseclib\Crypt\ECDSA\BaseCurves\Prime; +use phpseclib\Crypt\EC\BaseCurves\Prime; use phpseclib\Math\BigInteger; class secp112r2 extends Prime diff --git a/phpseclib/Crypt/ECDSA/Curves/secp128r1.php b/phpseclib/Crypt/EC/Curves/secp128r1.php similarity index 89% rename from phpseclib/Crypt/ECDSA/Curves/secp128r1.php rename to phpseclib/Crypt/EC/Curves/secp128r1.php index b73eec7f..e665d191 100644 --- a/phpseclib/Crypt/ECDSA/Curves/secp128r1.php +++ b/phpseclib/Crypt/EC/Curves/secp128r1.php @@ -6,16 +6,16 @@ * PHP version 5 and 7 * * @category Crypt - * @package ECDSA + * @package EC * @author Jim Wigginton * @copyright 2017 Jim Wigginton * @license http://www.opensource.org/licenses/mit-license.html MIT License * @link http://pear.php.net/package/Math_BigInteger */ -namespace phpseclib\Crypt\ECDSA\Curves; +namespace phpseclib\Crypt\EC\Curves; -use phpseclib\Crypt\ECDSA\BaseCurves\Prime; +use phpseclib\Crypt\EC\BaseCurves\Prime; use phpseclib\Math\BigInteger; class secp128r1 extends Prime diff --git a/phpseclib/Crypt/ECDSA/Curves/secp128r2.php b/phpseclib/Crypt/EC/Curves/secp128r2.php similarity index 90% rename from phpseclib/Crypt/ECDSA/Curves/secp128r2.php rename to phpseclib/Crypt/EC/Curves/secp128r2.php index 18d92b0d..73f05417 100644 --- a/phpseclib/Crypt/ECDSA/Curves/secp128r2.php +++ b/phpseclib/Crypt/EC/Curves/secp128r2.php @@ -6,16 +6,16 @@ * PHP version 5 and 7 * * @category Crypt - * @package ECDSA + * @package EC * @author Jim Wigginton * @copyright 2017 Jim Wigginton * @license http://www.opensource.org/licenses/mit-license.html MIT License * @link http://pear.php.net/package/Math_BigInteger */ -namespace phpseclib\Crypt\ECDSA\Curves; +namespace phpseclib\Crypt\EC\Curves; -use phpseclib\Crypt\ECDSA\BaseCurves\Prime; +use phpseclib\Crypt\EC\BaseCurves\Prime; use phpseclib\Math\BigInteger; class secp128r2 extends Prime diff --git a/phpseclib/Crypt/ECDSA/Curves/secp160k1.php b/phpseclib/Crypt/EC/Curves/secp160k1.php similarity index 93% rename from phpseclib/Crypt/ECDSA/Curves/secp160k1.php rename to phpseclib/Crypt/EC/Curves/secp160k1.php index 41acc4e7..87415069 100644 --- a/phpseclib/Crypt/ECDSA/Curves/secp160k1.php +++ b/phpseclib/Crypt/EC/Curves/secp160k1.php @@ -6,16 +6,16 @@ * PHP version 5 and 7 * * @category Crypt - * @package ECDSA + * @package EC * @author Jim Wigginton * @copyright 2017 Jim Wigginton * @license http://www.opensource.org/licenses/mit-license.html MIT License * @link http://pear.php.net/package/Math_BigInteger */ -namespace phpseclib\Crypt\ECDSA\Curves; +namespace phpseclib\Crypt\EC\Curves; -use phpseclib\Crypt\ECDSA\BaseCurves\KoblitzPrime; +use phpseclib\Crypt\EC\BaseCurves\KoblitzPrime; use phpseclib\Math\BigInteger; class secp160k1 extends KoblitzPrime diff --git a/phpseclib/Crypt/ECDSA/Curves/secp160r1.php b/phpseclib/Crypt/EC/Curves/secp160r1.php similarity index 90% rename from phpseclib/Crypt/ECDSA/Curves/secp160r1.php rename to phpseclib/Crypt/EC/Curves/secp160r1.php index 175f5e8b..354e8a8d 100644 --- a/phpseclib/Crypt/ECDSA/Curves/secp160r1.php +++ b/phpseclib/Crypt/EC/Curves/secp160r1.php @@ -6,16 +6,16 @@ * PHP version 5 and 7 * * @category Crypt - * @package ECDSA + * @package EC * @author Jim Wigginton * @copyright 2017 Jim Wigginton * @license http://www.opensource.org/licenses/mit-license.html MIT License * @link http://pear.php.net/package/Math_BigInteger */ -namespace phpseclib\Crypt\ECDSA\Curves; +namespace phpseclib\Crypt\EC\Curves; -use phpseclib\Crypt\ECDSA\BaseCurves\Prime; +use phpseclib\Crypt\EC\BaseCurves\Prime; use phpseclib\Math\BigInteger; class secp160r1 extends Prime diff --git a/phpseclib/Crypt/ECDSA/Curves/secp160r2.php b/phpseclib/Crypt/EC/Curves/secp160r2.php similarity index 90% rename from phpseclib/Crypt/ECDSA/Curves/secp160r2.php rename to phpseclib/Crypt/EC/Curves/secp160r2.php index fcf9591a..d3aa8752 100644 --- a/phpseclib/Crypt/ECDSA/Curves/secp160r2.php +++ b/phpseclib/Crypt/EC/Curves/secp160r2.php @@ -6,16 +6,16 @@ * PHP version 5 and 7 * * @category Crypt - * @package ECDSA + * @package EC * @author Jim Wigginton * @copyright 2017 Jim Wigginton * @license http://www.opensource.org/licenses/mit-license.html MIT License * @link http://pear.php.net/package/Math_BigInteger */ -namespace phpseclib\Crypt\ECDSA\Curves; +namespace phpseclib\Crypt\EC\Curves; -use phpseclib\Crypt\ECDSA\BaseCurves\Prime; +use phpseclib\Crypt\EC\BaseCurves\Prime; use phpseclib\Math\BigInteger; class secp160r2 extends Prime diff --git a/phpseclib/Crypt/ECDSA/Curves/secp192k1.php b/phpseclib/Crypt/EC/Curves/secp192k1.php similarity index 93% rename from phpseclib/Crypt/ECDSA/Curves/secp192k1.php rename to phpseclib/Crypt/EC/Curves/secp192k1.php index acc10f59..a24349dc 100644 --- a/phpseclib/Crypt/ECDSA/Curves/secp192k1.php +++ b/phpseclib/Crypt/EC/Curves/secp192k1.php @@ -6,16 +6,16 @@ * PHP version 5 and 7 * * @category Crypt - * @package ECDSA + * @package EC * @author Jim Wigginton * @copyright 2017 Jim Wigginton * @license http://www.opensource.org/licenses/mit-license.html MIT License * @link http://pear.php.net/package/Math_BigInteger */ -namespace phpseclib\Crypt\ECDSA\Curves; +namespace phpseclib\Crypt\EC\Curves; -use phpseclib\Crypt\ECDSA\BaseCurves\KoblitzPrime; +use phpseclib\Crypt\EC\BaseCurves\KoblitzPrime; use phpseclib\Math\BigInteger; class secp192k1 extends KoblitzPrime diff --git a/phpseclib/Crypt/ECDSA/Curves/secp192r1.php b/phpseclib/Crypt/EC/Curves/secp192r1.php similarity index 96% rename from phpseclib/Crypt/ECDSA/Curves/secp192r1.php rename to phpseclib/Crypt/EC/Curves/secp192r1.php index 48ad6dcb..99045884 100644 --- a/phpseclib/Crypt/ECDSA/Curves/secp192r1.php +++ b/phpseclib/Crypt/EC/Curves/secp192r1.php @@ -8,16 +8,16 @@ * PHP version 5 and 7 * * @category Crypt - * @package ECDSA + * @package EC * @author Jim Wigginton * @copyright 2017 Jim Wigginton * @license http://www.opensource.org/licenses/mit-license.html MIT License * @link http://pear.php.net/package/Math_BigInteger */ -namespace phpseclib\Crypt\ECDSA\Curves; +namespace phpseclib\Crypt\EC\Curves; -use phpseclib\Crypt\ECDSA\BaseCurves\Prime; +use phpseclib\Crypt\EC\BaseCurves\Prime; use phpseclib\Math\BigInteger; class secp192r1 extends Prime diff --git a/phpseclib/Crypt/ECDSA/Curves/secp224k1.php b/phpseclib/Crypt/EC/Curves/secp224k1.php similarity index 93% rename from phpseclib/Crypt/ECDSA/Curves/secp224k1.php rename to phpseclib/Crypt/EC/Curves/secp224k1.php index e590ea0d..d6880d35 100644 --- a/phpseclib/Crypt/ECDSA/Curves/secp224k1.php +++ b/phpseclib/Crypt/EC/Curves/secp224k1.php @@ -6,16 +6,16 @@ * PHP version 5 and 7 * * @category Crypt - * @package ECDSA + * @package EC * @author Jim Wigginton * @copyright 2017 Jim Wigginton * @license http://www.opensource.org/licenses/mit-license.html MIT License * @link http://pear.php.net/package/Math_BigInteger */ -namespace phpseclib\Crypt\ECDSA\Curves; +namespace phpseclib\Crypt\EC\Curves; -use phpseclib\Crypt\ECDSA\BaseCurves\KoblitzPrime; +use phpseclib\Crypt\EC\BaseCurves\KoblitzPrime; use phpseclib\Math\BigInteger; class secp224k1 extends KoblitzPrime diff --git a/phpseclib/Crypt/ECDSA/Curves/secp224r1.php b/phpseclib/Crypt/EC/Curves/secp224r1.php similarity index 91% rename from phpseclib/Crypt/ECDSA/Curves/secp224r1.php rename to phpseclib/Crypt/EC/Curves/secp224r1.php index 21125546..f27c3736 100644 --- a/phpseclib/Crypt/ECDSA/Curves/secp224r1.php +++ b/phpseclib/Crypt/EC/Curves/secp224r1.php @@ -6,16 +6,16 @@ * PHP version 5 and 7 * * @category Crypt - * @package ECDSA + * @package EC * @author Jim Wigginton * @copyright 2017 Jim Wigginton * @license http://www.opensource.org/licenses/mit-license.html MIT License * @link http://pear.php.net/package/Math_BigInteger */ -namespace phpseclib\Crypt\ECDSA\Curves; +namespace phpseclib\Crypt\EC\Curves; -use phpseclib\Crypt\ECDSA\BaseCurves\Prime; +use phpseclib\Crypt\EC\BaseCurves\Prime; use phpseclib\Math\BigInteger; class secp224r1 extends Prime diff --git a/phpseclib/Crypt/ECDSA/Curves/secp256k1.php b/phpseclib/Crypt/EC/Curves/secp256k1.php similarity index 91% rename from phpseclib/Crypt/ECDSA/Curves/secp256k1.php rename to phpseclib/Crypt/EC/Curves/secp256k1.php index 3d90d35f..f776491a 100644 --- a/phpseclib/Crypt/ECDSA/Curves/secp256k1.php +++ b/phpseclib/Crypt/EC/Curves/secp256k1.php @@ -8,17 +8,17 @@ * PHP version 5 and 7 * * @category Crypt - * @package ECDSA + * @package EC * @author Jim Wigginton * @copyright 2017 Jim Wigginton * @license http://www.opensource.org/licenses/mit-license.html MIT License * @link http://pear.php.net/package/Math_BigInteger */ -namespace phpseclib\Crypt\ECDSA\Curves; +namespace phpseclib\Crypt\EC\Curves; -//use phpseclib\Crypt\ECDSA\BaseCurves\Prime; -use phpseclib\Crypt\ECDSA\BaseCurves\KoblitzPrime; +//use phpseclib\Crypt\EC\BaseCurves\Prime; +use phpseclib\Crypt\EC\BaseCurves\KoblitzPrime; use phpseclib\Math\BigInteger; //class secp256k1 extends Prime diff --git a/phpseclib/Crypt/ECDSA/Curves/secp256r1.php b/phpseclib/Crypt/EC/Curves/secp256r1.php similarity index 91% rename from phpseclib/Crypt/ECDSA/Curves/secp256r1.php rename to phpseclib/Crypt/EC/Curves/secp256r1.php index 67e162d8..cfc12247 100644 --- a/phpseclib/Crypt/ECDSA/Curves/secp256r1.php +++ b/phpseclib/Crypt/EC/Curves/secp256r1.php @@ -6,16 +6,16 @@ * PHP version 5 and 7 * * @category Crypt - * @package ECDSA + * @package EC * @author Jim Wigginton * @copyright 2017 Jim Wigginton * @license http://www.opensource.org/licenses/mit-license.html MIT License * @link http://pear.php.net/package/Math_BigInteger */ -namespace phpseclib\Crypt\ECDSA\Curves; +namespace phpseclib\Crypt\EC\Curves; -use phpseclib\Crypt\ECDSA\BaseCurves\Prime; +use phpseclib\Crypt\EC\BaseCurves\Prime; use phpseclib\Math\BigInteger; class secp256r1 extends Prime diff --git a/phpseclib/Crypt/ECDSA/Curves/secp384r1.php b/phpseclib/Crypt/EC/Curves/secp384r1.php similarity index 93% rename from phpseclib/Crypt/ECDSA/Curves/secp384r1.php rename to phpseclib/Crypt/EC/Curves/secp384r1.php index f30bf24f..dcff1d77 100644 --- a/phpseclib/Crypt/ECDSA/Curves/secp384r1.php +++ b/phpseclib/Crypt/EC/Curves/secp384r1.php @@ -6,16 +6,16 @@ * PHP version 5 and 7 * * @category Crypt - * @package ECDSA + * @package EC * @author Jim Wigginton * @copyright 2017 Jim Wigginton * @license http://www.opensource.org/licenses/mit-license.html MIT License * @link http://pear.php.net/package/Math_BigInteger */ -namespace phpseclib\Crypt\ECDSA\Curves; +namespace phpseclib\Crypt\EC\Curves; -use phpseclib\Crypt\ECDSA\BaseCurves\Prime; +use phpseclib\Crypt\EC\BaseCurves\Prime; use phpseclib\Math\BigInteger; class secp384r1 extends Prime diff --git a/phpseclib/Crypt/ECDSA/Curves/secp521r1.php b/phpseclib/Crypt/EC/Curves/secp521r1.php similarity index 94% rename from phpseclib/Crypt/ECDSA/Curves/secp521r1.php rename to phpseclib/Crypt/EC/Curves/secp521r1.php index f37d59ef..0ffc738e 100644 --- a/phpseclib/Crypt/ECDSA/Curves/secp521r1.php +++ b/phpseclib/Crypt/EC/Curves/secp521r1.php @@ -6,16 +6,16 @@ * PHP version 5 and 7 * * @category Crypt - * @package ECDSA + * @package EC * @author Jim Wigginton * @copyright 2017 Jim Wigginton * @license http://www.opensource.org/licenses/mit-license.html MIT License * @link http://pear.php.net/package/Math_BigInteger */ -namespace phpseclib\Crypt\ECDSA\Curves; +namespace phpseclib\Crypt\EC\Curves; -use phpseclib\Crypt\ECDSA\BaseCurves\Prime; +use phpseclib\Crypt\EC\BaseCurves\Prime; use phpseclib\Math\BigInteger; class secp521r1 extends Prime diff --git a/phpseclib/Crypt/ECDSA/Curves/sect113r1.php b/phpseclib/Crypt/EC/Curves/sect113r1.php similarity index 88% rename from phpseclib/Crypt/ECDSA/Curves/sect113r1.php rename to phpseclib/Crypt/EC/Curves/sect113r1.php index 992b5945..6caf5ff8 100644 --- a/phpseclib/Crypt/ECDSA/Curves/sect113r1.php +++ b/phpseclib/Crypt/EC/Curves/sect113r1.php @@ -6,16 +6,16 @@ * PHP version 5 and 7 * * @category Crypt - * @package ECDSA + * @package EC * @author Jim Wigginton * @copyright 2017 Jim Wigginton * @license http://www.opensource.org/licenses/mit-license.html MIT License * @link http://pear.php.net/package/Math_BigInteger */ -namespace phpseclib\Crypt\ECDSA\Curves; +namespace phpseclib\Crypt\EC\Curves; -use phpseclib\Crypt\ECDSA\BaseCurves\Binary; +use phpseclib\Crypt\EC\BaseCurves\Binary; use phpseclib\Math\BigInteger; class sect113r1 extends Binary diff --git a/phpseclib/Crypt/ECDSA/Curves/sect113r2.php b/phpseclib/Crypt/EC/Curves/sect113r2.php similarity index 88% rename from phpseclib/Crypt/ECDSA/Curves/sect113r2.php rename to phpseclib/Crypt/EC/Curves/sect113r2.php index 140b94f3..c927f6b0 100644 --- a/phpseclib/Crypt/ECDSA/Curves/sect113r2.php +++ b/phpseclib/Crypt/EC/Curves/sect113r2.php @@ -6,16 +6,16 @@ * PHP version 5 and 7 * * @category Crypt - * @package ECDSA + * @package EC * @author Jim Wigginton * @copyright 2017 Jim Wigginton * @license http://www.opensource.org/licenses/mit-license.html MIT License * @link http://pear.php.net/package/Math_BigInteger */ -namespace phpseclib\Crypt\ECDSA\Curves; +namespace phpseclib\Crypt\EC\Curves; -use phpseclib\Crypt\ECDSA\BaseCurves\Binary; +use phpseclib\Crypt\EC\BaseCurves\Binary; use phpseclib\Math\BigInteger; class sect113r2 extends Binary diff --git a/phpseclib/Crypt/ECDSA/Curves/sect131r1.php b/phpseclib/Crypt/EC/Curves/sect131r1.php similarity index 88% rename from phpseclib/Crypt/ECDSA/Curves/sect131r1.php rename to phpseclib/Crypt/EC/Curves/sect131r1.php index ba41413a..f354c381 100644 --- a/phpseclib/Crypt/ECDSA/Curves/sect131r1.php +++ b/phpseclib/Crypt/EC/Curves/sect131r1.php @@ -6,16 +6,16 @@ * PHP version 5 and 7 * * @category Crypt - * @package ECDSA + * @package EC * @author Jim Wigginton * @copyright 2017 Jim Wigginton * @license http://www.opensource.org/licenses/mit-license.html MIT License * @link http://pear.php.net/package/Math_BigInteger */ -namespace phpseclib\Crypt\ECDSA\Curves; +namespace phpseclib\Crypt\EC\Curves; -use phpseclib\Crypt\ECDSA\BaseCurves\Binary; +use phpseclib\Crypt\EC\BaseCurves\Binary; use phpseclib\Math\BigInteger; class sect131r1 extends Binary diff --git a/phpseclib/Crypt/ECDSA/Curves/sect131r2.php b/phpseclib/Crypt/EC/Curves/sect131r2.php similarity index 88% rename from phpseclib/Crypt/ECDSA/Curves/sect131r2.php rename to phpseclib/Crypt/EC/Curves/sect131r2.php index 8b1d88bf..04526494 100644 --- a/phpseclib/Crypt/ECDSA/Curves/sect131r2.php +++ b/phpseclib/Crypt/EC/Curves/sect131r2.php @@ -6,16 +6,16 @@ * PHP version 5 and 7 * * @category Crypt - * @package ECDSA + * @package EC * @author Jim Wigginton * @copyright 2017 Jim Wigginton * @license http://www.opensource.org/licenses/mit-license.html MIT License * @link http://pear.php.net/package/Math_BigInteger */ -namespace phpseclib\Crypt\ECDSA\Curves; +namespace phpseclib\Crypt\EC\Curves; -use phpseclib\Crypt\ECDSA\BaseCurves\Binary; +use phpseclib\Crypt\EC\BaseCurves\Binary; use phpseclib\Math\BigInteger; class sect131r2 extends Binary diff --git a/phpseclib/Crypt/ECDSA/Curves/sect163k1.php b/phpseclib/Crypt/EC/Curves/sect163k1.php similarity index 89% rename from phpseclib/Crypt/ECDSA/Curves/sect163k1.php rename to phpseclib/Crypt/EC/Curves/sect163k1.php index 562eb144..7e108d82 100644 --- a/phpseclib/Crypt/ECDSA/Curves/sect163k1.php +++ b/phpseclib/Crypt/EC/Curves/sect163k1.php @@ -6,16 +6,16 @@ * PHP version 5 and 7 * * @category Crypt - * @package ECDSA + * @package EC * @author Jim Wigginton * @copyright 2017 Jim Wigginton * @license http://www.opensource.org/licenses/mit-license.html MIT License * @link http://pear.php.net/package/Math_BigInteger */ -namespace phpseclib\Crypt\ECDSA\Curves; +namespace phpseclib\Crypt\EC\Curves; -use phpseclib\Crypt\ECDSA\BaseCurves\Binary; +use phpseclib\Crypt\EC\BaseCurves\Binary; use phpseclib\Math\BigInteger; class sect163k1 extends Binary diff --git a/phpseclib/Crypt/ECDSA/Curves/sect163r1.php b/phpseclib/Crypt/EC/Curves/sect163r1.php similarity index 89% rename from phpseclib/Crypt/ECDSA/Curves/sect163r1.php rename to phpseclib/Crypt/EC/Curves/sect163r1.php index 634e300c..543efff4 100644 --- a/phpseclib/Crypt/ECDSA/Curves/sect163r1.php +++ b/phpseclib/Crypt/EC/Curves/sect163r1.php @@ -6,16 +6,16 @@ * PHP version 5 and 7 * * @category Crypt - * @package ECDSA + * @package EC * @author Jim Wigginton * @copyright 2017 Jim Wigginton * @license http://www.opensource.org/licenses/mit-license.html MIT License * @link http://pear.php.net/package/Math_BigInteger */ -namespace phpseclib\Crypt\ECDSA\Curves; +namespace phpseclib\Crypt\EC\Curves; -use phpseclib\Crypt\ECDSA\BaseCurves\Binary; +use phpseclib\Crypt\EC\BaseCurves\Binary; use phpseclib\Math\BigInteger; class sect163r1 extends Binary diff --git a/phpseclib/Crypt/ECDSA/Curves/sect163r2.php b/phpseclib/Crypt/EC/Curves/sect163r2.php similarity index 85% rename from phpseclib/Crypt/ECDSA/Curves/sect163r2.php rename to phpseclib/Crypt/EC/Curves/sect163r2.php index 39c1e0fc..5a3c17a3 100644 --- a/phpseclib/Crypt/ECDSA/Curves/sect163r2.php +++ b/phpseclib/Crypt/EC/Curves/sect163r2.php @@ -6,16 +6,16 @@ * PHP version 5 and 7 * * @category Crypt - * @package ECDSA + * @package EC * @author Jim Wigginton * @copyright 2017 Jim Wigginton * @license http://www.opensource.org/licenses/mit-license.html MIT License * @link http://pear.php.net/package/Math_BigInteger */ -namespace phpseclib\Crypt\ECDSA\Curves; +namespace phpseclib\Crypt\EC\Curves; -use phpseclib\Crypt\ECDSA\BaseCurves\Binary; +use phpseclib\Crypt\EC\BaseCurves\Binary; use phpseclib\Math\BigInteger; class sect163r2 extends Binary diff --git a/phpseclib/Crypt/ECDSA/Curves/sect193r1.php b/phpseclib/Crypt/EC/Curves/sect193r1.php similarity index 86% rename from phpseclib/Crypt/ECDSA/Curves/sect193r1.php rename to phpseclib/Crypt/EC/Curves/sect193r1.php index 6cacff14..801130cc 100644 --- a/phpseclib/Crypt/ECDSA/Curves/sect193r1.php +++ b/phpseclib/Crypt/EC/Curves/sect193r1.php @@ -6,16 +6,16 @@ * PHP version 5 and 7 * * @category Crypt - * @package ECDSA + * @package EC * @author Jim Wigginton * @copyright 2017 Jim Wigginton * @license http://www.opensource.org/licenses/mit-license.html MIT License * @link http://pear.php.net/package/Math_BigInteger */ -namespace phpseclib\Crypt\ECDSA\Curves; +namespace phpseclib\Crypt\EC\Curves; -use phpseclib\Crypt\ECDSA\BaseCurves\Binary; +use phpseclib\Crypt\EC\BaseCurves\Binary; use phpseclib\Math\BigInteger; class sect193r1 extends Binary diff --git a/phpseclib/Crypt/ECDSA/Curves/sect193r2.php b/phpseclib/Crypt/EC/Curves/sect193r2.php similarity index 86% rename from phpseclib/Crypt/ECDSA/Curves/sect193r2.php rename to phpseclib/Crypt/EC/Curves/sect193r2.php index 1a8181be..16992009 100644 --- a/phpseclib/Crypt/ECDSA/Curves/sect193r2.php +++ b/phpseclib/Crypt/EC/Curves/sect193r2.php @@ -6,16 +6,16 @@ * PHP version 5 and 7 * * @category Crypt - * @package ECDSA + * @package EC * @author Jim Wigginton * @copyright 2017 Jim Wigginton * @license http://www.opensource.org/licenses/mit-license.html MIT License * @link http://pear.php.net/package/Math_BigInteger */ -namespace phpseclib\Crypt\ECDSA\Curves; +namespace phpseclib\Crypt\EC\Curves; -use phpseclib\Crypt\ECDSA\BaseCurves\Binary; +use phpseclib\Crypt\EC\BaseCurves\Binary; use phpseclib\Math\BigInteger; class sect193r2 extends Binary diff --git a/phpseclib/Crypt/ECDSA/Curves/sect233k1.php b/phpseclib/Crypt/EC/Curves/sect233k1.php similarity index 86% rename from phpseclib/Crypt/ECDSA/Curves/sect233k1.php rename to phpseclib/Crypt/EC/Curves/sect233k1.php index 7e98e1c4..7429bbe7 100644 --- a/phpseclib/Crypt/ECDSA/Curves/sect233k1.php +++ b/phpseclib/Crypt/EC/Curves/sect233k1.php @@ -6,16 +6,16 @@ * PHP version 5 and 7 * * @category Crypt - * @package ECDSA + * @package EC * @author Jim Wigginton * @copyright 2017 Jim Wigginton * @license http://www.opensource.org/licenses/mit-license.html MIT License * @link http://pear.php.net/package/Math_BigInteger */ -namespace phpseclib\Crypt\ECDSA\Curves; +namespace phpseclib\Crypt\EC\Curves; -use phpseclib\Crypt\ECDSA\BaseCurves\Binary; +use phpseclib\Crypt\EC\BaseCurves\Binary; use phpseclib\Math\BigInteger; class sect233k1 extends Binary diff --git a/phpseclib/Crypt/ECDSA/Curves/sect233r1.php b/phpseclib/Crypt/EC/Curves/sect233r1.php similarity index 86% rename from phpseclib/Crypt/ECDSA/Curves/sect233r1.php rename to phpseclib/Crypt/EC/Curves/sect233r1.php index 38c76e2e..a783c8a3 100644 --- a/phpseclib/Crypt/ECDSA/Curves/sect233r1.php +++ b/phpseclib/Crypt/EC/Curves/sect233r1.php @@ -6,16 +6,16 @@ * PHP version 5 and 7 * * @category Crypt - * @package ECDSA + * @package EC * @author Jim Wigginton * @copyright 2017 Jim Wigginton * @license http://www.opensource.org/licenses/mit-license.html MIT License * @link http://pear.php.net/package/Math_BigInteger */ -namespace phpseclib\Crypt\ECDSA\Curves; +namespace phpseclib\Crypt\EC\Curves; -use phpseclib\Crypt\ECDSA\BaseCurves\Binary; +use phpseclib\Crypt\EC\BaseCurves\Binary; use phpseclib\Math\BigInteger; class sect233r1 extends Binary diff --git a/phpseclib/Crypt/ECDSA/Curves/sect239k1.php b/phpseclib/Crypt/EC/Curves/sect239k1.php similarity index 87% rename from phpseclib/Crypt/ECDSA/Curves/sect239k1.php rename to phpseclib/Crypt/EC/Curves/sect239k1.php index 82fd47ae..c70a4321 100644 --- a/phpseclib/Crypt/ECDSA/Curves/sect239k1.php +++ b/phpseclib/Crypt/EC/Curves/sect239k1.php @@ -6,16 +6,16 @@ * PHP version 5 and 7 * * @category Crypt - * @package ECDSA + * @package EC * @author Jim Wiggint on * @copyright 2017 Jim Wigginton * @license http://www.opensource.org/licenses/mit-license.html MIT License * @link http://pear.php.net/package/Math_BigInteger */ -namespace phpseclib\Crypt\ECDSA\Curves; +namespace phpseclib\Crypt\EC\Curves; -use phpseclib\Crypt\ECDSA\BaseCurves\Binary; +use phpseclib\Crypt\EC\BaseCurves\Binary; use phpseclib\Math\BigInteger; class sect239k1 extends Binary diff --git a/phpseclib/Crypt/ECDSA/Curves/sect283k1.php b/phpseclib/Crypt/EC/Curves/sect283k1.php similarity index 87% rename from phpseclib/Crypt/ECDSA/Curves/sect283k1.php rename to phpseclib/Crypt/EC/Curves/sect283k1.php index 6b4b7c88..e60edc32 100644 --- a/phpseclib/Crypt/ECDSA/Curves/sect283k1.php +++ b/phpseclib/Crypt/EC/Curves/sect283k1.php @@ -6,16 +6,16 @@ * PHP version 5 and 7 * * @category Crypt - * @package ECDSA + * @package EC * @author Jim Wiggint on * @copyright 2017 Jim Wigginton * @license http://www.opensource.org/licenses/mit-license.html MIT License * @link http://pear.php.net/package/Math_BigInteger */ -namespace phpseclib\Crypt\ECDSA\Curves; +namespace phpseclib\Crypt\EC\Curves; -use phpseclib\Crypt\ECDSA\BaseCurves\Binary; +use phpseclib\Crypt\EC\BaseCurves\Binary; use phpseclib\Math\BigInteger; class sect283k1 extends Binary diff --git a/phpseclib/Crypt/ECDSA/Curves/sect283r1.php b/phpseclib/Crypt/EC/Curves/sect283r1.php similarity index 87% rename from phpseclib/Crypt/ECDSA/Curves/sect283r1.php rename to phpseclib/Crypt/EC/Curves/sect283r1.php index 65cd968b..abb3a818 100644 --- a/phpseclib/Crypt/ECDSA/Curves/sect283r1.php +++ b/phpseclib/Crypt/EC/Curves/sect283r1.php @@ -6,16 +6,16 @@ * PHP version 5 and 7 * * @category Crypt - * @package ECDSA + * @package EC * @author Jim Wiggint on * @copyright 2017 Jim Wigginton * @license http://www.opensource.org/licenses/mit-license.html MIT License * @link http://pear.php.net/package/Math_BigInteger */ -namespace phpseclib\Crypt\ECDSA\Curves; +namespace phpseclib\Crypt\EC\Curves; -use phpseclib\Crypt\ECDSA\BaseCurves\Binary; +use phpseclib\Crypt\EC\BaseCurves\Binary; use phpseclib\Math\BigInteger; class sect283r1 extends Binary diff --git a/phpseclib/Crypt/ECDSA/Curves/sect409k1.php b/phpseclib/Crypt/EC/Curves/sect409k1.php similarity index 89% rename from phpseclib/Crypt/ECDSA/Curves/sect409k1.php rename to phpseclib/Crypt/EC/Curves/sect409k1.php index 6432e627..be03a574 100644 --- a/phpseclib/Crypt/ECDSA/Curves/sect409k1.php +++ b/phpseclib/Crypt/EC/Curves/sect409k1.php @@ -6,16 +6,16 @@ * PHP version 5 and 7 * * @category Crypt - * @package ECDSA + * @package EC * @author Jim Wiggint on * @copyright 2017 Jim Wigginton * @license http://www.opensource.org/licenses/mit-license.html MIT License * @link http://pear.php.net/package/Math_BigInteger */ -namespace phpseclib\Crypt\ECDSA\Curves; +namespace phpseclib\Crypt\EC\Curves; -use phpseclib\Crypt\ECDSA\BaseCurves\Binary; +use phpseclib\Crypt\EC\BaseCurves\Binary; use phpseclib\Math\BigInteger; class sect409k1 extends Binary diff --git a/phpseclib/Crypt/ECDSA/Curves/sect409r1.php b/phpseclib/Crypt/EC/Curves/sect409r1.php similarity index 89% rename from phpseclib/Crypt/ECDSA/Curves/sect409r1.php rename to phpseclib/Crypt/EC/Curves/sect409r1.php index 641b4ae6..c588d2dd 100644 --- a/phpseclib/Crypt/ECDSA/Curves/sect409r1.php +++ b/phpseclib/Crypt/EC/Curves/sect409r1.php @@ -6,16 +6,16 @@ * PHP version 5 and 7 * * @category Crypt - * @package ECDSA + * @package EC * @author Jim Wiggint on * @copyright 2017 Jim Wigginton * @license http://www.opensource.org/licenses/mit-license.html MIT License * @link http://pear.php.net/package/Math_BigInteger */ -namespace phpseclib\Crypt\ECDSA\Curves; +namespace phpseclib\Crypt\EC\Curves; -use phpseclib\Crypt\ECDSA\BaseCurves\Binary; +use phpseclib\Crypt\EC\BaseCurves\Binary; use phpseclib\Math\BigInteger; class sect409r1 extends Binary diff --git a/phpseclib/Crypt/ECDSA/Curves/sect571k1.php b/phpseclib/Crypt/EC/Curves/sect571k1.php similarity index 90% rename from phpseclib/Crypt/ECDSA/Curves/sect571k1.php rename to phpseclib/Crypt/EC/Curves/sect571k1.php index 8ba5f93e..b54caae4 100644 --- a/phpseclib/Crypt/ECDSA/Curves/sect571k1.php +++ b/phpseclib/Crypt/EC/Curves/sect571k1.php @@ -6,16 +6,16 @@ * PHP version 5 and 7 * * @category Crypt - * @package ECDSA + * @package EC * @author Jim Wiggint on * @copyright 2017 Jim Wigginton * @license http://www.opensource.org/licenses/mit-license.html MIT License * @link http://pear.php.net/package/Math_BigInteger */ -namespace phpseclib\Crypt\ECDSA\Curves; +namespace phpseclib\Crypt\EC\Curves; -use phpseclib\Crypt\ECDSA\BaseCurves\Binary; +use phpseclib\Crypt\EC\BaseCurves\Binary; use phpseclib\Math\BigInteger; class sect571k1 extends Binary diff --git a/phpseclib/Crypt/ECDSA/Curves/sect571r1.php b/phpseclib/Crypt/EC/Curves/sect571r1.php similarity index 90% rename from phpseclib/Crypt/ECDSA/Curves/sect571r1.php rename to phpseclib/Crypt/EC/Curves/sect571r1.php index a99e000a..6aa05062 100644 --- a/phpseclib/Crypt/ECDSA/Curves/sect571r1.php +++ b/phpseclib/Crypt/EC/Curves/sect571r1.php @@ -6,16 +6,16 @@ * PHP version 5 and 7 * * @category Crypt - * @package ECDSA + * @package EC * @author Jim Wiggint on * @copyright 2017 Jim Wigginton * @license http://www.opensource.org/licenses/mit-license.html MIT License * @link http://pear.php.net/package/Math_BigInteger */ -namespace phpseclib\Crypt\ECDSA\Curves; +namespace phpseclib\Crypt\EC\Curves; -use phpseclib\Crypt\ECDSA\BaseCurves\Binary; +use phpseclib\Crypt\EC\BaseCurves\Binary; use phpseclib\Math\BigInteger; class sect571r1 extends Binary diff --git a/phpseclib/Crypt/ECDSA/Formats/Keys/Common.php b/phpseclib/Crypt/EC/Formats/Keys/Common.php similarity index 96% rename from phpseclib/Crypt/ECDSA/Formats/Keys/Common.php rename to phpseclib/Crypt/EC/Formats/Keys/Common.php index 3efe814a..f158a8e5 100644 --- a/phpseclib/Crypt/ECDSA/Formats/Keys/Common.php +++ b/phpseclib/Crypt/EC/Formats/Keys/Common.php @@ -1,25 +1,25 @@ * @copyright 2015 Jim Wigginton * @license http://www.opensource.org/licenses/mit-license.html MIT License * @link http://phpseclib.sourceforge.net */ -namespace phpseclib\Crypt\ECDSA\Formats\Keys; +namespace phpseclib\Crypt\EC\Formats\Keys; use ParagonIE\ConstantTime\Hex; -use phpseclib\Crypt\ECDSA\BaseCurves\Base as BaseCurve; -use phpseclib\Crypt\ECDSA\BaseCurves\Prime as PrimeCurve; -use phpseclib\Crypt\ECDSA\BaseCurves\Binary as BinaryCurve; -use phpseclib\Crypt\ECDSA\BaseCurves\TwistedEdwards as TwistedEdwardsCurve; +use phpseclib\Crypt\EC\BaseCurves\Base as BaseCurve; +use phpseclib\Crypt\EC\BaseCurves\Prime as PrimeCurve; +use phpseclib\Crypt\EC\BaseCurves\Binary as BinaryCurve; +use phpseclib\Crypt\EC\BaseCurves\TwistedEdwards as TwistedEdwardsCurve; use phpseclib\Common\Functions\Strings; use phpseclib\Math\BigInteger; use phpseclib\Math\PrimeField; @@ -28,9 +28,9 @@ use phpseclib\File\ASN1\Maps; use phpseclib\Exception\UnsupportedCurveException; /** - * Generic ECDSA Key Parsing Helper functions + * Generic EC Key Parsing Helper functions * - * @package ECDSA + * @package EC * @author Jim Wigginton * @access public */ @@ -189,7 +189,7 @@ trait Common * If the key contains an implicit curve phpseclib needs the curve * to be explicitly provided * - * @param \phpseclib\Crypt\ECDSA\BaseCurves\Base $curve + * @param \phpseclib\Crypt\EC\BaseCurves\Base $curve */ public static function setImplicitCurve(BaseCurve $curve) { @@ -197,11 +197,11 @@ trait Common } /** - * Returns an instance of \phpseclib\Crypt\ECDSA\BaseCurves\Base based + * Returns an instance of \phpseclib\Crypt\EC\BaseCurves\Base based * on the curve parameters * * @param array $params - * @return \phpseclib\Crypt\ECDSA\BaseCurves\Base|false + * @return \phpseclib\Crypt\EC\BaseCurves\Base|false */ protected static function loadCurveByParam(array $params) { @@ -209,7 +209,7 @@ trait Common throw new \RuntimeException('No parameters are present'); } if (isset($params['namedCurve'])) { - $curve = '\phpseclib\Crypt\ECDSA\Curves\\' . $params['namedCurve']; + $curve = '\phpseclib\Crypt\EC\Curves\\' . $params['namedCurve']; if (!class_exists($curve)) { throw new UnsupportedCurveException('Named Curve of ' . $params['namedCurve'] . ' is not supported'); } @@ -275,7 +275,7 @@ trait Common * Supports both compressed and uncompressed points * * @param string $str - * @param \phpseclib\Crypt\ECDSA\BaseCurves\Base $curve + * @param \phpseclib\Crypt\EC\BaseCurves\Base $curve * @return object[] */ public static function extractPoint($str, BaseCurve $curve) @@ -341,7 +341,7 @@ trait Common * Encode Parameters * * @todo Maybe at some point this could be moved to __toString() for each of the curves? - * @param \phpseclib\Crypt\ECDSA\BaseCurves\Base $curve + * @param \phpseclib\Crypt\EC\BaseCurves\Base $curve * @param bool $returnArray optional * @param array $options optional * @return string|false @@ -367,7 +367,7 @@ trait Common continue; } $testName = $file->getBasename('.php'); - $class = 'phpseclib\Crypt\ECDSA\Curves\\' . $testName; + $class = 'phpseclib\Crypt\EC\Curves\\' . $testName; $reflect = new \ReflectionClass($class); if ($reflect->isFinal()) { continue; @@ -544,7 +544,7 @@ trait Common /** * Use Named Curve * - * A named curve does not include any parameters. It is up to the ECDSA parameters to + * A named curve does not include any parameters. It is up to the EC parameters to * know what the coefficients, the base points, etc, are from the name of the curve. * A named curve is a more concise way of representing a curve */ diff --git a/phpseclib/Crypt/ECDSA/Formats/Keys/OpenSSH.php b/phpseclib/Crypt/EC/Formats/Keys/OpenSSH.php similarity index 92% rename from phpseclib/Crypt/ECDSA/Formats/Keys/OpenSSH.php rename to phpseclib/Crypt/EC/Formats/Keys/OpenSSH.php index afb8e50c..ee8a60d8 100644 --- a/phpseclib/Crypt/ECDSA/Formats/Keys/OpenSSH.php +++ b/phpseclib/Crypt/EC/Formats/Keys/OpenSSH.php @@ -1,35 +1,35 @@ * @copyright 2015 Jim Wigginton * @license http://www.opensource.org/licenses/mit-license.html MIT License * @link http://phpseclib.sourceforge.net */ -namespace phpseclib\Crypt\ECDSA\Formats\Keys; +namespace phpseclib\Crypt\EC\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 phpseclib\Crypt\ECDSA\BaseCurves\Base as BaseCurve; +use phpseclib\Crypt\EC\BaseCurves\Base as BaseCurve; use phpseclib\Exception\UnsupportedCurveException; -use phpseclib\Crypt\ECDSA\Curves\Ed25519; +use phpseclib\Crypt\EC\Curves\Ed25519; use phpseclib\Math\Common\FiniteField\Integer; /** - * OpenSSH Formatted ECDSA Key Handler + * OpenSSH Formatted EC Key Handler * - * @package ECDSA + * @package EC * @author Jim Wigginton * @access public */ @@ -92,7 +92,7 @@ abstract class OpenSSH extends Progenitor $qa = self::extractPoint($parsed['publicKey'], $curve); } else { list($curveName, $publicKey) = Strings::unpackSSH2('ss', $parsed['publicKey']); - $curveName = '\phpseclib\Crypt\ECDSA\Curves\\' . $curveName; + $curveName = '\phpseclib\Crypt\EC\Curves\\' . $curveName; $curve = new $curveName(); $qa = self::extractPoint("\0" . $publicKey, $curve); @@ -138,10 +138,10 @@ abstract class OpenSSH extends Progenitor } /** - * Convert an ECDSA public key to the appropriate format + * Convert an EC public key to the appropriate format * * @access public - * @param \phpseclib\Crypt\ECDSA\BaseCurves\Base $curve + * @param \phpseclib\Crypt\EC\BaseCurves\Base $curve * @param \phpseclib\Math\Common\FiniteField\Integer[] $publicKey * @param array $options optional * @return string @@ -180,7 +180,7 @@ abstract class OpenSSH extends Progenitor * * @access public * @param \phpseclib\Math\Common\FiniteField\Integer $privateKey - * @param \phpseclib\Crypt\ECDSA\Curves\Ed25519 $curve + * @param \phpseclib\Crypt\EC\Curves\Ed25519 $curve * @param \phpseclib\Math\Common\FiniteField\Integer[] $publicKey * @param string $password optional * @param array $options optional diff --git a/phpseclib/Crypt/ECDSA/Formats/Keys/PKCS1.php b/phpseclib/Crypt/EC/Formats/Keys/PKCS1.php similarity index 90% rename from phpseclib/Crypt/ECDSA/Formats/Keys/PKCS1.php rename to phpseclib/Crypt/EC/Formats/Keys/PKCS1.php index 521894c6..96cef1ca 100644 --- a/phpseclib/Crypt/ECDSA/Formats/Keys/PKCS1.php +++ b/phpseclib/Crypt/EC/Formats/Keys/PKCS1.php @@ -1,7 +1,7 @@ * @copyright 2015 Jim Wigginton * @license http://www.opensource.org/licenses/mit-license.html MIT License * @link http://phpseclib.sourceforge.net */ -namespace phpseclib\Crypt\ECDSA\Formats\Keys; +namespace phpseclib\Crypt\EC\Formats\Keys; use phpseclib\Math\Common\FiniteField\Integer; use phpseclib\Crypt\Common\Formats\Keys\PKCS1 as Progenitor; use phpseclib\File\ASN1; use phpseclib\File\ASN1\Maps; -use phpseclib\Crypt\ECDSA\BaseCurves\Base as BaseCurve; +use phpseclib\Crypt\EC\BaseCurves\Base as BaseCurve; use phpseclib\Math\BigInteger; use ParagonIE\ConstantTime\Base64; -use phpseclib\Crypt\ECDSA\BaseCurves\TwistedEdwards as TwistedEdwardsCurve; +use phpseclib\Crypt\EC\BaseCurves\TwistedEdwards as TwistedEdwardsCurve; use phpseclib\Exception\UnsupportedCurveException; /** - * "PKCS1" (RFC5915) Formatted ECDSA Key Handler + * "PKCS1" (RFC5915) Formatted EC Key Handler * - * @package ECDSA + * @package EC * @author Jim Wigginton * @access public */ @@ -87,7 +87,7 @@ abstract class PKCS1 extends Progenitor } /** - * Convert ECDSA parameters to the appropriate format + * Convert EC parameters to the appropriate format * * @access public * @return string @@ -112,7 +112,7 @@ abstract class PKCS1 extends Progenitor * * @access public * @param \phpseclib\Math\Common\FiniteField\Integer $privateKey - * @param \phpseclib\Crypt\ECDSA\BaseCurves\Base $curve + * @param \phpseclib\Crypt\EC\BaseCurves\Base $curve * @param \phpseclib\Math\Common\FiniteField\Integer[] $publicKey * @param string $password optional * @param array $options optional diff --git a/phpseclib/Crypt/ECDSA/Formats/Keys/PKCS8.php b/phpseclib/Crypt/EC/Formats/Keys/PKCS8.php similarity index 93% rename from phpseclib/Crypt/ECDSA/Formats/Keys/PKCS8.php rename to phpseclib/Crypt/EC/Formats/Keys/PKCS8.php index be7e3235..6e9f3d9d 100644 --- a/phpseclib/Crypt/ECDSA/Formats/Keys/PKCS8.php +++ b/phpseclib/Crypt/EC/Formats/Keys/PKCS8.php @@ -1,7 +1,7 @@ * @copyright 2015 Jim Wigginton * @license http://www.opensource.org/licenses/mit-license.html MIT License * @link http://phpseclib.sourceforge.net */ -namespace phpseclib\Crypt\ECDSA\Formats\Keys; +namespace phpseclib\Crypt\EC\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 phpseclib\Crypt\ECDSA\BaseCurves\Base as BaseCurve; -use phpseclib\Crypt\ECDSA\BaseCurves\TwistedEdwards as TwistedEdwardsCurve; +use phpseclib\Crypt\EC\BaseCurves\Base as BaseCurve; +use phpseclib\Crypt\EC\BaseCurves\TwistedEdwards as TwistedEdwardsCurve; use phpseclib\Math\Common\FiniteField\Integer; -use phpseclib\Crypt\ECDSA\Curves\Ed25519; -use phpseclib\Crypt\ECDSA\Curves\Ed448; +use phpseclib\Crypt\EC\Curves\Ed25519; +use phpseclib\Crypt\EC\Curves\Ed448; /** - * PKCS#8 Formatted ECDSA Key Handler + * PKCS#8 Formatted EC Key Handler * - * @package ECDSA + * @package EC * @author Jim Wigginton * @access public */ @@ -164,10 +164,10 @@ abstract class PKCS8 extends Progenitor } /** - * Convert an ECDSA public key to the appropriate format + * Convert an EC public key to the appropriate format * * @access public - * @param \phpseclib\Crypt\ECDSA\BaseCurves\Base $curve + * @param \phpseclib\Crypt\EC\BaseCurves\Base $curve * @param \phpseclib\Math\Common\FiniteField\Integer[] $publicKey * @param array $optiona optional * @return string @@ -196,7 +196,7 @@ abstract class PKCS8 extends Progenitor * * @access public * @param \phpseclib\Math\Common\FiniteField\Integer $privateKey - * @param \phpseclib\Crypt\ECDSA\BaseCurves\Base $curve + * @param \phpseclib\Crypt\EC\BaseCurves\Base $curve * @param \phpseclib\Math\Common\FiniteField\Integer[] $publicKey * @param string $password optional * @param array $options optional diff --git a/phpseclib/Crypt/ECDSA/Formats/Keys/PuTTY.php b/phpseclib/Crypt/EC/Formats/Keys/PuTTY.php similarity index 88% rename from phpseclib/Crypt/ECDSA/Formats/Keys/PuTTY.php rename to phpseclib/Crypt/EC/Formats/Keys/PuTTY.php index 25e3fe36..2ee49750 100644 --- a/phpseclib/Crypt/ECDSA/Formats/Keys/PuTTY.php +++ b/phpseclib/Crypt/EC/Formats/Keys/PuTTY.php @@ -1,32 +1,32 @@ * @copyright 2015 Jim Wigginton * @license http://www.opensource.org/licenses/mit-license.html MIT License * @link http://phpseclib.sourceforge.net */ -namespace phpseclib\Crypt\ECDSA\Formats\Keys; +namespace phpseclib\Crypt\EC\Formats\Keys; use ParagonIE\ConstantTime\Base64; use phpseclib\Math\BigInteger; use phpseclib\Common\Functions\Strings; use phpseclib\Crypt\Common\Formats\Keys\PuTTY as Progenitor; -use phpseclib\Crypt\ECDSA\BaseCurves\Base as BaseCurve; +use phpseclib\Crypt\EC\BaseCurves\Base as BaseCurve; use phpseclib\Math\Common\FiniteField\Integer; -use phpseclib\Crypt\ECDSA\BaseCurves\TwistedEdwards as TwistedEdwardsCurve; +use phpseclib\Crypt\EC\BaseCurves\TwistedEdwards as TwistedEdwardsCurve; /** - * PuTTY Formatted ECDSA Key Handler + * PuTTY Formatted EC Key Handler * - * @package ECDSA + * @package EC * @author Jim Wigginton * @access public */ @@ -40,7 +40,7 @@ abstract class PuTTY extends Progenitor * @var string * @access private */ - const PUBLIC_HANDLER = 'phpseclib\Crypt\ECDSA\Formats\Keys\OpenSSH'; + const PUBLIC_HANDLER = 'phpseclib\Crypt\EC\Formats\Keys\OpenSSH'; /** * Supported Key Types @@ -93,7 +93,7 @@ abstract class PuTTY extends Progenitor * * @access public * @param \phpseclib\Math\Common\FiniteField\Integer $privateKey - * @param \phpseclib\Crypt\ECDSA\BaseCurves\Base $curve + * @param \phpseclib\Crypt\EC\BaseCurves\Base $curve * @param \phpseclib\Math\Common\FiniteField\Integer[] $publicKey * @param string $password optional * @param array $options optional @@ -126,10 +126,10 @@ abstract class PuTTY extends Progenitor } /** - * Convert an ECDSA public key to the appropriate format + * Convert an EC public key to the appropriate format * * @access public - * @param \phpseclib\Crypt\ECDSA\BaseCurves\Base $curve + * @param \phpseclib\Crypt\EC\BaseCurves\Base $curve * @param \phpseclib\Math\Common\FiniteField[] $publicKey * @return string */ diff --git a/phpseclib/Crypt/ECDSA/Formats/Keys/XML.php b/phpseclib/Crypt/EC/Formats/Keys/XML.php similarity index 94% rename from phpseclib/Crypt/ECDSA/Formats/Keys/XML.php rename to phpseclib/Crypt/EC/Formats/Keys/XML.php index e033f7a4..9c6f47ae 100644 --- a/phpseclib/Crypt/ECDSA/Formats/Keys/XML.php +++ b/phpseclib/Crypt/EC/Formats/Keys/XML.php @@ -1,7 +1,7 @@ * @copyright 2015 Jim Wigginton * @license http://www.opensource.org/licenses/mit-license.html MIT License * @link http://phpseclib.sourceforge.net */ -namespace phpseclib\Crypt\ECDSA\Formats\Keys; +namespace phpseclib\Crypt\EC\Formats\Keys; use ParagonIE\ConstantTime\Base64; use phpseclib\Math\BigInteger; -use phpseclib\Crypt\ECDSA\BaseCurves\Base as BaseCurve; -use phpseclib\Crypt\ECDSA\BaseCurves\Prime as PrimeCurve; -use phpseclib\Crypt\ECDSA\BaseCurves\TwistedEdwards as TwistedEdwardsCurve; +use phpseclib\Crypt\EC\BaseCurves\Base as BaseCurve; +use phpseclib\Crypt\EC\BaseCurves\Prime as PrimeCurve; +use phpseclib\Crypt\EC\BaseCurves\TwistedEdwards as TwistedEdwardsCurve; use phpseclib\Exception\UnsupportedCurveException; /** - * XML Formatted ECDSA Key Handler + * XML Formatted EC Key Handler * - * @package ECDSA + * @package EC * @author Jim Wigginton * @access public */ @@ -168,7 +168,7 @@ abstract class XML * Extract points from an XML document * * @param \DOMXPath $xpath - * @param \phpseclib\Crypt\ECDSA\BaseCurves\Base $curve + * @param \phpseclib\Crypt\EC\BaseCurves\Base $curve * @return object[] */ private static function extractPointRFC4050(\DOMXPath $xpath, BaseCurve $curve) @@ -192,11 +192,11 @@ abstract class XML } /** - * Returns an instance of \phpseclib\Crypt\ECDSA\BaseCurves\Base based + * Returns an instance of \phpseclib\Crypt\EC\BaseCurves\Base based * on the curve parameters * * @param \DomXPath $xpath - * @return \phpseclib\Crypt\ECDSA\BaseCurves\Base|false + * @return \phpseclib\Crypt\EC\BaseCurves\Base|false */ private static function loadCurveByParam(\DOMXPath $xpath) { @@ -209,7 +209,7 @@ abstract class XML throw new UnsupportedCurveException('Curve with OID of ' . $oid . ' is not supported'); } - $curve = '\phpseclib\Crypt\ECDSA\Curves\\' . $name; + $curve = '\phpseclib\Crypt\EC\Curves\\' . $name; if (!class_exists($curve)) { throw new UnsupportedCurveException('Named Curve of ' . $name . ' is not supported'); } @@ -272,11 +272,11 @@ abstract class XML } /** - * Returns an instance of \phpseclib\Crypt\ECDSA\BaseCurves\Base based + * Returns an instance of \phpseclib\Crypt\EC\BaseCurves\Base based * on the curve parameters * * @param \DomXPath $xpath - * @return \phpseclib\Crypt\ECDSA\BaseCurves\Base|false + * @return \phpseclib\Crypt\EC\BaseCurves\Base|false */ private static function loadCurveByParamRFC4050(\DOMXPath $xpath) { @@ -363,7 +363,7 @@ abstract class XML /** * Convert a public key to the appropriate format * - * @param \phpseclib\Crypt\ECDSA\BaseCurves\Base $curve + * @param \phpseclib\Crypt\EC\BaseCurves\Base $curve * @param \phpseclib\Math\Common\FiniteField\Integer[] $publicKey * @param array $options optional * @return string @@ -395,16 +395,16 @@ abstract class XML $publicKey = "\4" . $publicKey[0]->toBytes() . $publicKey[1]->toBytes(); - return '<' . $pre . 'ECKeyValue xmlns' . $post . '="http://www.w3.org/2009/xmldsig11#">' . "\r\n" . + return '<' . $pre . 'ECDSAKeyValue xmlns' . $post . '="http://www.w3.org/2009/xmldsig11#">' . "\r\n" . self::encodeXMLParameters($curve, $pre, $options) . "\r\n" . '<' . $pre . 'PublicKey>' . Base64::encode($publicKey) . '' . "\r\n" . - ''; + ''; } /** * Encode Parameters * - * @param \phpseclib\Crypt\ECDSA\BaseCurves\Base $curve + * @param \phpseclib\Crypt\EC\BaseCurves\Base $curve * @param string $pre * @param array $options optional * @return string|false diff --git a/phpseclib/Crypt/ECDSA/Formats/Keys/libsodium.php b/phpseclib/Crypt/EC/Formats/Keys/libsodium.php similarity index 91% rename from phpseclib/Crypt/ECDSA/Formats/Keys/libsodium.php rename to phpseclib/Crypt/EC/Formats/Keys/libsodium.php index f0710bb5..0bc69aeb 100644 --- a/phpseclib/Crypt/ECDSA/Formats/Keys/libsodium.php +++ b/phpseclib/Crypt/EC/Formats/Keys/libsodium.php @@ -10,22 +10,22 @@ * PHP version 5 * * @category Crypt - * @package ECDSA + * @package EC * @author Jim Wigginton * @copyright 2015 Jim Wigginton * @license http://www.opensource.org/licenses/mit-license.html MIT License * @link http://phpseclib.sourceforge.net */ -namespace phpseclib\Crypt\ECDSA\Formats\Keys; +namespace phpseclib\Crypt\EC\Formats\Keys; -use phpseclib\Crypt\ECDSA\Curves\Ed25519; +use phpseclib\Crypt\EC\Curves\Ed25519; use phpseclib\Math\Common\FiniteField\Integer; /** * libsodium Key Handler * - * @package ECDSA + * @package EC * @author Jim Wigginton * @access public */ @@ -76,10 +76,10 @@ abstract class libsodium } /** - * Convert an ECDSA public key to the appropriate format + * Convert an EC public key to the appropriate format * * @access public - * @param \phpseclib\Crypt\ECDSA\Curves\Ed25519 $curve + * @param \phpseclib\Crypt\EC\Curves\Ed25519 $curve * @param \phpseclib\Math\Common\FiniteField\Integer[] $publicKey * @return string */ @@ -93,7 +93,7 @@ abstract class libsodium * * @access public * @param \phpseclib\Math\Common\FiniteField\Integer $privateKey - * @param \phpseclib\Crypt\ECDSA\Curves\Ed25519 $curve + * @param \phpseclib\Crypt\EC\Curves\Ed25519 $curve * @param \phpseclib\Math\Common\FiniteField\Integer[] $publicKey * @param string $password optional * @return string diff --git a/phpseclib/Crypt/ECDSA/Formats/Signature/ASN1.php b/phpseclib/Crypt/EC/Formats/Signature/ASN1.php similarity index 96% rename from phpseclib/Crypt/ECDSA/Formats/Signature/ASN1.php rename to phpseclib/Crypt/EC/Formats/Signature/ASN1.php index 42a9bbe9..c212c358 100644 --- a/phpseclib/Crypt/ECDSA/Formats/Signature/ASN1.php +++ b/phpseclib/Crypt/EC/Formats/Signature/ASN1.php @@ -16,7 +16,7 @@ * @link http://phpseclib.sourceforge.net */ -namespace phpseclib\Crypt\ECDSA\Formats\Signature; +namespace phpseclib\Crypt\EC\Formats\Signature; use phpseclib\Math\BigInteger; use phpseclib\File\ASN1 as Encoder; diff --git a/phpseclib/Crypt/ECDSA/Formats/Signature/Raw.php b/phpseclib/Crypt/EC/Formats/Signature/Raw.php similarity index 83% rename from phpseclib/Crypt/ECDSA/Formats/Signature/Raw.php rename to phpseclib/Crypt/EC/Formats/Signature/Raw.php index 6e180ca4..b4c06c31 100644 --- a/phpseclib/Crypt/ECDSA/Formats/Signature/Raw.php +++ b/phpseclib/Crypt/EC/Formats/Signature/Raw.php @@ -1,7 +1,7 @@ * @access public */ diff --git a/phpseclib/Crypt/ECDSA/Formats/Signature/SSH2.php b/phpseclib/Crypt/EC/Formats/Signature/SSH2.php similarity index 97% rename from phpseclib/Crypt/ECDSA/Formats/Signature/SSH2.php rename to phpseclib/Crypt/EC/Formats/Signature/SSH2.php index 0ab6461b..7e1f5770 100644 --- a/phpseclib/Crypt/ECDSA/Formats/Signature/SSH2.php +++ b/phpseclib/Crypt/EC/Formats/Signature/SSH2.php @@ -15,7 +15,7 @@ * @link http://phpseclib.sourceforge.net */ -namespace phpseclib\Crypt\ECDSA\Formats\Signature; +namespace phpseclib\Crypt\EC\Formats\Signature; use phpseclib\Math\BigInteger; use phpseclib\Common\Functions\Strings; diff --git a/phpseclib/Crypt/ECDSA/Parameters.php b/phpseclib/Crypt/EC/Parameters.php similarity index 80% rename from phpseclib/Crypt/ECDSA/Parameters.php rename to phpseclib/Crypt/EC/Parameters.php index 4d2002e4..0bff2efc 100644 --- a/phpseclib/Crypt/ECDSA/Parameters.php +++ b/phpseclib/Crypt/EC/Parameters.php @@ -1,28 +1,28 @@ * @copyright 2015 Jim Wigginton * @license http://www.opensource.org/licenses/mit-license.html MIT License * @link http://phpseclib.sourceforge.net */ -namespace phpseclib\Crypt\ECDSA; +namespace phpseclib\Crypt\EC; -use phpseclib\Crypt\ECDSA; +use phpseclib\Crypt\EC; /** - * ECDSA Parameters + * EC Parameters * - * @package ECDSA + * @package EC * @author Jim Wigginton * @access public */ -class Parameters extends ECDSA +class Parameters extends EC { /** * Returns the parameters diff --git a/phpseclib/Crypt/ECDSA/PrivateKey.php b/phpseclib/Crypt/EC/PrivateKey.php similarity index 92% rename from phpseclib/Crypt/ECDSA/PrivateKey.php rename to phpseclib/Crypt/EC/PrivateKey.php index ad309f82..8b61091f 100644 --- a/phpseclib/Crypt/ECDSA/PrivateKey.php +++ b/phpseclib/Crypt/EC/PrivateKey.php @@ -1,35 +1,35 @@ * @copyright 2015 Jim Wigginton * @license http://www.opensource.org/licenses/mit-license.html MIT License * @link http://phpseclib.sourceforge.net */ -namespace phpseclib\Crypt\ECDSA; +namespace phpseclib\Crypt\EC; -use phpseclib\Crypt\ECDSA; -use phpseclib\Crypt\ECDSA\Formats\Signature\ASN1 as ASN1Signature; +use phpseclib\Crypt\EC; +use phpseclib\Crypt\EC\Formats\Signature\ASN1 as ASN1Signature; use phpseclib\Math\BigInteger; -use phpseclib\Crypt\ECDSA\BaseCurves\TwistedEdwards as TwistedEdwardsCurve; +use phpseclib\Crypt\EC\BaseCurves\TwistedEdwards as TwistedEdwardsCurve; use phpseclib\Crypt\Hash; -use phpseclib\Crypt\ECDSA\Curves\Ed25519; -use phpseclib\Crypt\ECDSA\Formats\Keys\PKCS8; +use phpseclib\Crypt\EC\Curves\Ed25519; +use phpseclib\Crypt\EC\Formats\Keys\PKCS8; use phpseclib\Crypt\Common; /** - * ECDSA Private Key + * EC Private Key * - * @package ECDSA + * @package EC * @author Jim Wigginton * @access public */ -class PrivateKey extends ECDSA implements Common\PrivateKey +class PrivateKey extends EC implements Common\PrivateKey { use Common\Traits\PasswordProtected; @@ -104,7 +104,7 @@ class PrivateKey extends ECDSA implements Common\PrivateKey if (self::$engines['OpenSSL'] && in_array($this->hash->getHash(), openssl_get_md_methods())) { $signature = ''; - // altho PHP's OpenSSL bindings only supported ECDSA key creation in PHP 7.1 they've long + // altho PHP's OpenSSL bindings only supported EC key creation in PHP 7.1 they've long // supported signing / verification // we use specified curves to avoid issues with OpenSSL possibly not supporting a given named curve; // doing this may mean some curve-specific optimizations can't be used but idk if OpenSSL even @@ -196,7 +196,7 @@ class PrivateKey extends ECDSA implements Common\PrivateKey $type = self::validatePlugin('Keys', 'PKCS8', 'savePublicKey'); $key = $type::savePublicKey($this->curve, $this->QA); - $key = ECDSA::load($key, 'PKCS8') + $key = EC::load($key, 'PKCS8') ->withHash($this->hash->getHash()) ->withSignatureFormat($this->shortFormat); if ($this->curve instanceof TwistedEdwardsCurve) { diff --git a/phpseclib/Crypt/ECDSA/PublicKey.php b/phpseclib/Crypt/EC/PublicKey.php similarity index 90% rename from phpseclib/Crypt/ECDSA/PublicKey.php rename to phpseclib/Crypt/EC/PublicKey.php index fdcda54e..2d0d6fc8 100644 --- a/phpseclib/Crypt/ECDSA/PublicKey.php +++ b/phpseclib/Crypt/EC/PublicKey.php @@ -1,36 +1,36 @@ * @copyright 2015 Jim Wigginton * @license http://www.opensource.org/licenses/mit-license.html MIT License * @link http://phpseclib.sourceforge.net */ -namespace phpseclib\Crypt\ECDSA; +namespace phpseclib\Crypt\EC; -use phpseclib\Crypt\ECDSA; +use phpseclib\Crypt\EC; use phpseclib\Crypt\Hash; use phpseclib\Math\BigInteger; -use phpseclib\Crypt\ECDSA\Formats\Signature\ASN1 as ASN1Signature; -use phpseclib\Crypt\ECDSA\BaseCurves\TwistedEdwards as TwistedEdwardsCurve; -use phpseclib\Crypt\ECDSA\Curves\Ed25519; -use phpseclib\Crypt\ECDSA\Formats\Keys\PKCS1; -use phpseclib\Crypt\ECDSA\Formats\Keys\PKCS8; +use phpseclib\Crypt\EC\Formats\Signature\ASN1 as ASN1Signature; +use phpseclib\Crypt\EC\BaseCurves\TwistedEdwards as TwistedEdwardsCurve; +use phpseclib\Crypt\EC\Curves\Ed25519; +use phpseclib\Crypt\EC\Formats\Keys\PKCS1; +use phpseclib\Crypt\EC\Formats\Keys\PKCS8; use phpseclib\Crypt\Common; /** - * ECDSA Public Key + * EC Public Key * - * @package ECDSA + * @package EC * @author Jim Wigginton * @access public */ -class PublicKey extends ECDSA implements Common\PublicKey +class PublicKey extends EC implements Common\PublicKey { use Common\Traits\Fingerprint; diff --git a/phpseclib/Crypt/PublicKeyLoader.php b/phpseclib/Crypt/PublicKeyLoader.php index 6dfc6def..147cc86c 100644 --- a/phpseclib/Crypt/PublicKeyLoader.php +++ b/phpseclib/Crypt/PublicKeyLoader.php @@ -39,7 +39,7 @@ abstract class PublicKeyLoader public static function load($key, $password = false) { try { - $new = ECDSA::load($key, false, $password); + $new = EC::load($key, false, $password); } catch (\Exception $e) {} if (!isset($new)) { diff --git a/phpseclib/File/X509.php b/phpseclib/File/X509.php index 87e2df57..b607f8a8 100644 --- a/phpseclib/File/X509.php +++ b/phpseclib/File/X509.php @@ -32,7 +32,7 @@ use phpseclib\Crypt\Hash; use phpseclib\Crypt\Random; use phpseclib\Crypt\RSA; use phpseclib\Crypt\DSA; -use phpseclib\Crypt\ECDSA; +use phpseclib\Crypt\EC; use phpseclib\Crypt\Common\PublicKey; use phpseclib\Crypt\Common\PrivateKey; use phpseclib\Exception\UnsupportedAlgorithmException; @@ -1380,10 +1380,10 @@ class X509 break; case 'id-Ed25519': case 'id-Ed448': - $key = ECDSA::load($publicKey, 'PKCS8'); + $key = EC::load($publicKey, 'PKCS8'); break; case 'id-ecPublicKey': - $key = ECDSA::load($publicKey, 'PKCS8'); + $key = EC::load($publicKey, 'PKCS8'); switch ($signatureAlgorithm) { case 'ecdsa-with-SHA1': case 'ecdsa-with-SHA224': @@ -2093,7 +2093,7 @@ class X509 case 'id-ecPublicKey': case 'id-Ed25519': case 'id-Ed448': - return ECDSA::load($key, 'PKCS8'); + return EC::load($key, 'PKCS8'); case 'id-dsa': return DSA::load($key, 'PKCS8'); } @@ -2952,7 +2952,7 @@ class X509 throw new UnsupportedAlgorithmException('The only supported hash algorithms for DSA are: sha1, sha224, sha256'); } - if ($key instanceof ECDSA) { + if ($key instanceof EC) { switch ($key->getCurve()) { case 'Ed25519': case 'Ed448': @@ -2966,10 +2966,10 @@ class X509 case 'sha512': return 'ecdsa-with-' . strtoupper($key->getHash()); } - throw new UnsupportedAlgorithmException('The only supported hash algorithms for ECDSA are: sha1, sha224, sha256, sha384, sha512'); + throw new UnsupportedAlgorithmException('The only supported hash algorithms for EC are: sha1, sha224, sha256, sha384, sha512'); } - throw new UnsupportedAlgorithmException('The only supported public key classes are: RSA, DSA, ECDSA'); + throw new UnsupportedAlgorithmException('The only supported public key classes are: RSA, DSA, EC'); } /** diff --git a/phpseclib/Net/SSH2.php b/phpseclib/Net/SSH2.php index b6e88de4..7bec4923 100644 --- a/phpseclib/Net/SSH2.php +++ b/phpseclib/Net/SSH2.php @@ -57,7 +57,7 @@ use phpseclib\Crypt\Rijndael; use phpseclib\Crypt\Common\PrivateKey; use phpseclib\Crypt\RSA; use phpseclib\Crypt\DSA; -use phpseclib\Crypt\ECDSA; +use phpseclib\Crypt\EC; use phpseclib\Crypt\TripleDES; use phpseclib\Crypt\Twofish; use phpseclib\Crypt\ChaCha20; @@ -2412,7 +2412,7 @@ class SSH2 $hash = 'sha1'; $signatureType = 'ssh-rsa'; } - } else if ($publickey instanceof ECDSA) { + } else if ($publickey instanceof EC) { $privatekey = $privatekey->withSignatureFormat('SSH2'); $curveName = $privatekey->getCurve(); switch ($curveName) { @@ -2443,7 +2443,7 @@ class SSH2 $hash = 'sha1'; $signatureType = 'ssh-dss'; } else { - throw new UnsupportedAlgorithmException('Please use either an RSA key, an ECDSA one or a DSA key'); + throw new UnsupportedAlgorithmException('Please use either an RSA key, an EC one or a DSA key'); } $publickeyStr = $publickey->toString('OpenSSH', ['binary' => true]); @@ -4601,7 +4601,7 @@ class SSH2 case 'ecdsa-sha2-nistp256': case 'ecdsa-sha2-nistp384': case 'ecdsa-sha2-nistp521': - $key = ECDSA::load($server_public_host_key, 'OpenSSH') + $key = EC::load($server_public_host_key, 'OpenSSH') ->withSignatureFormat('SSH2'); switch ($this->signature_format) { case 'ssh-ed25519': diff --git a/tests/Unit/Crypt/ECDSA/CurveTest.php b/tests/Unit/Crypt/EC/CurveTest.php similarity index 95% rename from tests/Unit/Crypt/ECDSA/CurveTest.php rename to tests/Unit/Crypt/EC/CurveTest.php index 972913bb..b0166547 100644 --- a/tests/Unit/Crypt/ECDSA/CurveTest.php +++ b/tests/Unit/Crypt/EC/CurveTest.php @@ -6,15 +6,15 @@ * @license http://www.opensource.org/licenses/mit-license.html MIT License */ -use phpseclib\Crypt\ECDSA; +use phpseclib\Crypt\EC; use phpseclib\File\ASN1; -use phpseclib\Crypt\ECDSA\Curves\Ed448; +use phpseclib\Crypt\EC\Curves\Ed448; use phpseclib\Math\BigInteger; use phpseclib\Crypt\PublicKeyLoader; class Ed448PublicKey { - use phpseclib\Crypt\ECDSA\Formats\Keys\Common; + use phpseclib\Crypt\EC\Formats\Keys\Common; public static function load($key, $password = '') { @@ -37,17 +37,17 @@ class Ed448PrivateKey } } -class Unit_Crypt_ECDSA_CurveTest extends PhpseclibTestCase +class Unit_Crypt_EC_CurveTest extends PhpseclibTestCase { public function curves() { $curves = []; - foreach (new \DirectoryIterator(__DIR__ . '/../../../../phpseclib/Crypt/ECDSA/Curves/') as $file) { + foreach (new \DirectoryIterator(__DIR__ . '/../../../../phpseclib/Crypt/EC/Curves/') as $file) { if ($file->getExtension() != 'php') { continue; } $testName = $file->getBasename('.php'); - $class = 'phpseclib\Crypt\ECDSA\Curves\\' . $testName; + $class = 'phpseclib\Crypt\EC\Curves\\' . $testName; $reflect = new \ReflectionClass($class); if ($reflect->isFinal()) { continue; @@ -61,7 +61,7 @@ class Unit_Crypt_ECDSA_CurveTest extends PhpseclibTestCase public function allCurves() { $curves = []; - foreach (new \DirectoryIterator(__DIR__ . '/../../../../phpseclib/Crypt/ECDSA/Curves/') as $file) { + foreach (new \DirectoryIterator(__DIR__ . '/../../../../phpseclib/Crypt/EC/Curves/') as $file) { if ($file->getExtension() != 'php') { continue; } @@ -74,7 +74,7 @@ class Unit_Crypt_ECDSA_CurveTest extends PhpseclibTestCase public function curvesWithOIDs() { - $class = new ReflectionClass('phpseclib\Crypt\ECDSA\Formats\Keys\PKCS8'); + $class = new ReflectionClass('phpseclib\Crypt\EC\Formats\Keys\PKCS8'); $initialize = $class->getMethod('initialize_static_variables'); $initialize->setAccessible(true); @@ -99,7 +99,7 @@ class Unit_Crypt_ECDSA_CurveTest extends PhpseclibTestCase */ public function testBasePoint($name) { - $class = 'phpseclib\Crypt\ECDSA\Curves\\' . $name; + $class = 'phpseclib\Crypt\EC\Curves\\' . $name; $curve = new $class; $this->assertTrue($curve->verifyPoint($curve->getBasePoint()), "Failed to verify basepoint of curve $name"); } @@ -112,7 +112,7 @@ class Unit_Crypt_ECDSA_CurveTest extends PhpseclibTestCase */ public function testKeyGeneration($name) { - $class = 'phpseclib\Crypt\ECDSA\Curves\\' . $name; + $class = 'phpseclib\Crypt\EC\Curves\\' . $name; $curve = new $class; $dA = $curve->createRandomMultiplier(); $QA = $curve->multiplyPoint($curve->getBasePoint(), $dA); @@ -126,7 +126,7 @@ class Unit_Crypt_ECDSA_CurveTest extends PhpseclibTestCase */ public function testCurveExistance($name) { - $this->assertFileExists(__DIR__ . "/../../../../phpseclib/Crypt/ECDSA/Curves/$name.php"); + $this->assertFileExists(__DIR__ . "/../../../../phpseclib/Crypt/EC/Curves/$name.php"); } /** @@ -167,12 +167,12 @@ class Unit_Crypt_ECDSA_CurveTest extends PhpseclibTestCase $plaintext = 'zzz'; - ECDSA::useInternalEngine(); - $privatekey = ECDSA::createKey($name); + EC::useInternalEngine(); + $privatekey = EC::createKey($name); $publickey = $privatekey->getPublicKey(); $sig = $privatekey->sign($plaintext); - ECDSA::useBestEngine(); + EC::useBestEngine(); $this->assertTrue($publickey->verify($plaintext, $sig)); } @@ -190,12 +190,12 @@ class Unit_Crypt_ECDSA_CurveTest extends PhpseclibTestCase $plaintext = 'zzz'; - ECDSA::useBestEngine(); - $privatekey = ECDSA::createKey($name); + EC::useBestEngine(); + $privatekey = EC::createKey($name); $publickey = $privatekey->getPublicKey(); $sig = $privatekey->sign($plaintext); - ECDSA::useInternalEngine(); + EC::useInternalEngine(); $this->assertTrue($publickey->verify($plaintext, $sig)); } @@ -204,8 +204,8 @@ class Unit_Crypt_ECDSA_CurveTest extends PhpseclibTestCase */ public function testEd448TestVectors() { - ECDSA::addFileFormat('Ed448PublicKey'); - ECDSA::addFileFormat('Ed448PrivateKey'); + EC::addFileFormat('Ed448PublicKey'); + EC::addFileFormat('Ed448PrivateKey'); $private = pack('H*', '6c82a562cb808d10d632be89c8513ebf6c929f34ddfa8c9f63c9960ef6e348a3528c8a3fcc2f044e39a3fc5b94492f8f032e7549a20098f95b'); $public = pack('H*', '5fd7449b59b461fd2ce787ec616ad46a1da1342485a70e1f8a0ea75d80e96778edf124769b46c7061bd6783df1e50f6cd1fa1abeafe8256180'); @@ -319,7 +319,7 @@ class Unit_Crypt_ECDSA_CurveTest extends PhpseclibTestCase */ public function testEd25519TestVectors() { - ECDSA::useBestEngine(); + EC::useBestEngine(); $private = pack('H*', '9d61b19deffd5a60ba844af492ec2cc44449c5697b326919703bac031cae7f60'); $public = pack('H*', 'd75a980182b10ab7d54bfed3c964073a0ee172f3daa62325af021a68f707511a'); @@ -483,9 +483,9 @@ Private-MAC: b85ca0eb7c612df5d18af85128821bd53faaa3ef'); $signature1 = $private->sign($message, 'ASN1'); $signature2 = $private->sign($message, 'ASN1'); - // phpseclib's ECDSA implementation uses a CSPRNG to generate the k parameter. + // phpseclib's EC implementation uses a CSPRNG to generate the k parameter. // used correctly this should result in different signatures every time. - // RFC6979 describes a deterministic ECDSA scheme wherein two signatures for the same + // RFC6979 describes a deterministic EC scheme wherein two signatures for the same // plaintext would yield the same value so if that were to be switched to then this // unit test would need to be updated $this->assertNotEquals($signature1, $signature2); diff --git a/tests/Unit/Crypt/ECDSA/KeyTest.php b/tests/Unit/Crypt/EC/KeyTest.php similarity index 98% rename from tests/Unit/Crypt/ECDSA/KeyTest.php rename to tests/Unit/Crypt/EC/KeyTest.php index 9c35ca07..3e7fc80a 100644 --- a/tests/Unit/Crypt/ECDSA/KeyTest.php +++ b/tests/Unit/Crypt/EC/KeyTest.php @@ -5,16 +5,16 @@ * @license http://www.opensource.org/licenses/mit-license.html MIT License */ -use phpseclib\Crypt\ECDSA; -use phpseclib\Crypt\ECDSA\Formats\Keys\PKCS1; -use phpseclib\Crypt\ECDSA\Formats\Keys\PKCS8; -use phpseclib\Crypt\ECDSA\Formats\Keys\PuTTY; -use phpseclib\Crypt\ECDSA\Formats\Keys\OpenSSH; -use phpseclib\Crypt\ECDSA\Formats\Keys\XML; +use phpseclib\Crypt\EC; +use phpseclib\Crypt\EC\Formats\Keys\PKCS1; +use phpseclib\Crypt\EC\Formats\Keys\PKCS8; +use phpseclib\Crypt\EC\Formats\Keys\PuTTY; +use phpseclib\Crypt\EC\Formats\Keys\OpenSSH; +use phpseclib\Crypt\EC\Formats\Keys\XML; use phpseclib\Crypt\PublicKeyLoader; -use phpseclib\Crypt\ECDSA\PrivateKey; +use phpseclib\Crypt\EC\PrivateKey; -class Unit_Crypt_ECDSA_LoadKeyTest extends PhpseclibTestCase +class Unit_Crypt_EC_LoadKeyTest extends PhpseclibTestCase { // openssl ecparam -name secp256k1 -genkey -noout -out secp256k1.pem public function testPKCS1PrivateKey() @@ -443,7 +443,7 @@ pomV7r6gmoMYteGVABfgAAAAD3ZhZ3JhbnRAdmFncmFudAECAwQFBg== return parent::assertSame($expected, $actual, $message); } - public function testOpenSSHPrivateECDSA() + public function testOpenSSHPrivateEC() { $key = '-----BEGIN OPENSSH PRIVATE KEY----- b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAAAaAAAABNlY2RzYS diff --git a/tests/Unit/File/X509/X509Test.php b/tests/Unit/File/X509/X509Test.php index cb18c499..589c6798 100644 --- a/tests/Unit/File/X509/X509Test.php +++ b/tests/Unit/File/X509/X509Test.php @@ -759,7 +759,7 @@ pMAUPdvLhVjjTvw4ypYrNMc4Z3z5n3bfCVzIQL5Z $this->assertTrue($x509->validateSignature(false)); } - public function testECDSALoad() + public function testECLoad() { // openssl req -x509 -nodes -days 3650 -newkey ec:<(openssl ecparam -name prime256v1) -keyout ecdsakey.pem -out ecdsacert.pem @@ -873,7 +873,7 @@ uhPlgkgknwIgdDqqKIAF60ouiynsbU53ERS0TwpjeFiYGA48SwYW3Nk= $this->assertSame('id-dsa-with-sha256', $r['signatureAlgorithm']['algorithm']); } - public function testECDSASave() + public function testECSave() { $private = '-----BEGIN PRIVATE KEY----- MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgQ0o1byJQbAcuklBt