| /dokuwiki/vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Formats/Keys/ |
| H A D | JWK.php | 73 $curve = '\phpseclib3\Crypt\EC\Curves\\' . str_replace('P-', 'nistp', $key->crv); 74 $curve = new $curve(); 76 if ($curve instanceof TwistedEdwardsCurve) { 77 $QA = self::extractPoint(Strings::base64url_decode($key->x), $curve); 81 $arr = $curve->extractSecret(Strings::base64url_decode($key->d)); 86 $curve->convertInteger(new BigInteger(Strings::base64url_decode($key->x), 256)), 87 $curve->convertInteger(new BigInteger(Strings::base64url_decode($key->y), 256)) 90 if (!$curve->verifyPoint($QA)) { 100 $curve->rangeCheck($dA); 110 private static function getAlias(BaseCurve $curve) argument [all …]
|
| H A D | Common.php | 187 * @param BaseCurve $curve 189 public static function setImplicitCurve(BaseCurve $curve) argument 191 self::$implicitCurve = $curve; 207 $curve = '\phpseclib3\Crypt\EC\Curves\\' . $params['namedCurve']; 208 if (!class_exists($curve)) { 211 return new $curve(); 223 $curve = new PrimeCurve(); 224 $curve->setModulo($data['fieldID']['parameters']); 225 $curve->setCoefficients( 229 $point = self::extractPoint("\0" . $data['base'], $curve); [all …]
|
| H A D | libsodium.php | 67 $curve = new Ed25519(); 68 $components = ['curve' => $curve]; 70 $arr = $curve->extractSecret($private); 75 self::extractPoint($public, $curve) : 76 $curve->multiplyPoint($curve->getBasePoint(), $components['dA']); 84 * @param Ed25519 $curve 88 public static function savePublicKey(Ed25519 $curve, array $publicKey) argument 90 return $curve->encodePoint($publicKey); 97 * @param Ed25519 $curve 103 …public static function savePrivateKey(BigInteger $privateKey, Ed25519 $curve, array $publicKey, $s… argument [all …]
|
| H A D | MontgomeryPrivate.php | 53 $curve = new Curve25519(); 56 $curve = new Curve448(); 62 $components = ['curve' => $curve]; 64 $curve->rangeCheck($components['dA']); 74 * @param MontgomeryCurve $curve 78 public static function savePublicKey(MontgomeryCurve $curve, array $publicKey) argument 87 * @param MontgomeryCurve $curve 93 …public static function savePrivateKey(BigInteger $privateKey, MontgomeryCurve $curve, array $publi… argument 99 return str_pad($privateKey->toBytes(), $curve::SIZE, "\0", STR_PAD_RIGHT);
|
| H A D | OpenSSH.php | 70 $curve = self::loadCurveByParam(['namedCurve' => $curveName]); 71 $curve->rangeCheck($privateKey); 73 'curve' => $curve, 75 'QA' => self::extractPoint("\0$publicKey", $curve), 85 $curve = new Ed25519(); 86 $qa = self::extractPoint($parsed['publicKey'], $curve); 90 $curve = new $curveName(); 92 $qa = self::extractPoint("\0" . $publicKey, $curve); 96 'curve' => $curve, 107 private static function getAlias(BaseCurve $curve) argument [all …]
|
| H A D | XML.php | 96 $curve = self::loadCurveByParam($xpath); 101 self::extractPointRFC4050($xpath, $curve) : 102 self::extractPoint("\0" . $pubkey, $curve); 175 * @param BaseCurve $curve 178 private static function extractPointRFC4050(\DOMXPath $xpath, BaseCurve $curve) argument 189 $curve->convertInteger(new BigInteger($x->item(0)->getAttribute('Value'))), 190 $curve->convertInteger(new BigInteger($y->item(0)->getAttribute('Value'))) 192 if (!$curve->verifyPoint($point)) { 216 $curve = '\phpseclib3\Crypt\EC\Curves\\' . $name; 217 if (!class_exists($curve)) { [all …]
|
| H A D | MontgomeryPublic.php | 45 $curve = new Curve25519(); 48 $curve = new Curve448(); 54 $components = ['curve' => $curve]; 63 * @param MontgomeryCurve $curve 67 public static function savePublicKey(MontgomeryCurve $curve, array $publicKey) argument
|
| H A D | PKCS8.php | 210 * @param BaseCurve $curve 215 public static function savePublicKey(BaseCurve $curve, array $publicKey, array $options = []) argument 218 if ($curve instanceof MontgomeryCurve) { 220 str_pad(strrev($publicKey[0]->toBytes()), $curve::SIZE, "\0", STR_PAD_RIGHT), 222 $curve instanceof Curve25519 ? 'id-X25519' : 'id-X448', 227 if ($curve instanceof TwistedEdwardsCurve) { 229 $curve->encodePoint($publicKey), 231 $curve instanceof Ed25519 ? 'id-Ed25519' : 'id-Ed448', 236 $params = new ASN1\Element(self::encodeParameters($curve, false, $options)); 247 * @param BaseCurve $curve [all …]
|
| H A D | PuTTY.php | 88 * @param BaseCurve $curve 95 …public static function savePrivateKey(BigInteger $privateKey, BaseCurve $curve, array $publicKey, … argument 99 $public = explode(' ', OpenSSH::savePublicKey($curve, $publicKey)); 107 if (!$curve instanceof TwistedEdwardsCurve) { 114 $private = $curve instanceof TwistedEdwardsCurve ? 124 * @param BaseCurve $curve 128 public static function savePublicKey(BaseCurve $curve, array $publicKey) argument 130 $public = explode(' ', OpenSSH::savePublicKey($curve, $publicKey));
|
| H A D | PKCS1.php | 147 public static function saveParameters(BaseCurve $curve, array $options = []) argument 151 if ($curve instanceof TwistedEdwardsCurve || $curve instanceof MontgomeryCurve) { 155 $key = self::encodeParameters($curve, false, $options); 166 * @param BaseCurve $curve 173 …public static function savePrivateKey(BigInteger $privateKey, BaseCurve $curve, array $publicKey, … argument 177 if ($curve instanceof TwistedEdwardsCurve || $curve instanceof MontgomeryCurve) { 186 'parameters' => new ASN1\Element(self::encodeParameters($curve)),
|
| /dokuwiki/vendor/phpseclib/phpseclib/phpseclib/Crypt/ |
| H A D | EC.php | 78 protected $curve; variable in phpseclib3\\Crypt\\EC 140 * @param string $curve 143 public static function createKey($curve) argument 152 $curveName = self::getCurveCase($curve); 153 $curve = '\phpseclib3\Crypt\EC\Curves\\' . $curveName; 155 if (!class_exists($curve)) { 159 $reflect = new \ReflectionClass($curve); 205 …ew BadConfigurationException("EC::createKey: Engine $engine is forced but unsupported for $curve"); 211 $curve = new $curve(); 212 if ($curve instanceof TwistedEdwardsCurve) { [all …]
|
| /dokuwiki/vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Formats/Signature/ |
| H A D | SSH2.php | 71 * @param string $curve 74 public static function save(BigInteger $r, BigInteger $s, $curve) argument 76 switch ($curve) { 78 $curve = 'nistp256'; 81 $curve = 'nistp384'; 84 $curve = 'nistp521'; 92 return Strings::packSSH2('ss', 'ecdsa-sha2-' . $curve, $blob);
|
| H A D | IEEE.php | 57 * @param string $curve 61 public static function save(BigInteger $r, BigInteger $s, $curve, $length) argument
|
| /dokuwiki/vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/ |
| H A D | PublicKey.php | 46 if ($this->curve instanceof MontgomeryCurve) { 56 if (self::$forcedEngine === 'libsodium' && !$this->curve instanceof Ed25519) { 62 …if ($this->curve instanceof Ed25519 && self::$forcedEngine !== 'PHP' && self::$forcedEngine !== 'O… 82 if ($this->curve instanceof TwistedEdwardsCurve) { 88 …$keyTypeConstant = $this->curve instanceof Ed25519 ? 'OPENSSL_KEYTYPE_ED25519' : 'OPENSSL_KEYTYPE_… 110 $order = $this->curve->getOrder(); 112 $curve = $this->curve; 113 if (strlen($signature) != 2 * $curve::SIZE) { 117 $R = substr($signature, 0, $curve::SIZE); 118 $S = substr($signature, $curve::SIZE); [all …]
|
| H A D | PrivateKey.php | 67 if (self::$forcedEngine === 'libsodium' && !$this->curve instanceof Curve25519) { 71 if ($this->curve instanceof Curve25519 && self::$forcedEngine !== 'PHP') { 81 if ($this->curve instanceof MontgomeryCurve) { 82 $point = [$this->curve->convertInteger(new BigInteger(strrev($coordinates), 256))]; 83 $point = $this->curve->multiplyPoint($point, $this->dA); 87 if (!$this->curve instanceof TwistedEdwardsCurve) { 91 $point = PKCS1::extractPoint($coordinates, $this->curve); 92 $point = $this->curve->multiplyPoint($point, $this->dA); 93 if ($this->curve instanceof TwistedEdwardsCurve) { 94 return $this->curve->encodePoint($point); [all …]
|
| H A D | Parameters.php | 34 return $type::saveParameters($this->curve, $options);
|
| /dokuwiki/vendor/phpseclib/phpseclib/phpseclib/Net/ |
| H A D | SSH2.php | 1814 $curve = strpos($this->kex_algorithm, 'curve25519-sha256') === 0 ? 1817 $ourPrivate = EC::createKey($curve);
|