Bitcoin Forum
September 04, 2026, 11:51:25 PM *
News: Latest Bitcoin Core release: 31.1 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Public and private keys, explained with a mailbox (not just "it's like a passwor  (Read 156 times)
diggler (OP)
Newbie
*
Offline

Activity: 28
Merit: 11


View Profile
Today at 02:28:18 AM
 #1

However, I've been for quite a while trying to define an important concept, and I think I finally found the correct words to do it.
Anyway, it's one of the points that always comes up in discussions about cryptocurrencies: the comparison between a key pair and a username/password for any online service.

It's a false comparison and it creates confusion.
Imagine, to start, that the public key is something like a mailbox mounted on a wall visible to everyone on the street, with the address showing too. Any person can use that address to send letters inside that box. And what would the private key be in this case? It would be the physical thing that opens that box, and that thing must be kept far away, not even for the mailman!
As for this process with Bitcoin, it works exactly like this too, except that the relationship between these keys is mathematically inverted. Getting the public key starting from the private key is simple. Deriving the private key starting from the public one will never be possible. All the security that exists in this system is based on this single functionality.

The Bitcoin address where you receive BTC is derived from the public key with more hashings to simplify it even further. So, the sequence of operations will be this:
private key -> public key -> address where you receive BTC
All these procedures are absolutely one-directional.

There are countless users who have completely wrong ideas that if you lose the private key that implies you just won't be able to use your address anymore. They think there will always be a way to recover the key, just like you recover a password... That's false, and it will never be possible.

No entity in this system, not even an exchange house or even the developer themself, will have the capacity to recover a private key from a public key or from a BTC address where you receive BTCs.
That total incapacity for recovery only exists if there is personal custody. If you lose your password to an account at an exchange house like Binance or Coinbase, it's a completely different scenario, because those exchange houses have your private key for you, that's what custody means. So, you can recover your account using traditional account recovery methods.

SeriouslyGiveaway
Sr. Member
****
Offline

Activity: 840
Merit: 271


Bitz.io Best Bitcoin and Crypto Casino


View Profile
Today at 02:55:27 AM
 #2

The Bitcoin address where you receive BTC is derived from the public key with more hashings to simplify it even further. So, the sequence of operations will be this:
private key -> public key -> address where you receive BTC
All these procedures are absolutely one-directional.
It's absolutely correct. The procedure of creating public key from private key is one-way, and the procedure of generating a Bitcoin public address from its public key is also one-way.

Private key > Public key: through Elliptic Curve Multiplication (one-way)
Public key > Bitcoin address: through a Hashing function (one-way)

Quote
There are countless users who have completely wrong ideas that if you lose the private key that implies you just won't be able to use your address anymore. They think there will always be a way to recover the key, just like you recover a password... That's false, and it will never be possible.
I am sorry but I am feeling lost when reading this post because it is confusing and kind of misleading me to a thought like if I lost my Bitcoin private key, I still can access my bitcoin, and it means like I am still safe.

It's untrue.

If you lost your Bitcoin private keys - lost means you lost your original wallet, and did not have any wallet back or can not use any wallet backup you have - so you will certainly not be able to access your bitcoin.

█ 
███████▄▄███▄███▄
███▄▄████████▌██
▄█████████████▐██▌
██▄███████████▌█▌
███████▀██████▐▌█
██████████████▌▌▐
████████▄███████▐▐
█████████████████
███████████████▄██▄
██████████████▀▀▀
█████▀███▀▀▀
Bitz.io█ ████████▄████▄▄▄█████▄▄
██████▄████████▀▀██▀▀
█████▀▀█████▀▀▄▄█
███████████▄▀▀██
███████████████▐▌
███████████████▐▌
███▄▄████▄▄▄██▄▄
▄█████████████████████▄
████████████████████
██
█████████████████████
▀██
█████████████████████▀
▀████
█████████████████▀
███▀▀████▀▀██▀▀█████▀▀
98%
RTP
▄▄███████▄▄
███████████████▄
▄███████████████████▄
▄██████████████
██████▄
▄██████████████████████
████████████████████████
███████████████████████
██████████████████████
████████████████████████
▀█████████████████████▀
███████████████████▀
███████████████▀
▀▀███████▀▀
HIGH
ODDS
 
█████████   ██

......PLAY NOW......

██   █████████
█ 
Cookdata
Legendary
*
Offline

Activity: 1792
Merit: 1477


Not Your Keys, Not Your Bitcoin


View Profile
Today at 06:57:12 AM
 #3

The Bitcoin address where you receive BTC is derived from the public key with more hashings to simplify it even further. So, the sequence of operations will be this:
private key -> public key -> address where you receive BTC
All these procedures are absolutely one-directional.

You are right, but there is a small correction to the way you simplify this explanation, Bitcoin are recieved on the address, but this address is not directly from the public key, they are derived from the public key hash which is why we have different types of Bitcoin locking scripts. Among them, we have the old p2pk, p2pkh, p2sh and we have the SegWit scripts. It is these pubkey hashes that are encoded into the address, not the public key.

Quote
That total incapacity for recovery only exists if there is personal custody. If you lose your password to an account at an exchange house like Binance or Coinbase, it's a completely different scenario, because those exchange houses have your private key for you, that's what custody means. So, you can recover your account using traditional account recovery methods.

The centralised exchanges are custodial services, they help you manage your coins. You give them the coin, and they give you a platform where you keep records of transactions but most of them are not reliable, they have failed their customers, most of the exchanges have lost funds to hacks, and they don't speak up. We have some that have been bankrupt for years now and are still paying creditors. If you want to avoid these nightmares, use a custodial wallet.

hugeblack
Legendary
*
Offline

Activity: 3360
Merit: 4772


View Profile WWW
Today at 08:06:45 AM
 #4

No entity in this system, not even an exchange house or even the developer themself, will have the capacity to recover a private key from a public key or from a BTC address where you receive BTCs.
This is true under certain conditions, namely generating a good entropy Private Key and not revealing xpub + ANY Child Private Key.
In short, never share Extended Public Keys (xpub). Create a wallet with good entropy, preferably open-source and ideally airgapped.

Andreas M. Antonopoulos' YouTube channel has better explanations of public and private keys; I highly recommend it instead of relying on online articles.

▄███████████████████████▄
███████████████████████
████████████▀▀██████████
████████████████████████
██████████▄▄██████████
█████████████████████
███████████████████████
█████████████████████
██████████▀▀██████████
████████████████████████
██████████▄▄████████████
███████████████████████
▀███████████████████████▀
 
 MoBit 
████
██
██
██
██
██
██
██
██
██
██
██
████
 NO   LOGS
 
 LOW  FEES
 
 PGP  GUARANTEE
████
██
██
██
██
██
██
██
██
██
██
██
████
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
Charles-Tim
Legendary
*
Offline

Activity: 2394
Merit: 6526


Leading Crypto Sports Betting & Casino Platform


View Profile
Today at 08:50:32 AM
 #5

That total incapacity for recovery only exists if there is personal custody. If you lose your password to an account at an exchange house like Binance or Coinbase, it's a completely different scenario, because those exchange houses have your private key for you, that's what custody means. So, you can recover your account using traditional account recovery methods.
So, in short, you are insinuating that people should use custodial means to hold their coins? Also this is entirely different from the title of your topic which is about private key and public key explained, and not about in difference to exchanges.

Exchanges have their own downsides which can not make me use exchanges to hold coins.

..Stake.com..   ▄████████████████████████████████████▄
   ██ ▄▄▄▄▄▄▄▄▄▄            ▄▄▄▄▄▄▄▄▄▄ ██  ▄████▄
   ██ ▀▀▀▀▀▀▀▀▀▀ ██████████ ▀▀▀▀▀▀▀▀▀▀ ██  ██████
   ██ ██████████ ██      ██ ██████████ ██   ▀██▀
   ██ ██      ██ ██████  ██ ██      ██ ██    ██
   ██ ██████  ██ █████  ███ ██████  ██ ████▄ ██
   ██ █████  ███ ████  ████ █████  ███ ████████
   ██ ████  ████ ██████████ ████  ████ ████▀
   ██ ██████████ ▄▄▄▄▄▄▄▄▄▄ ██████████ ██
   ██            ▀▀▀▀▀▀▀▀▀▀            ██ 
   ▀█████████▀ ▄████████████▄ ▀█████████▀
  ▄▄▄▄▄▄▄▄▄▄▄▄███  ██  ██  ███▄▄▄▄▄▄▄▄▄▄▄▄
 ██████████████████████████████████████████
▄▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▄
█  ▄▀▄             █▀▀█▀▄▄
█  █▀█             █  ▐  ▐▌
█       ▄██▄       █  ▌  █
█     ▄██████▄     █  ▌ ▐▌
█    ██████████    █ ▐  █
█   ▐██████████▌   █ ▐ ▐▌
█    ▀▀██████▀▀    █ ▌ █
█     ▄▄▄██▄▄▄     █ ▌▐▌
█                  █▐ █
█                  █▐▐▌
█                  █▐█
▀▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▀█
▄▄█████████▄▄
▄██▀▀▀▀█████▀▀▀▀██▄
▄█▀       ▐█▌       ▀█▄
██         ▐█▌         ██
████▄     ▄█████▄     ▄████
████████▄███████████▄████████
███▀    █████████████    ▀███
██       ███████████       ██
▀█▄       █████████       ▄█▀
▀█▄    ▄██▀▀▀▀▀▀▀██▄  ▄▄▄█▀
▀███████         ███████▀
▀█████▄       ▄█████▀
▀▀▀███▄▄▄███▀▀▀
..PLAY NOW..
Taskford
Legendary
*
Offline

Activity: 3332
Merit: 1066


A swap that needs a hand? zeto.cash@proton.me


View Profile
Today at 09:54:56 AM
 #6

That total incapacity for recovery only exists if there is personal custody. If you lose your password to an account at an exchange house like Binance or Coinbase, it's a completely different scenario, because those exchange houses have your private key for you, that's what custody means. So, you can recover your account using traditional account recovery methods.
So, in short, you are insinuating that people should use custodial means to hold their coins? Also this is entirely different from the title of your topic which is about private key and public key explained, and not about in difference to exchanges.

Exchanges have their own downsides which can not make me use exchanges to hold coins.

Maybe he just think about he convenience what those custodial platforms could offer to their users. But he didn't pay any attention on possible trade offs for using those exchange.

Yeah recovery is truly possible with those exchange, but the bigger problem comes if the exchange got suffered for massive hack. Like they lose lots of money and can't afford to pay those people affected with this issue. Also if there's sudden unfair freezing of their account or they decide to rug pull and shutdown their operation.

People should remember that the coins deposited on custodial platforms are always in huge risk. So better use those exchange as gateway for their trading or buying, then best to hold their funds on wallet on which they have full control like non custodial wallets.

diggler (OP)
Newbie
*
Offline

Activity: 28
Merit: 11


View Profile
Today at 03:49:54 PM
 #7



Quote from: SeriouslyGiveaway link=topic=5593153.msg67110081#msg67110081 date=...
I am sorry but I am feeling lost when reading this post because it is confusing and kind of misleading me to a thought like if I lost my Bitcoin private key, I still can access my bitcoin, and it means like I am still safe.

It's untrue.

If you lost your Bitcoin private keys - lost means you lost your original wallet, and did not have any wallet back or can not use any wallet backup you have - so you will certainly not be able to access your bitcoin.

Well, you managed to hit the nail on the head with what I meant with your response, it was just poorly articulated on my part.
If you lose your private key (and there is no type of backup available), the money is eternally lost. Nobody recovers absolutely anything.
I just wanted to point out that there are still those who hope to be able to recover their private key just as it happens in the case of passwords. That hope is nothing more than an illusion. Whatever the situation, the private key is definitively lost.  Cheesy
diggler (OP)
Newbie
*
Offline

Activity: 28
Merit: 11


View Profile
Today at 03:57:09 PM
 #8

That total incapacity for recovery only exists if there is personal custody. If you lose your password to an account at an exchange house like Binance or Coinbase, it's a completely different scenario, because those exchange houses have your private key for you, that's what custody means. So, you can recover your account using traditional account recovery methods.
So, in short, you are insinuating that people should use custodial means to hold their coins? Also this is entirely different from the title of your topic which is about private key and public key explained, and not about in difference to exchanges.

Exchanges have their own downsides which can not make me use exchanges to hold coins.

Maybe he just think about he convenience what those custodial platforms could offer to their users. But he didn't pay any attention on possible trade offs for using those exchange.

Yeah recovery is truly possible with those exchange, but the bigger problem comes if the exchange got suffered for massive hack. Like they lose lots of money and can't afford to pay those people affected with this issue. Also if there's sudden unfair freezing of their account or they decide to rug pull and shutdown their operation.

People should remember that the coins deposited on custodial platforms are always in huge risk. So better use those exchange as gateway for their trading or buying, then best to hold their funds on wallet on which they have full control like non custodial wallets.

No, I am not suggesting that anyone use custodial services. I only mentioned the exchanges to illustrate the difference. In the case of an exchange, even if you lose the access password, you can still recover it because they are the ones who hold the keys. If it is in the case of self-custody, and you lose your private key, without any backup, there go your coins forever.
That was my whole idea.
Charles-Tim
Legendary
*
Offline

Activity: 2394
Merit: 6526


Leading Crypto Sports Betting & Casino Platform


View Profile
Today at 04:15:19 PM
Last edit: Today at 06:06:47 PM by Charles-Tim
 #9

No, I am not suggesting that anyone use custodial services. I only mentioned the exchanges to illustrate the difference. In the case of an exchange, even if you lose the access password, you can still recover it because they are the ones who hold the keys. If it is in the case of self-custody, and you lose your private key, without any backup, there go your coins forever.
That was my whole idea.
You posted 'no', but you still explained the same thing again. I do not know what you intention is, but when referring to private keys and public keys, I see no reason to mention exchanges than letting people know that the keys of their addresses on exchanges are not their.

You also said the exchanges are managing the keys for their customers. That is completely wrong. The keys belongs to the exchanges and not belonging to the customers, but the customers will rely on the exchanges to protect their coins.

You can not illustrate the difference between private and public keys by explaining about using forgot password to recover your exchange account back. That is completely off-topic discussion.

..Stake.com..   ▄████████████████████████████████████▄
   ██ ▄▄▄▄▄▄▄▄▄▄            ▄▄▄▄▄▄▄▄▄▄ ██  ▄████▄
   ██ ▀▀▀▀▀▀▀▀▀▀ ██████████ ▀▀▀▀▀▀▀▀▀▀ ██  ██████
   ██ ██████████ ██      ██ ██████████ ██   ▀██▀
   ██ ██      ██ ██████  ██ ██      ██ ██    ██
   ██ ██████  ██ █████  ███ ██████  ██ ████▄ ██
   ██ █████  ███ ████  ████ █████  ███ ████████
   ██ ████  ████ ██████████ ████  ████ ████▀
   ██ ██████████ ▄▄▄▄▄▄▄▄▄▄ ██████████ ██
   ██            ▀▀▀▀▀▀▀▀▀▀            ██ 
   ▀█████████▀ ▄████████████▄ ▀█████████▀
  ▄▄▄▄▄▄▄▄▄▄▄▄███  ██  ██  ███▄▄▄▄▄▄▄▄▄▄▄▄
 ██████████████████████████████████████████
▄▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▄
█  ▄▀▄             █▀▀█▀▄▄
█  █▀█             █  ▐  ▐▌
█       ▄██▄       █  ▌  █
█     ▄██████▄     █  ▌ ▐▌
█    ██████████    █ ▐  █
█   ▐██████████▌   █ ▐ ▐▌
█    ▀▀██████▀▀    █ ▌ █
█     ▄▄▄██▄▄▄     █ ▌▐▌
█                  █▐ █
█                  █▐▐▌
█                  █▐█
▀▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▀█
▄▄█████████▄▄
▄██▀▀▀▀█████▀▀▀▀██▄
▄█▀       ▐█▌       ▀█▄
██         ▐█▌         ██
████▄     ▄█████▄     ▄████
████████▄███████████▄████████
███▀    █████████████    ▀███
██       ███████████       ██
▀█▄       █████████       ▄█▀
▀█▄    ▄██▀▀▀▀▀▀▀██▄  ▄▄▄█▀
▀███████         ███████▀
▀█████▄       ▄█████▀
▀▀▀███▄▄▄███▀▀▀
..PLAY NOW..
notocactus
Legendary
*
Offline

Activity: 3122
Merit: 5164


Glory to Ukraine!


View Profile
Today at 04:38:52 PM
 #10

You also said the exchanges are managing the keys for their customers. That is completely wrong. The keys belongs to the exchanges and not belonging to the customers, but the customers will rely on the exchanges to protect their coins.
Centralized exchanges have both private keys and public keys, while exchange users don't have anything. They have to submit their withdrawal request, and wait for support, approval, and processing of exchanges to have their coins back. They only control their coins if exchanges proceed withdrawals for them, and if it is sent to user's non custodial wallet.

If user received coins in another custodial wallet, on another centralized exchange, they will again have no access to public key and private key.

Quote
You can not illustration the difference between private and public keys by explaining about using forgot password to recover your exchange account back.
It's only account recovery, whereas even with access to account, user does not have access to either public key or private key.

 
 b1exch.to 
  ETH      DAI   
  BTC      LTC   
  USDT     XMR    
.███████████▄▀▄▀
█████████▄█▄▀
███████████
███████▄█▀
█▀█
▄▄▀░░██▄▄
▄▀██▄▀█████▄
██▄▀░▄██████
███████░█████
█░████░█████████
█░█░█░████░█████
█░█░█░██░█████
▀▀▀▄█▄████▀▀▀
suzanne5223
Hero Member
*****
Offline

Activity: 3430
Merit: 761


Want top-notch marketing for your brand, Hire me


View Profile WWW
Today at 05:55:46 PM
 #11

That total incapacity for recovery only exists if there is personal custody. If you lose your password to an account at an exchange house like Binance or Coinbase, it's a completely different scenario, because those exchange houses have your private key for you, that's what custody means. So, you can recover your account using traditional account recovery methods.
So, in short, you are insinuating that people should use custodial means to hold their coins? Also this is entirely different from the title of your topic which is about private key and public key explained, and not about in difference to exchanges.

Exchanges have their own downsides which can not make me use exchanges to hold coins.

Maybe he just think about he convenience what those custodial platforms could offer to their users. But he didn't pay any attention on possible trade offs for using those exchange.

Yeah recovery is truly possible with those exchange, but the bigger problem comes if the exchange got suffered for massive hack. Like they lose lots of money and can't afford to pay those people affected with this issue. Also if there's sudden unfair freezing of their account or they decide to rug pull and shutdown their operation.

People should remember that the coins deposited on custodial platforms are always in huge risk. So better use those exchange as gateway for their trading or buying, then best to hold their funds on wallet on which they have full control like non custodial wallets.
I don't think anyone in the crypto market doesn't know there's always a risk in using a CEX as storage, given the experience many of us had with traditional banking and how we have to wait hours to get our hard earned money.
But some people will always have different narrative about things in sense that they will always go for the ease of access their crypto while they leave the security responsible for CEX instead of doing it themselves that's what we just see about the OP, and one thing we need to know is that the incident of ColdCard wallet have changed how some newbie with the inclusion of institutional sees self-custody that's why some institutional investors are moving their BTC to Coinbase Prime.


No, I am not suggesting that anyone use custodial services. I only mentioned the exchanges to illustrate the difference. In the case of an exchange, even if you lose the access password, you can still recover it because they are the ones who hold the keys. If it is in the case of self-custody, and you lose your private key, without any backup, there go your coins forever.
That was my whole idea.
Why would anyone in his/her right sense won't backup their Bitcoin wallet?

Ambatman
Legendary
*
Offline

Activity: 1120
Merit: 1435


Don't tell anyone


View Profile WWW
Today at 06:28:31 PM
 #12

As for this process with Bitcoin, it works exactly like this too, except that the relationship between these keys is mathematically inverted. Getting the public key starting from the private key is simple. Deriving the private key starting from the public one will never be possible. All the security that exists in this system is based on this single functionality.

Never say never
With current technology it's practically unfeasible to get a private key from a pubkey.
And Bitcoin security is more than that.

Quote
And what would the private key be in this case? It would be the physical thing that opens that box,
I understand is an analogy but the private key creates a digital signature
While the pubkey verify it.


Why would anyone in his/her right sense won't backup their Bitcoin wallet?
Well you can have a back up and still loss it
Nothing is ever guaranteed.
Anything that can go wrong will go wrong.

Mia Chloe
Legendary
*
Offline

Activity: 1190
Merit: 2288


Contact me for your designs...


View Profile
Today at 06:51:58 PM
 #13

Never say never
With current technology it's practically unfeasible to get a private key from a pubkey.
And Bitcoin security is more than that.
Couldn't agree more everyone keeps talking about the whole backwards compatibility as a flaw that quantum computing could potentially exploit but in reality we are actually still kinda behind in practically using these devices and systems. Most of the data we have are from simulations and not practical yet.

It's absolutely correct. The procedure of creating public key from private key is one-way, and the procedure of generating a Bitcoin public address from its public key is also one-way.
For clarity sake Master key is formally a better expression. The ability for you to isolate a particular address entirely comes from the fact that smaller private keys can be derived from the master key.

Alvin_talk
Full Member
***
Offline

Activity: 291
Merit: 138

I don't want peace, I love problem always


View Profile
Today at 08:30:48 PM
 #14

The Bitcoin address where you receive BTC is derived from the public key with more hashings to simplify it even further. So, the sequence of operations will be this:
private key -> public key -> address where you receive BTC
This is true except for native P2PK, where the output is locked directly to a public key. In this we only have private key -> Public key, that is why in an event where quantum attack become feasible, P2PK (including Satoshi’s coin) are most vulnerable to attack. The concept of address only became a thing when P2PKH was introduced.

So, in short, you are insinuating that people should use custodial means to hold their coins?
I think you misunderstood the OP, he only used exchanges to explain his post, he is still on point in my opinion.
diggler (OP)
Newbie
*
Offline

Activity: 28
Merit: 11


View Profile
Today at 09:10:41 PM
 #15

No, I am not suggesting that anyone use custodial services. I only mentioned the exchanges to illustrate the difference. In the case of an exchange, even if you lose the access password, you can still recover it because they are the ones who hold the keys. If it is in the case of self-custody, and you lose your private key, without any backup, there go your coins forever.
That was my whole idea.
You posted 'no', but you still explained the same thing again. I do not know what you intention is, but when referring to private keys and public keys, I see no reason to mention exchanges than letting people know that the keys of their addresses on exchanges are not their.

You also said the exchanges are managing the keys for their customers. That is completely wrong. The keys belongs to the exchanges and not belonging to the customers, but the customers will rely on the exchanges to protect their coins.

You can not illustrate the difference between private and public keys by explaining about using forgot password to recover your exchange account back. That is completely off-topic discussion.

You are right about the ownership issue.
The keys on an exchange belong to the exchange itself and not to the customers. Customers only have an account balance and have to request withdrawals if they want to move their crypto. When I said that “exchanges hold the keys for their customers”, I was defining it wrongly. My whole idea was only to focus on a limited comparison between recovering an exchange account and recovering private keys in self-custody. In the case where it is impossible to recover the exchange account data, there is still the possibility of direct contact with the company itself. If we lose our private key and cannot recover it through backups, there is nothing left that can be recovered.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!