When performing a cryptocurrency transaction, it is first necessary to have a public and private key. It is the combination of these two keys that allows users to send and receive in a secure way. Each key is represented by an alphanumeric string, a hashed reference to that user’s ownership of a cryptocurrency from a particular blockchain.
Think as your private key as your digital ID, or PIN number. Like a conventional bank account, it’s required to spend, withdraw or transfer funds, or carry out functions on the account. A hash algorithm processes your private key, in order to generate your public key. When you make a transfer, your public key is broadcast to the nodes on the blockchain network. Via consensus, the network confirms the validity of that transfer, that is to say that the private and public keys are compatible, and the entity that performed the transfer actually owns the funds.
Once confirmed, the transaction is sent to the recipient’s public address. The addresses themselves are generated via the public key, and you can think of your address as an account number and sort code. Although public keys and addresses are generated from a private key, and both the public key and address are visible on the network, trying to reverse the process to find a private key is practically impossible.
This is due to the hashing algorithm on the network, which makes trying find the key economically non-viable, due to the cost of the hash power required, which would need to exceed the power of 51% of the entire network. It is important to safeguard your private key. You can always regenerate your public key and address from your private key, but if you lose your private key, you will lose access to your account.