Every account (address) on a public blockchain has a public and private key. This is a “key pair.” The public and private keys are like tools that ensure the security of a public blockchain. Both keys are stored in a cryptocurrency wallet.
The private key is the most important part of a blockchain wallet. It allows access to the blockchain address. The private key is a string of characters (numbers and letters). The private key should only be known to the user and serves as a form of digital identification (ID) for the user. The private key authorizes the user to transfer funds or do any other transaction from the account. It may help to think of the account as a physical mailbox and the private key is a key to open the mailbox.
The public key is generated (derived) from the private key. It is a relatively long string of characters (numbers and letters) that is longer than 64 characters. A sophisticated algorithm called elliptic curve cryptography is used to generate the public key.
When you “send” tokens, you are using your private key to sign the transaction and broadcast it to the blockchain network. The signature confirms that a transaction has come from a particular user and it proves ownership of the private key without revealing the private key. Because there public key is derived from the private key, the user’s public key is used to prove that the digital signature came from the owner of the private key.
The address is a hash of the public key. This makes it a shortened version of the public key.
The public key and the address (the hashed version of the public key) are public. This means that they are seen by everyone on the network.
As noted above, the address is generated from the public key which is generated from the private key. It is impossible to reverse engineer this process to derive the private key. Knowing the private key is essential. This is why losing the private key results in an address and the cryptocurrency in it becoming inaccessible forever.