Bitcoin & Cryptocurrency
Priya R L
Department of Computer Engineering, VESIT, Mumbai
Agenda
● Course Overview
● Why there is a hype in Blockchain?
● Why to learn Blockchain ?
● What is Web 3.0 ?
● What is Blockchain ?
● P2P Network in Blockchain - Challenges & Solutions
Department of Computer Engineering, VESIT, Mumbai
Department of Computer Engineering, VESIT, Mumbai
Department of Computer Engineering, VESIT, Mumbai
Department of Computer Engineering, VESIT, Mumbai
HBCC501 : Blockchain Development - Assessment (100 Marks)
Direct Assessment
● End Semester Exam (Full syllabus, Duration : 2 hours) : 60 Marks
● Internal Assessment : 40 Marks
○ Mid Term Test (50% syllabus, Duration : 1 hour) - 20 marks
○ Continuous Assessment - 20 marks
Indirect Assessment (Extra Assignment - Case Study) - 25 Marks
Rubrics considered for Continuous Assessment from Syllabus :
1. ** Certificate course NPTEL/ Coursera/Udemy/any MOOC - 10 marks
2. Wins in the event/competition/hackathon - 10 marks
7. ** Participation in event / workshop / talk / competition - 5 marks
8. Multiple Choice Questions (Quiz) - 5 marks
9. ** Case study, Presentation, group discussion - 10 marks
10. Question paper solution (Slow Learners) - 10 marks
11. Multiple Choice Questions (Quiz) (Slow Learners) - 5 marks
12. ** Literature review of papers/journals - 5 marks
13. Library related work (Slow Learners) - 5 marks
** Conditions Apply - Refer Syllabus
Department of Computer Engineering, VESIT, Mumbai
Agenda
● Course Overview
● Why there is a hype in Blockchain?
● Why to learn Blockchain ?
● What is Web 3.0 ?
● What is Blockchain ?
● P2P Network in Blockchain - Challenges & Solutions
Department of Computer Engineering, VESIT, Mumbai
Why there is a hype in Blockchain?
Courtesy : https://emtemp.gcom.cloud/ngw/globalassets/en/newsroom/images/graphs/blockchain-hypecycle-oct-3-2019-2.png
Department of Computer Engineering, VESIT, Mumbai
Agenda
● Course Overview
● Why there is a hype in Blockchain?
● Why to learn Blockchain ?
● What is Web 3.0 ?
● What is Blockchain ?
● P2P Network in Blockchain - Challenges & Solutions
Department of Computer Engineering, VESIT, Mumbai
Why to Learn Blockchain ?
Current Scenario Blockchain Offers …
● Internet is owned by Technical Giants ● Decentralized with P2P Network
● Huge Transaction fees by 3rd Parties ● Trust in a Trustless Network
● Time to complete Transactions.. ● Immutable
● Ownership for Content Creators ● Security through Cryptography
● Lack of Transparency ● Transparency
Department of Computer Engineering, VESIT, Mumbai
Agenda
● Course Overview
● Why there is a hype in Blockchain?
● Why to learn Blockchain ?
● What is Web 3.0 ?
● What is Blockchain ?
● P2P Network in Blockchain - Challenges & Solutions
Department of Computer Engineering, VESIT, Mumbai
What is Web 3.0?
Courtesy : https://www.globaldata.com/wp-content/uploads/2022/03/220302_Web3.0_7and9_1.png
Department of Computer Engineering, VESIT, Mumbai
Agenda
● Course Overview
● Why there is a hype in Blockchain?
● Why to learn Blockchain ?
● What is Web 3.0 ?
● What is Blockchain with an Example Scenario
● P2P Network in Blockchain - Challenges & Solutions
Department of Computer Engineering, VESIT, Mumbai
What is Blockchain ?
Courtesy : https://nptel.ac.in/courses/106105184
Department of Computer Engineering, VESIT, Mumbai
Example Scenario
Courtesy : https://nptel.ac.in/courses/106105184
Department of Computer Engineering, VESIT, Mumbai
Example Scenario
Courtesy : https://nptel.ac.in/courses/106105184
Department of Computer Engineering, VESIT, Mumbai
Example Scenario
Courtesy : https://nptel.ac.in/courses/106105184
Department of Computer Engineering, VESIT, Mumbai
Example Scenario
Courtesy : https://nptel.ac.in/courses/106105184
Department of Computer Engineering, VESIT, Mumbai
Example Scenario
Courtesy : https://nptel.ac.in/courses/106105184
Department of Computer Engineering, VESIT, Mumbai
Example Scenario
Courtesy : https://nptel.ac.in/courses/106105184
Department of Computer Engineering, VESIT, Mumbai
Agenda
● Course Overview
● Why there is a hype in Blockchain?
● Why to learn Blockchain ?
● What is Web 3.0 ?
● What is Blockchain? With an example Scenario
● P2P Network in Blockchain - Challenges & Solutions
Department of Computer Engineering, VESIT, Mumbai
P2P Network in Blockchain
Solution
Challenges
- Cryptography
1. Confidentiality
2. Integrity
3. Non-repudiation
4. Authentication
Courtesy : https://www.youtube.com/watch?v=06Un2_F4Y0E&list=PLsyeobzWxl7oY6tZmnZ5S7yTDxyu4zDW-&index=7
Department of Computer Engineering, VESIT, Mumbai
P2P Network in Blockchain
Solution
Challenges
- Cryptography
1. Confidentiality
2. Integrity
3. Non-repudiation
4. Authentication
Courtesy : https://www.youtube.com/watch?v=06Un2_F4Y0E&list=PLsyeobzWxl7oY6tZmnZ5S7yTDxyu4zDW-&index=7
Department of Computer Engineering, VESIT, Mumbai
P2P Network in Blockchain → Cryptography
Courtesy : https://www.youtube.com/watch?v=06Un2_F4Y0E&list=PLsyeobzWxl7oY6tZmnZ5S7yTDxyu4zDW-&index=7
Department of Computer Engineering, VESIT, Mumbai
Cryptography - Types
Department of Computer Engineering, VESIT, Mumbai
Symmetric Key Cryptography
Challenges
- Key must be secure
- Need for Frequent Key changes
- Key Distribution Problem
- # Communication pairs
Courtesy : https://www.youtube.com/watch?v=06Un2_F4Y0E&list=PLsyeobzWxl7oY6tZmnZ5S7yTDxyu4zDW-&index=7
Department of Computer Engineering, VESIT, Mumbai
Public Key or Asymmetric Key Cryptography
Challenges
- Require a pair of keys
- Expensive to generate
- Not efficient for long messages
- Require High Computational Power
Courtesy : https://www.youtube.com/watch?v=06Un2_F4Y0E&list=PLsyeobzWxl7oY6tZmnZ5S7yTDxyu4zDW-&index=7
Department of Computer Engineering, VESIT, Mumbai
Asymmetric Key Generation - Demo
Courtesy : https://andersbrownworth.com/blockchain/public-private-keys/keys
Department of Computer Engineering, VESIT, Mumbai
Cryptographic Hash Functions
Courtesy : https://www.simplilearn.com/tutorials/blockchain-tutorial/merkle-tree-in-blockchain
Department of Computer Engineering, VESIT, Mumbai
Cryptographic Hash Functions
Courtesy : https://en.wikipedia.org/wiki/Cryptographic_hash_function
Department of Computer Engineering, VESIT, Mumbai
Cryptographic Hash Functions - Eg.
Courtesy : https://www.youtube.com/watch?v=06Un2_F4Y0E&list=PLsyeobzWxl7oY6tZmnZ5S7yTDxyu4zDW-&index=7
Department of Computer Engineering, VESIT, Mumbai
Cryptographic Hash Functions - Demo
Courtesy : https://andersbrownworth.com/blockchain/hash
Department of Computer Engineering, VESIT, Mumbai
Cryptographic Hash Functions
Courtesy : https://www.simplilearn.com/tutorials/blockchain-tutorial/merkle-tree-in-blockchain
Department of Computer Engineering, VESIT, Mumbai
Cryptographic Hash Functions - Deterministic
Courtesy : https://www.youtube.com/watch?v=06Un2_F4Y0E&list=PLsyeobzWxl7oY6tZmnZ5S7yTDxyu4zDW-&index=7
Department of Computer Engineering, VESIT, Mumbai
Cryptographic Hash Functions - Cannot be reverse engineered
Courtesy : https://www.youtube.com/watch?v=06Un2_F4Y0E&list=PLsyeobzWxl7oY6tZmnZ5S7yTDxyu4zDW-&index=7
Department of Computer Engineering, VESIT, Mumbai
Cryptographic Hash Functions - Collision Resistant
Courtesy : https://www.youtube.com/watch?v=06Un2_F4Y0E&list=PLsyeobzWxl7oY6tZmnZ5S7yTDxyu4zDW-&index=7
Department of Computer Engineering, VESIT, Mumbai
P2P Network in Blockchain
Solution
Challenges
- Digital Signature
1. Confidentiality
2. Integrity
3. Non-repudiation
4. Authentication
Courtesy : https://www.youtube.com/watch?v=06Un2_F4Y0E&list=PLsyeobzWxl7oY6tZmnZ5S7yTDxyu4zDW-&index=7
Department of Computer Engineering, VESIT, Mumbai
P2P Network in Blockchain
Solution
Challenges
- Digital Signature
1. Confidentiality
2. Integrity
3. Non-repudiation
4. Authentication
Courtesy : https://www.youtube.com/watch?v=06Un2_F4Y0E&list=PLsyeobzWxl7oY6tZmnZ5S7yTDxyu4zDW-&index=7
Department of Computer Engineering, VESIT, Mumbai
Digital Signature - Basic
Courtesy : https://www.youtube.com/watch?v=06Un2_F4Y0E&list=PLsyeobzWxl7oY6tZmnZ5S7yTDxyu4zDW-&index=7
Department of Computer Engineering, VESIT, Mumbai
Digital Signature – Ensures only Authentication
Courtesy : https://www.youtube.com/watch?v=06Un2_F4Y0E&list=PLsyeobzWxl7oY6tZmnZ5S7yTDxyu4zDW-&index=7
Department of Computer Engineering, VESIT, Mumbai
Digital Signature - Eg.
Courtesy : https://www.digilocker.gov.in/
https://github.com/jai-singhal/digiLocker
Department of Computer Engineering, VESIT, Mumbai
Digital Signatures - Demo
Courtesy : https://andersbrownworth.com/blockchain/public-private-keys/signatures
Department of Computer Engineering, VESIT, Mumbai
Digital Signatures - Demo
Courtesy : https://andersbrownworth.com/blockchain/public-private-keys/signatures
Department of Computer Engineering, VESIT, Mumbai
Digital Signatures - Demo
Courtesy : https://andersbrownworth.com/blockchain/public-private-keys/signatures
Department of Computer Engineering, VESIT, Mumbai
Digitally Signed Transaction - Demo
Courtesy : https://andersbrownworth.com/blockchain/public-private-keys/transaction
Department of Computer Engineering, VESIT, Mumbai
Digitally Signed Transaction - Demo
Courtesy : https://andersbrownworth.com/blockchain/public-private-keys/transaction
Department of Computer Engineering, VESIT, Mumbai
Digitally Signed Transaction - Demo
Courtesy : https://andersbrownworth.com/blockchain/public-private-keys/transaction
Department of Computer Engineering, VESIT, Mumbai
Digital Signature
Courtesy : https://www.youtube.com/watch?v=06Un2_F4Y0E&list=PLsyeobzWxl7oY6tZmnZ5S7yTDxyu4zDW-&index=7
Department of Computer Engineering, VESIT, Mumbai
Digital Signature – Ensures both Authentication &
Confidentiality
Courtesy : https://www.youtube.com/watch?v=06Un2_F4Y0E&list=PLsyeobzWxl7oY6tZmnZ5S7yTDxyu4zDW-&index=7
Department of Computer Engineering, VESIT, Mumbai
Elliptical Curve Cryptography
● Asymmetric Key Cryptography
● Provides High Security with smaller key size (compared to RSA)
● Uses Elliptical Curves
○ defined using equations of degree 3
○ Symmetric to x-axis
○ Line drawn will intersect atmost 3 points.
Courtesy : https://www.youtube.com/watch?v=0NGPhAPKYv4
Department of Computer Engineering, VESIT, Mumbai
Elliptical Curve Cryptography
● What makes ECC hard to crack ?
n
○ Discrete Logarithm Problem
■ Let Eq (a,b) be the Elliptical Curve, consider the equation, Q = kP ;
where Q & P are pts on curve and k < n
● If k & P is given, its easy to find Q.
● Otherwise, extremely difficult to find k
○ Trapdoor Function
Courtesy : https://en.wikipedia.org/wiki/Trapdoor_function
Department of Computer Engineering, VESIT, Mumbai
Elliptical Curve Cryptography
● Global Public Elements
n
○ Eq (a,b) :
■ a, b : parameters of elliptical curve
■ q : prime no. or an integer of the form 2m
○ G : Point on the elliptical curve, > n
Courtesy : https://www.youtube.com/watch?v=0NGPhAPKYv4
Department of Computer Engineering, VESIT, Mumbai
Elliptical Curve Cryptography
● User A Key Generation
○ Select Private Key nA: nA < n n
○ Calculate Public Key PA: PA= nA x G
● User B Key Generation
○ Select Private Key nB: nB < n
○ Calculate Public Key PB : PB = nB x G
● Key Exchange :
○ Calculation of secret key by User A : k = nA x PB
○ Calculation of secret key by User B : k = nB x PA
Courtesy : https://www.youtube.com/watch?v=0NGPhAPKYv4
Department of Computer Engineering, VESIT, Mumbai
Elliptical Curve Cryptography
● ECC Encryption
n
○ Let m be the message.
○ Encode m into a point on the Elliptic curve, Pm
○ For encryption, chose a random +ve integer, k
○ The Cipher point, Cm = { kG, Pm + kPB}
○ Cm is forwarded to destination
Courtesy : https://www.youtube.com/watch?v=0NGPhAPKYv4
Department of Computer Engineering, VESIT, Mumbai
Elliptical Curve Cryptography
● ECC Decryption : Cm = { kG, Pm + kPB}
n
○ kG x nB //(where, nB : Private key of
B)
○ Pm + kPB - (kG x nB ) // we know PB = nB x G
○ i.e., Pm + kPB - kPB
○ i.e., Pm // Receiver gets Encrypted
point of message
Courtesy : https://www.youtube.com/watch?v=0NGPhAPKYv4
Department of Computer Engineering, VESIT, Mumbai
Questions
● What is Web 3.0 ?
● What is Blockchain? Explain its Significance with an example
● Differentiate between Centralized, Decentralized and Distributed Networks
● Explain Asymmetric Key Cryptography with an example
● Difference between Symmetric Key and Asymmetric Key Cryptography
● Properties of Cryptographic Hash Functions
● Explain Digital Signature with an example.
Department of Computer Engineering, VESIT, Mumbai
Online Resources
Theory
● https://en.wikipedia.org/wiki/Public-key_cryptography
● https://komodoplatform.com/en/academy/cryptographic-hash-function/
● https://cse.iitkgp.ac.in/~debdeep/pres/TI/ecc.pdf
Visualization
● https://andersbrownworth.com/blockchain/
● https://andersbrownworth.com/blockchain/hash
● https://andersbrownworth.com/blockchain/public-private-keys/
Useful Videos
● https://nptel.ac.in/courses/106105184
● https://www.youtube.com/watch?v=dCvB-mhkT0w
● https://www.simplilearn.com/tutorials/blockchain-tutorial/merkle-tree-in-blockchain
● https://www.youtube.com/watch?v=2uYuWiICCM0&list=PLsyeobzWxl7oY6tZmnZ5S7yTDxyu4zDW-
Department of Computer Engineering, VESIT, Mumbai