Introduction to Digital Signature:
Alice has to send ₹30000 to Bob.
He decides to write a check for ₹30000 in Bob’s name.
Alice would then sign on the check to verify her ownership and prove she has written the check.
Similarly in Ethereum, there is Digital Signatures.
Why Digital Signature?
When Person A wants to send a transaction to Person B, she would sign on the transaction using the Digital Signature.
It is also used to authenticate the ownership of the smart contract. To tell the blockchain network that the specific person has deployed the contract.
How is Digital Signature created?
In Ethereum, the transaction details is nothing but the message.
Using Elliptic Curve cryptography (The elliptic curve cryptography used by Ethereum is called secp256k1) on the message and the Private Key, the Digital Signature is created.
If you want to verify if the specific person has sent the transaction…. The digital signature should match the Ethereum Address and the transaction details. If it matched it tells us that the person who sent the transaction owns the private key if the Ethereum address and hence should be the owner of the address.
Note how the Private key is not required to verify who has sent the transaction. Hence, anyone on the network can check authenticate the transaction. Private Key is not required. It is also a way to prove the ownership of the private key without revealing the private key itself.