public static bool VerifySignature(uint256 message, UnblindedSignature signature, PubKey signerPubKey)
        {
            if (!Context.Instance.TryCreatePubKey(signerPubKey.ToBytes(), out var signerECPubkey))
            {
                throw new FormatException("Invalid signer pubkey.");
            }

            var P = signerECPubkey.Q;

            var sG = (signature.S * EC.G).ToGroupElement();
            var cP = P * signature.C;
            var R  = cP + sG;
            var t  = R.ToGroupElement().x.Normalize();

            using var sha = new SHA256();
            Span <byte> tmp = stackalloc byte[32];

            message.ToBytes(tmp, false);
            sha.Write(tmp);
            t.WriteToSpan(tmp);
            sha.Write(tmp);
            sha.GetHash(tmp);
            return(new Scalar(tmp) == signature.C);
        }
            public bool VerifyUnblindedSignature(UnblindedSignature signature, byte[] data)
            {
                var hash = new uint256(Hashes.SHA256(data));

                return(SchnorrBlinding.VerifySignature(hash, signature, Key.PubKey));
            }
 public bool VerifyUnblindedSignature(UnblindedSignature signature, uint256 dataHash)
 {
     return(SchnorrBlinding.VerifySignature(dataHash, signature, Key.PubKey));
 }