Bitcoin Forum
November 07, 2024, 05:58:18 PM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1] 2 3 »  All
  Print  
Author Topic: [CANCELLED] C# guru's - Need signmessage & verifymessage fill in the blanks  (Read 3146 times)
slothbag (OP)
Sr. Member
****
Offline Offline

Activity: 369
Merit: 250



View Profile
September 19, 2013, 05:44:33 AM
Last edit: December 05, 2013, 12:17:37 AM by slothbag
 #1

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/BitcoinCryptoTest

File 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.0

Update: I am cancelling the bounty for this due to lack of interest.
doof
Hero Member
*****
Offline Offline

Activity: 765
Merit: 503


View Profile WWW
September 19, 2013, 06:59:27 AM
 #2

Happy to look at it tomorrow, after my Brisbane meetup tonight.
doof
Hero Member
*****
Offline Offline

Activity: 765
Merit: 503


View Profile WWW
September 19, 2013, 07:06:25 AM
 #3

Actually, looking at it now.
doof
Hero Member
*****
Offline Offline

Activity: 765
Merit: 503


View Profile WWW
September 19, 2013, 07:21:12 AM
 #4

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)
Sr. Member
****
Offline Offline

Activity: 369
Merit: 250



View Profile
September 19, 2013, 10:33:26 AM
 #5

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. 
herzmeister
Legendary
*
Offline Offline

Activity: 1764
Merit: 1007



View Profile WWW
September 19, 2013, 10:38:39 AM
 #6

i'm also ready to help out if still needed (my SO profile: http://stackoverflow.com/users/90742/herzmeister)

https://localbitcoins.com/?ch=80k | BTC: 1LJvmd1iLi199eY7EVKtNQRW3LqZi8ZmmB
paraipan
In memoriam
Legendary
*
Offline Offline

Activity: 924
Merit: 1004


Firstbits: 1pirata


View Profile WWW
September 19, 2013, 11:06:17 AM
 #7

I think people would be more willing to help if you sent the bounty in escrow on Rugatu, assuming is your question of course.

http://www.rugatu.com/questions/21141/are-there-any-gurus-at-c

BTCitcoin: An Idea Worth Saving - Q&A with bitcoins on rugatu.com - Check my rep
slothbag (OP)
Sr. Member
****
Offline Offline

Activity: 369
Merit: 250



View Profile
September 19, 2013, 11:11:56 AM
 #8

i'm also ready to help out if still needed (my SO profile: http://stackoverflow.com/users/90742/herzmeister)

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 Offline

Activity: 1764
Merit: 1007



View Profile WWW
September 19, 2013, 11:31:19 AM
 #9

I thought I'm nice and let the other guy first, and I'm at work right now anyway.

https://localbitcoins.com/?ch=80k | BTC: 1LJvmd1iLi199eY7EVKtNQRW3LqZi8ZmmB
doof
Hero Member
*****
Offline Offline

Activity: 765
Merit: 503


View Profile WWW
September 19, 2013, 09:40:33 PM
 #10

i'm also ready to help out if still needed (my SO profile: http://stackoverflow.com/users/90742/herzmeister)

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)
Sr. Member
****
Offline Offline

Activity: 369
Merit: 250



View Profile
September 19, 2013, 11:39:32 PM
 #11

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
Hero Member
*****
Offline Offline

Activity: 765
Merit: 503


View Profile WWW
September 19, 2013, 11:54:20 PM
 #12

Just about done.  Theres a few Classes that don't seem to exist in bouncy castle.  Just hunting them down now.
slothbag (OP)
Sr. Member
****
Offline Offline

Activity: 369
Merit: 250



View Profile
September 20, 2013, 12:05:38 AM
Last edit: September 20, 2013, 12:16:39 AM by slothbag
 #13

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.
mb300sd
Legendary
*
Offline Offline

Activity: 1260
Merit: 1000

Drunk Posts


View Profile WWW
September 20, 2013, 12:16:36 AM
 #14

I haven't even looked at this code in months, but I did implement full tx signing and verification in C# here, https://github.com/mb300sd/Bitcoin-Tool/tree/master/Bitcoin%20Tool

Something might be helpful.

1D7FJWRzeKa4SLmTznd3JpeNU13L1ErEco
slothbag (OP)
Sr. Member
****
Offline Offline

Activity: 369
Merit: 250



View Profile
September 20, 2013, 12:18:12 AM
 #15

I haven't even looked at this code in months, but I did implement full tx signing and verification in C# here, https://github.com/mb300sd/Bitcoin-Tool/tree/master/Bitcoin%20Tool

Something might be helpful.

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 Offline

Activity: 1260
Merit: 1000

Drunk Posts


View Profile WWW
September 20, 2013, 12:22:41 AM
 #16

I haven't even looked at this code in months, but I did implement full tx signing and verification in C# here, https://github.com/mb300sd/Bitcoin-Tool/tree/master/Bitcoin%20Tool

Something might be helpful.

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)
Sr. Member
****
Offline Offline

Activity: 369
Merit: 250



View Profile
September 20, 2013, 12:32:07 AM
 #17

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
Hero Member
*****
Offline Offline

Activity: 765
Merit: 503


View Profile WWW
September 20, 2013, 12:33:37 AM
 #18

I haven't even looked at this code in months, but I did implement full tx signing and verification in C# here, https://github.com/mb300sd/Bitcoin-Tool/tree/master/Bitcoin%20Tool

Something might be helpful.

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
Hero Member
*****
Offline Offline

Activity: 765
Merit: 503


View Profile WWW
September 20, 2013, 12:35:18 AM
 #19

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)
Sr. Member
****
Offline Offline

Activity: 369
Merit: 250



View Profile
September 20, 2013, 12:35:28 AM
 #20

It just does a double hash.. ComputeHash(ComputeHash(data)) I believe
Pages: [1] 2 3 »  All
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!