0 - Unit-1 - Introducntion To Crypto Currencies
0 - Unit-1 - Introducntion To Crypto Currencies
0 - Unit-1 - Introducntion To Crypto Currencies
• Introduction to Cryptocurrencies
• Definition:
security.
• Key Features:
• Decentralized systems
Key Features:
• Deterministic: If you put the same data into the blender, you’ll always get the
same smoothie.
• Pre-image Resistance: It’s really hard to figure out what the original data was
just by looking at the smoothie.
• Fixed Output Length: No matter how much data you put in, the smoothie
Cryptocurrencies use specific hash functions to keep things secure. Here are
• Used by Bitcoin.
• RIPEMD-160:
• Keccak-256:
• Used in Ethereum.
Hash Pointers and Data Structures
Hash Pointers
• A hash pointer is a data structure that acts as a pointer to the location of some
combination provides both the address of the data and a way to verify its
integrity.
How It Works:
• Hash: A cryptographic hash of the data, ensuring that any change in the data
• Applications:
Linked Lists: Hash pointers can be used in linked lists to ensure that the
1.Blockchain:
creating a chain.
oIntegrity: Any change in a block will change its hash, breaking the
Block N: Data + Previous Block Hash -> Hash Function -> Block N Hash
Hash Pointers and Data Structures
2.Merkle Trees:
• Structure: Leaf nodes contain hashes of data blocks, and non-leaf nodes
• Root Hash
/ \
Hash 0 Hash 1
/ \ / \
| | | |
3. Hash Tables:
oIntegrity: Ensures that the data in each node has not been tampered
with.
Node 1: Data + Hash Pointer -> Node 2: Data + Hash Pointer -> ...
Hash Pointers and Data Structures
Example: Blockchain
• Hash Pointer: A hash of the previous block’s data and its hash pointer.
Hash Pointers and Data Structures
• How It Works
• This hash is then encrypted with your private key to create the digital
signature.
Digital Signatures
• How It Works
• The recipient uses your public key to decrypt the digital signature.
signer.
Digital Signatures
Key Features
• Integrity: Ensures the document has not been altered since it was
signed.
Applications
• Email Security: Ensuring the authenticity of the sender and the integrity
of the message.
with.
digital signatures.
Public Keys as Identities:
• Identification: Your public key can be shared with anyone, much like a
messages.
Public Keys as Identities:
Verification: When you sign a document with your private key, others can use
your public key to verify that the signature is indeed yours and that the document
Example
- When you send a message, you sign it with your private key.
- Your friends use your public key to verify that the message is from you and
A Simple Cryptocurrency:
• Key Concepts
1.Decentralization:
2.Blockchain Technology:
3.Cryptography:
Cryptography is like a secret code that secures transactions and controls the
creation of new units of cryptocurrency.
A Simple Cryptocurrency:
• How It Works
1.Transactions:
2.Mining:
• Miners are rewarded with new cryptocurrency units for their work.
A Simple Cryptocurrency:
• How It Works
3.Wallets:
network.
Challenges
entities control the entire system. Examples include traditional banks and
• Bitcoin uses a public ledger called the blockchain, where all transactions are
the world.
2.Distributed Consensus:
blockchain. This ensures that no single entity can control the entire network.
How Bitcoin Achieves Decentralization:
A simple flowchart to help visualize how Bitcoin achieves
decentralization:
Centralized System:
[Central Authority] -> [Validates Transactions] -> [Maintains Records]
Bitcoin. It ensures that all participants in the network agree on the state
it works:
1.Transaction Broadcast:
of nodes.
Distributed Consensus:
2.Transaction Validation:
is legitimate. This involves checking that the sender has enough balance
miner to solve the problem gets to add the new block of transactions to
the blockchain.
the network.
Distributed Consensus:
4.Block Addition:
• Once a miner solves the problem, the new block is added to the
blockchain.
• The solution is broadcast to the network, and other nodes verify it. If
the solution is correct, the block is accepted, and the miner is rewarded
5. Consensus Achieved:
oAll nodes update their copy of the blockchain to include the new
block. This ensures that all participants have the same version of the
blockchain.
Distributed Consensus:
• A simple flowchart to illustrate distributed consensus in Bitcoin:
[User A] -> [Broadcasts Transaction] -> [Network of Nodes]
-> [Nodes Validate Transaction]
-> [Miners Compete to Solve Problem]
-> [First Miner Solves Problem]
-> [New Block Added to Blockchain]
-> [Network Verifies Solution]
-> [Consensus Achieved]
-> [User B Receives Bitcoin]
This process ensures that the network remains secure, transparent, and
2.Proof of Work:
• This process is known as Proof of Work and ensures that the network
remains secure and decentralized.
How Bitcoin Achieves Consensus Without
Identity:
3.Random Node Selection:
4.Sybil Resistance:
Instead, they use cryptographic keys (public and private keys) to sign
identity:
This process ensures that the network remains secure, transparent, and
1.Mining:
• The first miner to solve the problem gets to add a new block of
transactions to the blockchain.
Incentives and Proof of Work
• Proof of Work (PoW)
2.Difficulty Adjustment:
3.Validation:
• Other nodes verify the solution. If it is correct, the new block is added
to the blockchain.
Incentives and Proof of Work
• Incentives
1.Block Rewards:
• This reward decreases over time through a process called “halving.” For
• Scalability: The time and resources required for mining can limit the
scalability of the network.