1

Title may be confusing you, and to be honest I am also confused how things work and I am new to this crypto world so sorry in advance if I am not using the correct words.
I try to explain :

Let say Alice wants to send cryptos to Bob.

A sends to B
(address of A) to (address of B)

Because blockchains are public, and both address will be known to each one, what process do prevent Bob from not using Alice address as the sender in another transaction ?

B pretends to be A
using A to send to B
(address of A) to (address of B) without A consent

The reason why I am confused right now about this question is because in Dapps you can use a wallet like Metamask to make some transactions, which means you only needs an address. So how is that secure.
If someone code a program using the same logic as Metamask, what prevents him to use another person's address in Dapps and to smart contracts? (Similar to changing the ip field in http requests, which was a popular hacking technique for man in the middle before https was widely used).

Thanks in advance for helping me to understand.

2
  • "... in Dapps you can use a wallet like Metamask to ..." That seems to be about Ethereum not Bitcoin. You can ask about Etherium in etherium.stackexchange.com. This Q&A website bitcoin.stackexchange.com, is for questions about Bitcoin specifically. Mar 10 at 16:12
  • Did you read my whole question ? I used Dapp as an example, but my question is still relevant to this Q&A. Thanks for your suggestion though.
    – vdegenne
    Mar 10 at 21:35
1

what process do prevent Bob from not using Alice address as the sender in another transaction

Bob doesn't know Alice's private key.


A transaction requires that a kind of digital signature be included with the amounts being spent (e.g. From Alice's address) All other Bitcoin users (wallets, miners, etc) check the signature.

the signature is just a complex mathematical process that proves someone knows a private key without ever disclosing the private key. The private key is just a large number that is kept secret by the user (e.g. Alice).


Further reading:


Some other things worth remembering:

  • Bitcoin has rules but no rulers.
  • Bitcoin is electronic cash
  • There are no accounts in the Bitcoin network
  • Wallets don't contain money.
  • Addresses don't identify people, businesses or places.
  • Bitcoin isn't sent to, or from, addresses.
  • Bitcoin is never really in transit.
  • Bitcoins don't survive transactions.
  • Bitcoins don't exist as entities.
  • The blockchain is not a ledger (it's a transaction journal)
  • Miners don't have any special privileges (they exercise a role that has two special rewards).

The above are intended to guide readers away from misconceptions, not as a self-evident explanation of the points made.

3
  • But when you use an exchange platform like say Binance, you don't have the piece of software on your computer, does that mean technically they hold the private key of all the investors on the website, and hypothetically they could use them to force fraudulent transactions behind the curtain ?
    – vdegenne
    Mar 10 at 21:41
  • @vdegenne yes they could do that. ”Not your keys, not your coins” is a popular saying for a reason.
    – chytrik
    Mar 10 at 22:08
  • @vdegenne: Yes. The inventors of Bitcoin wanted to create a currency that had no need for such trusted third parties. That was perhaps the major motivation. If you give your money to exchanges or other custodial businesses then, so far as the Bitcoin network is concerned, you control no Bitcoin -- which is the same as owning no Bitcoin. Mar 10 at 22:20
0

In addition to what @redgrittybrick wrote, it is also relevant to understand that bitcoin uses what is called an ‘unspent transaction output’ (UTXO) system for keeping track of coins, not an ‘account system’.

So when a coin is spent, it cannot be spent again. There is no ‘from’ address in a bitcoin transaction. There are just inputs, which are consumed entirely in the transaction and thus cannot be spent again later.

This, along with the cryptographic signature that @redgrittybrick explained, make it so that you cannot steal funds simply by ‘replaying’ a transaction.

2
  • But if you can't "replay" you can make a new one, supposing you have Alice private key, right ?
    – vdegenne
    Mar 10 at 21:43
  • @vdegenne yes, anyone with the private key can spend the funds locked to the associated bitcoin address. This is why private keys are to be carefully guarded, and transactions are affixed with a cryptographic signature made by the private key, not with the private key itself.
    – chytrik
    Mar 10 at 22:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.