public bool ContainsKey(Cryptography.ECC.ECPoint publicKey) { return(ContainsKey(publicKey.EncodePoint(true).ToScriptHash())); }
public KeyPair GetKey(Cryptography.ECC.ECPoint publicKey) { return(GetKey(publicKey.EncodePoint(true).ToScriptHash())); }
public extern static bool VerifyWithECDsa(ByteString message, Cryptography.ECC.ECPoint pubkey, ByteString signature, NamedCurve curve);
public static UInt160 CreateStandardAccount(Cryptography.ECC.ECPoint pubKey) { return(Contract.CreateStandardAccount(pubKey)); }
public extern static bool CheckSig(Cryptography.ECC.ECPoint pubkey, ByteString signature);
public StealthPubKeys(Cryptography.ECC.ECPoint payloadPubKey, Cryptography.ECC.ECPoint viewPubKey) { this.PayloadPubKey = payloadPubKey; this.ViewPubKey = viewPubKey; }
public void Deserialize(BinaryReader reader) { PayloadPubKey = reader.ReadSerializable <Cryptography.ECC.ECPoint>(); ViewPubKey = reader.ReadSerializable <Cryptography.ECC.ECPoint>(); }
public Account GetAccount(Cryptography.ECC.ECPoint publicKey) { return(GetAccount(publicKey.EncodePoint(true).ToScriptHash())); }
public StealthPubKeys() { PayloadPubKey = new Cryptography.ECC.ECPoint(); ViewPubKey = new Cryptography.ECC.ECPoint(); }
public static SchnorrSignatureType Generate(byte[] x, Cryptography.ECC.ECPoint P1, Cryptography.ECC.ECPoint P2, int index) { byte[] a = GenerateRandomScalar(); if (index == 0) { Cryptography.ECC.ECPoint L1 = Cryptography.ECC.ECCurve.Secp256r1.G * a; byte[] s2 = GenerateRandomScalar(); byte[] c2 = Crypto.Default.Hash256(L1.EncodePoint(true)); Cryptography.ECC.ECPoint L2 = Cryptography.ECC.ECCurve.Secp256r1.G * s2 + P2 * c2; byte[] c1 = Crypto.Default.Hash256(L2.EncodePoint(true)); byte[] s1 = ScalarFunctions.MulSub(c1, x, a); SchnorrSignatureType retSig = new SchnorrSignatureType(L1, s1, s2); return(retSig); } else if (index == 1) { Cryptography.ECC.ECPoint L2 = Cryptography.ECC.ECCurve.Secp256r1.G * a; byte[] s1 = GenerateRandomScalar(); byte[] c1 = Crypto.Default.Hash256(L2.EncodePoint(true)); Cryptography.ECC.ECPoint L1 = Cryptography.ECC.ECCurve.Secp256r1.G * s1 + P1 * c1; byte[] c2 = Crypto.Default.Hash256(L1.EncodePoint(true)); byte[] s2 = ScalarFunctions.MulSub(c2, x, a); SchnorrSignatureType retSig = new SchnorrSignatureType(L1, s1, s2); return(retSig); } else { throw new Exception("SchnorrNonLinkable Index Overload Error!"); } }
public static byte[] PointToScalar(Cryptography.ECC.ECPoint pt) { return(new byte[0]); }
public static extern UInt160 CreateStandardAccount(Cryptography.ECC.ECPoint pubKey);
public static extern bool CheckWitness(Cryptography.ECC.ECPoint pubkey);
public extern static bool Verify(byte[] message, Cryptography.ECC.ECPoint pubkey, byte[] signature);