Hello guys,
I have a question regarding
Bitcoin digital signatures :
On the Bitcoin network, when
- Bob sends a transaction to Alice's public Key and signs using his private key, what is the method used to sign ? In my understanding, the transaction would be hashed in SHA 256 and then encoded with the private key.
- Alice receives the transaction and needs to verify its validity : she decrypt the signature using Bob's public key, and
this is where I don't really understand anymore. Like when she decrypts the signature, she then has the hash of the transaction right ? Because the transaction was hashed by Bob, so she can't immedialty get the original transaction at this moment, or she can ?
So how can she get the original transaction with the hash of this transaction, because we can't reverse it, right ? Like if a document is hashed and encoded with a private key, then if I decrypt it with a public key, will I get the original document, or will I just get the hash of this document ?
- When she finally gets access to the transaction, then she would have to hash the transaction she received to compare the result with the hash she got ? This way she is able to know if it's bob who sent the document and if the document wasn't modified, right ?
Thank you to the guys who will respond, if any
I'm not really into cryptography or programming so it can be pretty hard to understand sometimes.