The difference between private keys and public keys is huge — find out what “not your keys, not your coins” really means.
Private keys are an essential part of the underlying architecture of crypto networks because you need them to sign transactions.
In this guide, you will learn about public-key cryptography and the role of private keys in crypto wallets.
What Is Public Key Cryptography(PKC)?
Public key cryptography (PKC) refers to a system in cryptography that leverages a pair of corresponding but unique keys: the public key and private key.
A public key, as you may have guessed because of the name, is public and can be shared with anyone. A private key, however, must be kept secure to ensure the security of the framework.
PKC is sometimes referred to as asymmetric cryptography. This is an allusion to the fact that a public key and a private key are different. This framework allows the user to encrypt information, using their public key, and broadcast it to the world while simultaneously ensuring that only the intended recipient can decrypt it, using the corresponding private key.
The first asymmetric cryptography scheme was publicly described in 1977 by a trio of computer scientists called Ron Rivest, Adi Shamir and Leonard Adleman. Their system, called RSA (after the initials of their last names), describes a scheme in which a suite of complex mathematical computations would generate two asymmetric keys.
In RSA, the two generated keys would be used to encrypt and decrypt information, ensuring only the intended recipient could read the information contained therein.
Prior to the entry of the RSA scheme, all cipher schemes leveraged symmetric key cryptography, which uses only one key to both encrypt and decrypt data. In this scheme, it was imperative to keep this key secure. Sharing this key to all participants had to be done through a secure channel, prior to the transfer of any data. While this was doable between two parties, it increased in complexity and became harder to manage as more parties became involved in the scheme, creating a significant security risk.
The entry of the RSA scheme solved this challenge.
RSA leverages the premise that states that it is difficult to factorize a large integer. A public key is composed of two numbers — one of these numbers is a multiplication of two large prime numbers, and the corresponding private key also comes from the same two prime numbers.
Therefore, we can see that the strength of this cypher scheme depends on the size or length of the keys. This is because if a party is able to factorize the public key, then the private key is compromised. However, if keys are made to be large numbers, it is mathematically infeasible to break them.
While Bitcoin does not leverage RSA, the premise behind all public key cryptography is similar to the RSA description above. This explains why the keys in Bitcoin, and in other crypto networks, are typically long. The average length or size varies between 1,024 and 2,048 bits to maximize security and privacy.
The Role of Private Keys in Your Crypto Wallet
Each cryptocurrency wallet has public and private keys.
Private keys are used to authenticate asset ownership and encrypt the wallet, while public keys are used to derive public addresses used to identify the wallet and to receive funds.
When you are setting up a crypto wallet, you will typically be presented with a twelve-word seed phrase. These words are a human-readable representation of infinite combinations of public keys and their corresponding private keys.
The twelve-word seed phrase is a representation of your private key (but not the actual private key) and is used to restore your wallet should you lose access to your wallet.
For example, when you first download and install a mobile wallet, such as Trust Wallet, it can generate private keys for you. At that point, you are asked to note down your seed phrase. Once you have written it down and stored it securely, you can access your crypto wallet.
As an example, should you lose your smartphone with Trust Wallet, you can simply download the app again and use your twelve-word seed phrase to restore your wallet in your new smartphone. At this point, you will have regained full access to your funds and are able to send and receive the coins.
Remember, whoever has access to a wallet’s private keys controls the funds in the wallet. That is where the meme “not your keys, not your coins” comes from.