mirror of
https://github.com/phpseclib/phpseclib.git
synced 2024-06-01 08:00:52 +00:00
Merge branch '3.0'
This commit is contained in:
commit
8b08fbfe63
|
@ -278,7 +278,7 @@ class Binary extends Base
|
|||
*
|
||||
* Not supported because it is covered by patents.
|
||||
* Quoting https://www.openssl.org/docs/man1.1.0/apps/ecparam.html ,
|
||||
*
|
||||
*
|
||||
* "Due to patent issues the compressed option is disabled by default for binary curves
|
||||
* and can be enabled by defining the preprocessor macro OPENSSL_EC_BIN_PT_COMP at
|
||||
* compile time."
|
||||
|
@ -370,7 +370,7 @@ class Binary extends Base
|
|||
if (isset($p[2])) {
|
||||
return $p;
|
||||
}
|
||||
|
||||
|
||||
$p[2] = clone $this->one;
|
||||
$p['fresh'] = true;
|
||||
return $p;
|
||||
|
|
|
@ -128,8 +128,9 @@ abstract class PKCS8 extends Progenitor
|
|||
|
||||
$temp = new BigInteger($key['privateKey'], 256);
|
||||
$components['dA'] = $components['curve']->convertInteger($temp);
|
||||
|
||||
$components['QA'] = self::extractPoint($key['publicKey'], $components['curve']);
|
||||
$components['QA'] = isset($key['publicKey']) ?
|
||||
self::extractPoint($key['publicKey'], $components['curve']) :
|
||||
$components['curve']->multiplyPoint($components['curve']->getBasePoint(), $components['dA']);
|
||||
|
||||
return $components;
|
||||
}
|
||||
|
|
|
@ -78,7 +78,6 @@ abstract class libsodium
|
|||
$components['QA'] = isset($public) ?
|
||||
self::extractPoint($public, $curve) :
|
||||
$curve->multiplyPoint($curve->getBasePoint(), $components['dA']);
|
||||
|
||||
|
||||
return $components;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user