The private key is one of the keys that is generated during the asymmetric cryptographic system key generation procedure.

Una private key or private key, is a secret key generated by the process of asymmetric cryptography. This key is the one that allows the total ownership and management of our cryptocurrency wallets. In Bitcoin, this key is generated using cryptography of the type ECDSA, using the elliptic curve secp256k1. This is a special type of asymmetric cryptography, which we provides a high level of security.

Thanks to the use of this cryptographic system, an almost infinite number of private keys can be generated. In fact, almost any 256-bit number is a valid private key. That is, with this system we are able to produce 2 ^ 256 different key combinations. So many that at the current rate of creation it would take at least 4 trillion years to create them all. Their diversity and the difficulty of calculating them is precisely what makes this system so safe.

During the process of creating a purse Bitcoin, the first thing to create is the private key. After creating it, the creation of the public key begins. Putting this last one, it is mathematically related to the private key. Once both keys have been created, the public key It is used to create the Bitcoin address. All this process following fixed rules. However, the reverse process is impossible to perform. We cannot derive the private key using either the address or the public key.

How do private keys work?

The operation of private keys is simple. This is just a random number, which applies to the cryptographic system formula. This formula can respond to curves known as the secp256k1, secp256r1 o Curve25519. Once this number is applied in the formula, the so-called private key is obtained. This key is used to generate the public key and create an asymmetric crypto system. That is, a system with two keys, the private and the public.

Thanks to this system, we can share with whoever likes the public key. This will not create any security or privacy problem. This is because there is no practical way to get the private key from which the public key was derived. A positive situation, because we can share it and receive encrypted messages from other people who have access to our public key. These messages can only be visible to the originator of the message and we who have the private key. Well, the only way to decipher the content is with that key.


Private keys in Bitcoin

A 256-bit private key like the ones generated in Bitcoin, generally has the following form:


This form is explained by the following rules:

  1. A 256-bit private key is divided into a sequence of 64 characters.
  2. The character range respects the hexadecimal order, with a range that goes from AF to 0-9.

However, the keys under this format are complex to handle for users. That is why, for various tasks in Bitcoin, an algorithm has been created to simplify them. This with the aim of putting them in good safeguards, because do not forget that they are the key to access our wallet. This system created by Bitcoin is called; import format Base 58.

This Base 58 import format is nothing more than a special algorithm that transforms our private key into a shorter and simpler cryptographic chain. For example, from our previously given private key, we get:


This notation is the one we most commonly see in Bitcoin as a private key. This format is used, thanks to the fact that it incorporates a series of elements that help to ensure that it is correct, something impossible with the original private key format. Additionally, it is easier to handle and its implementation in software helps to improve the security levels of the wallets.

How much do you know, cryptonuta?

Is the private key a unique feature of asymmetric crypto?


The private key is not a unique characteristic of asymmetric cryptography systems, we can also see it in symmetric cryptography systems where the same system is fulfilled except that a public key is not generated.

Private key use cases

Let's take an example of this case:

Example of how a private key works

Suppose that John wants to communicate with Mary safely. For this Juan creates a private key and from there derives a public key. Once both keys were created, Juan gave the public key to María. This will allow Maria to write a message and send it to Juan in encrypted form. All this with the certainty that nobody but him will be able to see the message. This is thanks to the fact that only Juan has the private key, and only he can decrypt the messages encrypted with the public key that he has generated.

It is precisely this security scheme that allows the use of public and private keys to be so secure. And since private keys are the key that allows you to spend bitcoins, it is essential to keep them safe. Private keys can be stored in computer files, but being simple numbers they can also be printed on paper. Many even recommend encrypting private keys on another system, to add a further layer of security.

Use cases of this technology can be seen in the software PGP. This system created by Phil Zimmerman, allows you to use asymmetric cryptography to send messages securely. Another well-known and widely used variant is GPG developed by Werner koch, which uses the standard OpenPGP.

The same system is also used for SSL / TLS communications from secure Internet sites. Virtually everything on the Internet uses some type of asymmetric encryption, and this Academy is an example of this.