1

I have read the whitepaper a few times now, I just want to know precisely what Satoshi meant by 'digitally signing a hash of the previous transaction and the public key of the next owner and adding these to the end of the coin.'enter image description here

Forget everything you know about Bitcoin, imagine you are reading this for the first time in late 2008 and you have only read the abstract and sections 1&2. Does he mean:

  1. Get hash of previous transaction, Prev_Hash
  2. Get public key of whom we are transferring coin to, Pub_Key
  3. Concatenate these two strings, New_String = concat(Prev_Hash,Pub_Key)
  4. Digitally sign New_String using whatever algorithm (no mention of specifics in whitepaper)

OR

  1. Get previous transaction, Prev_Tx
  2. Get public key of whom we are transferring coin to, Pub_Key
  3. Concatenate these two strings, New_String = concat(Prev_Tx, Pub_Key)
  4. Hash New_String, Hashed_New_String
  5. Digitally sign Hashed_New_String using whatever algorithm

Or any other ways of going about it, such as signing a hash of Prev_Tx, and then Also signing a hash of Pub_key and having 2 signatures.

I want to explore evolution of Bitcoin in a chronological way by trying to put myself in the shoes of the people working on it at the very start and so I want to know what Satoshi really meant. Can't seem to find anything online

5
  • I think the first would be best since then when you decrypt it you are left with a string and then if you know, for example, the first 32bytes refers to the Prev_Hash (because it is output of SHA_256), then you can just split this string into 2 and the first string would be a digital fingerprint of the previous transaction you are referring to and the second string would be the public key you are transferring to. This is all a miner would need in order to validate a transaction, is it not?
    – Kryptonite
    Jan 23 at 12:31
  • Also, exactly what is included in each transaction, 3 things? Pub_Key of next owner, hash of previous transaction, and the signature? [Pub_Key, Hash(Prev_Tx), Sig]? So when a miner receives this tuple, they looks at second entry to get "Tx_id" and find it in the blockchain, they then use the first entry of Prev_Tx to decrypt the Sig (3rd entry) and then they can use the first 2 entries and do: concat(Prev_Hash,Pub_Key) and check to see if both are equal?
    – Kryptonite
    Jan 23 at 12:33
  • "TX_id" being defined as the hash of the transaction...
    – Kryptonite
    Jan 23 at 12:37
  • 2
    You can (and should) edit your question rather than adding comments. In stackexchange websites, comments are temporary and disposable. Comments are mainly to assist an author to improve a question or an answer. Jan 23 at 13:41
  • Ah okay, I will do in future, it's my first time on here so I wasn't aware
    – Kryptonite
    Jan 23 at 15:44

1 Answer 1

2

According to some of his other writings, Satoshi had a working prototype when he wrote the whitepaper¹. The whitepaper gives a high-level overview of how Bitcoin works, and to that end, Satoshi simplified some of the concepts.

For example, "We define an electronic coin as a chain of digital signatures." is a simplification, because transactions can have multiple inputs and multiple outputs. The resulting structure is a directed acyclic graph, not a chain.

Likewise, the "Hash" box being composed from previous transaction and public key of the recipient is a simplification. The first output type, Pay to Public Key (P2PK), locked funds to the recipient's public key (literally: <pubkey> OP_CHECKSIG). Meanwhile, inputs identify which "coin" they're spending by referencing the transaction output's outpoint, txid:vout, composed of transaction id and position in the output list. For signing, we then create a digest of the entire transaction to commit to the exact inputs and outputs as well as other details of the transaction. This hash of the transaction to be signed, the sighash, is then used as the input for the signing algorithm, along with the senders private key. As you can see, the whitepaper does not provide nearly enough information to deduce the actual implementation.

The whitepaper does a fine job explaining Bitcoin in broad strokes, but the actual implementation details only became apparent when the software itself was published. Here's for example a copy of the original release's codebase annotated by Jeremy Rubin.


¹ A whitepaper is a document meant to give a concise overview of something, usually to entice readers to learn more about a product or proposal. (And it worked! Read it some nine or ten years ago, I'm still fascinated.) However, it's a marketing document. It's not meant to be a comprehensive technical document. I don't understand why people are acting as if it were some form of ultimate truth (in this vein, see e.g. this errata).

6
  • Thanks for taking the time to answer. I was trying to put myself in the mindset of someone who would've been on the mailing list at the time and seen this whitepaper. If you saw Satoshi's email and whitepaper back in '08 and you had only read the abstract and introduction and then you read section 2 (transactions) how would you have interpreted what he was saying? Would you reply to him and tell him to be a bit more precise? Or do you think he deliberately left it a bit vague as if to say 'the implementation could very, but this is the gist of it'?
    – Kryptonite
    Jan 23 at 15:42
  • Also, do you know where I would find a copy of the original code? I don't think his prototype was ever released publicly, not sure, where would I find earliest version?
    – Kryptonite
    Jan 23 at 15:47
  • @Kryptonite: I added a link to a copy of the originally released sourcecode.
    – Murch
    Jan 24 at 1:24
  • Oh, just seeing your previous comment. I've added a comment on how I perceive the whitepaper.
    – Murch
    Jan 24 at 4:35
  • Okay that's helped to clear a few things up, especially the erratum you linked to - that's exactly what I was after, thanks.
    – Kryptonite
    Jan 25 at 10:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.