<p>Your description works well enough until you start talking about encryption. The way you've described implementing public-key cryptography isn't quite right, if you're interested, I would suggest taking a looking at at the <a href="https://en.wikipedia.org/wiki/Public-key_cryptography" rel="nofollow noreferrer">public-key cryptography wiki page</a>.</p>

<p>I think more useful than explaining how your description is wrong, I'll just give an example of how I would re-write it to be more accurate (at least insofar as it is implemented in bitcoin). My addition in bold:</p>

<blockquote>
  <p>How would the databases verify that you are in fact doing the transaction and not someone saying that they are doing it? Through public and private keys, right. <strong>Coins can be sent to public keys, and then spent using the corresponding private key. So you can share your 'pubkeyA' with someone, and then they can send bitcoins to that key (and thus to you). They do this by using their 'privkeyX' to sign a transaction that says "send the coins held at 'pubkeyX' to pubkeyA", and everyone else can use the pubkeyX to verify that the signature came from privkeyX, without ever knowing what privkeyX is!</strong></p>
</blockquote>

<p>Perhaps also worth mentioning, saying 'databases that everyone has access to and can write to' is sorta misleading, it makes me think of a database instance that many different people write to. In reality it is 'many instances of a database that are constantly updating according to the network's rules'. </p>

<blockquote>
  <p>A lot of people's computers verify the transaction so it's safe. Why is mining even necessary?</p>
</blockquote>

<p>Proof-of-work mining solves the problem of needing a large network of untrusted computers to all agree upon the ordering of transactions, in order to solve the doublespend problem. Otherwise, how will the computers agree on which transactions to include, and in what order? What would make any one copy of the database more trustworthy and accurate than any other?</p>

CC BY-SA 4.0
2018-05-20T14:04:47.123Z
But can anyone who receives the signed transaction fake another transaction by sending the signed transaction again to everyone else?
dan dan
CC BY-SA 4.0
2018-05-20T18:18:32.353Z
@dandan no, they cannot. If you change the data being signed, then the signature will change. So if you strip the signature off a random tx, and try to add it to a tx that spends those coins to your address instead, then the signature will be invalid on your tx.
chytrik
CC BY-SA 4.0
2018-05-22T02:25:05.050Z
how about to the same address? without changing signature
dan dan
CC BY-SA 4.0
2018-05-22T04:45:38.217Z
The signature is made across all of the transaction data; changing **any** part of the transaction data will invalidate the signature. If this were not true, then it would be trivial for an attacker to intercept and alter transactions before they were confirmed in a block.
chytrik
CC BY-SA 4.0
2018-05-19T06:06:17.007Z
2018-05-19T06:06:17.007Z
chytrik
<p>Mining is necessary for two big reasons.  It creates value of scarcity. Mining also provides the processing of the Bitcoin transactions.</p>

CC BY-SA 4.0
2018-05-18T16:18:01.550Z
2018-05-18T16:18:01.550Z
Corey Chambers
<p>How would cryptocurrencies be explained intuitively? I tried reading about bitcoin but most articles explain broad concepts ambiguously, and I want to understand the concepts so I could potentially make a cryptocurrency myself. So, here is my intuitive understanding of it. With online currencies usually there is a central service that steals some of the money when you make transactions? You don't want that so you directly do transactions from one person to the other, perhaps by passing a code that is worth value to someone else. OK, but this has problems because of double spending. A person cannot be sure if the currency has already been spent. So that's why there's databases that everyone has access to and everyone writes to that stores the amount of money everyone has. How would the databases verify that you are in fact doing the transaction and not someone saying that they are doing it? Through public and private keys, right. How that works is that each person has a private key that encrypts a specific code, and everyone has access to the public key that is paired with the private key. If that code, when decrypted by the public key, is in the correct format, then it can be verified who is making the transaction, because nobody else has the private key. But the code that needs to be decrypted must be different every time because if it's the same every time, whoever sees the code can use it to spend money. So maybe you make a rule that when you decrypt the code it has to form the current date to verify the transaction. The public key would be stored in the database with the corresponding amount of money connected to the public key. Also when you make the transaction you say which public key you want to give money to and which public key you have, and how much money you want to give. A lot of people's computers verify the transaction so it's safe. Why is mining even necessary? I might just be dumb because I don't have much cryptography experience, I do have some programming knowledge however.</p>

