Money that exists only as electronic data in a wallet
Cambridge IGCSE Computer Science, syllabus 0478. Paper 1, theory.
Digital currency and blockchain
You can explain a digital currency, and how a blockchain keeps its record.
A digital currency is money that exists only as electronic data. There is no note or coin to hold. A cryptocurrency is one kind of digital currency. A shared network tracks it, not one bank.
- 5.2.1 Digital currency
- 5.2.2 Blockchain
- Paper 1
Syllabus map
What Paper 1 can ask you to state or describe
5.2.1
What a digital currency is
You can state what a digital currency is.
Alice has 2.5 coins in an app on her phone. She cannot hold those coins in her hand. The app is her digital wallet. A digital wallet stores the currency on a computer, a phone, or a secure server.
A digital currency exists only in electronic form. It has no paper notes and no metal coins. Cash is different, because you can hold a note.
A blockchain is the ledger that records the payments. It is not another name for the money.
Quick question
State two features of a digital currency.
It exists only electronically. It has no notes or coins. State needs the facts only, so you do not add “because”.
Which idea is it?
Digital currency, blockchain, or not the definition.
A shared ledger of time-stamped records that cannot be altered
Digital currency means Bitcoin, and only Bitcoin
The hash of the previous block, stored inside this block
A paper banknote issued by a central bank
5.2.1 continued
How people use a digital currency
You can describe a use, then discuss one benefit and one risk.
Alice sends 2.5 coins from her wallet to Bob’s wallet. A bank does not have to pass that payment on. The same coins can pay a shop, or an online service, in another country.
A private key is the secret that controls a wallet. You will use it again when you sign a payment. If Alice loses her private key, the coins stay locked, because she cannot prove they are hers.
| Point | Benefit | Risk |
|---|---|---|
| Time | The network is open all day, so you are not limited to bank hours. | A network failure can stop the payment. |
| Cost | A payment abroad can cost less than a bank transfer. | The price of the coins can rise or fall sharply. |
| After you pay | The coins can arrive quickly. | A finished payment cannot be reversed if you paid the wrong wallet. |
Quick question
Give one benefit of paying with a digital currency.
The network is open all day. Give needs only the fact. You do not need a reason unless the question says “explain”.
Benefit or risk?
The network is available 24 hours a day
The price can change sharply
Lower overhead, and access for people without a bank branch
A completed payment cannot be reversed
Losing the private key locks the funds
Before 5.2.2
How a cryptocurrency differs from a bank balance
You can compare a cryptocurrency with other electronic money.
Bitcoin is a cryptocurrency. Alice’s 2.5 coins are not printed as notes by a central bank. A network of computers keeps the record of who paid whom. No single bank is in charge of the accounts.
A cryptocurrency is still a digital currency, because it exists only as electronic data in a wallet. “Digital currency” is the wider term. It is not another name for Bitcoin.
| Word | Meaning |
|---|---|
| Digital currency | Money that exists only electronically. |
| Cryptocurrency | A digital currency tracked by a shared network, not by one bank. |
| Bank balance | The number is electronic, but the bank keeps the account. |
| Blockchain | The ledger that stores the payments. It is not another name for the money. |
Quick question
Compare a cryptocurrency with a balance in a banking app.
Both are electronic, so there is no note to hold. A cryptocurrency is tracked by a shared network. A bank balance is kept by the bank. Compare needs both sides.
Building the record
How a hash shows that data has changed
You can explain what a hash is used for.
The payment “Alice to Bob, 2.5 coins” has the hash 4951b1d8. Hash that same payment again and you get 4951b1d8. Change it to “Alice to Bob, 9 coins” and the hash becomes a380f610.
A hash is a short fingerprint of some data. The same data always gives the same hash. Change one character and the hash changes.
You cannot rebuild the payment from the hash, and the hash does not hide it. Hiding a message is encryption. That is topic 2.3.
Same payment, same fingerprint
Look at the two top arrows. They start from the same payment and both end at 4951b1d8. Look at the lower arrow. The amount has changed, so the hash is a380f610. Each hash is eight characters. The crossed arrow means you cannot turn the hash back into the sentence.
Quick question
Explain why “Alice to Bob, 9 coins” has a different hash from “Alice to Bob, 2.5 coins”.
The hash is worked out from the payment. The amount is part of that payment, so the hash changes. One mark for the point, and one mark for the reason.
Change one detail and watch the hash
This is a short classroom hash, not a real blockchain hash. A real hash is much longer. You do not need the method’s name.
Hash
Building the record
How a digital signature shows who authorised a payment
You can describe how a digital signature is checked.
Alice signs “Alice pays Bob 2.5 coins”. A digital signature shows who authorised a message. It also shows that the message is still the one they signed. It does not hide the payment. The computers still need to read who is paying whom.
You met the private key as the secret in the wallet. A public key is the matching key that other people can use. Alice signs with her private key. A node checks with her public key.
A node is one computer on the network.
The order matters. The wallet hashes the payment first, because the signature is made from that hash. The private key is used next. The node then hashes the copy it received. A change to the wording makes the two hashes differ, so the check fails.
Why the keys are used this way
The private key stays in the wallet, so only Alice can sign. The public key can be shared, so any node can check. Topic 2.3 uses the keys the other way round. There, the public key hides a message and the private key reads it.
The four steps, in this order
- Hash the payment, such as “Alice pays Bob 2.5 coins”.
- Use Alice’s private key on that hash. The result is the signature.
- The node hashes the payment it received.
- It checks the signature with Alice’s public key. A changed amount, or another person’s key, is rejected.
| Hash | Digital signature | Encryption | |
|---|---|---|---|
| Job | Shows whether the data changed | Shows who authorised the payment | Hides the message |
| Key | No key | Private key signs. Public key checks. | Public key hides. Private key reads. |
| Can you read the payment? | Yes | Yes | No. The message is hidden. |
How a signature is checked
Look at the top row. Alice hashes the payment, then her private key makes the signature. Look at the lower row. The node hashes the copy it received and checks it with Alice’s public key. Match means accept. Differ means reject.
Check Alice’s signature
Alice signed “Alice pays Bob 2.5 coins” with her private key. The nodes check it with Alice’s public key.
Quick question
Describe how a node checks Alice’s signature.
The node hashes the payment it received. It checks the signature with Alice’s public key. It accepts the payment only if they match. Describe needs those steps.
Hash, signature, or encryption?
The same data always gives the same result. Change one character and the result changes.
Made with the private key and checked with the public key, to show who authorised this payment.
Hides a readable message so another person cannot read it.
A value kept beside a message, so you can tell later whether that message was edited.
Building the record
What a transaction stores
You can state the four items in one payment.
Alice pays Bob 2.5 coins, and she signs that payment. A transaction is one payment written as data. It stores the sender, the recipient, the amount, and the digital signature.
The sender is Alice’s wallet. The recipient is Bob’s wallet. These are addresses on the network, not names written in a paper book. A node checks the signature with Alice’s public key before the payment can be stored.
Quick question
State the four items in Alice’s transaction.
Alice, Bob, 2.5 coins, and Alice’s digital signature. State needs the four facts. You do not need to explain the keys.
Building the record
What one block stores
You can state the contents of a block.
Block 1 stores Alice’s payment, the time 09:15:02, the hash 0e42f289, and the previous hash 00000000. A block groups waiting transactions. It also stores the time it was checked, its own hash, and the previous block’s hash.
The hashes on this page are short classroom hashes. A real hash is much longer. You do not need the method’s name. The next section shows why the previous hash is stored.
Look at what Block 1 and Block 2 store
Look at Block 2’s previous hash. It is 0e42f289, the same hash as Block 1. Look at Block 1’s previous hash. It is 00000000, because there is no earlier block.
The four items inside a block
- The transactions: sender, recipient, amount, and a digital signature.
- The time the block was checked.
- This block’s hash, worked out from its own data.
- The previous hash, which is the hash of the block before this one.
Quick question
State two things a block stores besides the transactions.
The time it was checked, and the previous block’s hash. Its own hash is also correct. State needs the names only.
5.2.2
How linked blocks make a blockchain
You can describe a blockchain in the form Paper 1 expects.
Block 2 stores Block 1’s hash, 0e42f289. If Alice’s 2.5 coins in Block 1 are changed to 9, Block 1’s hash changes. Block 2 still holds the old hash, so the link fails.
A blockchain is a digital ledger. A digital ledger is a shared record of transactions. It is a time-stamped series of records that cannot be altered. Time-stamped means each block stores the time it was agreed. Copies are kept on many computers. No single bank owns the ledger.
Digital ledger
The nodes keep the same record of transactions. A node is one computer on the network.
Time-stamped
Each block stores when it was checked, so the payments stay in order.
Cannot be altered
After the network has agreed a block, a change breaks the later links. The other nodes can see that.
Each block stores its own hash and the hash of the block before it. This matters because a change to an old payment changes that block’s hash. Later blocks still store the old hash, so the chain no longer matches. The signature checked one payment. The block hash checks that the agreed history was not rewritten.
Quick question
Explain why a change to Block 1 is detected.
Block 1’s hash changes, so it no longer matches the previous hash stored in Block 2. One mark for the changed hash, and one mark for the broken link.
Alter a block that was already agreed
5.2.2 continued
How a payment is added to the ledger
You can describe the six steps in order.
Alice’s payment is requested, grouped into a block, sent to the nodes, checked, added to the chain, and then the ledger updates. The order matters. The nodes must check the block before it is added. If it is added first, a bad payment could enter the ledger.
- WalletRequest
- BlockGroup transactions
- NetworkBroadcast
- NodesValidate
- ChainAppend
- RecipientFunds arrive
Put the steps in order
Click a step to add it. Click a chosen step to remove it.
5.2.2 continued
Why the ledger stops a coin being spent twice
You can explain double-spending.
The ledger already says Alice sent coin C-19 to Bob. She then tries to send C-19 to the shop as well. Double-spending means spending the same digital coin more than once.
A digital coin is data, so it can be copied. A paper note cannot be handed over twice, because you no longer have it. The ledger is checked before a new payment is accepted. A coin that was already spent is rejected.
No single bank keeps the only copy of this ledger. If one node fails, the other nodes still hold it. That is why one broken computer does not delete the currency.
Quick question
Explain how the ledger stops Alice spending coin C-19 twice.
The ledger shows that C-19 was already paid to Bob, so the shop payment is rejected. The point is the earlier record. The reason is that the same coin would be spent twice.
Try to spend a coin twice
The ledger already contains one payment. Ask for another and see which coin the network will accept.
Exam practice
How to answer the written questions
Write first. Then open the scheme and award the marks yourself.
Question 1 2 marks
Command word: State. Give a short fact for each mark. Do not explain.
State what is meant by a digital currency.
Model answer: A digital currency exists only in electronic form. It has no paper notes or metal coins.
- 1 mark: it exists only in electronic form.
- 1 mark: it has no paper notes or metal coins.
Question 2 3 marks
Command word: Describe. Give the details. Do not turn it into a story about Bitcoin.
Describe the role and characteristics of a blockchain in tracking digital currency transactions.
Model answer: A blockchain is a digital ledger. It stores a time-stamped series of transactions. Once the records are agreed, they cannot be altered.
- 1 mark: it is a digital ledger.
- 1 mark: the records are time-stamped, so they stay in order.
- 1 mark: once agreed, the records cannot be altered.
Question 3 2 marks
Command word: Explain. Give a point and a reason, using “because” or “so”.
Explain why timestamps are essential in a blockchain transaction record.
Model answer: A timestamp puts the transactions in order, so the ledger can show that a coin was already spent. That stops double-spending.
- 1 mark: a timestamp puts the transactions in order.
- 1 mark: that order shows when a coin was spent, so it cannot be spent twice.
Quick check
Ten short questions. The explanation appears as soon as you choose.
Section 5.2 review
Say these without looking back
Tick an idea only when you can say it. The ticks stay in this browser.