Signing Transaction using Keys
Private Keys and Public Keys: Need to keep it safe?
Welcome back folks,
Today we will be talking about a more important concept in making your transaction on Web3 blockchain. There are a lot more things that you should know it be safe and to be rich always.
If you don't keep these important stuff safe then your account will be wiped clean just as WarizX accounts.
Understanding this concept of Public and Private keys will help you essentially grasp the concept of blockchain transactions.
🔑 Private Keys and Public Keys
A 'Private Key' is a randomly generated secret key used to sign all transactions.
The private key is then passed through an algorithm named the Elliptic Curve Digital Signature Algorithm ECDSA for Ethereum and Bitcoin to create the corresponding public key.
Don't think too much, ECDSA is a complex algorithm but you don't have to study it in-depth.
Just remember this from the example, the bit size of the private key is believed to be about twice the size of the security level, in bits. For example, at a security level of 80 bits — meaning an attacker requires a maximum of about 2^80 operations to find the private key.
Private Key is like a password, only known to the key holder, it’s used to sign transactions.
The private key must remain secret, the public key needs to be accessible to everyone on the internet.
A Private Key is created by performing Hashing on the + 0, +1 and more.. to generate a private key for every single account that you create with that one Seed Phrase.
✍ Looking under the hood of Transaction Signing
When we sign a txn with our private key, a Message Signature Key is generated. So, a message signature key can be created from a private key but doesn’t the other way around.
We are always signing some data digitally with our private key.
But, by using a Public Key, anybody can verify the signature. Hence, by using this method, we can sign transactions where the amount is paid from person A to B. And this txn can be verified by everyone using our Public Key.
Signing a Transaction is a “One Way” process. Someone with the private key signs the txn by their private key being hashed with their transaction data.
Anyone can verify this new txn hash with your public key.
👓 Why should you Hide your Private Keys from Creepy Eyes?
Whenever you will try to access your Private Key on any wallet, you will be first prompted to enter your password to gain access to this golden key.
Anyone with access to your private key can perform and sign transactions, on your behalf consequently making it absolutely vital to safeguard private keys.
Therefore, it’s said to keep your private key or Mnemonic Seed Phrase or Secret Phrase saved and away from the public eyes.
This is the reason why being safe is better than regret after you have lost everything!