លំហសិក្សាកម្ពុជា លំហសិក្សាកម្ពុជា V1.0
ចូល ចុះឈ្មោះ

Cryptographic Principles in Blockchain – Assignment Report

មូលសង្ខេប / Abstract

This report looks at twelve cryptographic terms that blockchain depends on. For each one, it gives a short definition, explains what the term does in blockchain or cryptography, and shows an example of where it is used. The terms are sorted into four groups: hash functions, keys and signatures, data integrity, and consensus and attacks. Taken together, they explain how a blockchain keeps its records safe, shows who sent a transaction, notices changes, and stops the same money from being spent twice. Keywords: hash function, deterministic property, collision resistance, public key cryptography, private key, digital signature, Merkle tree, immutability, proof-of-work, tamper detection, 51% attack, double spending

ពាក្យគន្លឹះ

Cryptographic Principles in Blockchain – Assignment Report

Introduction

People often say that blockchain is secure, but that security does not come from a bank or a central office. It comes from cryptography, which means using mathematics to protect information so that it can be checked, signed, and kept from being changed.

The homework asks for twelve keywords to be researched. To keep them easy to follow, they are sorted into four groups. Each term is explained the same way: what it means, what role it plays, and one example of it in use.

1. Hash Functions

Hash functions are the starting point of blockchain security. The three terms below cover what a hash function is and the two properties that make it dependable.

1.1 Hash Functions

A hash function takes data of any size and turns it into a short string of characters with a fixed length, called a hash. The hash works like a fingerprint of the data. In a blockchain, every block keeps the hash of the block before it, and this is what links the blocks into a chain. Hashes are also used in mining and to identify transactions. Bitcoin, for example, uses the SHA-256 hash function, which always gives a 64-character result. If even one letter of the input changes, the hash comes out completely different.

1.2 Deterministic Property

The deterministic property means that the same input always gives the same hash, no matter who calculates it or when. This matters because any computer on the network can hash a block again and compare the result with the stored one, without having to trust anyone else. When a new block is sent out on the Bitcoin network, many nodes hash it separately. If they all get the same answer, the block checks out. If one node gets something different, it rejects the block.

1.3 Collision Resistance

Collision resistance means it is practically impossible to find two different inputs that give the same hash. Because of this, nobody can swap a real transaction or block for a fake one with the same fingerprint. Older hash functions show why this matters. In 2017, researchers at Google and CWI produced two different files with the same SHA-1 hash, so SHA-1 is no longer considered safe. Bitcoin uses SHA-256 instead.

2. Keys and Signatures

A blockchain has no bank to say who owns what. Instead, ownership and permission are proven with pairs of keys and digital signatures.

2.1 Public Key Cryptography

Public key cryptography uses two keys that are mathematically linked. The public key can be shared with anyone, while the private key must stay secret. This method is also called asymmetric cryptography. On a blockchain, the public key, or an address made from it, works like an account number. People can send money to it and check signatures against it, but they cannot spend from it. A Bitcoin address, for example, is created from a public key using elliptic curve cryptography.

2.2 Private Key

A private key is a secret number that belongs to one user and proves that they own their account. It is used to sign transactions, so whoever has the key controls the money. There is no "forgot password" button, so if the key is lost, the funds are lost too. Most crypto wallets give the user a recovery phrase that backs up the private key. Anyone who sees that phrase can take the funds, so it has to be kept somewhere safe.

2.3 Digital Signatures

A digital signature is data created with a private key. It shows that a message or transaction really came from a certain sender and was not changed on the way. It does the same job as a handwritten signature, but it is much harder to fake. When someone sends Bitcoin, the wallet signs the transaction automatically. Nodes check the signature with the sender's public key before adding the transaction to a block, and they reject it if the check fails.

3. Data Integrity

These three terms are about how a blockchain organizes its data, keeps it permanent, and notices when someone tries to change it.

3.1 Merkle Tree

A Merkle tree is a way of summarizing many transactions in one value. Each transaction is hashed, the hashes are joined in pairs and hashed again, and this repeats until only one hash is left. That final hash is called the Merkle root. The root is stored in the block header, so it stands for every transaction in the block. It also lets someone prove that one transaction is inside a block without downloading all the others. Light wallets on phones use this idea to confirm Bitcoin payments without storing the whole blockchain.

