(Make this the only red writing in the article to emphasize its importance.)
A Bitcoin Private Key is essentially a long pin number which ONLY you should know. I really can’t stress this point enough. If you lose your private key or someone else gets access to your private key, your money/coins/tokens are at the mercy of the key holder. In other words they have full transaction rights to your wallet and can clean you out instantly.
A private key allows you to access your wallet on the blockchain. Whenever you create a bitcoin wallet, it creates a private and public key for you. The public key is like a post box address for people to send their BTC to. So you can give it out freely. However the private key is the key to that postbox that only you own. So you need to keep it safe. This article may help you visualise it.
With that being said let’s look at a more in-depth definition and explanation of a Bitcoin Private Key. A Bitcoin Private Key is a cryptographic signature which is a piece of data that is encrypted onto a digital wallet that holds your Bitcoin for you. It allows you to transact with your Bitcoins using your private wallet. This wallets could be digital or a paper wallet. I will go into different types of wallets later on in this site.
Here is an example of a private key:
There are multiple ways to represent a private key but the private key above consists of a 256-bit number in hexadecimal. If we look at what 256 bits represents in bytes we get 32 bytes. Then if we look at it in characters it amounts to 64 characters ranging from 0-9 and A-F.
You also have:
- ECDSA private keys
- Hierarchical Deterministic Wallet Keys (HD)
- Base58 Wallet Import format
- Mini private key format
But to go in depth into the above key characteristics would be pretty advanced so lets concentrate on the most common type that I have seen and explain that a little, which is the Base58 Wallet Import Format Private Key.
The Base58 Wallet Import Format Private Key offers multiple advantages to the hexadecimal private key for example the format is shorter in total characters, type bits indicating how the private key intends on being utilised and automatically detectable error checking which in some instances can prompt the user that the key is too short or invalid rather than risking loss of Bitcoin.
Here is an example of a commonly used Base58 Wallet Import Format Private Key:
The ‘5’ at the start of these addresses represent the fact it is on Mainnet whereas a ‘9’ at the start would signify it is on the Testnet. If these files were compressed on the Mainnet they would start with an ‘L’ or a ‘K’ or on Testnet a ‘c’.