Major cryptocurrencies are built on public-key cryptography, which is a cryptographic system that utilizes a pair of keys, one public key (publicly known and used for identification) and a private key (secret, used for authentication and encryption).
Private and public keys are cryptographic keys made up of lines of random alphanumeric characters which are created when a user initiates their first bitcoin or altcoin (any other cryptocurrency that is not a bitcoin) transaction. If, for example, you decide to send cryptocurrencies over the blockchain, you will send these to the public key. The private key is used to generate a digital signature for each transaction a user sends out so that it validates ownership of the private key and confirms that the transaction cannot be tampered with.
The private key is your private, secret password that you alone should know, and which you will need to sell your coins, as the private key will inform the blockchain that you are selling the coins. Private keys are secure passwords that allow users to access their bitcoin and altcoins, and to keep their funds safe. As the saying goes, “If you don’t own your private key, you don’t own your bitcoin.” Without the private key a user cannot spend, withdraw or carry out any other transaction from their account. To protect your private keys, it is always recommended that you back up your private keys and wallet by putting them on a USB or CD, and to have them encrypted.
The public key is widely distributed, can be shared among other people and is the key that the blockchain uses to identify the coin. It informs the blockchain community that a user has purchased or is selling a coin. It is a long string of alphanumeric representations generated from the private key. It is impossible, however, to reverse the process, and generate a private key from a public one, as the public key is created through a complicated mathematical algorithm.