Info

The most important facts in brief:

  • You can think of a Bitcoin address as a safe deposit box.
  • The public key is the number of the box into which you or anyone can deposit coins.
  • The private key is the key to take the coins out of the box and spend them.

In our article "What is cryptography?" we have already briefly touched on the fact that there are different ways to encrypt something. For Bitcoin and other cryptocurrencies, public key cryptography is particularly relevant.
In this episode, I would like to explain to you in simple terms exactly what this is all about. How to classify the terms "public key" and "private key" and why it is so important to understand the difference for the secure handling of cryptocurrencies.

The largest wardrobe in the world

To make this very complex topic a little clearer, I will try to illustrate the relationships as much as possible.
First of all, imagine the largest locker cabinet in the world. The locker in your imagination should consist of a total of "2 to the power of 160" (written out in full, this results in a number with 48 digits!) compartments. Each compartment should be numbered, have a slot and can only be opened with a key. Something like this:

However, the doors of your imaginary locker should be transparent so that everyone can see what's inside at first glance.

Why all this?

I will now explain the terminology based on the properties of our thought locker.

Why do there have to be so many compartments?
Well, there are so many Bitcoin addresses due to the mathematical and information technology circumstances and in our example, each numbered compartment represents a "public key". This number on the compartment, the so-called "public address", is derived from the compartment itself (here, for example, from the location, i.e. row & column, where the compartment is located) and is what you probably know as the "Bitcoin address" and which (comparable to an IBAN) is used to receive Bitcoin.

Why does the wallet need a slot?
If you want to receive bitcoins to your address, you give the sender - metaphorically - the number of the box in which you want to receive the payment. He or she now knows exactly where to look and can drop the Bitcoin through the slot into the box.

Why is the door transparent?
Contrary to the opinion of many people who only know Bitcoin from hearsay, a blockchain and therefore the construct "Bitcoin" is not necessarily anonymous and non-transparent, but pseudonymous and extremely transparent. Anyone can publicly view how many Bitcoin are stored at which address - i.e. in which locker. So you can immediately see how many Bitcoins you own, but you can't take them out and spend them.

You can only open the locker with the right key!
To open the transparent door and transfer your bitcoins, you will of course need the right key - the "private key". You should always keep this secret, as anyone with the right key would have full access to your locker and therefore to your coins. The utmost care is therefore required here!

How is it all connected?

As already mentioned, the most important thing is the private key, as the public key can in turn be derived from this. To prevent uncertainties in cryptography, Bitcoin additionally hashes the public key to create a receiving address, which means that the public address can in turn be derived from the public key. So even if an error were discovered in the cryptographic function (Bitcoin uses so-called "elliptical curves", for example) and an attacker were able to calculate the private key back from a public key in just a few hours, your money would still be safe for the time being. Since your public key is not known but only a hash of it. The attacker would therefore also have to be able to recalculate the hash function, which is extremely unlikely.

As these keys consist of a long string of characters, e.g. xprv9s21ZrQH143K3NKrJpbQBj8y4tkc8eJnNfHiSmjyrq9WSx5U2hL96tq65de9pcgcscXUMk4dcKshAeTCtSce2pZYfy47BXEQtNXhn4PyD3f and extremely unwieldy to remember, it is now possible to create so-called mnemonicor seed phrases. These "seeds" usually consist of 12 or 24 words, from which the corresponding private key can then be derived. For the key above, it would be these 12 words: grant air abstract group badge kitchen enemy beach credit search rocket adjust

Note: The derivation sequence is seedprivate keypublic key public address.
You are welcome to share your public address or the public key publicly, but you should not share your private key or even the mnemonic phrase with others, as they would have full access to your Bitcoin holdings.

Did you like this article? You are also welcome to discuss it with us and the community in our forum .