Pages:
Author

Topic: [CANCELLED] C# guru's - Need signmessage & verifymessage fill in the blanks - page 2. (Read 3114 times)

hero member
Activity: 765
Merit: 503
hero member
Activity: 765
Merit: 503
It just does a double hash.. ComputeHash(ComputeHash(data)) I believe

Ahhh... cool.  Was thinking from type Double, lol
hero member
Activity: 765
Merit: 503
Java implementation he is adding 2 bit ints r & s. The c# out of the box class doesn't have these, so ill have to wrap it.

public static class ECDSASignature {
 
        public BigInteger r, s;
 

 
        public ECDSASignature(BigInteger r, BigInteger s) {
 
            this.r = r;
 
            this.s = s;
 
        }
sr. member
Activity: 369
Merit: 250
It just does a double hash.. ComputeHash(ComputeHash(data)) I believe
hero member
Activity: 765
Merit: 503
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...
hero member
Activity: 765
Merit: 503
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);
sr. member
Activity: 369
Merit: 250
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.
legendary
Activity: 1260
Merit: 1000
Drunk Posts
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
sr. member
Activity: 369
Merit: 250
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.
legendary
Activity: 1260
Merit: 1000
Drunk Posts
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.
sr. member
Activity: 369
Merit: 250
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.
hero member
Activity: 765
Merit: 503
Just about done.  Theres a few Classes that don't seem to exist in bouncy castle.  Just hunting them down now.
sr. member
Activity: 369
Merit: 250
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.
hero member
Activity: 765
Merit: 503
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.
legendary
Activity: 1764
Merit: 1007
I thought I'm nice and let the other guy first, and I'm at work right now anyway.
sr. member
Activity: 369
Merit: 250
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.
legendary
Activity: 924
Merit: 1004
Firstbits: 1pirata
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
legendary
Activity: 1764
Merit: 1007
i'm also ready to help out if still needed (my SO profile: http://stackoverflow.com/users/90742/herzmeister)
sr. member
Activity: 369
Merit: 250
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. 
hero member
Activity: 765
Merit: 503
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.
Pages:
Jump to: