Post
Topic
Board Development & Technical Discussion
Re: Validating DER sig (brainwallet Tx eg)
by
doug_armory
on 29/07/2015, 03:15:47 UTC
How, using pybitcointools (or Python), does one validate these DER sigs (given we know both privkeys)?
Throw away your knowledge of privkeys.
Validating ecdsa signature does not require privkeys.

Start from here
http://bitcoin.stackexchange.com/questions/3374/how-to-redeem-a-basic-tx
http://www.nilsschneider.net/2013/01/28/recovering-bitcoin-private-keys.html
http://bitcoin.stackexchange.com/questions/32305/how-does-the-ecdsa-verification-algorithm-work-during-transaction

dersigs in your transaction (or may be is it my transaction?  Grin ) are
Code:
303902153b78ce563f89a0ed9414f5aa28ad0d96d6795f9c6302205eff1e344551d115b708155eed631cafa4fe719be5ec68c1f3abbf8670d34e11
303902153b78ce563f89a0ed9414f5aa28ad0d96d6795f9c6302201e74d38e5abd2836e9e17acf1b94f267b4f99704e2b22eac02ab136ec4740b76

Strictly speaking, BC Core also treats the follow-up byte ("sighash") as part-and-parcel with the actual DER signature, even though it's not included as part of the DER encoding. In this case, both transactions are SIGHASH_ALL (0x01).