Bitcoin Forum
May 06, 2024, 02:36:17 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: ECDSA_verify() problem  (Read 1427 times)
d33tah (OP)
Newbie
*
Offline Offline

Activity: 47
Merit: 0



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

Posts: 1714962977

View Profile Personal Message (Offline)

Ignore
1714962977
Reply with quote  #2

1714962977
Report to moderator
The block chain is the main innovation of Bitcoin. It is the first distributed timestamping system.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714962977
Hero Member
*
Offline Offline

Posts: 1714962977

View Profile Personal Message (Offline)

Ignore
1714962977
Reply with quote  #2

1714962977
Report to moderator
1714962977
Hero Member
*
Offline Offline

Posts: 1714962977

View Profile Personal Message (Offline)

Ignore
1714962977
Reply with quote  #2

1714962977
Report to moderator
kokjo
Legendary
*
Offline Offline

Activity: 1050
Merit: 1000

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 (OP)
Newbie
*
Offline Offline

Activity: 47
Merit: 0



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
Merit: 1000

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 (OP)
Newbie
*
Offline Offline

Activity: 47
Merit: 0



View Profile
September 29, 2011, 02:04:06 PM
Last edit: October 07, 2011, 10:22:40 AM by d33tah
 #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:  

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