Author

Topic: Verify Bitcoin address signed message in C# (Read 1080 times)

full member
Activity: 173
Merit: 100
member
Activity: 66
Merit: 10
You can verify the message as a whole using the verifymessage bitcoind' API RPC command. Take a look at: https://github.com/GeorgeKimionis/BitcoinLib for a working C# implementation, you then need to call: VerifyMessage(String bitcoinAddress, String signature, String message).
newbie
Activity: 1
Merit: 0
Hi guys,

I've been searching everywhere for this but can't find it anywhere.  I'd like to verify a signed message's signature as being generated by a specific Bitcoin address using C#.

I'm not a strong crypto-coder so I was hoping for a pre-made solution, I found the code at http://stackoverflow.com/a/20400041 though this only seems to verify that the signature is valid, not that it came from a specified address.

In essence, I am looking for a method like so

Code:
public static bool VerifySignature(string address, string message, string signature)
{
    //jiggery pokery that likely uses the wonderful Bouncy Castle

    return (Signature valid and generated by specified address)
}

I found similar tools that do this in Python but would really appreciate a C# method and I suspect many others will appreciate it too.  Does anyone know where I should look?  It's entirely possible I've just been using the wrong search terms in my hunt Smiley

Andy
Jump to: