SlideShare a Scribd company logo
1 of 37
Download to read offline
Blockchain Technology
Week 6
Unit III – Role of Cryptography in Blockchain
Ferdin Joe John Joseph, PhD
Faculty of Information Technology
Thai-Nichi Institute of Technology, Bangkok
Venue: D603
Week 6 – Unit III
Agenda
• Role of Cryptography in Blockchain
• RSA and SHA
2
Faculty of Information Technology, Thai-Nichi Institute of
Technology
Blockchain’s Encryption
Faculty of Information Technology, Thai-Nichi Institute of
Technology
3
Faculty of Information Technology, Thai-Nichi Institute of
Technology
4
Faculty of Information Technology, Thai-Nichi Institute of
Technology
5
Faculty of Information Technology, Thai-Nichi Institute of
Technology
6
Bitcoin Hash
• The corresponding SHA-256 of the sentence “How to buy
Bitcoin?” looks like this:
156aedcfab1d49f73abddd89faf78d9930e4b523ab804026310c973bf
a707d37
• If we remove only one symbol – for example the question mark “?” –
the hash of “How to buy Bitcoin” looks like
this: 4314d903f04e90e4a5057685243c903fbcfa4f8ec75ec797e1780e
d5c891b1bf
Faculty of Information Technology, Thai-Nichi Institute of
Technology
7
What is hashing
• Hashing means taking an input string of any length and giving out an
output of a fixed length.
Faculty of Information Technology, Thai-Nichi Institute of
Technology
8
Properties of Hashing
• Deterministic
• Quick Computation
• Pre-image resistance
Faculty of Information Technology, Thai-Nichi Institute of
Technology
9
Properties of hashing - Deterministic
• No matter how many times you parse a particular input through a
hash function you will always get the same result.
• This is critical because if you get different hashes every single time it
will be impossible to keep track of the input.
Faculty of Information Technology, Thai-Nichi Institute of
Technology
10
Properties of hashing – Quick Computation
• The hash function should be capable of returning the hash of an input
quickly.
• If the process isn’t fast enough then the system simply won’t be
efficient.
Faculty of Information Technology, Thai-Nichi Institute of
Technology
11
Properties of hashing – Pre-image resistance
• It is infeasible to determine A, where A is the input and H(A) is the
output hash.
Faculty of Information Technology, Thai-Nichi Institute of
Technology
12
Faculty of Information Technology, Thai-Nichi Institute of
Technology
13
The RSA Algorithm
• Based on the idea that factorization of integers into their prime
factors is hard.
★ n=p.q, where p and q are distinct primes
• Proposed by Rivest, Shamir, and Adleman
in 1977 and a paper was published in The Communications of ACM in
1978
• A public-key cryptosystem
RSA Algorithm
• Bob chooses two primes p,q and compute n=pq
• Bob chooses e with gcd(e,(p-1)(q-1))=
gcd(e, ψ(n))=1
• Bob solves de≡1 (mod ψ(n))
• Bob makes (e,n) public and (p,q,d) secret
• Alice encrypts M as C≡Me (mod n)
• Bob decrypts by computing M≡Cd (mod n)
Proof for the RSA Algorithm
• Cd ≡ (Me)d ≡ Med ≡ M1+kφ(n) ≡M (mod n) by Euler’s theorem and
Exercise 19 on p.192
• p=885320963, q=238855417,
• n=p.q=211463707796206571
• Let e=9007, ∴ d=116402471153538991
• M=“cat”=30120, C=113535859035722866
Another Example
• n=127x193=24511, φ(n)=24192
• e=1307, d=10643
• Encrypt “box” with M=21524, then
C=?
Encrypt the following message
Formosa means a beautiful island
Selected Problems from P.192-200
(1) n=11413=101x113, so p=101, q=113
ψ(n)=(p-1)x(q-1)=100x112=11200
Choose e=7467, then gcd(e, ψ(n))=1
Solve de≡1 (mod ψ(n)) to get d=3
If the ciphertext C=5859, then the plaintext
M≡Cd ≡58593 ≡1415 (mod 11413)
Fast Computation of xd (mod n)
• 1235 mod 511
• 1235 ≡ 28153056843 mod 511
• 1232 ≡ 310 (mod 511)
• 1234 ≡ 32 (mod 511)
• 1235 ≡ 123101b ≡1234 ×123
≡ 359 (mod 511)
Fast Computation for xd (mod n)
y=1;
while (d != 0) {
if ((d%2) != 0) { y=(y*x)%n; d--; }
d>>1;
x=(x*x)%n; /* x^(2k) */
}
Fast Computation for xd (mod n)
Let t be the number of bits for integer d, e.g.,
If d=5=1012 , then t=3
y=1;
for (i=t; i≧0; i--) {
y=(y*y)%n;
if (d[i]==1) y=(y*x)%n;
}
The Concept and Criteria
1. Ek(Dk(m))=m and Dk(Ek(m))=m for every message m in M, the set of
possible messages, every key k in K, the set of possible keys
2. For every m and every k, then values of Ek(m) and Dk(m) are easy to
compute
3. For every k, if someone knows only the function Ek, it is
computationally infeasible to find an algorithm to compute Dk
4. Given k, it’s easy to find the functions Ek and Dk
Secure Hash Algorithm (SHA)
• SHA-0 1993
• SHA-1 1995
• SHA-2 2002
• SHA-224, SHA-256, SHA-384, SHA-512
SHA-1
A message
composed of
b bits
160-bit
message
digest
CS 450/650 Lecture 8: Secure Hash
Algorithm
23
Step 1 -- Padding
• Padding  the total length of a padded message is multiple of 512
• Every message is padded even if its length is already a multiple of 512
• Padding is done by appending to the input
• A single bit, 1
• Enough additional bits, all 0, to make the final 512 block exactly 448 bits long
• A 64-bit integer representing the length of the original message in bits
CS 450/650 Lecture 8: Secure Hash
Algorithm
24
Padding (cont.)
Message Message length1 0…0
64 bits
Multiple of 512
1 bit
CS 450/650 Lecture 8: Secure Hash
Algorithm
25
Example
• M = 01100010 11001010 1001 (20 bits)
• Padding is done by appending to the input
• A single bit, 1
• 427 0s
• A 64-bit integer representing 20
• Pad(M) = 01100010 11001010 10011000 … 00010100
Example
• Length of M = 500 bits
• Padding is done by appending to the input:
• A single bit, 1
• 459 0s
• A 64-bit integer representing 500
• Length of Pad(M) = 1024 bits
Step 2 -- Dividing Pad(M)
• Pad (M) = B1, B2, B3, …, Bn
• Each Bi denote a 512-bit block
• Each Bi is divided into 16 32-bit words
• W0, W1, …, W15
CS 450/650 Lecture 8: Secure Hash
Algorithm
28
Step 3 – Compute W16 – W79
• To Compute word Wj (16<=j<=79)
• Wj-3, Wj-8, Wj-14 , Wj-16 are XORed
• The result is circularly left shifted one bit
CS 450/650 Lecture 8: Secure Hash
Algorithm
29
Step 4 – Initialize A,B,C,D,E
• A = H0
• B = H1
• C = H2
• D = H3
• E = H4
CS 450/650 Lecture 8: Secure Hash
Algorithm
30
Initialize 32-bit words
• H0 = 67452301
• H1 = EFCDAB89
• H2 = 98BADCFE
• H3 = 10325476
• H4 = C3D2E1F0
• K0 – K19 = 5A827999
• K20 – K39 = 6ED9EBA1
• K40 – K49 = 8F1BBCDC
• K60 – K79 = CA62C1D6
CS 450/650 Lecture 8: Secure Hash
Algorithm
31
Step 5 – Loop
For j = 0 … 79
TEMP = CircLeShift_5 (A) + fj(B,C,D) + E + Wj + Kj
E = D; D = C;
C = CircLeShift_30(B);
B = A; A = TEMP
Done
+  addition (ignore overflow)
CS 450/650 Lecture 8: Secure Hash
Algorithm
32
Four functions
• For j = 0 … 19
• fj(B,C,D) = (B AND C) OR ( B AND D) OR (C AND D)
• For j = 20 … 39
• fj(B,C,D) = (B XOR C XOR D)
• For j = 40 … 59
• fj(B,C,D) = (B AND C) OR ((NOT B) AND D)
• For j = 60 … 79
• fj(B,C,D) = (B XOR C XOR D)
CS 450/650 Lecture 8: Secure Hash
Algorithm
33
Step 6 – Final
• H0 = H0 + A
• H1 = H1 + B
• H2 = H2 + C
• H3 = H3 + D
• H4 = H4 + E
CS 450/650 Lecture 8: Secure Hash
Algorithm
34
Done
• Once these steps have been performed on each 512-bit block (B1, B2,
…, Bn) of the padded message,
• the 160-bit message digest is given by
H0 H1 H2 H3 H4
CS 450/650 Lecture 8: Secure Hash
Algorithm
35
SHA
Output
size
(bits)
Internal
state size
(bits)
Block
size
(bits)
Max
message
size (bits)
Word
size
(bits)
Rounds Operations
Collisions
found
SHA-0 160 160 512 264 − 1 32 80
+, and, or,
xor, rot
Yes
SHA-1 160 160 512 264 − 1 32 80
+, and, or,
xor, rot
None
(252 attack)
SHA-2
256/224 256 512 264 − 1 32 64
+, and, or,
xor, shr, rot
None
512/384 512 1024 2128 − 1 64 80
+, and, or,
xor, shr, rot
None
CS 450/650 Lecture 8: Secure Hash
Algorithm
36
Next Week
• Fraud and Intrusion Detection
37
Faculty of Information Technology, Thai-Nichi Institute of
Technology

More Related Content

What's hot

Blockchain Technology - Week 10 - CAP Teorem, Byzantines General Problem
Blockchain Technology - Week 10 - CAP Teorem, Byzantines General ProblemBlockchain Technology - Week 10 - CAP Teorem, Byzantines General Problem
Blockchain Technology - Week 10 - CAP Teorem, Byzantines General ProblemFerdin Joe John Joseph PhD
 
Blockchain Technology - Week 1 - Introduction to Blockchain
Blockchain Technology - Week 1 - Introduction to BlockchainBlockchain Technology - Week 1 - Introduction to Blockchain
Blockchain Technology - Week 1 - Introduction to BlockchainFerdin Joe John Joseph PhD
 
Blockchain Technology - Week 3 - FinTech and Cryptocurrencies
Blockchain Technology - Week 3 - FinTech and CryptocurrenciesBlockchain Technology - Week 3 - FinTech and Cryptocurrencies
Blockchain Technology - Week 3 - FinTech and CryptocurrenciesFerdin Joe John Joseph PhD
 
Week 11: Cloud Native- DSA 441 Cloud Computing
Week 11: Cloud Native- DSA 441 Cloud ComputingWeek 11: Cloud Native- DSA 441 Cloud Computing
Week 11: Cloud Native- DSA 441 Cloud ComputingFerdin Joe John Joseph PhD
 
Week 2: Virtualization and VM Ware - DSA 441 Cloud Computing
Week 2: Virtualization and VM Ware - DSA 441 Cloud ComputingWeek 2: Virtualization and VM Ware - DSA 441 Cloud Computing
Week 2: Virtualization and VM Ware - DSA 441 Cloud ComputingFerdin Joe John Joseph PhD
 
Week 1: Introduction to Cloud Computing - DSA 441 Cloud Computing
Week 1: Introduction to Cloud Computing - DSA 441 Cloud ComputingWeek 1: Introduction to Cloud Computing - DSA 441 Cloud Computing
Week 1: Introduction to Cloud Computing - DSA 441 Cloud ComputingFerdin Joe John Joseph PhD
 
Week 4: Big Data and Hadoop in Alibaba Cloud - DSA 441 Cloud Computing
Week 4: Big Data and Hadoop in Alibaba Cloud - DSA 441 Cloud ComputingWeek 4: Big Data and Hadoop in Alibaba Cloud - DSA 441 Cloud Computing
Week 4: Big Data and Hadoop in Alibaba Cloud - DSA 441 Cloud ComputingFerdin Joe John Joseph PhD
 
La Blockchain pas à PaaS
La Blockchain pas à PaaSLa Blockchain pas à PaaS
La Blockchain pas à PaaSMicrosoft
 
2019 DSA 105 Introduction to Data Science Week 1
2019 DSA 105 Introduction to Data Science Week 12019 DSA 105 Introduction to Data Science Week 1
2019 DSA 105 Introduction to Data Science Week 1Ferdin Joe John Joseph PhD
 
Những phép biến đổi dãy số
Những phép biến đổi dãy sốNhững phép biến đổi dãy số
Những phép biến đổi dãy sốThế Giới Tinh Hoa
 
Block chains & payment online
Block chains & payment onlineBlock chains & payment online
Block chains & payment onlineHưng Đặng
 
Artificial intelligence ai l6-logic va-suy_dien
Artificial intelligence ai l6-logic va-suy_dienArtificial intelligence ai l6-logic va-suy_dien
Artificial intelligence ai l6-logic va-suy_dienTráng Hà Viết
 
03 lap trinh hop ngu voi 8086
03 lap trinh hop ngu voi 808603 lap trinh hop ngu voi 8086
03 lap trinh hop ngu voi 8086onlylove511
 

What's hot (20)

Week2: Programming for Data Analysis
Week2: Programming for Data AnalysisWeek2: Programming for Data Analysis
Week2: Programming for Data Analysis
 
Week 9: Programming for Data Analysis
Week 9: Programming for Data AnalysisWeek 9: Programming for Data Analysis
Week 9: Programming for Data Analysis
 
Blockchain Technology - Week 10 - CAP Teorem, Byzantines General Problem
Blockchain Technology - Week 10 - CAP Teorem, Byzantines General ProblemBlockchain Technology - Week 10 - CAP Teorem, Byzantines General Problem
Blockchain Technology - Week 10 - CAP Teorem, Byzantines General Problem
 
Blockchain Technology - Week 1 - Introduction to Blockchain
Blockchain Technology - Week 1 - Introduction to BlockchainBlockchain Technology - Week 1 - Introduction to Blockchain
Blockchain Technology - Week 1 - Introduction to Blockchain
 
Blockchain Technology - Week 3 - FinTech and Cryptocurrencies
Blockchain Technology - Week 3 - FinTech and CryptocurrenciesBlockchain Technology - Week 3 - FinTech and Cryptocurrencies
Blockchain Technology - Week 3 - FinTech and Cryptocurrencies
 
Week 10: Programming for Data Analysis
Week 10: Programming for Data AnalysisWeek 10: Programming for Data Analysis
Week 10: Programming for Data Analysis
 
Week 11: Cloud Native- DSA 441 Cloud Computing
Week 11: Cloud Native- DSA 441 Cloud ComputingWeek 11: Cloud Native- DSA 441 Cloud Computing
Week 11: Cloud Native- DSA 441 Cloud Computing
 
Week 2: Virtualization and VM Ware - DSA 441 Cloud Computing
Week 2: Virtualization and VM Ware - DSA 441 Cloud ComputingWeek 2: Virtualization and VM Ware - DSA 441 Cloud Computing
Week 2: Virtualization and VM Ware - DSA 441 Cloud Computing
 
Week 1: Introduction to Cloud Computing - DSA 441 Cloud Computing
Week 1: Introduction to Cloud Computing - DSA 441 Cloud ComputingWeek 1: Introduction to Cloud Computing - DSA 441 Cloud Computing
Week 1: Introduction to Cloud Computing - DSA 441 Cloud Computing
 
Week 4: Big Data and Hadoop in Alibaba Cloud - DSA 441 Cloud Computing
Week 4: Big Data and Hadoop in Alibaba Cloud - DSA 441 Cloud ComputingWeek 4: Big Data and Hadoop in Alibaba Cloud - DSA 441 Cloud Computing
Week 4: Big Data and Hadoop in Alibaba Cloud - DSA 441 Cloud Computing
 
Deep learning - Introduction
Deep learning - IntroductionDeep learning - Introduction
Deep learning - Introduction
 
DSA 103 Object Oriented Programming :: Week 1
DSA 103 Object Oriented Programming :: Week 1DSA 103 Object Oriented Programming :: Week 1
DSA 103 Object Oriented Programming :: Week 1
 
La Blockchain pas à PaaS
La Blockchain pas à PaaSLa Blockchain pas à PaaS
La Blockchain pas à PaaS
 
2019 DSA 105 Introduction to Data Science Week 1
2019 DSA 105 Introduction to Data Science Week 12019 DSA 105 Introduction to Data Science Week 1
2019 DSA 105 Introduction to Data Science Week 1
 
Pres blockchain
Pres blockchainPres blockchain
Pres blockchain
 
Những phép biến đổi dãy số
Những phép biến đổi dãy sốNhững phép biến đổi dãy số
Những phép biến đổi dãy số
 
Block chains & payment online
Block chains & payment onlineBlock chains & payment online
Block chains & payment online
 
Artificial intelligence ai l6-logic va-suy_dien
Artificial intelligence ai l6-logic va-suy_dienArtificial intelligence ai l6-logic va-suy_dien
Artificial intelligence ai l6-logic va-suy_dien
 
03 lap trinh hop ngu voi 8086
03 lap trinh hop ngu voi 808603 lap trinh hop ngu voi 8086
03 lap trinh hop ngu voi 8086
 
Ppt cacbon
Ppt cacbonPpt cacbon
Ppt cacbon
 

Similar to Blockchain Technology - Week 6 - Role of Cryptography in Blockchain

VLSI DESIGN Conference 2016, Kolkata- Authenticated Encryption Decryption
VLSI DESIGN Conference 2016, Kolkata- Authenticated Encryption DecryptionVLSI DESIGN Conference 2016, Kolkata- Authenticated Encryption Decryption
VLSI DESIGN Conference 2016, Kolkata- Authenticated Encryption DecryptionHardik Manocha
 
Elliptic curve cryptography and zero knowledge proof
Elliptic curve cryptography and zero knowledge proofElliptic curve cryptography and zero knowledge proof
Elliptic curve cryptography and zero knowledge proofNimish Joseph
 
Elliptic Curve Cryptography and Zero Knowledge Proof
Elliptic Curve Cryptography and Zero Knowledge ProofElliptic Curve Cryptography and Zero Knowledge Proof
Elliptic Curve Cryptography and Zero Knowledge ProofArunanand Ta
 
On-Homomorphic-Encryption-and-Secure-Computation.ppt
On-Homomorphic-Encryption-and-Secure-Computation.pptOn-Homomorphic-Encryption-and-Secure-Computation.ppt
On-Homomorphic-Encryption-and-Secure-Computation.pptssuser85a33d
 
Public_Key_Cryptography in crypto analysis.ppt
Public_Key_Cryptography in crypto analysis.pptPublic_Key_Cryptography in crypto analysis.ppt
Public_Key_Cryptography in crypto analysis.pptImmanImman6
 
Blockchain Cryptography for Developers (Nakov @ BlockWorld 2018, San Jose)
Blockchain Cryptography for Developers (Nakov @ BlockWorld 2018, San Jose)Blockchain Cryptography for Developers (Nakov @ BlockWorld 2018, San Jose)
Blockchain Cryptography for Developers (Nakov @ BlockWorld 2018, San Jose)Svetlin Nakov
 
Cryptocurrency Jeopardy!
Cryptocurrency Jeopardy!Cryptocurrency Jeopardy!
Cryptocurrency Jeopardy!David Evans
 
