'Blockchain and Cryptocurrency' Subject @ Korea University, 2021
01. Syllabus
02. Blockchain Overview and Introduction - Technical Concepts of Blockchain Systems -
03. Blockchain's Theoretical Foundation, Cryptography
04. Bitcoin and Nakamoto Blockchain
05. Ethereum and Smart Contract
06. NFT and Metaverse
07. Cardano(ADA) and Other Altcoins
08. Dark Coins
09. Blockchain Usage Beyond Currency - Way to Design Good Blockchain Business Models -
1 of 234
More Related Content
[Blockchain and Cryptocurrency] 03. Blockchain's Theoretical Foundation, Cryptography
43. ????????????
??? ?? ??? ??
What is Crypto?
Cryptology :
science of secret
communication
Cryptography :
design secret
systems
Cryptanalysis :
break secret
systems
43
44. ????????????
??? ?? ??? ??
What is Crypto¡¯s Goal?
Symmetric-key
ciphers:
?Block ciphers
?Stream ciphers
Public-key
ciphers
Cryptographic goals
Confidentiality Data integrity Authentication Non-repudiation
Message authentication
Entity authentication
Arbitrary length
hash functions
Message
Authentication
codes (MACs)
Digital signatures
Authentication
primitives
Digital signatures
MACs
Digital
signatures
(a.k.a. Data origin authentication)
44
45. ????????????
??? ?? ??? ??
? Plaintext : the original message
? Ciphertext : the coded message
? Cipher : algorithm for transforming plaintext to
ciphertext
? Key : information used in cipher known only to
sender/receiver
? Encipher (Encrypt) : converting plaintext to
ciphertext
? Decipher (Decrypt) : recovering plaintext from
ciphertext
? Cryptanalysis : analyzing of encrypted without
legitimate access to the keys.
? Brute Force Search : simply try every possible
key
Terminology
45
46. ????????????
??? ?? ??? ??
? Classic (~ 1976/77)
? BC 487 : Transposition Cipher, ¡°Scytale¡±
? BC 300 : Steganography
? BC 100 ~ BC 44 : Substitution Cipher, ¡°Caesar
Cipher¡±
? 1883 : Kerckhoffs' Assumption
? WW II :
? ¡°Enigma¡± and ¡°Turing Machine¡± for Cryptanalysis
? 1949 : Perfect Secrecy (C.E.Shannon)
? ¡°Confusion¡± and ¡°Diffusion¡±
Brief History
46
47. ????????????
??? ?? ??? ??
? Modern (1976/77 ~ Today)
? 1976 : Public-Key Cryptography (Diffie,
Hellman)
? 1977 : Data Encryption Standard, DES (NIST)
? 1978 : RSA (Rivest, Shamir, Adleman)
? 1982/85 : Goldwasser presented 2
paradigms for firm foundations of
cryptography.
? ¡°Indistinguishability¡± and ¡°Simulatability¡±
? 1999 : SEED (KISA)
Brief History
47
55. ????????????
??? ?? ??? ??
Steganography
Apparently neutral's protest is thoroughly discounted
and ignored. Isman hard hit. Blockade issue affects
pretext for embargo on by-products, ejecting suets
and vegetable oils.
WWII?? ??? ??????? ??? (¡°Pershing sails from NY June 1.¡±)
55
58. ????????????
??? ?? ??? ??
? ??? ??? ?? ??, ?? ?? ??
? ???? ????
? Plaintext) Come here at once
? Ciphertext)
Substitution Cipher (“Q×Ö ??)
58
59. ????????????
??? ?? ??? ??
? Security) ?? ?? ??? ??? ???
? ??? ??? ??
Substitution Cipher (“Q×Ö ??)
0.127
0.091
0.082
0.075
0.070
0.067
0.063
0.061
0.060
0.043
0.040
0.028
0.028
0.024
0.023
0.022
0.020
0.020
0.019
0.015
0.010
0.008
0.002
0.001
0.001
0.001
0.000
0.020
0.040
0.060
0.080
0.100
0.120
0.140
E T A O I N S H RD L C UMWF G Y P B V K J Q X Z
59
67. ????????????
??? ?? ??? ??
? The Father of Information Theory
? Information Theory
? Worked at MIT / Bell Labs
? ¡°The Math. Theory of Communication¡± (1948)
? Def. of the ¡°binary digit¡±(bit) as a unit of info.
? Def. of ¡°entropy¡± as a measure of info.
? Cryptography
? Model of a secrecy system
? ¡°Communication Theory of Secrecy Systems¡± (1945, Bell
Labs memo, classified).
? Def. of ¡°perfect secrecy¡±
? Formulate the principles of ¡°confusion¡± (standing for
substitution) and ¡°diffusion¡± (standing for transposition)
Claude E. Shannon (1916~2001)
67
72. ????????????
??? ?? ??? ??
Modern Ciphers ¨C Block Cipher ¨C
ciphertext blocks n bits
n bits plaintext blocks
n bits
n bits
Common Block Sizes:
n = 64, 128, 256 bits
Common Key Sizes:
k = 40, 56, 64, 80, 128,
168, 192, 256 bits
k bits
Key
Block Cipher
n bits
72
78. ????????????
??? ?? ??? ??
Initial Permutation
F
+
F
+
F
+
F
+
¡
Initial Permutation-1
(64)
(64)
(32)
(32)
(48)
(48)
(48)
(48)
Key
Scheduler
(56)
K
K1
K2
K16
K3
X
Y
? F need not be invertible!
? Have ¡°unstructured¡±
behavior.
? Decryption is the same as
encryption with reversed
key schedule (hardware
implementation!).
DES in a Nutshell (1977)
78
79. ????????????
??? ?? ??? ??
DES in a Nutshell (1977) ¨C 1 Round ¨C
Expansion Permutation
48
P-Box Permutation
S-Box Substitution
32
Shift Shift
48
Compression
Permutation
Feistel
Network
56
32
32
Keyi-1
Ri-1
Li-1
Keyi
Ri
Li
32
32
56
79
91. ????????????
??? ?? ??? ??
RSA in a Nutshell (1978)
Alice
+ +
Bob
+
Alice Bob
Directory
31 13
¡±A¡± 13
6513 369,720,589,101,
871,337,890,625
1/13
(6513)1/13 = 65 = ¡°A¡±
Encryption Decryption
91
92. ????????????
??? ?? ??? ??
Hard
(NP)
317 = 129,140,163
129,140,163 ¡õ = 3
¡ú ¡õ = 1/17
317 mod 2773 = 1553
1553 ¡õ mod 2773 = 3
¡ú ¡õ = 157
Easy
(P)
RSA in a Nutshell (1978)
92
93. ????????????
??? ?? ??? ??
RSA in a Nutshell (1978)
Alice
+ +
Bob
+
Directory
¡±!¡±
(7, 55) 23
Encryption Decryption
Bob
7, 55(= 5¡Á11)
337 mod 55 = 22
22 2223 mod 55 = 33 = ¡°!¡±
93
¢Ù Select two random primes : 5, 11
¢Ú Select random number : 7
¢Û Compute EUCLID(7,5,11)=23
¢Ü Compute 5¡Á11=55
¢Ý Publish (7,55) as Public Key
¢Þ Keep 23 as Private Key
94. ????????????
??? ?? ??? ??
? M = 10101111010011111¡¡(2)
= a¡Á55n-1 + b¡Á55n-2 + ¡. c¡Á550
(where, 0 ¡Ü a, b, ¡, c ¡Ü 54)
? C = M7 mod 55
= (a7 mod 55, b7 mod 55, ¡, c7 mod 55)
RSA in a Nutshell (1978)
94
95. ????????????
??? ?? ??? ??
m 00¡0 r
G(r)
m1
*
H(m1
*)
m2
*
G
H
( ) :
?
f one-way permutation
C = f(OAEP(m,r)) = (m1
*||m2
*)e mod N
RSA-OAEP (1994)
95
96. ????????????
??? ?? ??? ??
? Martin Gardner column and RSA-129 challenge
? Described public-key and RSA cryptosystem in his Scientific
American column, Mathematical Games (1977)
? Ron Rivest offered copy of RSA technical memo.
? Ron Rivest offered $100 to first person to break challenge
ciphertext based on 129-digit product of primes.
? Ron¡¯s estimated time to solution: 40 quadrillion years
RSA? ???????
96
97. ????????????
??? ?? ??? ??
? Question (1977) :
? N=114,381,625,757,888,867,669,235,779,976,146
,612,010,218,296,721,242,362,562,561,842,935,70
6,935,245,733,897,830,597,123,563,958,705,058,9
89,075,147,599,290,026,879,543,541
? Answer (1994, 8 months work by about
600 volunteers from more than 20
countries; 5000 MIPS-years.) :
? p=32,769,132,993,266,709,549,961,988,190,834,4
61,413,177,642,967,992,942,539,798,288,533
? q=3,490,529,510,847,650,949,147,849,619,903,89
8,133,417,764,638,493,387,843,990,820,577
RSA? ???????
97
107. ????????????
??? ?? ??? ??
? Diffie-Hellman
? Keys generated by exponentiation over the
group.
? Exponentiation defined by repeated
multiplication
? Elliptic Curve Diffie-Hellman
? ECC was introduced by Victor Miller and Neal
Koblitz in 1985.
? Keys generated by multiplication over elliptic
curves.
? Multiplication through repeated addition
? Cryptanalysis involves determining k given a
and (k x G)
???? Diffie-Hellman
107
125. ????????????
??? ?? ??? ??
? Loren Kohnfelder ¨C
Invention of Digital
Certificates
? Loren Kohnfelder¡¯s
B.S. thesis (MIT
1978, supervised by
Len Adleman),
proposed notion of
digital certificate ¡ª
a digitally signed
message attesting
to another party¡¯s
public key.
??? ??? ?? (1978)
125
126. ????????????
??? ?? ??? ??
Alice Bob
Directory
Alice
+ +
Eve
+
Encryption Decryption
Bob
??? ??? ?? (1978)
126
156. ????????????
??? ?? ??? ??
It's not at all
clear how to
formalize the
notion that
"nothing is
learned".
156
157. ????????????
??? ?? ??? ??
What Is ¡°Nothing Is Learned¡°?
Plaintext is ¡°I found a
solution to the calendar
sync problem¡±.
157
158. ????????????
??? ?? ??? ??
What Is ¡°Nothing Is Learned¡°?
Plaintext is
english!
Plaintext is ¡°I found a
solution to the calendar
sync problem¡±.
Plaintext is ¡°¡. solution
¡. calendar sync ¡.¡±.
158
160. ????????????
??? ?? ??? ??
? Perfect secrecy : if a passive adversary,
even with infinite computational
resources, can learn nothing about the
plaintext from the ciphertext, except
possibly its length.
? Semantic security : a passive adversary
with polynomially bounded
computational resources can learn
nothing about the plaintext from the
ciphertext.
Semantic Security
160
165. ????????????
??? ?? ??? ??
1. V stands at A.
2. P walks to C or D.
3. V walks to B.
4. V asks P to come L or R.
5. P follows the request.
6. Repeat 1 ~ 5, n times.
ZKIP for Kids
A
B
D
C
165
170. ????????????
??? ?? ??? ??
? Cryptographic protocol for emulating a
trusted party (already started in the late 1970s)
? MPC enables decentralization and privacy!
Secure Multi-Party Computation (MPC)
Goal :
- Correctness : Everyone computes y=f(x,y)
- Security : Nothing but the output is revealed
170
179. ????????????
??? ?? ??? ??
Order-Preserving Encryption (OPE)
? OPE? ??
? R. Agrawal, J. Kiernan, R. Srikant, and Y. Xu,
¡°Order-preserving encryption for numeric
data¡±, SIGMOD 2004, pp. 563~574
eA eD eC eB
OPE
key
Plain data (A > B > C >D)
cipher data (eA > eB > eC >eD)
eA eB eC eD
A B C D
A D C B
179
180. ????????????
??? ?? ??? ??
Order-Preserving Encryption (OPE)
? OPE? ???
? A. Boldyreva, N. Chenette, Y. Lee, A. O'Neill,
¡°Order-Preserving Symmetric Encryption¡±,
EUROCRYPT 2009, pp. 224~241
? IND-CPA? ???
? ??? ???? ????? CPA ??? ??
????? ??? ? ??? ??
180
188. ????????????
??? ?? ??? ??
? In 1978, Rivest, Adleman, and Dertouzos asked,
¡°Can one compute on encrypted data, while
keeping it encrypted?¡±
? In 2009, Craig Gentry (Stanford, IBM) gave solution
based on use of lattices. If efficiency can be greatly
improved, could be huge implications (e.g. for cloud
computing).
Fully Homomorphic Encryption
188
192. ????????????
??? ?? ??? ??
Currently there is no ¡°silver bullet¡± solution, said Lynne
Parker, White House deputy chief technology officer.
She pointed to several reasons: ¡øData de-identification
can be accidentally undone when the scrubbed data is
combined with other sources of information. ¡øData
aggregation limits analytics. ¡øSimulating data raises
concerns about accuracy and reverse engineering, while
homomorphic encryption ¡ª which allows data to be
mined without sacrificing privacy ¡ª hurts performance
and speed.
Other techniques and technologies also have their
weaknesses, she said. ¡øDifferential privacy, or systems
that publicly share information on group patterns while
withholding information on individuals in a dataset, water
down insights.
192
193. ????????????
??? ?? ??? ??
?????? ??! Define & Design!!
Identify privacy
breach
Design a new
algorithm to fix the
privacy breach
Breach and Patch Approach
Formally specify
the privacy model
Define and Design Approach
Design an algorithm
that satisfies the
privacy conditions
Derive conditions
for privacy
193
201. ????????????
??? ?? ??? ??
? ROM : Holds the Operating System
? EEPROM : Holds the application programs
and their data
? PROM : Holds the card number
? RAM : Used as temporary storage space for
variables
? Processor : 8 bit processor based on CISC
architecture. Moving towards 32 bit due to
JavaCards
? I/O Interface for data transfer to and from
the card.
Smart Card
201
207. ????????????
??? ?? ??? ??
Smart Card Security
Invasive Analysis Non-invasive Analysis
Side Channel Attacks
Probing Fault-based
Analysis
Timing Analysis Power Analysis
A technique to probe
signal after exposing
surface of chips and
removing protective
coating
A technique to derive
internal confidential
information using the
difference between
normal output and
faulty output caused
artificially
A technique to
estimate confidential
information by
analyzing processing
time
A technique to
estimate confidential
information by
observing power
consumption
207
208. ????????????
??? ?? ??? ??
? Paul Kocher et al. introduced
? Timing attacks (CRYPTO ¡¯96)
? Differential Power analysis (CRYPTO ¡¯99)
? Differential fault analysis (Eurocrypt ¡¯97)
? induce a fault and ¡°see what happens¡±
? a.k.a. micro-wave attack
? Sound of computer while computing RSA
? Van Eck phreaking :
? eavesdropping on screen output displayed on a CRT or
LCD monitor by measuring electromagnetic emissions
? emissions from keyboard
Brief History of Side Channel Attacks
208
209. ????????????
??? ?? ??? ??
Power Attack
Data input
Data output
Terminal
IC chip
Power supply
0111011011111
0111011101110
1111000001
Measure power
consumption
Guess secret information
stored on IC chip memory
209
210. ????????????
??? ?? ??? ??
Power Attack
Can sample voltage
differences at around
1GHz with less than
1% error. It also transfers
Data to a PC. Cost around
$400.
Courtesy: Side-Channel Analysis Lab,
210
211. ????????????
??? ?? ??? ??
? Simple Power Attack (SPA)
? Makes use of characteristics that are directly
visible in a single measurement trace
? Differential Power Attack (DPA)
? Looks for side channel differences that are NOT
directly visible in one measurement trace
? Statistical methods have to be applied
? Divide-and-conquer tactics: finding small
pieces of the key at a time
? Harder to prevent
? DPA = SPA + Statistical Analysis
SPA vs. DPA
211
212. ????????????
??? ?? ??? ??
SPA on PIN
for i = 0 to 2
if (INPUT[i] ¡Ù PWD[i])
return(¡°REJECT¡±)
return(¡°ACCEPT¡±)
212
214. ????????????
??? ?? ??? ??
SPA on RSA
z = 1
for i = k-1 downto 0 {
z = z2 mod n
if ei = 1 then z = z ¡Á m mod n
}
return (z)
me = m(e3 e2 e1 e0) mod n
214
215. ????????????
??? ?? ??? ??
SPA on RSA
310 = 3(1 0 1 0) mod 15
3 1 12¡Á3 mod 15 = 3
2 0 32 mod 15 = 9
1 1 92¡Á3 mod 15 = 3
0 0 32 mod 15 = 9
i ei z
215
231. ????????????
??? ?? ??? ??
? In 1967 David Kahn published The Codebreakers
¡ª The Story of Secret Writing.
? A monumental history of cryptography.
? NSA attempted to suppress its publication.
To Learn More
231
232. ????????????
??? ?? ??? ??
? Established 1982 by David Chaum, Ron Rivest, and
others, to promote academic research in cryptology.
? Sponsors three major conferences/year (Crypto,
Eurocrypt, Asiacrypt) and four workshops; about 200
papers/year, plus another 600/year posted on web.
? Publishes J. Cryptography
? Around 1600 members, (25% students), from 74
countries, 27 Fellows.
To Learn More
232
233. ????????????
??? ?? ??? ??
? ?2021 by Seungjoo Gabriel Kim. Permission to
make digital or hard copies of part or all of this
material is currently granted without fee
provided that copies are made only for personal
or classroom use, are not distributed for profit
or commercial advantage, and that new copies
bear this notice and the full citation.
233