Lines Matching refs:curve

61         if ($this->curve instanceof MontgomeryCurve) {
62 if ($this->curve instanceof Curve25519 && self::$engines['libsodium']) {
66 $point = [$this->curve->convertInteger(new BigInteger(strrev($coordinates), 256))];
67 $point = $this->curve->multiplyPoint($point, $this->dA);
70 if (!$this->curve instanceof TwistedEdwardsCurve) {
73 $point = PKCS1::extractPoint($coordinates, $this->curve);
74 $point = $this->curve->multiplyPoint($point, $this->dA);
75 if ($this->curve instanceof TwistedEdwardsCurve) {
76 return $this->curve->encodePoint($point);
94 if ($this->curve instanceof MontgomeryCurve) {
99 $order = $this->curve->getOrder();
107 if ($this->curve instanceof TwistedEdwardsCurve) {
108 … if ($this->curve instanceof Ed25519 && self::$engines['libsodium'] && !isset($this->context)) {
116 $A = $this->curve->encodePoint($this->QA);
117 $curve = $this->curve;
118 $hash = new Hash($curve::HASH);
120 $secret = substr($hash->hash($this->dA->secret), $curve::SIZE);
122 if ($curve instanceof Ed25519) {
134 $R = $curve->multiplyPoint($curve->getBasePoint(), $r);
135 $R = $curve->encodePoint($R);
142 $S = str_pad(strrev($S->toBytes()), $curve::SIZE, "\0");
174 list($x, $y) = $this->curve->multiplyPoint($this->curve->getBasePoint(), $k);
225 return $type::savePrivateKey($this->dA, $this->curve, $this->QA, $this->password, $options);
238 if ($this->curve instanceof MontgomeryCurve) {
244 $key = $type::savePublicKey($this->curve, $this->QA);
246 if ($this->curve instanceof MontgomeryCurve) {
252 if ($this->curve instanceof TwistedEdwardsCurve) {