<mining-theory>
Intuitive CryptoCurrency?
dan dan
# Intuitive CryptoCurrency?

(Asked by: username_0 on 2018-05-18)

How would cryptocurrencies be explained intuitively? I tried reading about bitcoin but most articles explain broad concepts ambiguously, and I want to understand the concepts so I could potentially make a cryptocurrency myself. So, here is my intuitive understanding of it. With online currencies usually there is a central service that steals some of the money when you make transactions? You don't want that so you directly do transactions from one person to the other, perhaps by passing a code that is worth value to someone else. OK, but this has problems because of double spending. A person cannot be sure if the currency has already been spent. So that's why there's databases that everyone has access to and everyone writes to that stores the amount of money everyone has. How would the databases verify that you are in fact doing the transaction and not someone saying that they are doing it? Through public and private keys, right. How that works is that each person has a private key that encrypts a specific code, and everyone has access to the public key that is paired with the private key. If that code, when decrypted by the public key, is in the correct format, then it can be verified who is making the transaction, because nobody else has the private key. But the code that needs to be decrypted must be different every time because if it's the same every time, whoever sees the code can use it to spend money. So maybe you make a rule that when you decrypt the code it has to form the current date to verify the transaction. The public key would be stored in the database with the corresponding amount of money connected to the public key. Also when you make the transaction you say which public key you want to give money to and which public key you have, and how much money you want to give. A lot of people's computers verify the transaction so it's safe. Why is mining even necessary? I might just be dumb because I don't have much cryptography experience, I do have some programming knowledge however.

**Tags:** mining-theory


---

## 2 answers

### Answer by username_1 on 2018-05-19. Score: 1

Your description works well enough until you start talking about encryption. The way you've described implementing public-key cryptography isn't quite right, if you're interested, I would suggest taking a looking at at the [public-key cryptography wiki page](https://en.wikipedia.org/wiki/Public-key_cryptography).

I think more useful than explaining how your description is wrong, I'll just give an example of how I would re-write it to be more accurate (at least insofar as it is implemented in bitcoin). My addition in bold:

> How would the databases verify that you are in fact doing the transaction and not someone saying that they are doing it? Through public and private keys, right. **Coins can be sent to public keys, and then spent using the corresponding private key. So you can share your 'pubkeyA' with someone, and then they can send bitcoins to that key (and thus to you). They do this by using their 'privkeyX' to sign a transaction that says "send the coins held at 'pubkeyX' to pubkeyA", and everyone else can use the pubkeyX to verify that the signature came from privkeyX, without ever knowing what privkeyX is!**

Perhaps also worth mentioning, saying 'databases that everyone has access to and can write to' is sorta misleading, it makes me think of a database instance that many different people write to. In reality it is 'many instances of a database that are constantly updating according to the network's rules'.

> A lot of people's computers verify the transaction so it's safe. Why is mining even necessary?

Proof-of-work mining solves the problem of needing a large network of untrusted computers to all agree upon the ordering of transactions, in order to solve the doublespend problem. Otherwise, how will the computers agree on which transactions to include, and in what order? What would make any one copy of the database more trustworthy and accurate than any other?

> **Comments:**
> **username_0**: But can anyone who receives the signed transaction fake another transaction by sending the signed transaction again to everyone else?  
> **username_1**: @username_0 no, they cannot. If you change the data being signed, then the signature will change. So if you strip the signature off a random tx, and try to add it to a tx that spends those coins to your address instead, then the signature will be invalid on your tx.  
> **username_0**: how about to the same address? without changing signature  
> **username_1**: The signature is made across all of the transaction data; changing **any** part of the transaction data will invalidate the signature. If this were not true, then it would be trivial for an attacker to intercept and alter transactions before they were confirmed in a block.  

---

### Answer by username_2 on 2018-05-18. Score: 0

Mining is necessary for two big reasons. It creates value of scarcity. Mining also provides the processing of the Bitcoin transactions.


---