Two fish & Rijndael (AES) Encryption Algorithm
Two fish & Rijndael (AES) Encryption AlgorithmTwo fish & Rijndael (AES) Encryption Algorithm
Two fish & Rijndael (AES) Encryption AlgorithmRifat Tasnim
 
zkStudyClub: PLONKUP & Reinforced Concrete [Luke Pearson, Joshua Fitzgerald, ...
zkStudyClub: PLONKUP & Reinforced Concrete [Luke Pearson, Joshua Fitzgerald, ...zkStudyClub: PLONKUP & Reinforced Concrete [Luke Pearson, Joshua Fitzgerald, ...
zkStudyClub: PLONKUP & Reinforced Concrete [Luke Pearson, Joshua Fitzgerald, ...Alex Pruden
 
Convolution codes - Coding/Decoding Tree codes and Trellis codes for multiple...
Convolution codes - Coding/Decoding Tree codes and Trellis codes for multiple...Convolution codes - Coding/Decoding Tree codes and Trellis codes for multiple...
Convolution codes - Coding/Decoding Tree codes and Trellis codes for multiple...Madhumita Tamhane
 
Digital electronics(EC8392) unit- 1-Sesha Vidhya S/ ASP/ECE/RMKCET
Digital electronics(EC8392) unit- 1-Sesha Vidhya S/ ASP/ECE/RMKCETDigital electronics(EC8392) unit- 1-Sesha Vidhya S/ ASP/ECE/RMKCET
Digital electronics(EC8392) unit- 1-Sesha Vidhya S/ ASP/ECE/RMKCETSeshaVidhyaS
 

Similar to Blockchain Technology - Week 6 - Role of Cryptography in Blockchain (20)

VLSI DESIGN Conference 2016, Kolkata- Authenticated Encryption Decryption
VLSI DESIGN Conference 2016, Kolkata- Authenticated Encryption DecryptionVLSI DESIGN Conference 2016, Kolkata- Authenticated Encryption Decryption
VLSI DESIGN Conference 2016, Kolkata- Authenticated Encryption Decryption
 
Bch codes
Bch codesBch codes
Bch codes
 
Elliptic curve cryptography and zero knowledge proof
Elliptic curve cryptography and zero knowledge proofElliptic curve cryptography and zero knowledge proof
Elliptic curve cryptography and zero knowledge proof
 
Elliptic Curve Cryptography and Zero Knowledge Proof
Elliptic Curve Cryptography and Zero Knowledge ProofElliptic Curve Cryptography and Zero Knowledge Proof
Elliptic Curve Cryptography and Zero Knowledge Proof
 
Computing on Encrypted Data
Computing on Encrypted DataComputing on Encrypted Data
Computing on Encrypted Data
 
On-Homomorphic-Encryption-and-Secure-Computation.ppt
On-Homomorphic-Encryption-and-Secure-Computation.pptOn-Homomorphic-Encryption-and-Secure-Computation.ppt
On-Homomorphic-Encryption-and-Secure-Computation.ppt
 
Public_Key_Cryptography in crypto analysis.ppt
Public_Key_Cryptography in crypto analysis.pptPublic_Key_Cryptography in crypto analysis.ppt
Public_Key_Cryptography in crypto analysis.ppt
 
Blockchain Cryptography for Developers (Nakov @ BlockWorld 2018, San Jose)
Blockchain Cryptography for Developers (Nakov @ BlockWorld 2018, San Jose)Blockchain Cryptography for Developers (Nakov @ BlockWorld 2018, San Jose)
Blockchain Cryptography for Developers (Nakov @ BlockWorld 2018, San Jose)
 
microprocessors
microprocessorsmicroprocessors
microprocessors
 
Cryptocurrency Jeopardy!
Cryptocurrency Jeopardy!Cryptocurrency Jeopardy!
Cryptocurrency Jeopardy!
 
BCH Codes
BCH CodesBCH Codes
BCH Codes
 
Two fish & Rijndael (AES) Encryption Algorithm
Two fish & Rijndael (AES) Encryption AlgorithmTwo fish & Rijndael (AES) Encryption Algorithm
Two fish & Rijndael (AES) Encryption Algorithm
 
8086 labmanual
8086 labmanual8086 labmanual
8086 labmanual
 
8086 microprocessor lab manual
8086 microprocessor lab manual8086 microprocessor lab manual
8086 microprocessor lab manual
 
zkStudyClub: PLONKUP & Reinforced Concrete [Luke Pearson, Joshua Fitzgerald, ...
zkStudyClub: PLONKUP & Reinforced Concrete [Luke Pearson, Joshua Fitzgerald, ...zkStudyClub: PLONKUP & Reinforced Concrete [Luke Pearson, Joshua Fitzgerald, ...
zkStudyClub: PLONKUP & Reinforced Concrete [Luke Pearson, Joshua Fitzgerald, ...
 
Convolution codes - Coding/Decoding Tree codes and Trellis codes for multiple...
Convolution codes - Coding/Decoding Tree codes and Trellis codes for multiple...Convolution codes - Coding/Decoding Tree codes and Trellis codes for multiple...
Convolution codes - Coding/Decoding Tree codes and Trellis codes for multiple...
 
Secure hashing algorithm
Secure hashing algorithmSecure hashing algorithm
Secure hashing algorithm
 
Codes and Isogenies
Codes and IsogeniesCodes and Isogenies
Codes and Isogenies
 
1508.07756v1
1508.07756v11508.07756v1
1508.07756v1
 
Digital electronics(EC8392) unit- 1-Sesha Vidhya S/ ASP/ECE/RMKCET
Digital electronics(EC8392) unit- 1-Sesha Vidhya S/ ASP/ECE/RMKCETDigital electronics(EC8392) unit- 1-Sesha Vidhya S/ ASP/ECE/RMKCET
Digital electronics(EC8392) unit- 1-Sesha Vidhya S/ ASP/ECE/RMKCET
 

More from Ferdin Joe John Joseph PhD

Week 10: Cloud Security- DSA 441 Cloud Computing
Week 10: Cloud Security- DSA 441 Cloud ComputingWeek 10: Cloud Security- DSA 441 Cloud Computing
Week 10: Cloud Security- DSA 441 Cloud ComputingFerdin Joe John Joseph PhD
 
Week 9: Relational Database Service Alibaba Cloud- DSA 441 Cloud Computing
Week 9: Relational Database Service Alibaba Cloud- DSA 441 Cloud ComputingWeek 9: Relational Database Service Alibaba Cloud- DSA 441 Cloud Computing
Week 9: Relational Database Service Alibaba Cloud- DSA 441 Cloud ComputingFerdin Joe John Joseph PhD
 
Week 7: Object Storage Service Alibaba Cloud- DSA 441 Cloud Computing
Week 7: Object Storage Service Alibaba Cloud- DSA 441 Cloud ComputingWeek 7: Object Storage Service Alibaba Cloud- DSA 441 Cloud Computing
Week 7: Object Storage Service Alibaba Cloud- DSA 441 Cloud ComputingFerdin Joe John Joseph PhD
 
Week 6: Server Load Balancer and Auto Scaling Alibaba Cloud- DSA 441 Cloud Co...
Week 6: Server Load Balancer and Auto Scaling Alibaba Cloud- DSA 441 Cloud Co...Week 6: Server Load Balancer and Auto Scaling Alibaba Cloud- DSA 441 Cloud Co...
Week 6: Server Load Balancer and Auto Scaling Alibaba Cloud- DSA 441 Cloud Co...Ferdin Joe John Joseph PhD
 
Week 5: Elastic Compute Service (ECS) with Alibaba Cloud- DSA 441 Cloud Compu...
Week 5: Elastic Compute Service (ECS) with Alibaba Cloud- DSA 441 Cloud Compu...Week 5: Elastic Compute Service (ECS) with Alibaba Cloud- DSA 441 Cloud Compu...
Week 5: Elastic Compute Service (ECS) with Alibaba Cloud- DSA 441 Cloud Compu...Ferdin Joe John Joseph PhD
 
Week 3: Virtual Private Cloud, On Premise, IaaS, PaaS, SaaS - DSA 441 Cloud C...
Week 3: Virtual Private Cloud, On Premise, IaaS, PaaS, SaaS - DSA 441 Cloud C...Week 3: Virtual Private Cloud, On Premise, IaaS, PaaS, SaaS - DSA 441 Cloud C...
Week 3: Virtual Private Cloud, On Premise, IaaS, PaaS, SaaS - DSA 441 Cloud C...Ferdin Joe John Joseph PhD
 
Sept 6 2021 BTech Artificial Intelligence and Data Science curriculum
Sept 6 2021 BTech Artificial Intelligence and Data Science curriculumSept 6 2021 BTech Artificial Intelligence and Data Science curriculum
Sept 6 2021 BTech Artificial Intelligence and Data Science curriculumFerdin Joe John Joseph PhD
 
Transforming deep into transformers – a computer vision approach
Transforming deep into transformers – a computer vision approachTransforming deep into transformers – a computer vision approach
Transforming deep into transformers – a computer vision approachFerdin Joe John Joseph PhD
 

More from Ferdin Joe John Joseph PhD (19)

Invited Talk DGTiCon 2022
Invited Talk DGTiCon 2022Invited Talk DGTiCon 2022
Invited Talk DGTiCon 2022
 
Week 12: Cloud AI- DSA 441 Cloud Computing
Week 12: Cloud AI- DSA 441 Cloud ComputingWeek 12: Cloud AI- DSA 441 Cloud Computing
Week 12: Cloud AI- DSA 441 Cloud Computing
 
Week 10: Cloud Security- DSA 441 Cloud Computing
Week 10: Cloud Security- DSA 441 Cloud ComputingWeek 10: Cloud Security- DSA 441 Cloud Computing
Week 10: Cloud Security- DSA 441 Cloud Computing
 
Week 9: Relational Database Service Alibaba Cloud- DSA 441 Cloud Computing
Week 9: Relational Database Service Alibaba Cloud- DSA 441 Cloud ComputingWeek 9: Relational Database Service Alibaba Cloud- DSA 441 Cloud Computing
Week 9: Relational Database Service Alibaba Cloud- DSA 441 Cloud Computing
 
Week 7: Object Storage Service Alibaba Cloud- DSA 441 Cloud Computing
Week 7: Object Storage Service Alibaba Cloud- DSA 441 Cloud ComputingWeek 7: Object Storage Service Alibaba Cloud- DSA 441 Cloud Computing
Week 7: Object Storage Service Alibaba Cloud- DSA 441 Cloud Computing
 
Week 6: Server Load Balancer and Auto Scaling Alibaba Cloud- DSA 441 Cloud Co...
Week 6: Server Load Balancer and Auto Scaling Alibaba Cloud- DSA 441 Cloud Co...Week 6: Server Load Balancer and Auto Scaling Alibaba Cloud- DSA 441 Cloud Co...
Week 6: Server Load Balancer and Auto Scaling Alibaba Cloud- DSA 441 Cloud Co...
 
Week 5: Elastic Compute Service (ECS) with Alibaba Cloud- DSA 441 Cloud Compu...
Week 5: Elastic Compute Service (ECS) with Alibaba Cloud- DSA 441 Cloud Compu...Week 5: Elastic Compute Service (ECS) with Alibaba Cloud- DSA 441 Cloud Compu...
Week 5: Elastic Compute Service (ECS) with Alibaba Cloud- DSA 441 Cloud Compu...
 
Week 3: Virtual Private Cloud, On Premise, IaaS, PaaS, SaaS - DSA 441 Cloud C...
Week 3: Virtual Private Cloud, On Premise, IaaS, PaaS, SaaS - DSA 441 Cloud C...Week 3: Virtual Private Cloud, On Premise, IaaS, PaaS, SaaS - DSA 441 Cloud C...
Week 3: Virtual Private Cloud, On Premise, IaaS, PaaS, SaaS - DSA 441 Cloud C...
 
Sept 6 2021 BTech Artificial Intelligence and Data Science curriculum
Sept 6 2021 BTech Artificial Intelligence and Data Science curriculumSept 6 2021 BTech Artificial Intelligence and Data Science curriculum
Sept 6 2021 BTech Artificial Intelligence and Data Science curriculum
 
Hadoop in Alibaba Cloud
Hadoop in Alibaba CloudHadoop in Alibaba Cloud
Hadoop in Alibaba Cloud
 
Cloud Computing Essentials in Alibaba Cloud
Cloud Computing Essentials in Alibaba CloudCloud Computing Essentials in Alibaba Cloud
Cloud Computing Essentials in Alibaba Cloud
 
Transforming deep into transformers – a computer vision approach
Transforming deep into transformers – a computer vision approachTransforming deep into transformers – a computer vision approach
Transforming deep into transformers – a computer vision approach
 
Week 8: Programming for Data Analysis
Week 8: Programming for Data AnalysisWeek 8: Programming for Data Analysis
Week 8: Programming for Data Analysis
 
Programming for Data Analysis: Week 3
Programming for Data Analysis: Week 3Programming for Data Analysis: Week 3
Programming for Data Analysis: Week 3
 
Data wrangling week 10
Data wrangling week 10Data wrangling week 10
Data wrangling week 10
 
Data wrangling week 11
Data wrangling week 11Data wrangling week 11
Data wrangling week 11
 
Data wrangling week 9
Data wrangling week 9Data wrangling week 9
Data wrangling week 9
 
Data Wrangling Week 7
Data Wrangling Week 7Data Wrangling Week 7
Data Wrangling Week 7
 
Deep Learning and CNN Architectures
Deep Learning and CNN ArchitecturesDeep Learning and CNN Architectures
Deep Learning and CNN Architectures
 

Recently uploaded

Effects of Smartphone Addiction on the Academic Performances of Grades 9 to 1...
Effects of Smartphone Addiction on the Academic Performances of Grades 9 to 1...Effects of Smartphone Addiction on the Academic Performances of Grades 9 to 1...
Effects of Smartphone Addiction on the Academic Performances of Grades 9 to 1...limedy534
 
9654467111 Call Girls In Munirka Hotel And Home Service
9654467111 Call Girls In Munirka Hotel And Home Service9654467111 Call Girls In Munirka Hotel And Home Service
9654467111 Call Girls In Munirka Hotel And Home ServiceSapana Sha
 
Beautiful Sapna Vip Call Girls Hauz Khas 9711199012 Call /Whatsapps
Beautiful Sapna Vip  Call Girls Hauz Khas 9711199012 Call /WhatsappsBeautiful Sapna Vip  Call Girls Hauz Khas 9711199012 Call /Whatsapps
Beautiful Sapna Vip Call Girls Hauz Khas 9711199012 Call /Whatsappssapnasaifi408
 
INTERNSHIP ON PURBASHA COMPOSITE TEX LTD
INTERNSHIP ON PURBASHA COMPOSITE TEX LTDINTERNSHIP ON PURBASHA COMPOSITE TEX LTD
INTERNSHIP ON PURBASHA COMPOSITE TEX LTDRafezzaman
 
From idea to production in a day – Leveraging Azure ML and Streamlit to build...
From idea to production in a day – Leveraging Azure ML and Streamlit to build...From idea to production in a day – Leveraging Azure ML and Streamlit to build...
From idea to production in a day – Leveraging Azure ML and Streamlit to build...Florian Roscheck
 
Call Girls In Mahipalpur O9654467111 Escorts Service
Call Girls In Mahipalpur O9654467111  Escorts ServiceCall Girls In Mahipalpur O9654467111  Escorts Service
Call Girls In Mahipalpur O9654467111 Escorts ServiceSapana Sha
 
Consent & Privacy Signals on Google *Pixels* - MeasureCamp Amsterdam 2024
Consent & Privacy Signals on Google *Pixels* - MeasureCamp Amsterdam 2024Consent & Privacy Signals on Google *Pixels* - MeasureCamp Amsterdam 2024
Consent & Privacy Signals on Google *Pixels* - MeasureCamp Amsterdam 2024thyngster
 
办理学位证纽约大学毕业证(NYU毕业证书)原版一比一
办理学位证纽约大学毕业证(NYU毕业证书)原版一比一办理学位证纽约大学毕业证(NYU毕业证书)原版一比一
办理学位证纽约大学毕业证(NYU毕业证书)原版一比一fhwihughh
 
Data Science Jobs and Salaries Analysis.pptx
Data Science Jobs and Salaries Analysis.pptxData Science Jobs and Salaries Analysis.pptx
Data Science Jobs and Salaries Analysis.pptxFurkanTasci3
 
VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...
VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...
VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...Suhani Kapoor
 
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Callshivangimorya083
 
vip Sarai Rohilla Call Girls 9999965857 Call or WhatsApp Now Book
vip Sarai Rohilla Call Girls 9999965857 Call or WhatsApp Now Bookvip Sarai Rohilla Call Girls 9999965857 Call or WhatsApp Now Book
vip Sarai Rohilla Call Girls 9999965857 Call or WhatsApp Now Bookmanojkuma9823
 
High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...
High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...
High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...soniya singh
 
VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130
VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130
VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130Suhani Kapoor
 
9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service
9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service
9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort servicejennyeacort
 
毕业文凭制作#回国入职#diploma#degree澳洲中央昆士兰大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree
毕业文凭制作#回国入职#diploma#degree澳洲中央昆士兰大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree毕业文凭制作#回国入职#diploma#degree澳洲中央昆士兰大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree
毕业文凭制作#回国入职#diploma#degree澳洲中央昆士兰大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degreeyuu sss
 
RS 9000 Call In girls Dwarka Mor (DELHI)⇛9711147426🔝Delhi
RS 9000 Call In girls Dwarka Mor (DELHI)⇛9711147426🔝DelhiRS 9000 Call In girls Dwarka Mor (DELHI)⇛9711147426🔝Delhi
RS 9000 Call In girls Dwarka Mor (DELHI)⇛9711147426🔝Delhijennyeacort
 
B2 Creative Industry Response Evaluation.docx
B2 Creative Industry Response Evaluation.docxB2 Creative Industry Response Evaluation.docx
B2 Creative Industry Response Evaluation.docxStephen266013
 

Recently uploaded (20)

Effects of Smartphone Addiction on the Academic Performances of Grades 9 to 1...
Effects of Smartphone Addiction on the Academic Performances of Grades 9 to 1...Effects of Smartphone Addiction on the Academic Performances of Grades 9 to 1...
Effects of Smartphone Addiction on the Academic Performances of Grades 9 to 1...
 
9654467111 Call Girls In Munirka Hotel And Home Service
9654467111 Call Girls In Munirka Hotel And Home Service9654467111 Call Girls In Munirka Hotel And Home Service
9654467111 Call Girls In Munirka Hotel And Home Service
 
Beautiful Sapna Vip Call Girls Hauz Khas 9711199012 Call /Whatsapps
Beautiful Sapna Vip  Call Girls Hauz Khas 9711199012 Call /WhatsappsBeautiful Sapna Vip  Call Girls Hauz Khas 9711199012 Call /Whatsapps
Beautiful Sapna Vip Call Girls Hauz Khas 9711199012 Call /Whatsapps
 
INTERNSHIP ON PURBASHA COMPOSITE TEX LTD
INTERNSHIP ON PURBASHA COMPOSITE TEX LTDINTERNSHIP ON PURBASHA COMPOSITE TEX LTD
INTERNSHIP ON PURBASHA COMPOSITE TEX LTD
 
From idea to production in a day – Leveraging Azure ML and Streamlit to build...
From idea to production in a day – Leveraging Azure ML and Streamlit to build...From idea to production in a day – Leveraging Azure ML and Streamlit to build...
From idea to production in a day – Leveraging Azure ML and Streamlit to build...
 
Call Girls In Mahipalpur O9654467111 Escorts Service
Call Girls In Mahipalpur O9654467111  Escorts ServiceCall Girls In Mahipalpur O9654467111  Escorts Service
Call Girls In Mahipalpur O9654467111 Escorts Service
 
Consent & Privacy Signals on Google *Pixels* - MeasureCamp Amsterdam 2024
Consent & Privacy Signals on Google *Pixels* - MeasureCamp Amsterdam 2024Consent & Privacy Signals on Google *Pixels* - MeasureCamp Amsterdam 2024
Consent & Privacy Signals on Google *Pixels* - MeasureCamp Amsterdam 2024
 
办理学位证纽约大学毕业证(NYU毕业证书)原版一比一
办理学位证纽约大学毕业证(NYU毕业证书)原版一比一办理学位证纽约大学毕业证(NYU毕业证书)原版一比一
办理学位证纽约大学毕业证(NYU毕业证书)原版一比一
 
Data Science Jobs and Salaries Analysis.pptx
Data Science Jobs and Salaries Analysis.pptxData Science Jobs and Salaries Analysis.pptx
Data Science Jobs and Salaries Analysis.pptx
 
Call Girls in Saket 99530🔝 56974 Escort Service
Call Girls in Saket 99530🔝 56974 Escort ServiceCall Girls in Saket 99530🔝 56974 Escort Service
Call Girls in Saket 99530🔝 56974 Escort Service
 
VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...
VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...
VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...
 
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call
 
vip Sarai Rohilla Call Girls 9999965857 Call or WhatsApp Now Book
vip Sarai Rohilla Call Girls 9999965857 Call or WhatsApp Now Bookvip Sarai Rohilla Call Girls 9999965857 Call or WhatsApp Now Book
vip Sarai Rohilla Call Girls 9999965857 Call or WhatsApp Now Book
 
High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...
High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...
High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...
 
VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130
VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130
VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130
 
E-Commerce Order PredictionShraddha Kamble.pptx
E-Commerce Order PredictionShraddha Kamble.pptxE-Commerce Order PredictionShraddha Kamble.pptx
E-Commerce Order PredictionShraddha Kamble.pptx
 
9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service
9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service
9711147426✨Call In girls Gurgaon Sector 31. SCO 25 escort service
 
毕业文凭制作#回国入职#diploma#degree澳洲中央昆士兰大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree
毕业文凭制作#回国入职#diploma#degree澳洲中央昆士兰大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree毕业文凭制作#回国入职#diploma#degree澳洲中央昆士兰大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree
毕业文凭制作#回国入职#diploma#degree澳洲中央昆士兰大学毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#degree
 
RS 9000 Call In girls Dwarka Mor (DELHI)⇛9711147426🔝Delhi
RS 9000 Call In girls Dwarka Mor (DELHI)⇛9711147426🔝DelhiRS 9000 Call In girls Dwarka Mor (DELHI)⇛9711147426🔝Delhi
RS 9000 Call In girls Dwarka Mor (DELHI)⇛9711147426🔝Delhi
 
B2 Creative Industry Response Evaluation.docx
B2 Creative Industry Response Evaluation.docxB2 Creative Industry Response Evaluation.docx
B2 Creative Industry Response Evaluation.docx
 

Blockchain Technology - Week 6 - Role of Cryptography in Blockchain

  • 1. Blockchain Technology Week 6 Unit III – Role of Cryptography in Blockchain Ferdin Joe John Joseph, PhD Faculty of Information Technology Thai-Nichi Institute of Technology, Bangkok Venue: D603
  • 2. Week 6 – Unit III Agenda • Role of Cryptography in Blockchain • RSA and SHA 2 Faculty of Information Technology, Thai-Nichi Institute of Technology
  • 3. Blockchain’s Encryption Faculty of Information Technology, Thai-Nichi Institute of Technology 3
  • 4. Faculty of Information Technology, Thai-Nichi Institute of Technology 4
  • 5. Faculty of Information Technology, Thai-Nichi Institute of Technology 5
  • 6. Faculty of Information Technology, Thai-Nichi Institute of Technology 6
  • 7. Bitcoin Hash • The corresponding SHA-256 of the sentence “How to buy Bitcoin?” looks like this: 156aedcfab1d49f73abddd89faf78d9930e4b523ab804026310c973bf a707d37 • If we remove only one symbol – for example the question mark “?” – the hash of “How to buy Bitcoin” looks like this: 4314d903f04e90e4a5057685243c903fbcfa4f8ec75ec797e1780e d5c891b1bf Faculty of Information Technology, Thai-Nichi Institute of Technology 7
  • 8. What is hashing • Hashing means taking an input string of any length and giving out an output of a fixed length. Faculty of Information Technology, Thai-Nichi Institute of Technology 8
  • 9. Properties of Hashing • Deterministic • Quick Computation • Pre-image resistance Faculty of Information Technology, Thai-Nichi Institute of Technology 9
  • 10. Properties of hashing - Deterministic • No matter how many times you parse a particular input through a hash function you will always get the same result. • This is critical because if you get different hashes every single time it will be impossible to keep track of the input. Faculty of Information Technology, Thai-Nichi Institute of Technology 10
  • 11. Properties of hashing – Quick Computation • The hash function should be capable of returning the hash of an input quickly. • If the process isn’t fast enough then the system simply won’t be efficient. Faculty of Information Technology, Thai-Nichi Institute of Technology 11
  • 12. Properties of hashing – Pre-image resistance • It is infeasible to determine A, where A is the input and H(A) is the output hash. Faculty of Information Technology, Thai-Nichi Institute of Technology 12
  • 13. Faculty of Information Technology, Thai-Nichi Institute of Technology 13
  • 14. The RSA Algorithm • Based on the idea that factorization of integers into their prime factors is hard. ★ n=p.q, where p and q are distinct primes • Proposed by Rivest, Shamir, and Adleman in 1977 and a paper was published in The Communications of ACM in 1978 • A public-key cryptosystem
  • 15. RSA Algorithm • Bob chooses two primes p,q and compute n=pq • Bob chooses e with gcd(e,(p-1)(q-1))= gcd(e, ψ(n))=1 • Bob solves de≡1 (mod ψ(n)) • Bob makes (e,n) public and (p,q,d) secret • Alice encrypts M as C≡Me (mod n) • Bob decrypts by computing M≡Cd (mod n)
  • 16. Proof for the RSA Algorithm • Cd ≡ (Me)d ≡ Med ≡ M1+kφ(n) ≡M (mod n) by Euler’s theorem and Exercise 19 on p.192 • p=885320963, q=238855417, • n=p.q=211463707796206571 • Let e=9007, ∴ d=116402471153538991 • M=“cat”=30120, C=113535859035722866
  • 17. Another Example • n=127x193=24511, φ(n)=24192 • e=1307, d=10643 • Encrypt “box” with M=21524, then C=? Encrypt the following message Formosa means a beautiful island
  • 18. Selected Problems from P.192-200 (1) n=11413=101x113, so p=101, q=113 ψ(n)=(p-1)x(q-1)=100x112=11200 Choose e=7467, then gcd(e, ψ(n))=1 Solve de≡1 (mod ψ(n)) to get d=3 If the ciphertext C=5859, then the plaintext M≡Cd ≡58593 ≡1415 (mod 11413)
  • 19. Fast Computation of xd (mod n) • 1235 mod 511 • 1235 ≡ 28153056843 mod 511 • 1232 ≡ 310 (mod 511) • 1234 ≡ 32 (mod 511) • 1235 ≡ 123101b ≡1234 ×123 ≡ 359 (mod 511)
  • 20. Fast Computation for xd (mod n) y=1; while (d != 0) { if ((d%2) != 0) { y=(y*x)%n; d--; } d>>1; x=(x*x)%n; /* x^(2k) */ }
  • 21. Fast Computation for xd (mod n) Let t be the number of bits for integer d, e.g., If d=5=1012 , then t=3 y=1; for (i=t; i≧0; i--) { y=(y*y)%n; if (d[i]==1) y=(y*x)%n; }
  • 22. The Concept and Criteria 1. Ek(Dk(m))=m and Dk(Ek(m))=m for every message m in M, the set of possible messages, every key k in K, the set of possible keys 2. For every m and every k, then values of Ek(m) and Dk(m) are easy to compute 3. For every k, if someone knows only the function Ek, it is computationally infeasible to find an algorithm to compute Dk 4. Given k, it’s easy to find the functions Ek and Dk
  • 23. Secure Hash Algorithm (SHA) • SHA-0 1993 • SHA-1 1995 • SHA-2 2002 • SHA-224, SHA-256, SHA-384, SHA-512 SHA-1 A message composed of b bits 160-bit message digest CS 450/650 Lecture 8: Secure Hash Algorithm 23
  • 24. Step 1 -- Padding • Padding  the total length of a padded message is multiple of 512 • Every message is padded even if its length is already a multiple of 512 • Padding is done by appending to the input • A single bit, 1 • Enough additional bits, all 0, to make the final 512 block exactly 448 bits long • A 64-bit integer representing the length of the original message in bits CS 450/650 Lecture 8: Secure Hash Algorithm 24
  • 25. Padding (cont.) Message Message length1 0…0 64 bits Multiple of 512 1 bit CS 450/650 Lecture 8: Secure Hash Algorithm 25
  • 26. Example • M = 01100010 11001010 1001 (20 bits) • Padding is done by appending to the input • A single bit, 1 • 427 0s • A 64-bit integer representing 20 • Pad(M) = 01100010 11001010 10011000 … 00010100
  • 27. Example • Length of M = 500 bits • Padding is done by appending to the input: • A single bit, 1 • 459 0s • A 64-bit integer representing 500 • Length of Pad(M) = 1024 bits
  • 28. Step 2 -- Dividing Pad(M) • Pad (M) = B1, B2, B3, …, Bn • Each Bi denote a 512-bit block • Each Bi is divided into 16 32-bit words • W0, W1, …, W15 CS 450/650 Lecture 8: Secure Hash Algorithm 28
  • 29. Step 3 – Compute W16 – W79 • To Compute word Wj (16<=j<=79) • Wj-3, Wj-8, Wj-14 , Wj-16 are XORed • The result is circularly left shifted one bit CS 450/650 Lecture 8: Secure Hash Algorithm 29
  • 30. Step 4 – Initialize A,B,C,D,E • A = H0 • B = H1 • C = H2 • D = H3 • E = H4 CS 450/650 Lecture 8: Secure Hash Algorithm 30
  • 31. Initialize 32-bit words • H0 = 67452301 • H1 = EFCDAB89 • H2 = 98BADCFE • H3 = 10325476 • H4 = C3D2E1F0 • K0 – K19 = 5A827999 • K20 – K39 = 6ED9EBA1 • K40 – K49 = 8F1BBCDC • K60 – K79 = CA62C1D6 CS 450/650 Lecture 8: Secure Hash Algorithm 31
  • 32. Step 5 – Loop For j = 0 … 79 TEMP = CircLeShift_5 (A) + fj(B,C,D) + E + Wj + Kj E = D; D = C; C = CircLeShift_30(B); B = A; A = TEMP Done +  addition (ignore overflow) CS 450/650 Lecture 8: Secure Hash Algorithm 32
  • 33. Four functions • For j = 0 … 19 • fj(B,C,D) = (B AND C) OR ( B AND D) OR (C AND D) • For j = 20 … 39 • fj(B,C,D) = (B XOR C XOR D) • For j = 40 … 59 • fj(B,C,D) = (B AND C) OR ((NOT B) AND D) • For j = 60 … 79 • fj(B,C,D) = (B XOR C XOR D) CS 450/650 Lecture 8: Secure Hash Algorithm 33
  • 34. Step 6 – Final • H0 = H0 + A • H1 = H1 + B • H2 = H2 + C • H3 = H3 + D • H4 = H4 + E CS 450/650 Lecture 8: Secure Hash Algorithm 34
  • 35. Done • Once these steps have been performed on each 512-bit block (B1, B2, …, Bn) of the padded message, • the 160-bit message digest is given by H0 H1 H2 H3 H4 CS 450/650 Lecture 8: Secure Hash Algorithm 35
  • 36. SHA Output size (bits) Internal state size (bits) Block size (bits) Max message size (bits) Word size (bits) Rounds Operations Collisions found SHA-0 160 160 512 264 − 1 32 80 +, and, or, xor, rot Yes SHA-1 160 160 512 264 − 1 32 80 +, and, or, xor, rot None (252 attack) SHA-2 256/224 256 512 264 − 1 32 64 +, and, or, xor, shr, rot None 512/384 512 1024 2128 − 1 64 80 +, and, or, xor, shr, rot None CS 450/650 Lecture 8: Secure Hash Algorithm 36
  • 37. Next Week • Fraud and Intrusion Detection 37 Faculty of Information Technology, Thai-Nichi Institute of Technology