public void TestSecp256k1() { var priKey = Secp256k1.GeneratePrivateKey(); var pubKey = Secp256k1.DerivePublicKey(priKey); var msgHash = Keccack256.CalculateHash("hello world"); var signature = Secp256k1.Sign(msgHash, priKey); var recoveredPubKey = Secp256k1.RecoverPublickey(Keccack256.CalculateHash("hello world"), signature); Assert.True(pubKey.SequenceEqual(recoveredPubKey)); }