Bitcoin Forum
May 30, 2024, 03:43:48 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: « 1 [2]  All
  Print  
Author Topic: BIP70 : Question about canonical representation of signed data  (Read 1871 times)
Nicolas Dorier (OP)
Hero Member
*****
Offline Offline

Activity: 714
Merit: 661


View Profile
June 02, 2014, 01:21:02 PM
 #21

My reading of what the BIP says is that the fields that are serialized, are serialized in numerical order. Not that all fields including optional fields must be redundantly written to the wire.

This is the part that is not clear for me,
My reading is that all fields should  be serialized. Even if they are not included in the wire.
This is the part that is unclear, and I think each implementation have its own interpretation. (which depends on the default behavior of their protobuf implementation)

As I said, there is no wrong implementation of protobuf, we just need to know what I need to sign : the data from the wire ? or all data (omited fields from the wire included) ?
To my understanding we need to sign all fields, and not just what is received or sent to the wire.

Bitcoin address 15sYbVpRh6dyWycZMwPdxJWD4xbfxReeHe
Nicolas Dorier (OP)
Hero Member
*****
Offline Offline

Activity: 714
Merit: 661


View Profile
June 04, 2014, 11:15:05 PM
 #22

Mike, you were right with your reading of the BIP, Gavin just clarified the BIP, I'll change my implementation.

Bitcoin address 15sYbVpRh6dyWycZMwPdxJWD4xbfxReeHe
Pages: « 1 [2]  All
  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!