Академический Документы
Профессиональный Документы
Культура Документы
BlockChain
http://www.finextra.com/news/fullstory.aspx?newsitemi
http://www.finextra.com/news/fullstory.aspx?newsitemid=28395
https://ripple.com/
http://www.pymnts.com/news/2015/ripple-effect-for-blockchain-a
http://www.coindesk.com/microsoft-hints-future-ripple-blockchai
http://www.wired.com/insights/2015/01/block-chain-2-0/ oolkit/
https://www.ethereum.org/
http://www.finextra.com/news/fullstory.aspx?newsite
mid=28405
http://www.cnbc.com/2016/01/28/
016 looks to be the year of the Block Chain
OK, ok.
So how does it work?
Lots of documentation
and presentations
https://bitcoin.org/bitcoin.pdf
but heres my
attempt
Triple entry booking (or enter the
middleman)
From: Alice
To: Bob
Time: 12 Mar 2013
For: One pig
Signatories:
Alice
Fred Flintstone
Bob
Alice is hungry
Alice could eat a pig
To provide trust, Alice and Bob use Fred to notarise the transaction
3 copies of a transaction receipt, one for each party
Never trust the middleman
Bob loses his receipt
Bob is smad.
Then some smart people had an idea. They realised they could create an approach that
involved two different keys. One key is purposely kept private, the other is provided to
the other party (or often the public). If you use the private key to encrypt then the
public key can decrypt. If you use the public key to encrypt then you can use the
private key to decrypt. This is called asymmetric encryption.
Private
Some text Asymmetric algorithm key 6ab3d9f...
Public
key
There are many asymmetric encryption algorithms. RSA is one of the most common.
This is how
1. Alice and Bob generate public-private key pairs eg
RSA
2. Alice encrypts the plain text version of the transaction
receipt with her private key
3. Alice prepends her name to the signed receipt (so we
know which public key to use when many people
involved)
4. Alice and Bob (and any other members of the
network) store the result
Which means
From: Alice
To: Bob
Time: 15 Apr 2014
B7F8U7LA92C
What: Two pig
From: Bob
To: Alice
Time: 2 Dec 2015 87AB2D9A1d
What: One pig
From: Alice
To: Bob
Time: 15 Apr 2014
What: Two pig C7F8U7LA92C
Value: $200
From: Bob
To: Alice
Time: 2 Dec 2015
What: One pig 27AB2D9A1d
Value: $100
From: Bob
To: Alice
Time: 2 Dec 2015 BDA32E9ACd
What: Two melons
Value: $50
SHA256 signature
calculated for the
"V1jZUyLvPOxzZvKpuUwTCNzGmovoxHRzJ76FGXMN3JY="
transaction
Story time! SHA256 - what's that?
Once upon a time someone figured out that it was possible to calculate a short identifier for
any given input. Its like a unique signature for the input (although in reality its not guaranteed
to be unique at all but for all intents and purposes it is). It's called a hash because in the
process the algorithm is effectively doing a lot of chopping and mixing.
There are lots of algorithms to do this task but some are better than others. SHA-2, often
referred to as SHA256, was designed by the NSA. The letters stand for Secure Hash Algorithm
2.
If you have a hash value, it's not at all easy to obtain the input, even small changes to the
input have large consequences on the output. JD digoW 2O uYy8CkQ V10Xm yLnN nvD 42tAta25Rm
Some text
O iIqI=
SHA256
12E+SmrYMSTj6vlh51UdVDWgJQNGz35AOvesa2z3y
Some text1
Ao=
SHA256
Don't confuse it with encryption - there's no key, for any given input you always get the
same output.
Recap
No middle man
The summation of signed transaction receipts gives the
outstanding balance position across all parties
Including value transfer between parties
Sorted!?
SHA256 signature
This will become obvious in
calculated for the
transaction "V1jZUyLvPOxzZvKpuUwTCNzGmovoxHRzJ76FGXMN3JY="
time but by then the damage
is done
Question is: how do we ensure an action such as the creation
of a transaction record is valid?
We need some way to get transaction
integrity
How about 2-phase commit? Nope grinds to a halt when scaling
Story time! Paxos was created by Leslie Lamport and named after a
fictional parliament on the Greek island of Paxos.
oing in reverse you have to brute force which is hard but not impossible.
We can make this much harder
though
Look for a hash outcome that has some arbitrary substring eg 00 at the beginning.
Because of the broad distribution we dont normally get two solutions found at the same time.
Just what does harder work mean
here?
Recap
1. To stop malicious members double spending we
needed better transaction integrity but without the
downsides of a 3rd party or full 2 phase commit
majority consensus seems a reasonable idea.
2. But consensus voting is susceptible to the creation of
fake identities
3. It looks like we might have a way to make the vote
signing process sufficiently expensive to perform that
we can stop members trying to manipulate the
consensus mechanism.
Lets explore that proof of work cost aspect
a bit more
Lets say we have a network of 1000 participants
Alice transfers some value to Bob, lets say $1
We can set the computing cost (energy, hardware etc)
to create a transaction by making the proof of work
harder or easier Bob now has a choice:
$10
1. Trust that Alice wont double
spend, or
2. Ask some number of the network
participants to verify the
If Bob asks for verification, then whats a good
transaction
number of the total network to ask? 10, 100, 500,
Story time! Proof of work has an interesting history. The idea didn't start specifically with block
chains or BitCoin. It came up in the 1990s in the context of finding ways to hinder unwanted
behaviour in electronic systems; a classic example being Denial of Service.
Denial of Service is an a way to disrupt service by intentionally flooding a system with requests.
But what if we made the attacker's effort sufficiently large that it was no longer financially worth it?
What about if the task to make a request was computationally tough. The system offering the
service might could ignore those requests not able to satisfy the proof of work task.
Proof of work in the case of BitCoin is large which has lead to the creation of dedicated low energy
BitCoin mining hardware. Estimates for the electricity required to generate 1 BitCoin
vary greatly depending upon the type of hardware used (home PC versus laptop versus Raspberry
PI versus dedicated ASIC).
BitCoin also makes the proof of work progressively harder over time. Currently it's calibrated so
that on average the proof of work completes in about 10mins across the whole of the network. With
so many nodes on the bitcoin network that means any individual node would usually take many
hours or days to finish the proof of work.
For a $1 trade theres two options that look attract, particularly one of them.
Whoa! Hold it there. Cost to be a
crim? Isnt it also the cost to do
business?
nd just thinking about this surely, Bob has to pay something for the effort to request verificatio
Blocks of transactions linked together ... doh,I get it: Block Chain!
Blocks fundamentally cant ever be considered final you might not yet have
received all the generated blocks. That means transactions are also never
strictly final!
But it turns out that the odds the transaction isnt correct decrease dramatically as blocks get created.
BitCoin as an example
kChain clients need to validate transactions and blocks right back to the beginning of BitCoin. It takes awhi
To create fraudulent transactions then I need to create fraudulent blocks. To modify a past
block I would have to redo the proof of work on that block, and then all following blocks.
But this is a really tall order the probability of an attacker catching up diminishes
exponentially as blocks are added.
Block Block
Block
Block Block Block
Time
BitCoin has 1Mb blocks and the proof of work is much harder - roughly 13 0s on the front of
the hash which means an individual miner might days on average to complete the proof of
work, but with a big network BitCoin have tuned difficulty to achieve 10min average block
generation.
BitCoin currently limited to about 7 txns/sec by the 1Mb block size - that's not very much for
a retail payment system - moves afoot to increase block size and numbers of transactions
processed per mining operation.
Fees are effectively near 0 for a user. Compare/contrast to credit card or international
transaction fees which can be >3%. Costs of conventional payment brokers are high due to
operational overhead, especially fraud. BitCoin avoids all fraud in the actual payment
system itself.
Block chains
+
Smart contracts
+
Internet of Things
http://www.coindesk.com/math-behind-bitcoin/
http://scet.berkeley.edu/wp-content/uploads/BlockchainP
aper.pdf
https://bitcoin.org/bitcoin.pdf