Bitcoin Forum
April 26, 2024, 05:32:01 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1] 2 »  All
  Print  
Author Topic: Public vs. private keys  (Read 194 times)
BernyJB (OP)
Full Member
***
Offline Offline

Activity: 168
Merit: 190


View Profile
December 16, 2021, 04:07:43 PM
Merited by witcher_sense (4), Symmetrick (2), BlackHatCoiner (1)
 #1

I'm confused about the "public vs. private key" thing.

I mean, I get it, you never show your private key to anybody. Easy enough.

But when do you use it?

If you want to withdraw your money from the exchange, you use your public key. But then, if you wanna send your money back to the exchange, you use the public key from your exchange's wallet?

So using your private key would be limited to getting your money out of the system (cashing out)? Because even if you purchase something, it makes sense (at least from my completely uninformed point of view) to use the seller's public key to make the payment...

 

Can anybody please help me out? Thank you all in advance.  Smiley
1714109521
Hero Member
*
Offline Offline

Posts: 1714109521

View Profile Personal Message (Offline)

Ignore
1714109521
Reply with quote  #2

1714109521
Report to moderator
"You Asked For Change, We Gave You Coins" -- casascius
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714109521
Hero Member
*
Offline Offline

Posts: 1714109521

View Profile Personal Message (Offline)

Ignore
1714109521
Reply with quote  #2

1714109521
Report to moderator
NeuroticFish
Legendary
*
Offline Offline

Activity: 3654
Merit: 6365


Looking for campaign manager? Contact icopress!


View Profile
December 16, 2021, 04:20:14 PM
Merited by DdmrDdmr (4), pooya87 (2), witcher_sense (2), BlackHatCoiner (2)
 #2

I'm confused about the "public vs. private key" thing.

I mean, I get it, you never show your private key to anybody. Easy enough.

But when do you use it?

If you want to withdraw your money from the exchange, you use your public key. But then, if you wanna send your money back to the exchange, you use the public key from your exchange's wallet?

So using your private key would be limited to getting your money out of the system (cashing out)? Because even if you purchase something, it makes sense (at least from my completely uninformed point of view) to use the seller's public key to make the payment...

 

Can anybody please help me out? Thank you all in advance.  Smiley


What you give the exchange at withdrawing is your address, not your public key. When you send coins away, you send them to an address.
The private key is private and only you have to know it. The private key is something your wallet software uses to sign the transaction that spends your coins. Only the correctly signed transactions will "go through". The private key is nowadays generated from a HD seed (usually 12 or 24 English words). Whoever has the seed or private key can spend the coins.

Now.. you didn't say what kind of wallet you use and this may be part of the confusion. If you use a custodian wallet, then the private key is hidden from you, because actually the custodian owns those coins and you actually only have an account there; the custodian will handle the coins for you (just beware to the risks related to custodians: "not your keys, not your coins")

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
cygan
Legendary
*
Online Online

Activity: 3136
Merit: 7699


Cashback 15%


View Profile WWW
December 16, 2021, 04:22:49 PM
 #3

the public key is nothing else than your deposit/withdrawal Bitcoin address.
you use it to send the Bitcoins from the exchange to your wallet or from your wallet to any exchange.

the private key you only use to import your wallet on another pc or for example to restore your wallet (if no wallet.dat file is available anymore)

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
BernyJB (OP)
Full Member
***
Offline Offline

Activity: 168
Merit: 190


View Profile
December 16, 2021, 04:29:58 PM
 #4

Ok, now I'm more confused than before.  Huh

NeuroticFish, you say you use your address, not your public key,  but cygan says both are the same?
BTW, I haven't started yet, I have downloaded Exodus, and I'm now trying to download EToro, as it's said to be safer. Far as I know, both are non custodian wallets, right?
cygan
Legendary
*
Online Online

Activity: 3136
Merit: 7699


Cashback 15%


View Profile WWW
December 16, 2021, 04:41:01 PM
 #5

Quote
A public key allows you to receive cryptocurrency transactions. It’s a cryptographic code that’s paired to a private key. While anyone can send transactions to the public key, you need the private key to “unlock” them and prove that you are the owner of the cryptocurrency received in the transaction. The public key that can receive transactions is usually an address, which is simply a shortened form of your public key.

Therefore, you can freely share your public key without worry. You may have seen donation pages for content-creators or charities with the public keys for their crypto addresses online. While anyone can donate, you’d need the private key to unlock and access the donated funds.
https://www.gemini.com/cryptopedia/public-private-keys-cryptography#section-what-is-a-public-key