3.2 Immutability

Immutability means that once data is recorded and confirmed on the blockchain, it practically cannot be changed or deleted. This comes from the hash links between blocks together with consensus. To change an old block, someone would have to redo every block after it and then convince the network to accept the new version. Bitcoin's transaction history since 2009 can still be checked today. When a mistake is made, it is fixed by adding a new transaction instead of editing the old one.

3.3 Tamper Detection

Tamper detection is the ability to notice when recorded data has been altered. If a block is changed, its hash changes too, and the next block no longer matches the hash it stored. The nodes see this mismatch and reject the changed copy. Estonia uses KSI blockchain technology to protect the integrity of its national health records and access logs, so an unauthorized change to a record can be detected.

4. Consensus and Attacks

A decentralized network needs a way to agree on which transactions are valid, and it also has to defend itself against people who try to cheat. The terms below cover one way of reaching agreement and two well-known threats.

4.1 Proof-of-Work (PoW)

Proof-of-work is a consensus method in which miners compete to solve a hard mathematical puzzle that takes a lot of computing effort. The first miner to solve it gets to add the next block. Because adding blocks costs real work, cheating becomes expensive, and strangers can agree on one version of the ledger without a central authority. Bitcoin uses proof-of-work. Miners keep hashing the block data until they find a hash below a target value, and the network adjusts the difficulty so that a new block appears about every 10 minutes.

4.2 51% Attack

A 51% attack happens when one person or group controls more than half of a network's mining power. With that majority, the attacker can block other people's transactions and rewrite recent blocks, which makes double spending possible. The attacker still cannot take coins without the private keys. Smaller proof-of-work networks are the usual targets, because they have far less mining power than Bitcoin. Ethereum Classic was attacked several times in 2019 and 2020, and Bitcoin Gold was attacked in 2018. This is one reason a network needs to be large and widely spread out.

4.3 Double Spending

Double spending means that the same digital money is spent more than once. Digital files are easy to copy, so a payment system has to stop this somehow, and it was the main problem Bitcoin was built to solve. The network puts transactions in order, and only the first valid spend of a coin is accepted. If someone tries to pay two shops with the same coins, only the transaction that enters the chain first counts. For this reason, merchants usually wait for several confirmations, often six in Bitcoin, before treating a payment as final.

Conclusion

Looking at the twelve terms together, they fit as one system. Hash functions and their two properties give every block a dependable fingerprint. Keys and digital signatures show who owns and approves a transaction. Merkle trees, immutability, and tamper detection keep the stored data organized and trustworthy. Proof-of-work helps the network agree on one ledger, and the 51% attack and double spending show the risks the design is built to resist. Understanding these ideas explains why people can trust a blockchain without a central authority.

Keyword Summary

No.

Keyword

Short meaning

1

Hash function

Turns data of any size into a fixed-length fingerprint.

2

Deterministic property

The same input always gives the same hash.

3

Collision resistance

It is practically impossible for two different inputs to give the same hash.

4

Public key cryptography

Encryption with a linked pair of keys, one public and one secret.

5

Private key

A secret number that proves ownership and signs transactions.

6

Digital signature

Proof that a transaction came from the key owner and was not changed.

7

Merkle tree

A tree of hashes that summarizes all transactions in a block.

8

Immutability

Recorded data cannot practically be changed or deleted.

9

Proof-of-work

Miners solve a hard puzzle to earn the right to add a block.

10

Tamper detection

Noticing when recorded data has been altered.

11

51% attack

One group controls over half of the mining power and can rewrite recent blocks.

12

Double spending

The same digital money being spent more than once.

References

  1. Nakamoto, S. (2008). "Bitcoin: A Peer-to-Peer Electronic Cash System." bitcoin.org
  2. SecurityWeek. "First SHA-1 Collision Attack Conducted by Google, CWI." securityweek.com
  3. Chainlink. "What Is a 51% Attack?" chain.link
  4. Quartz. "Ethereum Classic is under attack." qz.com
  5. e-Estonia. "e-Health Records." e-estonia.com
ចែករំលែក
រក្សាទុក
ការផ្សព្វផ្សាយ
ការផ្សព្វផ្សាយ
មតិយោបល់ 0
ចូលគណនី ដើម្បីបញ្ចេញមតិ