Lines Matching refs:curve
50 if ($this->curve instanceof MontgomeryCurve) {
60 $order = $this->curve->getOrder();
62 if ($this->curve instanceof TwistedEdwardsCurve) {
67 … if ($this->curve instanceof Ed25519 && self::$engines['libsodium'] && !isset($this->context)) {
71 $curve = $this->curve;
72 if (strlen($signature) != 2 * $curve::SIZE) {
76 $R = substr($signature, 0, $curve::SIZE);
77 $S = substr($signature, $curve::SIZE);
80 $R = PKCS1::extractPoint($R, $curve);
81 $R = $this->curve->convertToInternal($R);
93 $A = $curve->encodePoint($this->QA);
95 if ($curve instanceof Ed25519) {
103 $hash = new Hash($curve::HASH);
104 $k = $hash->hash($dom2 . substr($signature, 0, $curve::SIZE) . $A . $message);
109 $qa = $curve->convertToInternal($this->QA);
111 $lhs = $curve->multiplyPoint($curve->getBasePoint(), $S);
112 $rhs = $curve->multiplyPoint($qa, $k);
113 $rhs = $curve->addPoint($rhs, $R);
114 $rhs = $curve->convertToAffine($rhs);
150 $u1 = $this->curve->convertInteger($u1);
151 $u2 = $this->curve->convertInteger($u2);
153 list($x1, $y1) = $this->curve->multiplyAddPoints(
154 [$this->curve->getBasePoint(), $this->QA],
175 return $type::savePublicKey($this->curve, $this->QA, $options);