public key = Bitcoin adress
Bitcoin adress = public key
 Wink

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
hosseinimr93
Legendary
*
Offline Offline

Activity: 2380
Merit: 5213



View Profile
December 16, 2021, 04:41:23 PM
 #6

I feel you don't know how an exchange work.
You need to know the difference between an exchange and a non-custodial wallet.

If you hold your bitcoin on a non-custodial wallet, you have full control over your fund. If you want to make a transaction, your wallet needs your private key to sign the transaction.
If you want to withdraw a fund from the exchange, you don't need any private key. Because you are not the one who makes the transaction. You request the exchange to make a transaction and the transaction is signed by the exchange not you. In this case, the private key is owned by the exchange.

Your bitcoin address is what you need to receive bitcoin.
Let's say you want to send me bitcoin. I give you my bitcoin address and you send me bitcoin.


NeuroticFish, you say you use your address, not your public key,  but cygan says both are the same?
Your bitcoin address is different from your public key, but any one who has your public key can derive your address.
Any private key generates a public key and the address is generated by that public key.


public key = Bitcoin adress
Bitcoin adress = public key
Any bitcoin address is a hash of a public key.

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
NeuroticFish
Legendary
*
Offline Offline

Activity: 3654
Merit: 6365


Looking for campaign manager? Contact icopress!


View Profile
December 16, 2021, 04:48:09 PM
Merited by fillippone (3), Upgrade00 (2), ABCbits (1)
 #7

Ok, now I'm more confused than before.  Huh

NeuroticFish, you say you use your address, not your public key,  but cygan says both are the same?
BTW, I haven't started yet, I have downloaded Exodus, and I'm now trying to download EToro, as it's said to be safer. Far as I know, both are non custodian wallets, right?

The bitcoin address is generated from the public key by using an one-way hashing function and by adding a checksum that helps preventing typing errors.
If you have patience, you can read here: https://www.oreilly.com/library/view/mastering-bitcoin-2nd/9781491954379/ch04.html
There's an nice image there too:


If you do the reading, keep in mind that it's an older version of the book and Bitcoin has evolved since, for example there are more types of addresses, not only starting with 1.



