slothbag (OP)
|
|
September 19, 2013, 05:44:33 AM Last edit: December 05, 2013, 12:17:37 AM by slothbag |
|
Hi All, Any C# guru's want a quick job? I need signmessage and verifymessage implemented, BitcoinJ code is in place, needs translating into C#. Check out this C# project on GitHub https://github.com/slothbag/BitcoinCryptoTestFile ECKeyPair.cs lines 90-200 have been commented out, they are a copy from BitcoinJ and obviously don't compile in C#. The first to make this very simple program sign and verify messages compatible with Bitcoin-QT there is 1 BTC for ya. The existing C# code is from mb300sb and his excellent C# library here https://bitcointalk.org/index.php?topic=148163.0Update: I am cancelling the bounty for this due to lack of interest.
|
|
|
|
doof
|
|
September 19, 2013, 06:59:27 AM |
|
Happy to look at it tomorrow, after my Brisbane meetup tonight.
|
|
|
|
doof
|
|
September 19, 2013, 07:06:25 AM |
|
Actually, looking at it now.
|
|
|
|
doof
|
|
September 19, 2013, 07:21:12 AM |
|
Most of it is easy fixes.
Change the static methods to not static. No need for them.
And a issues are just case problems. BigInteger.multiply should be BigInteger.Multiply, BigInteger.Long etc
If you go to your objectbrowser, you should see all the methods.
Gotta run to my meetup now. If the bounties not collected by tomorrow morn, ill finish it up.
|
|
|
|
slothbag (OP)
|
|
September 19, 2013, 10:33:26 AM |
|
Yeah, should be mostly straight forward, though there are a few curly ones in there like mismatch ECKey vs ECKeyPair classes..
I had a good crack at it myself but didn't wont to spend too long on it.. I figured the crypto experts would be able to get it working pretty quick.
Submit a pull request when your done, i'll run it through a test script with 100 addresses and different messages to confirm it works before releasing the bounty.
Thanks for looking into it for me.
|
|
|
|
|
|
slothbag (OP)
|
|
September 19, 2013, 11:11:56 AM |
|
Well no one has submitted a pull request yet.. first one to submit a working solution will get the coin. Not ideal I know... but it's not that big of a job either.
|
|
|
|
herzmeister
Legendary
Offline
Activity: 1764
Merit: 1007
|
|
September 19, 2013, 11:31:19 AM |
|
I thought I'm nice and let the other guy first, and I'm at work right now anyway.
|
|
|
|
doof
|
|
September 19, 2013, 09:40:33 PM |
|
Well no one has submitted a pull request yet.. first one to submit a working solution will get the coin. Not ideal I know... but it's not that big of a job either. Cant github from work, so I just copied and paste. Is the bounty still out? Should finish it off in an hour.
|
|
|
|
slothbag (OP)
|
|
September 19, 2013, 11:39:32 PM |
|
Cant github from work, so I just copied and paste. Is the bounty still out? Should finish it off in an hour.
Yeah mate, still available. Send us a link or whatever when your done and i'll have a look.
|
|
|
|
doof
|
|
September 19, 2013, 11:54:20 PM |
|
Just about done. Theres a few Classes that don't seem to exist in bouncy castle. Just hunting them down now.
|
|
|
|
slothbag (OP)
|
|
September 20, 2013, 12:05:38 AM Last edit: September 20, 2013, 12:16:39 AM by slothbag |
|
No probs, I should mention I dont want any extra dll's to be required.
All the required code should be able to be translated from the BitcoinJ library (BitcoinJ also uses Bouncy Castle). But if you find a different class, as long as its not too bloated, that's ok too.
|
|
|
|
|
slothbag (OP)
|
|
September 20, 2013, 12:18:12 AM |
|
Yeah, I tried the dataSign method you had, but the message signing required some extra work, I think because Bitcoin-QT use some compressed signature which chops out the public key or something.
|
|
|
|
mb300sd
Legendary
Offline
Activity: 1260
Merit: 1000
Drunk Posts
|
|
September 20, 2013, 12:22:41 AM |
|
Yeah, I tried the dataSign method you had, but the message signing required some extra work, I think because Bitcoin-QT use some compressed signature which chops out the public key or something. Well, if doof doesn't get it tonight, I might have a go at it tomorrow, just have to find my original source somewhere and install VS on this new laptop
|
1D7FJWRzeKa4SLmTznd3JpeNU13L1ErEco
|
|
|
slothbag (OP)
|
|
September 20, 2013, 12:32:07 AM |
|
Well, if doof doesn't get it tonight, I might have a go at it tomorrow, just have to find my original source somewhere and install VS on this new laptop
The GitHub project I created (linked above) has a crypto folder, which is pretty much 99% your code just cut down for this exercise. Hopefully the submitted changes I can push back into your library.
|
|
|
|
doof
|
|
September 20, 2013, 12:33:37 AM |
|
Yeah, I tried the dataSign method you had, but the message signing required some extra work, I think because Bitcoin-QT use some compressed signature which chops out the public key or something. Well, if doof doesn't get it tonight, I might have a go at it tomorrow, just have to find my original source somewhere and install VS on this new laptop Just tying to find out what this method does: then done Sha256Hash.createDouble(messageBytes);
|
|
|
|
doof
|
|
September 20, 2013, 12:35:18 AM |
|
No probs, I should mention I dont want any extra dll's to be required.
All the required code should be able to be translated from the BitcoinJ library (BitcoinJ also uses Bouncy Castle). But if you find a different class, as long as its not too bloated, that's ok too.
Yeah, that was my assumption. Just translating...
|
|
|
|
slothbag (OP)
|
|
September 20, 2013, 12:35:28 AM |
|
It just does a double hash.. ComputeHash(ComputeHash(data)) I believe
|
|
|
|
|