Bit Coin
Bit Coin
101011101011001…0010110100101 x h y 101110101001000110111100010101
HASH FUNCTIONS
101011101011001…0010110100101 ? h y 101110101001000110111100010101
HASH FUNCTIONS
101011101011001…0010110100101 x1
h y 101110101001000110111100010101
1100101001011001…110010100110 x2
HASH FUNCTIONS
101011101011001…0010110100101 x1
h y 101110101001000110111100010101
1100101001011001…110010100110 x2
101011101011001…0010110100101 x1 y1 101110101001000110111100010101
h
101010101011001…0010110100101 x2 y2 110010100101100100110010100110
CONSTRUCTIONS
m1 m2 mn
IV f f f h
Merkle-Damgard Construction
Example : SHA 256 — used in Bitcoin
CONSTRUCTIONS
m1 m2 mn h1
f f f f
c
Sponge Construction
Example : SHA 3 — used in Ethereum
APPLICATIONS
r x h y
commit(x) : verify(c,r,x) :
c = h(r || x) h(r || x) == c
Provably secure scheme for Commitment
Random nonce r must have a high min-entropy for this scheme to be secure.
APPLICATIONS
x h y
record(x) : verify(c,x) :
c = h(x) h(x) == c
Provably secure scheme for tamper-detection
DATA STRUCTURES
addr(data)
data
h hash(data)
Hash Pointer
Tamper-evident data pointer = Hash Pointer
DATA STRUCTURES
data data
HP(block) h HP(block)
timestamp timestamp
Block Block
Tamper-evident linked data structure = Block
DATA STRUCTURES
data data data data data
Tamper-evident linked-list = Blockchain
DATA STRUCTURES
data data data data data
Tamper-evident linked-list = Blockchain
DATA STRUCTURES
HP(root) data
HP(left) HP(right)
timestamp
Node
data data
timestamp timestamp
Node Node
data data
timestamp timestamp
Node Node
Tamper-evident binary-tree = Merkle Tree
DATA STRUCTURES
HP(root) data
HP(left) HP(right)
timestamp
Node
data data
timestamp timestamp
Node Node
data data
timestamp timestamp
Node Node
Tamper-evident binary-tree = Merkle Tree
DATA STRUCTURES
Properties Blockchain Merkle Tree Merkle Trie
2 1 3
Digital signature as a set of three algorithms
DIGITAL SIGNATURE
(sk, pk) = keygen(n) verify(pk,m,sign(sk,m)) = True
DIGITAL SIGNATURE
Given pk and access to sign(mi) as an oracle, an adversary should
not be able to create a valid fresh message-signature pair (m,s)
CONSTRUCTION
Q Fp
sk
sk
? sk
verify(pk,m,sign(sk,m))
Publish the public key pk as your Identity
Use the secret key sk to prove your identity
BITCOIN
Blockchain in Practice
BITCOIN
Ledger of Transactions
between
Pseudonymous Identities
Semi-Decentralised Publicly-Verifiable
Tamper-Resistant Eventually-Consistent
NOT BITCOIN
Economic Transaction
that we are familiar with
Tx
NOT BITCOIN
Tx
Tx
Tx Tx Tx Tx Tx Tx Tx
Tx
Tx Tx
Signed by
pk
Tx Tx pk
Signed by sk
pk1 pk
Tx R1
Recipient(s)
Sender(s)
pk2 pk
Tx Tx R2
sk1 sk2 sk3
pk3 pk
Tx R3
pk1
Tx Tx
Input Transactions
pk2 pk pk pk
Tx R1 R2 R3 Recipients
pk3
Input(s)
Output(s)
Tx Tx Tx Tx Tx Tx Tx Tx
Tx Tx Tx Tx Tx Tx Tx Tx Tx Tx Tx Tx
Tx
Tx
Transaction
Mining
MINING
Tx Tx
Tx
Tx
Transaction
Computational
Lottery (Puzzle)
Tx
Tx
Transaction
Mining
BITCOIN
Framework — Decentralised peer-to-peer collaborative network
Goal : All peers should agree on a sequence of transactions
BITCOIN
Publicly-Verifiable
as the complete ledger and the hash function is public
BITCOIN
Tamper-Evident / Tamper-Resistant
as the ledger is connected through a chain of hash pointers
X X X
X X X
X
BITCOIN
Eventually-Consistent
as the longest chain eventually sustains as the main chain
BITCOIN
S1 R1
S2 R2
Tx
Sn Rm
EXAMPLE #1
1FLa9NcXJPA2XvF34LRuB4zbXX4Ws32dpL S1 Tx R1 18rdKmjrg1EawxgiVT3ikLExj6GWS2MNCk
Note : Single recipient with an exact match of input to output — highly unlikely.
EXAMPLE #2
R1 1H3bY2Cv1pmn8ffTdyeRvZAUjNJC1giQHm
1Ao6mKMEXxCVNVAuGjfLXZ3Zf43hd3yAEq S1 Tx
R2 16pDB5bvoqRGvoH32GaJLfsEcaMc2T9xDr
R1 19onWuLmjXGVfc7oUAEVuy9Yd3jxqhsUbK
1PXzMrz8KBNEkTt3Wnuqy4axiWszbyQKyE S1 Tx
R2 1AASWBCGveXH6H5yTCZW2x7uZrawDiqp4U
19SZcQ2CzJacQZE9rYwQjsfcBKMWDNwBWD S1
Tx R1 1PLjv1VzGEKxtM2FnRzg2FmDjen9trUBrh
13Zjnzx8VxtLUEiYcrVXKp5sLucLMvBqaG S2
Note : Two arbitrary inputs exactly match up to a desired output — highly unlikely.
EXAMPLE #5
Tx
17atn5sagYRBUvzgFLd9bUjWF4yStkdokW S2 R2 1Nq612zwhEZDBNz2AeWKZxD6LvwiLm6cQU
Note : Two input transactions coupled for a payment plus some random change.
CLUSTERING
1PXzMrz8KBNEkTt3Wnuqy4axiWszbyQKyE
19onWuLmjXGVfc7oUAEVuy9Yd3jxqhsUbK
1Djvb34FNpNXtrbbjaQeERZf68cyUdWyzd
1AASWBCGveXH6H5yTCZW2x7uZrawDiqp4U
1FLa9NcXJPA2XvF34LRuB4zbXX4Ws32dpL
1AffmSG4tcNRjcgTWTnS6TM3cWPeeA9EVd
17atn5sagYRBUvzgFLd9bUjWF4yStkdokW
18rdKmjrg1EawxgiVT3ikLExj6GWS2MNCk
1Ao6mKMEXxCVNVAuGjfLXZ3Zf43hd3yAEq 16pDB5bvoqRGvoH32GaJLfsEcaMc2T9xDr
19SZcQ2CzJacQZE9rYwQjsfcBKMWDNwBWD 1H3bY2Cv1pmn8ffTdyeRvZAUjNJC1giQHm
13Zjnzx8VxtLUEiYcrVXKp5sLucLMvBqaG 1PLjv1VzGEKxtM2FnRzg2FmDjen9trUBrh
1Nq612zwhEZDBNz2AeWKZxD6LvwiLm6cQU
IDENTIFICATION
1PXzMrz8KBNEkTt3Wnuqy4axiWszbyQKyE
19onWuLmjXGVfc7oUAEVuy9Yd3jxqhsUbK
1Djvb34FNpNXtrbbjaQeERZf68cyUdWyzd
1AASWBCGveXH6H5yTCZW2x7uZrawDiqp4U
1FLa9NcXJPA2XvF34LRuB4zbXX4Ws32dpL
1AffmSG4tcNRjcgTWTnS6TM3cWPeeA9EVd
17atn5sagYRBUvzgFLd9bUjWF4yStkdokW
18rdKmjrg1EawxgiVT3ikLExj6GWS2MNCk
1Ao6mKMEXxCVNVAuGjfLXZ3Zf43hd3yAEq 16pDB5bvoqRGvoH32GaJLfsEcaMc2T9xDr
19SZcQ2CzJacQZE9rYwQjsfcBKMWDNwBWD 1H3bY2Cv1pmn8ffTdyeRvZAUjNJC1giQHm
13Zjnzx8VxtLUEiYcrVXKp5sLucLMvBqaG 1PLjv1VzGEKxtM2FnRzg2FmDjen9trUBrh
1Nq612zwhEZDBNz2AeWKZxD6LvwiLm6cQU
CLUSTERING
The Unreasonable Effectiveness of Address Clustering — Harrigan and Fretter, May 2016
DE-ANONYMIZATION
Passive : Analytics on 80 GB of Bitcoin blockchain data
— Clustering of Bitcoin Addresses with suitable definition of Metrics
— Identification of the Clusters using known and/or leaked Addresses
pk1
Tx Tx
Input Transactions
pk2 pk pk pk
Tx R1 R2 R3 Recipients
pk3
Input(s)
Output(s)