Exodus is not open source, hence it's better to avoid it.
I use Electrum and I'm very happy with it. It's the most mature light wallet for bitcoin. (just if you use it, make sure you get it from https://electrum.org/ and verify it https://bitcoinelectrum.com/how-to-verify-your-electrum-download/)

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
mk4
Legendary
*
Offline Offline

Activity: 2744
Merit: 3830


Paldo.io 🤖


View Profile
December 16, 2021, 04:54:37 PM
 #8

If you're fine without going too technical, then let's simplify it a bit.

Your public key(and addresses): your bank account number; whereas you can receive money freely
Your private key: your online banking login credentials(and 2fa); whereas you're going to need this to send out money

Hence why your should secure your private key, whereas it's mostly fine to give out your public key(besides privacy reasons, because blockchains are public).

BTW, I haven't started yet, I have downloaded Exodus, and I'm now trying to download EToro, as it's said to be safer. Far as I know, both are non custodian wallets, right?
Exodus is non-custodial but not open-source as far as I know; and eToro is custodian.

Here's some reading material for you: https://cryptosec.info/wallets

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
BernyJB (OP)
Full Member
***
Offline Offline

Activity: 168
Merit: 190


View Profile
December 16, 2021, 05:15:16 PM
 #9

I feel you don't know how an exchange work.
You need to know the difference between an exchange and a non-custodial wallet.

If you hold your bitcoin on a non-custodial wallet, you have full control over your fund. If you want to make a transaction, your wallet needs your private key to sign the transaction.
If you want to withdraw a fund from the exchange, you don't need any private key. Because you are not the one who makes the transaction. You request the exchange to make a transaction and the transaction is signed by the exchange not you. In this case, the private key is owned by the exchange.

Your bitcoin address is what you need to receive bitcoin.
Let's say you want to send me bitcoin. I give you my bitcoin address and you send me bitcoin.


Whoa! Hold on. Is there a difference (when talking about keys and addresses), between Bitcoin and other coins?
What I've seen is that, to transfer your coins from your exchange wallet to your software wallet, you use your software wallet's public key, and to transfer funds from your software wallet to your exchange's wallet, you use the exchange wallet's public key. Basically meaning you can keep your funds safe by never using your software wallet's private key. Do you need both?

NeuroticFish: thank you, I  will read it. I know Exodus is not 100% open source, but Electrum is for Bitcoin only, and I intend to invest on several different coins. That's why I was interested in EToro, buy it's now out, as it offers a download button that downloads nothing, and instead tricks you into opening  an account with  them.

Mk4:  thank you, I will give that a read.
hosseinimr93
Legendary
*
Offline Offline

Activity: 2380
Merit: 5213



View Profile
December 16, 2021, 05:27:50 PM
Last edit: December 16, 2021, 05:39:11 PM by hosseinimr93
 #10

What I've seen is that, to transfer your coins from your exchange wallet to your software wallet, you use your software wallet's public key, and to transfer funds from your software wallet to your exchange's wallet, you use the exchange wallet's public key.
For making any bitcoin transaction, whether it's made to a wallet or to an exchange, you need the recipient's address.
Note that although the recipient's address can be derived from the public key, but you always need to enter the address when making a transaction. I don't think there's any wallet or exchange accepting public keys when making a transaction.


Basically meaning you can keep your funds safe by never using your software wallet's private key. Do you need both?
Your private key is used only when you want to make a transaction from a non-custodial wallet.
As long as you don't intend to spend bitcoin from your non-custodial wallet, you don't need your private key.

Note that if you want your wallet to be 100% secure, you should create it on an air-gap device (a device which has been always offline and will never be online).

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
witcher_sense
Legendary
*
Offline Offline

Activity: 2310
Merit: 4313

🔐BitcoinMessage.Tools🔑


View Profile WWW
December 16, 2021, 05:34:42 PM
 #11

Whoa! Hold on. Is there a difference (when talking about keys and addresses), between Bitcoin and other coins?
What I've seen is that, to transfer your coins from your exchange wallet to your software wallet, you use your software wallet's public key, and to transfer funds from your software wallet to your exchange's wallet, you use the exchange wallet's public key. Basically meaning you can keep your funds safe by never using your software wallet's private key. Do you need both?
A cryptocurrency wallet is software that manages your private keys, signs the transactions you send to an exchange, generates the addresses you give an exchange to receive coins. Every time you send a transaction from your wallet, a private key is used to sign this transaction. Please note that you almost never see or interact with private keys directly, but your wallet does it every time you want to send coins to someone. An exchange does exactly the same: it signs a transaction with their private key and sends it to the address you gave them.

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
Upgrade00
Legendary
*
Offline Offline

Activity: 2016
Merit: 2170


Professional Community manager


View Profile WWW
December 16, 2021, 05:53:51 PM
 #12

Whoa! Hold on. Is there a difference (when talking about keys and addresses), between Bitcoin and other coins?
What I've seen is that, to transfer your coins from your exchange wallet to your software wallet, you use your software wallet's public key, and to transfer funds from your software wallet to your exchange's wallet, you use the exchange wallet's public key. Basically meaning you can keep your funds safe by never using your software wallet's private key. Do you need both?
Considering you are trying to understand the concept, I will say you should remove the part about the exchange wallet and understand the basics first, before trying to apply it to different concepts.

If you create a bitcoin wallet, what you own are set of keys (public and private) which you can use to access sets of inputs and outputs on the blockchain; all the keys are derived from the seed phrase.
Your private keys are derived from the seed phrase and is used to sign transactions, reason why it is commonly said, 'Not your keys, Not your coins'.
Your public keys are derived from your private keys, it sort of serves as a layer of security to verify the signature.
Your public address is a hash of the public key and is used to receive inputs to a specific wallet, it determines destination, sort of how a home address works.

This derivation pathway is not backward compatible, i.e, you cannot generate the public keys from the public address, or the private key from the public key.
To send a transaction, You need the private keys (and by extension the public keys, to check the signature),
To watch a wallet (only), you need the public keys,
To select the destination of an input, you need the public address.
With a non custodian wallet, which most exchange wallets are, you only have a public address which you use to receive inputs, when you send out you do not actually sign transactions, but only send a request to the exchange server to complete (sign) a transaction.

.BEST..CHANGE.███████████████
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
███████████████
..BUY/ SELL CRYPTO..
BlackHatCoiner
Legendary
*
Offline Offline

Activity: 1498
Merit: 7287


Farewell, Leo


View Profile
December 16, 2021, 05:54:45 PM
Merited by NeuroticFish (3)
 #13

Berny, in cryptography there are the so-called “digital signatures”. A private key is a very large, random number and the public key is resulted from a special form of multiplication (whose division is considered impossible) between the private key and another known number. When you sign a message, you use the private key to form a valid signature. When you verify the signature of that message you use its public key. So, I can provide you a proof that I'm the owner of a particular public key, without having to reveal the private key.

When you want to spend an amount of bitcoins, you sign a transaction with that statement. When you want to receive, you give your bitcoin address and someone else signs a transaction in which they state what they spend and to who.

So, to answer your question:
But when do you use it?
Every single time you make a transaction.

If you want to withdraw your money from the exchange, you use your public key. But then, if you wanna send your money back to the exchange, you use the public key from your exchange's wallet?
If you want to withdraw your money from an exchange you give them an address and they lock their funds to that address. If you want to return money to the exchange you sign a transaction that spends to their address.

So using your private key would be limited to getting your money out of the system (cashing out)? Because even if you purchase something, it makes sense (at least from my completely uninformed point of view) to use the seller's public key to make the payment...
And how do the money get out of the system? The seller always prepared an invoice for you to pay. “Cashing out” bitcoins doesn't get money out of the system, it just transfers them to another person. Cash out, essentially, means trade BTC for USD/EUR etc.

the public key is nothing else than your deposit/withdrawal Bitcoin address.
A public key isn't an address. The address is an encoded version of the hash of the public key. I hope this didn't confuse anybody.

I recommend to read this thread:  Important terms that are frequently confused.

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
BernyJB (OP)
Full Member
***
Offline Offline

Activity: 168
Merit: 190


View Profile
December 16, 2021, 06:47:57 PM
 #14

Dammit, I'm starting to feel like you guys are trying to explain a very simple concept to me, and I'm not getting it. I'm starting to feel like an idiot. Sad

Let me see if I can make my question a bit more clear: I open an account in an exchange. Automatically I get a wallet in that exchange. MY wallet.
I get another wallet. Also MY wallet.

I can withdraw my coins from either one of the wallets, or I can receive the funds in the other one. To send the coins I need the private key from the wallet sending them. However, to receive the coins, I only need the public key from the wallet receiving the coins. At least that's what they show on the videos I watched.
So it would make sense, so as to not expose your private key, to do the transaction from the sending wallet , which you can make with only the receiving wallet's public key.
I don't know if I can upload a video in here, so as to show you guys what I mean. It's a 27 minute video, so I don't know if I can upload something that big. In any case, it shows just that, not the withdrawal of the coins from a wallet, but the sending of the coins from the other one.

Please, somebody tell me if I'm making any sense at all. I'm starting to feel like I need help to count with my fingers... Sad
BlackHatCoiner
Legendary
*
Offline Offline

Activity: 1498
Merit: 7287


Farewell, Leo


View Profile
December 16, 2021, 07:03:10 PM
 #15

Dammit, I'm starting to feel like you guys are trying to explain a very simple concept to me, and I'm not getting it. I'm starting to feel like an idiot.
Don't. This is a difficult concept to understand at first. Here's the problem:  You've used to make transactions using an exchange. You should download a non-custodial wallet (like Electrum) instead and see how bitcoin works there.

The exchange won't show you any private keys. Instead, the only thing it gives you is the address you're supposed to give anyone who wants to send you money. It doesn't even give you the public key, to see how a public key looks like.

Let me see if I can make my question a bit more clear: I open an account in an exchange. Automatically I get a wallet in that exchange. MY wallet.
You open account in an exchange: It is automatically not your money. It's YOUR wallet, it's NOT YOUR money. It's someone else's who manages them for you, just like a bank.

I can withdraw my coins from either one of the wallets, or I can receive the funds in the other one.
If by withdrawing you mean to empty your balance by sending it to your other wallet, then you can both withdraw and receive.

To send the coins I need the private key from the wallet sending them.
Again, someone else has the private key, not you. So, you don't need any private key while you stay in the exchange just like you don't need the bank notes if you've given them to your bank. The exchange signs your transactions.

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
Upgrade00
Legendary
*
Offline Offline

Activity: 2016
Merit: 2170


Professional Community manager


View Profile WWW
December 16, 2021, 07:11:16 PM
Last edit: December 16, 2021, 07:22:48 PM by Upgrade00
 #16

Let me see if I can make my question a bit more clear: I open an account in an exchange. Automatically I get a wallet in that exchange. MY wallet.
I get another wallet. Also MY wallet.
What exchange are you using? So you get two wallets automatically when registering?

I can withdraw my coins from either one of the wallets, or I can receive the funds in the other one. To send the coins I need the private key from the wallet sending them. However, to receive the coins, I only need the public key from the wallet receiving the coins. At least that's what they show on the videos I watched.
If I understand you, One of the addresses is for sending out, i.e, you own the private keys, while you can use both for receiving?
Firstly, exchange wallets are usually custodian, so you probably do not own the private keys of any of the wallets. But lets take it that in this scenario, you do.
- Yes, you need the private keys to send,
- No, you do not need the public key to to receive, you only need the public address, both are not the same.

So it would make sense, so as to not expose your private key, to do the transaction from the sending wallet , which you can make with only the receiving wallet's public key.
I do not clearly understand this part, however;
- Your private keys are not exposed when you sign a transaction.
- Every private key associated to a bitcoin wallet has a public key and also a public address,
- Your public key is what is exposed when you sign a transaction, reason wallets change addresses after each transactions on some wallet software.

I don't know if I can upload a video in here, so as to show you guys what I mean.
You could just easily drop the youtube link.

.BEST..CHANGE.███████████████
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
███████████████
..BUY/ SELL CRYPTO..
BlackHatCoiner
Legendary
*
Offline Offline

Activity: 1498
Merit: 7287


Farewell, Leo


View Profile
December 16, 2021, 07:17:57 PM
 #17

What exchange are you using? So you get two wallets automatically when registering?
I think he's just using it as an example.

Firstly, exchange wallets are usually non custodian
You mean they're usually custodial?

I do not clearly understand this part, however;
I think Berny needs to understand there are two ways to use bitcoin;

1. By owning the private keys.
2. By trusting another entity to do it for you.

However, it's oxymoron to use the second way unless you feel really comfortable in your exchange and/or trade. Bitcoin was created to avoid trusting a third party.

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
BernyJB (OP)
Full Member
***
Offline Offline

Activity: 168
Merit: 190


View Profile
December 16, 2021, 07:28:10 PM
 #18

BlackHatCoiner: Oh, oh, nooooww I'm starting to get it. The exchange wallet is not the same as your wallet. So in the exchange wallet you work only with your public key/address, because you don't really have access to your private key. So the only way you have to send your funds to an external wallet would be to use the external wallet's public key. I'm guessing that wouldn't work the other way around...

Upgrade00: I'm not working with any exchange yet (which is part of the problem, I guess, as I don't have any personal experience. I'm just trying to address doubts I have before I sink any money on it.
The video is not from youtube, but from a Udemy course (which, now that I think of it, would open a whole 'nother can of worms). In any case, Now I'm starting to understand reality and how idiotic my initial question was.

Thank you all for the help. Smiley
BlackHatCoiner
Legendary
*
Offline Offline

Activity: 1498
Merit: 7287


Farewell, Leo


View Profile
December 16, 2021, 07:39:55 PM
 #19

So the only way you have to send your funds to an external wallet would be to use the external wallet's public key. I'm guessing that wouldn't work the other way around...
Exactly.

The video is not from youtube, but from a Udemy course
What kind of Udemy course talks about exchanges? Or does it just talk about Bitcoin and how it works?

In any case, Now I'm starting to understand reality and how idiotic my initial question was.
It wasn't. You were just confused. Don't be discouraged to make questions, it's the only way to learn.

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
BernyJB (OP)
Full Member
***
Offline Offline

Activity: 168
Merit: 190


View Profile
December 16, 2021, 07:49:36 PM
Merited by mk4 (1), BlackHatCoiner (1)
 #20

The video is not from youtube, but from a Udemy course
What kind of Udemy course talks about exchanges? Or does it just talk about Bitcoin and how it works?

There's a whole lot of cryptocurrency courses (for trading, investing, robot making) on Udemy. So far I took 5 of them. Right now, I'm starting on a python course, so I can write a bot.

In any case, Now I'm starting to understand reality and how idiotic my initial question was.
It wasn't. You were just confused. Don't be discouraged to make questions, it's the only way to learn.

Thank you. You guys are great.
I have learnt a great deal from the Udemy courses, but sometimes there are things that seem to be considered a given, and are not for me. Thank you for the patience.  Smiley
Pages: [1] 2 »  All
  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!