2

The problem is that you are doing all of the hashing (and putting it into hex) and then having OpenSSL hash it again. openssl dgst will hash the message before signing, but this is incorrect for Bitcoin. Traditionally, in ECDSA, the message is hashed once and then signed. But with Bitcoin, it is actually hashed twice. Another way to think of this is that the ...


2

The sum of a transaction's inputs must be greater than or equal to the sum of outputs as part of the validation rules. This difference is the transaction fee. So to answer your question directly, when a UTXO is spent, it is referenced as part of a transaction input. A UTXO is always completely consumed (analogous to how if you spend a dollar bill, you ...


1

Depending on the nature of the implementation, yes. If you are considering hosted wallets such as exchanges, then yes - an MITM that is able to bypass SSL protections, a fairly common implementation on many corporate and organizational networks, will trivially be able to change data. Certain wallets work around this by either storing the private keys ...


Only top voted, non community-wiki answers of a minimum length are eligible