https://learnmeabitcoin.com/technical/script/p2wpkh/I hope the explanations there are correct.
-snip-One question that is bothering me: What exactly is signed with the P2WPKH procedure? I sign on my offline wallet with the private key material. But what is the input for a signature?
Or to put it another way: How does the Core Client check the correctness of the signature? To which data does the core client (or another Bitcoin programme) apply the coresponding pubkey?
That website is legit, it's maintained by a former Bitcoin developer.
As for the signed data, it's the "
message hash" (
aka Z-value) which is the hash of the unsigned transaction with stripped parts depending on the "
sighash type".
On that website, the whole process from unsigned raw transaction to signed raw transaction is explained here:
https://learnmeabitcoin.com/technical/keys/signature/#legacy-algorithm (
example is for the commonly used "sighash_all")
Sighash type is explained just below that page.