I want to understand the crypto details behind the blockchain (at least in the form that bitcoin implements it).
Can you point me to some page or documents that show the details with examples?
I read the Wikipedia page on Blockchain, and it's sort of: I understand everything that I read, but at the end, I'm clueless about how it actually works. (I understand the characteristics of the blockchain/bitcoin mechanism, and I can see how the hashes and the PoW and the Merkle tree are related to accomplishing those characteristics, but no more than that)
I read the Original paper by Nakamoto, and for the most part, I perfectly understand each of the things it says (however, see below). Yet, at the end I'm back to being clueless about how does it actually work.
I think what I need is to see some concrete examples showing the actual detailed structure of things, and also some examples of concrete attacks that would be possible if a particular feature was missing.
Some of the concrete doubts/questions I have are:
- What is the nonce and how do we generate them? (maybe rephrasing: does the nonce represent something specific?)
- How does the individual node prove its work? I perfectly understand everything that §4 of Nakamoto's paper says --- the problem is that it does not say (at least not that I can see/understand) how those principles are incorporated in bitcoin.
§4 talks about incrementing a nonce until meeting the constraint (e.g., the hash starting with a given number of zeros). Is that the same nonce shown in the diagram? If so, how does one know that that nonce was generated honestly and not reused (maybe not reusing the exact same value, but perhaps a value derived from some past value that speeds-up the PoW)?
- I guess I'm not too clear on the notion of the "accumulated work" in a chain --- is it just that each block by itself represents a certain amount of work $w$, and a chain of $N$ nodes simply represents $N\times w$ work?
- Using a separate key pair for each transaction; though I can see how that addresses the issue of linking different transactions to a same user, if you just randomly generate a different key-pair for each transaction, then what's the point of signing a transaction? What are you proving by it? (the usual notion of digital signatures is that you publicize a verification key along with its associated identity --- even if the identity is given by a pseudonym). I guess for that matter, I'm not too clear on what the role of the digital signature is in the blocks; the idea is anonymous transactions, and the "chained hashing" provides authenticity and tamper-proof (thus, non-repudiation).