From previous post we learnt that
Today we will look into what cryptography looks like in blockchain.
The purpose of cryptography introduced to blockchain is the concept of digital signature.
Just like how we open cheque nowadays. Without the authorized signature, the cheque is invalid.
What does a signature suppose to mean?
How is the digital signature is carry out? Through 'keys' There are Private key and Public key.
So where does the digital signature come from? Private key.
Whenever we created our first bitcoin wallet, normally we will be reminded to back up the mnemonic phrase(the 12-24 words)
THOSE WORDS ARE THE PRIVATE KEY. NEVER EVER LOSE THEM OR GAVE IT TO STRANGERS
Why you ask? To put it simple,
As long as we have the private key, we can access to your wallet, just like you giving me your house key.
Private key grant all the access to the wallet, sending/receiving coins.
To make a transaction, private key is REQUIRED as digital signature so we know the transaction is being signed and proof origin.
Public key is used to received message/coins, just like our mail box. As long as i have your Public key, i can send money to you. Normally people will just call it 'wallet address'
How does Private key and Public key react to each other?
Whenever we make a transaction, we will need the recipient's Public key a.k.a address.
By executing a transaction, the transaction is basically encrypted by the recipient's Public key.
Thus only the recipient's Private key, able to decrypt and receive the transaction.
To put it simple,
just like a pad lock and key.
'you took my pad lock to encrypt a transaction, and only my key able to open it.'
Cryptography in blockchain mainly for verification purpose, and it is verified through Digital Signature
While to carry out the digital signature, they are done via the use of 'Private key & Public key'.
BUT!! Cryptography in cryptocurrency doesn't end here! will continue it on next post!
Stay tuned =)