Home Blockchain Guides What is a Private Key and What is a Public Key?

What is a Private Key and What is a Public Key?

What is a Private Key

Whether you’ve used them yet or not, public and private keys can be rather ambiguous terminologies. So, what is a public key? And what is a private key? 

We’re here to provide full clarification and simplify the definitions, as well as show you how they work. It is only by grasping how they work that you can truly gain a full understanding of what public keys and private keys actually are beneath the terms. 

What is a Public Key? 

A public key is your address — it is your identity on the blockchain that it belongs to. You can think of it as your username. It is what other users must input in the recipient field when they wish to send cryptocurrency to you. 

For example, if someone wishes to send Bitcoin to you, they’ll need your Bitcoin public key — your Bitcoin address. 

That’s what a public key is in the simplest of terms. 

Note: It doesn’t actually look anything like a key — it just looks like a random series of 26-35 alphanumerical characters. That’s the amount of characters in public keys on the Bitcoin blockchain, however, the number differs on different blockchains.

What is a Private Key? 

A private key is your signature — it is your authorization on the blockchain that it belongs to. You can think of it as your password.

It is what you need to sign transactions so that the blockchain knows the transactions are coming from you. Without it, any transactions attempted with cryptocurrency that belongs to you will be invalid and rejected.

As the key to authorize your transactions, it is something that you need to store very carefully and safely. It is not recommended that you simply paste it into a notepad file on your computer — if a hacker gets it, they can then authorize transactions from your address to theirs, allowing them to steal your funds. 

Instead, consider a hardware wallet — this is the safest way to store your private key. It provides offline, encrypted storage.

Note: Just like a public key, a private key’s appearance does not represent that of the keys we use to open our doors. Instead, a private key looks like a random series of 64 characters. Again, this is the amount of characters in private keys on the Bitcoin blockchain, however, the amount differs between different blockchains. 

The Science Behind Public & Private Keys 

Each public key on a blockchain ledger/database is associated with a balance. Let’s imagine that your balance is 10BTC — your public key would have 10BTC written next to it on the blockchain.

To move any of that balance to another public key requires the private key that matches that public key. You see, each public key is just an encrypted version of a private key.

So, when you send your transaction, you sign it with your private key, and the blockchain recognizes that your private key matches your public key. It then validates the transaction and records it on the blockchain. 

Now, the blockchain ledger/database states that the balance you sent no longer belongs to your public key. Instead, it states that it belongs to the public key that you sent it to. 

Both public keys involved in the transaction (sender and recipient) have their balances updated, and that’s that. The balance you sent to the recipient now requires the recipient’s private key if it is to be moved, whereas it used to require yours.

Final Words 

After reading our What is a Private Key and Public Key guide, you should now have a much better understanding of what public keys and private keys are. If you have any further questions, however, please do not hesitate to ask — we’re always happy to help. 

For more on blockchain technology, read our Blockchain Explained guide. 

LEAVE A REPLY

Please enter your comment!
Please enter your name here