Post
Topic
Board Development & Technical Discussion
Re: Source code for ECDSA operations (key generation, signing, verifying, etc)
by
schalk
on 13/04/2014, 23:04:08 UTC
Sorry, was just out for the weekend. I was actually at Kim Dotcom's mansion for the Internet Party picnic, it was an amazing weekend. Interestingly the first person I spoke to at the event use to be a developer at MtGox.

Thanks for that, but I will probably put up a repository later this week and I will give you commit access. Smiley just thought it would look good to have something like this on my CV.

Awesome - cheers for that. I have already noted down the issue with returning a compressed key everytime, it's on my mental todo list. Nunit is awesome, my personal preference of a testing framework, what mocking framework do you usually use? I'm quite a fan of Telerik's JustMock.

Yeah, my extensions class is a complete mess at the moment. What's your opinion on extension for strings like HexToBigInteger, HexToBytes and for byte[] ToBigIntegerUnsigned etc? I wasn't sure if those are better kept as static methods or extension methods.

Also, your point about adding in a keypair class. I wasn't too sure about this, I know that the likes of Bitcoinj use this approach. But I was considering maybe separating things out a bit more, having classes like:
PrivateKey - then PrivateKey would have a property called PublicKey
PublicKey - then PublicKey will have a property called PubKeyHash
PubKeyHash - which is essentially the bitcoin address which can be representing with different encoding methods.

I haven't put much thought into the Address class. But I was thinking about maybe making the Address class abstract and having classes like PubKeyHashAddress and ScriptHashAddress inheriting from Address.

What are your thoughts?