Bitcoin Forum
November 09, 2024, 05:57:47 PM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: SHA256 recognizing signer  (Read 379 times)
Piggy (OP)
Hero Member
*****
Offline Offline

Activity: 784
Merit: 1416



View Profile WWW
August 18, 2017, 05:44:13 AM
 #1

Hi,

Anybody has some material/code snippet/example explaining how given multiple signed messages (using SHA256), we can determine which were signed with the same key?

Thanks
jambola2
Legendary
*
Offline Offline

Activity: 1120
Merit: 1038


View Profile
August 18, 2017, 05:49:50 AM
Merited by ABCbits (3)
 #2

I think you've misunderstood what SHA-256 is.
SHA is a hash function, ie: it takes one value (a message), and outputs one value (a hash). There is no key involved.

Bitcoin signature uses ECDSA, there's stuff like PGP which uses RSA/DSA. But no, SHA256 does not allow for signatures.
The closest I can think of, is when a website publishes a SHA checksum for a file, allowing you to verify that the file was not maliciously altered.

Maybe explain your specific situation more, that might help others figure out what you're looking for.

No longer active on bitcointalk, however, you can still reach me via PMs if needed.
Piggy (OP)
Hero Member
*****
Offline Offline

Activity: 784
Merit: 1416



View Profile WWW
August 18, 2017, 06:02:54 AM
 #3

I think you've misunderstood what SHA-256 is.
SHA is a hash function, ie: it takes one value (a message), and outputs one value (a hash). There is no key involved.

Bitcoin signature uses ECDSA, there's stuff like PGP which uses RSA/DSA. But no, SHA256 does not allow for signatures.
The closest I can think of, is when a website publishes a SHA checksum for a file, allowing you to verify that the file was not maliciously altered.

Maybe explain your specific situation more, that might help others figure out what you're looking for.

thanks to clarify that.

I read in bitcoin or other coins, a transaction is accepted when other nodes recognize that the public key (address) and the hashed transaction itself were signed with the same key.

I'm interested in how this is done in specific, i guess i should look up for ECDSA now. Thats why i was not finding anything  Undecided

If you can still point me to some code sample / documents you know would be appreciated.

Thanks
jambola2
Legendary
*
Offline Offline

Activity: 1120
Merit: 1038


View Profile
August 18, 2017, 07:08:26 AM
Merited by ABCbits (1)
 #4


thanks to clarify that.

I read in bitcoin or other coins, a transaction is accepted when other nodes recognize that the public key (address) and the hashed transaction itself were signed with the same key.

I'm interested in how this is done in specific, i guess i should look up for ECDSA now. Thats why i was not finding anything  Undecided

If you can still point me to some code sample / documents you know would be appreciated.

Thanks

To be honest, I think the easiest resource for this is likely just Wikipedia: https://en.wikipedia.org/wiki/Elliptic_Curve_Digital_Signature_Algorithm

It outlines both the signature generation algorithm, and the signature verification algorithm.

If you really want to look at some code, here's a Python module dealing with the signature verification: https://github.com/nanotube/supybot-bitcoin-marketmonitor/blob/master/GPG/local/bitcoinsig.py
You can look through the code, but I don't think it will be easily understood.

No longer active on bitcointalk, however, you can still reach me via PMs if needed.
Piggy (OP)
Hero Member
*****
Offline Offline

Activity: 784
Merit: 1416



View Profile WWW
August 18, 2017, 08:00:54 AM
 #5


thanks to clarify that.

I read in bitcoin or other coins, a transaction is accepted when other nodes recognize that the public key (address) and the hashed transaction itself were signed with the same key.

I'm interested in how this is done in specific, i guess i should look up for ECDSA now. Thats why i was not finding anything  Undecided

If you can still point me to some code sample / documents you know would be appreciated.

Thanks

To be honest, I think the easiest resource for this is likely just Wikipedia: https://en.wikipedia.org/wiki/Elliptic_Curve_Digital_Signature_Algorithm

It outlines both the signature generation algorithm, and the signature verification algorithm.

If you really want to look at some code, here's a Python module dealing with the signature verification: https://github.com/nanotube/supybot-bitcoin-marketmonitor/blob/master/GPG/local/bitcoinsig.py
You can look through the code, but I don't think it will be easily understood.

that python code is quite something Smiley

ill start to read to read how the algorithm is working in general then, thanks for your help!
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!