9. Can we do better?
We hate the registrar's office
Can we get rid of the government?
Can we use technology?
A database of properties and owners
10. Need Tech Solutions For
Property Owner
Authentication
Transaction Permanence
Transaction Modifications
Use Digital Authentication
11. Solution v1 – Sameer’s Webserver
Online database of house owners
Stored on Sameer’s web server
Every owner has an account+password
Log in to transfer
Record all transactions (audit trail)
This is a “ledger”
12. Home Owner Ledger
House No New Owner Date
42 Julie 13 Jul 2000
133 Peter 11 Sep
2002
42 Neha 31 Oct 2006
1024 Binary 12 Apr 2008
3 Salman 21 Dec
2012
13. Conventional Database
Who can add transactions?
– Database software / admin (Sameer)
Homeowner authentication?
– Password (stored in database)
Who can read transactions?
– Sameer + Homeowner
Who can modify transactions?
– Sameer
16. Home Owner Ledger
House No New
Owner
Date Dig. Sign
42 Julie 13 Jul
2000
Xa2anT54
133 Peter 11 Sep
2002
7awRY27x
42 Neha 31 Oct
2006
Y4htT29x
H
1024 Binary 12 Apr
2008
BdR664bx
3 Salman 21 Dec
2012
RGbw5bx
20. Encryption Using Normal
Passwords
I, Julie Andrews,
residing at 42 ...
ORIGINAL
y</PLVDg/kzExgWO</xgODEDze/?p/å"/!!!
ENCRYPTED
Encryption
Decryption
PASSWORD
How it works:
• At encryption
» Software asks for password
» You can pick any password
• At Decryption
» Software asks for password
» Must provide same password
21. Encryption Using 2
Passwords
I, Julie Andrews,
residing at 42 ...
ORIGINAL
y</PLVDg/kzExgWO</xgODEDze/?p/å"/!!!
ENCRYPTED
PASSWORD1
PASSWORD2
22. Works in Reverse Too
I, Julie Andrews,
residing at 42 ...
ORIGINAL
y</PLVDg/kzExgWO</xgODEDze/?p/å"/!!!
ENCRYPTED
PASSWORD1
PASSWORD2
23. Authentication
I, Julie Andrews,
residing at 42 ...
ORIGINAL
y</PLVDg/kzExgWO</xgODEDze/?p/å"/!!!
ENCRYPTED
PUBLIC KEY
PRIVATE KEY
Authentication Usage:
• Encrypt a random text with private key
» e.g. Today's date
• Anyone can confirm
» By decrypting using public key
• None else can do this
Initial setup for authentication:
• Public key + Private key = Keypair
• Everyone creates keypairs
• Publicly publish all public keys
• Private keys kept hidden
24. Digital Signature
Block: 3242
Previous Block: 1337
T1: House #42, Julie, 13 Jul 2017, Xa2anT54
T2: House #133, Peter, 11 Sep 2002, 7AWry27x
Random Text: Abcdefghi11111113
Hash Value: b9f85daa6f83cf02ce5c31
PRIVATE KEY
Signature: 8093d995f066734046dbf5f
25. Digital Signature: Signing
To sign a document:
– Compute its hash
– Encrypt hash with private key
Anyone can validate:
– Decrypt signature with public key
– Compare with document hash
• Authenticates
– Identity of signing entity
– Content of document
26. Home Owner Ledger
House No New
Owner
Date Dig. Sign
42 Julie 13 Jul
2000
Xa2anT54
133 Peter 11 Sep
2002
7awRY27x
42 Neha 31 Oct
2006
Y4htT29x
H
1024 Binary 12 Apr
2008
BdR664bx
3 Salman 21 Dec
2012
RGbw5bx
27. The Transaction Deletion
Problem
Good News:
Sameer can’t fake a transaction
Sameer can’t change details of a transaction
Bad News:
Sameer can delete a transaction
Double-spend
Julie sells same plot to someone else & shares profits with Sameer
28. House No New
Owner
Date Dig. Sign
42 Julie 13 Jul
2000
Xa2anT54
133 Peter 11 Sep
2002
7awRY27x
42 Neha 31 Oct
2006
Y4htT29x
H
1024 Binary 12 Apr
2008
BdR664bx
3 Salman 21 Dec
2012
RGbw5bx
Home Owner Ledger
House No New
Owner
Date Dig. Sign
42 Julie 13 Jul
2000
Xa2anT54
133 Peter 11 Sep
2002
7awRY27x
42 Neha 31 Oct
2006
Y4htT29x
H
1024 Binary 12 Apr
2008
BdR664bx
3 Salman 21 Dec
2012
RGbw5bx
29. Deletion – Solution
Multiple servers
Every server keeps a copy
– Of entire transaction ledger
– “Distribute Ledger”
• Servers only add transactions. No modification or
deletion allowed.
• “Append-only ledger”
30. Nobody in charge
Any server can accept transactions
– “unconfirmed”
– Forwarded to all servers
Random “Master” chosen periodically
– Every 10 minutes
– Creates and seals new block
– Confirms all unconfirmed transactions
31. Ledger Propagation
• Anyone can join anytime as a server
• Servers keep all the blocks / complete
ledger
• Servers receive confirmed transactions
from current master
• Unconfirmed transaction(s) are kept
around by the servers until reconciled
32. “Random”??
Who chooses randomness?
Number of servers not known
No central authority
Make everyone solve a hard math problem
First server to solve the problem becomes the
“Master”
– Usually gets reward/commission
This is called “Mining”
33. The Mining Problem
Compute a function based on contents of current
block
– Like a compressed encryption of the block contents
– This is called the “Hash”
Modify block contents until hash ends with 0000
34. Hash Characteristics
Depends on contents of block
Minor changes produce totally different hash
Easy to compute/verify
Impossible to reverse-engineer
35. Mining
Block: 3242
Previous Block: 1337
T1: House #42, Julie, 13 Jul 2017, Xa2anT54
T2: House #133, Peter, 11 Sep 2002, 7AWry27x
Random Text: Abcdefghi11111111 (nonce)
Hash Value: 38260c9ad4e3142adc38a
36. Mining
Block: 3242
Previous Block: 1337
T1: House #42, Julie, 13 Jul 2017, Xa2anT54
T2: House #133, Peter, 11 Sep 2002, 7AWry27x
Random Text: Abcdefghi11111112
Hash Value: f29bc91bbdab169fc0c0a3
37. Mining
Block: 3242
Previous Block: 1337
T1: House #42, Julie, 13 Jul 2017, Xa2anT54
T2: House #133, Peter, 11 Sep 2002, 7AWry27x
Random Text: Abcdefghi11111113
Hash Value: b9f85daa6f83cf02ce5c31
38. Mining
Block: 3242
Previous Block: 1337
T1: House #42, Julie, 13 Jul 2017, Xa2anT54
T2: House #133, Peter, 11 Sep 2002, 7AWry27x
Random Text: Abcdefghi11111114
Hash Value: 21440dba05ffe31f6c6bf
39. Mining
Block: 3242
Previous Block: 1337
T1: House #42, Julie, 13 Jul 2017, Xa2anT54
T2: House #133, Peter, 11 Sep 2002, 7AWry27x
Random Text: Abcdefghi11111115
Hash Value: 0e8c4304837e44c4e8d02
40. Mining
Block: 3242
Previous Block: 1337
T1: House #42, Julie, 13 Jul 2017, Xa2anT54
T2: House #133, Peter, 11 Sep 2002, 7AWry27x
Random Text: Abcdefghi11111116
Hash Value: b591abbba2f4de490ee0c8
41. Mining
Block: 3242
Previous Block: 1337
T1: House #42, Julie, 13 Jul 2017, Xa2anT54
T2: House #133, Peter, 11 Sep 2002, 7AWry27x
Random Text: Abcdefghi11111117
Hash Value: b6485633f4901443360000
42. Bitcoin Mining
Bitcoin mining involves 16000000000000000
computations per second
Average time = 10 minutes
Problem made harder if more
servers join network