function token_verify($Hash, $Qx, $Qy, $R, $S) { $pGOST = GOSTcurve::generator_GOST(); $curve_GOST = GOSTcurve::curve_GOST(); $pubk = new PublicKey($pGOST, new Point($curve_GOST, gmp_Utils::gmp_hexdec('0x' . $Qx), gmp_Utils::gmp_hexdec('0x' . $Qy))); $got = $pubk->GOST_verifies(gmp_Utils::gmp_hexdec('0x' . $Hash), new Signature(gmp_Utils::gmp_hexdec('0x' . $R), gmp_Utils::gmp_hexdec('0x' . $S))); return $got; }