Bitcoin Forum
December 10, 2016, 09:01:35 AM *
News: Latest stable version of Bitcoin Core: 0.13.1  [Torrent].
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: ECDSA_verify() problem  (Read 1236 times)
d33tah
Jr. Member
*
Offline Offline

Activity: 47



View Profile
September 28, 2011, 05:56:49 PM
 #1

Hi folks,

I've recently thought of an interesting project that could help me understand Bitcoin internals and C programming on embedded devices. The project would be an external Arduino wallet - someone42 sent me an implementation of ECDSA_sign that would work on Atmega's and now I need a verification code so I could be able to test if the signatures generated by the devices are correct.

I, with the help of sipa, hacked Bitcoin's Sign() function to look like this: http://wklej.org/id/598789/ ; then, using the data generated by these printf's, I managed to write such an app:
http://wklej.org/id/599540/

Unfortunately, although the data should be correct, the ECDSA_verify returns 0. Does anybody have an idea why is that?

Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1481360495
Hero Member
*
Offline Offline

Posts: 1481360495

View Profile Personal Message (Offline)

Ignore
1481360495
Reply with quote  #2

1481360495
Report to moderator
1481360495
Hero Member
*
Offline Offline

Posts: 1481360495

View Profile Personal Message (Offline)

Ignore
1481360495
Reply with quote  #2

1481360495
Report to moderator
1481360495
Hero Member
*
Offline Offline

Posts: 1481360495

View Profile Personal Message (Offline)

Ignore
1481360495
Reply with quote  #2

1481360495
Report to moderator
kokjo
Legendary
*
Offline Offline

Activity: 1050

You are WRONG!


View Profile
September 28, 2011, 06:00:11 PM
 #2

do we get the ECDSA_sign code?

"The whole problem with the world is that fools and fanatics are always so certain of themselves and wiser people so full of doubts." -Bertrand Russell
d33tah
Jr. Member
*
Offline Offline

Activity: 47



View Profile
September 29, 2011, 02:09:12 AM
 #3

It's a standard code from OpenSSL 1.0.0e crypto.

kokjo
Legendary
*
Offline Offline

Activity: 1050

You are WRONG!


View Profile
September 29, 2011, 12:03:10 PM
 #4

It's a standard code from OpenSSL 1.0.0e crypto.
can't help you if you are not providing me with the faulty code. Sad

im thinking the device's code is wrong....

"The whole problem with the world is that fools and fanatics are always so certain of themselves and wiser people so full of doubts." -Bertrand Russell
d33tah
Jr. Member
*
Offline Offline

Activity: 47



View Profile
September 29, 2011, 02:04:06 PM
 #5

I'm not testing it on the device. So far, I'm trying to create a testing environment on a PC - I'm trying to build an app, that could just verify, if a given signature is correct or not.

I got the signature data hacking bitcoin client this way:
http://wklej.org/id/598789/

And the testing app looks this way:
http://wklej.org/id/599540/

Both of which you can easily compile and test yourself - the testing app is complete, yet faulty.

So, the problem stays open.

Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!