Blockchain concept and technology. How this is becoming the next trend after the Bitcoin, expanding to a myriad of solutions. Smart contracts might be using a public distributed, and encrypted platform to support data persistence.
3. • Bitcoin is a distributed
• peer-to-peer
• digital currency that can be transferred instantly
and securely between any two people in the
world.
• It's like electronic cash that you can use to pay
friends or merchants.
What Is Bitcoin?
8. Bitcoin : Currency and technology
• Mining
• 21 million
• Volatile value
• >50% in hands of 880 individuals
• Litecoin, Ripple, Zerocoin
Currency
“Satoshi Nakamoto”
2009
• Blockchain
• Distributed shared ledger
• Cryptograhy (SHA‐256, PKI)
• Consensus model
• Smart contracts
Technology
8
9. Blockchain Defined
Simply defined a Blockchain is little more than a:
• Distributed
• Secure
• Logfile - ledger
A digital currency was in a lot of ways the first demonstrable use
11. Distributed shared ledgers
• Group of replicated logs/databases (nodes)
• Transactions distributed in blocks
• All nodes hold all transactions
• Parties identified with public key (= anonymised)
• Accessibility of transactions depending on blockchain implementation
• Resilient for failure of one or more nodes
• Group of nodes operate tamper proof
13. Cryptography
Hashing functions
Creation of a bit string (digest) representingintegrityof content other string. Changing one character in the original string results in complete different has.
Changing multiple characters in original string that results in the same hash requireslarge amount of processing power for a long period of time.
13
Public & private keys and wallets
Two large prime numbers that have a mathematical relation with each other.A string encrypted with one key can only be decrypted with the other. One
key needs to be kept private,the other one can be made publicly known so that it can be used by other parties to exchange data with you in a secure
manner. Private keys need to be storedthat it is accessible only for owner. This can be done on personal devices(PC, smart card, USB stick, phone, …)or
remotelywith a service provider (cold and hot wallets).
Encryption
Scrambling of clear text withthe public key of the recipient so that the holder of that private key is the only one that can descramble the message. This is
used to guarantee the confidentiality of the data exchanged.
Digital signature
Encryption of hash representingof original data to be secured with the private key of the sender (called digital signature) that is decrypted by the recipient
with the public of the sender.If the decryptedhash matches the content of the original data it implies two things. First, the encryption can only be
performedwith the private key corresponding with public key and secondly, the original data can’t be tamperedwith.
14. Consensus
• Consensus = Majority of nodes agree on validity of transactions
• Includes validation on double‐spending
• Permissionless (public) vs. permissioned (private) blockchain setup
• Proof‐of‐work / proof‐of‐stake the proof validity of node
(only applicable for permissionless network)
14
15. Smart Contracts
• Business logic that can be assigned to a transaction on the blockchain
• Acts as a ‘notary’ of blockchain transactions
• Holds conditions under which specific actions can/must be perfomed
• Facilitates escrow services
• Can’t be modified without predefined permissions
15
16. Potential of blockchain extends across a wide
range of application areas
Financial Services
• Payments
• Securities registration & processing
• Lending
Governmental services
• Voting
• Registrations (passports, driving license)
• Permits
Trade
• Document exchange
• Asset exchange
• Escrow services
• Trade agreements
• Property
• Real estate
• Intellectual property
• Cars
• Identification & Security
• Party/device registration
• Authentication
• Access control
• Internet of Things (IoT)
• Autonomous devices, such as
• Cars
• Drones
• Robots
18. Sending Bitcoins - example
I’LL send 0.1
Bitcoin to Bob.
Alice
$ F T
Protocol: sending BTC
1. Craft a transaction.
2. Give it to your
computer.
Protocol: participating
On valid transactions:
1. Update ledger
2. Relay transaction
19. Addresses are like Accounts
• The wallet listens for transactions addressed to any of its public keys
• In theory - is the only node that is able to decrypt and accept the transfer
• “Coins” are “sent” by broadcasting the transaction to the network
which are verified to be viable and then added to a block
• Keys can represent a MULTI-SIG address that requires a N of M private
keys in order to decrypt the message
• N private keys
• M keys
19
20. A 2of3 multisig address can be created by following these steps:
1.Gather (or generate) 3 bitcoin addresses, on whichever machines will be participating, using getnewaddress or
getaccountaddress RPC commands (or copy and paste from the GUI).
2.Get their public keys using the validateaddress RPC command 3 times.
3.Then create a 2-of-3 multisig address using addmultisigaddress;
e.g.
addmultisigaddress returns the multisignature address
Public keys are raw hexadecimal and don't contain checksums like bitcoin addresses do.
Send funds into that 2-of-3 transaction using the normal sendtoaddress/sendmany RPC commands
Creating a Multisignature Address
bitcoind addmultisigaddress 2
'["044322868cb17d64dcc22185ae2d4493111d73244c3668f8ac79ecc79c0ba8d30a6756d0fa20157
709af3281cc721c7f53321a8cabda29b77900b7e4fe0174b114","..second pubkey..","..third pubkey.."]’
21. Assuring Pseudo Anonymity
• Using public key cryptography, specifically:
Elliptic Curve Cryptography due to its
• Key strength
• Shorter keys
• Transactions are sent to public key “addresses” eg:
1AjYPi8qryPCJu6xgdJuQzVnWFXLmxq9s3
1Give4dbry2pyJihnpqV6Urq2SGEhpz3K
21
23. Blocks
A block 𝐵 contains
RH(𝐵′) for another block 𝐵′,
a list of transactions,
and an arbitrary number
“nonce”.
Block 𝐵 is valid if the
first 𝑑 = 5 digits of the
hash of 𝐵 are all zero.
8046465385222
0000031105830
0000077326777
RH
24. =
A Tree of Blocks
If we have a block, with a
bit of work, we can find a
“next block”…
...and yet another “next
block”…
…or a block which
continues here…
… and so on.
25. Random Hash Function
In practice, we hope that SHA256 behaves “like a random oracle”.
SHA256: TextFiles → 0, … , 2256
− 1
Calculation:
If we made all computers on the world compute SHA256…
It takes ~“40 × 14 ⋅ 109
years” to find 𝑥1 ≠ 𝑥2 s.t.
SHA256 𝑥1 = SHA256 𝑥2 .
26. • We need a protocol to agree on a transaction.
• “Consensus protocols”. Studied since 1980, starting
with Pease, Shostak, Lamport.
• Main idea for protocols:
Consensus Protocols
What transaction
are you using?
Protocols work if (say) >
70% of the computers
follow the protocol.
27. The Protocol - for Finding Blocks
Protocol: finding blocks
1. Take the longest chain you
can find.
2. Collect transactions.
3. Find a new valid block here.
4. Publish it.
28. The Protocol - for Participants
Protocol: To know who owns BTC
1. Take the longest chain you
can find.
2. Process the transactions in
this chain in order
29.
30. “proof of work” - node generating a block needs to prove that it has put
enough computing resources to solve a mathematical puzzle.
Transaction order protection
35. Double Spending
I can exploit this!
Black Hat
Alice
Bob
: Give BTC from Black Hat to Alice
: Give BTC from Black Hat to Bob
Black Hat prepares
two transactions:
These transactions
spend previously
spent bitcoins!
Thanks
!
Thanks
!
36. Build an Alternate Chain?
The more RH-calls are
devoted to a chain, the
faster it grows.
Thus, intuitively: to
build a chain as fast as
the rest, you need as
many RH-calls as the
rest.
Maybe I should
build another
chain?
37. Distributed Denial of Service Attacks (DDoS)
If I cannot cheat bitcoin,
maybe I can mess it up!
Interesting idea…
…and while Bitcoin
incorporates many,
many rules to handle
this…
…people still try!
38. • Using computing power of third parties to achieve faster mining
performance (without knowledge and consent of the third party)
• The 51% cartel attack
• A Goldfinger attack (Sabatoge: "Losing" Bitcoins)
Mining problems
39. Improving Bitcoin: Open Problem
• Computing SHA256 around 2 × 1017 times per
second seems like a big waste of energy.
• Back of the envelope calculation gives a daily energy
use of 5.000.000+ kWh (> $500.000+)
• Can we improve the situation?
(There is previous work which studies this).