0% found this document useful (0 votes)
41 views3 pages

Blockchain Simple Explanation

Blockchain uses cryptography and hash functions to securely record transactions in a distributed ledger without the need for a central authority. Each transaction is bundled into a block that is linked to previous blocks using a cryptographic hash, creating a chain where all transactions can be publicly verified but not altered. Blockchain solves the double spending problem through consensus across a peer-to-peer network without requiring trust in a central record keeper like a bank.

Uploaded by

Amit Vishwakarma
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
41 views3 pages

Blockchain Simple Explanation

Blockchain uses cryptography and hash functions to securely record transactions in a distributed ledger without the need for a central authority. Each transaction is bundled into a block that is linked to previous blocks using a cryptographic hash, creating a chain where all transactions can be publicly verified but not altered. Blockchain solves the double spending problem through consensus across a peer-to-peer network without requiring trust in a central record keeper like a bank.

Uploaded by

Amit Vishwakarma
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

1

Blockchain: Simple Explanation


Oleg Mazonka, 2016

Abstract—This paper presents a step by step introduction to impossible. The best known cryptographic hash functions are
what blockchain is and how it works. MD5, SHA1, SHA2. An example of MD5 is this
Index Terms—Blockchain, Hashchain, Bitcoin, Cryptocur-
rency. MD5(”abc”) = 900150983cd24fb0d6963f7d28e17f72

The result is a 128-bit string shown here in the hexadecimal


I. I NTRODUCTION format.
Blockchain is a buzzword. You have probably heard it so If the hash value, represented in some form, is fed again
many times you feel like you should undersatand what it is. into the hash function, a new hash is obtained. If this process
By the end of reading this article you just might. repeated and the results are combined into a sequence of
The original problem comes from the idea to have some- hashes, one obtains a hashchain.
thing represented as digital entity that can be passed securely
from one party to another. Imagine you have some money in III. H ASHCHAINS
your bank account, and you would like to securely transfer
some of it to another person. This ususally goes through a Hashchain is a sequence homogeneous data chunks, or
digital transaction – no physical money is passed around. simply blocks, linked together by a hash function. Figure 1
This is nice and simple. But, it requires trusting the bank. schematically shows a simple hashchain.
Is it possible for some digital entity stored on my computer, Figure 1
representing money, to be passed securely to someone’s else
computer, without a bank? Yes it is possible. However, re-
gardless of representation any digital sequence can be copied. Hash Hash Hash Hash

This creates the well-known problem of “double-spending”: Payload Payload Payload Payload

one person makes an electronic transaction more than once


using the same money. This problem was not solved properly
until the first blockchain cryptocurrency, Bitcoin, appeared in
Each data block consists of the hash and the payload. The hash
2009.
of each block is calculated out of the whole previous block.
Many other cryptocurrencies appeared in the following
Payload in each block is arbitrary data. This hashchain has
years and followed the same principle of blockchain tech-
the important property: no data can be modified at any block
nology, which solves the double-spending problem without a
without affecting the integrity of the subsequent blocks. For
bank. The digital sequences, which are linked to a person, are
example, if the payload of the first block is changed, then the
passed around without possibility to copy and double-spend
hash of the second block must be changed as well, and hence
by placing one hashchain inside another hashchain. What is a
the hash of the third, and so on.
hashchain? Let us first recall what is hash.
Next step is to authorise only one person to create a
new block in the chain. One way to do it is Public Key
II. H ASH F UNCTIONS
Cryptography (PKC).
Hash function is a method to convert data of arbitrary size
into a digital string of predefined fixed length, called hash.
IV. P UBLIC K EY C RYPTOGRAPHY
One of the simplest hash functions is the modulo operation.
Any digital string can be converted into a number (possibly The basic idea of PKC is similar to hash functions – one
very big); this number can be divided by a constant; and the way computation. Given some data m (m for message) anyone
remainder of that division is the result, hash. Obviously the can compute encrypted value Enc(m). But, only the one who
result is less than the constant, because its size is no greater knows a special key related to this encryption can compute in
than the size of the constant. This hash function is simple but the opposite way, i.e. find m from Enc(m). The latter process
at the same time not used too often because people want to is called decryption.
have another property – one way computation. It should be To achieve PKC, one must first create a so-called pair of
easy to compute the hash, but finding any input to the hash keys: public and private. The public key is used to encrypt
function must be difficult, or better virtually impossible. data and can let be known to anyone. The private key is used
Hash functions with such a property are sometimes called to decrypt and must be kept in secret.
cryptographic hash functions, if necessary to distinguish from Figure 2 shows schematically the arrows of computation.
others. Such functions digest the bits of the input data in The top arrow represents the theoretical possibility to decrypt
a very convoluted way to make the reversible computation without knowing the private key upfront. For example, RSA
2

encryption is based on mathematical property of big number public key in the next block and signs that block. So the
factorization. next block will be owned by whoever keeps the private key
corresponding to the newly published block. And the signature
Figure 2
proves that only the previous owner could have done that.
Not possible but
theoretically imaginable
Figure 3 (from the original Bitcoin paper of Satoshi Nakamoto)

Public Key

m Enc(m)

If someone finds a way to factorize a big number (which is the


public key), then that person would be able to decrypt without
knowing the private key, in fact breaking the cryptography.
There are two main scenarios where PKC works. The first Figure 3 shows how PKC can be used in hashchains.
is when one party wants to send a secure message to another. Hashchain with PKC authorisation can perform as a func-
In this case the first party encrypts the message by the public tion for secure transfer of digital objects, called tokens.
key of the second party. The encrypted message can be made Suppose that one hashchain represents a token. It may be
public because only the second party is able to read the something to which the real world assigns a value. The owner
message encrypted with their key. The only vulnerability of of the last block is the owner of this value because only he
this method (apart from the theoretical one by cracking the is able to pass it to somebody else. However this kind of
math) is knowing and trusting the public key in the first place. hashchain implemented as-is would require a central place
To attack this problem a whole system of hierarchical public where the blocks are actually created, stored, and can be
certificates exists, for example, in the Internet https protocol. verified. We come back to the concept of a bank – a place
The second scenario is quite opposite to the first. Given which is required to be trusted.
some data, Alice encrypts it using its private key (or encrypts
only hash from the original data) and then publishes both data:
the original and encrypted. Anyone knowing the public key VI. B LOCKCHAINS
can verify that encrypted data is actually computed using the
Imagine that there is a place (possibly in virtual reality)
private key that is paired with the public key used for decryp-
where a continuous process exists that constantly creates new
tion. This verification works as a validation Alice actually did
blocks for some global hashchain. And imagine that you can
that. That process is called digital signing and the encrypted
place any data you like into the payload of the blocks of that
part is called digital signature.
global hashchain. If such a place and process would exist, then
Figure 2 shows the first scenario. In the second scenario the
you can insert the blocks of a hashchain representing values
private and public keys are swapped. Let us follow this again.
into the blocks of this global hashchain. In other words that
Alice takes a hash from a document m and encrypts this hash
would be one hashchain inside another hashchain. Essentially
using his private key, then makes both the document and the
this mechanism is called blockchain technology.
encrypted hash public. Anyone else can take the hash of the
document and decrypt the encrypted hash using the public key Figure 4
of Alice. If these two values are the same, then it means that
Alice has indeed signed the document m. This scenario with
digital signatures is the one which is useful in hashchains. Hash Hash Hash

V. S ECURING H ASHCHAIN WITH P UBLIC K EY


C RYPTOGRAPHY
Now, let’s go back to the question of whether it is possible
that only one person is enabled to add a block to the hashchain.
If the last block (Figure 1) contains the public key of the Figure 4 shows an external hashchain where block data
current owner and the digital signature of the previous block consists of blocks of internal hashchains. The blocks of the
owner, then creation of the next block will require the signature internal hashchains can chaotically appear in the external
of the current block, i.e. of the person who has the private key. hashchain. The obvious condition is that older internal blocks
When creating a new block the current owner places another cannot appear in newer external blocks.
3

Different solutions exist on how to organise that global (fees) to the creator of the new block of the global hashchain.
hashchain. And one particular solution proposed in the original So the creator of the new block receives the newly created
Bitcoin paper made Bitcoin popular. bitcoins plus all fees collected from the transactions placed
into the block.
VII. S OCIAL I NCENTIVE The third rule ensures that there is only one current valid
In Bitcoin network the global hashchain is a database dis- copy of the database distributed among many computers.
tributed among many computers. This global hashchain con- It is obvious that since many parties try to create blocks,
sists of many internal hashchains representing some valuable some different blocks are created independently. Since the
tokens called bitcoins. New blocks created on those internal propagation is not instant, new blocks may be created on top
hashchains are called transactions, because they represent of those independently created blocks. That makes the global
changing ownership of bitcoins. The owner of a particular hashchain branch. The third rule makes sure that only one
bitcoin creates a new block on the corresponding internal branch which is the longest is considered to be valid. This
hashchain and publishes this block as a new transaction to rule works fine because block creation is difficult, hence the
be included into the next block of the external hashchain. probability of two or more branches surviving die out very
Publish means sending to all other known participants of P2P quickly.
Bitcoin network. When a new block of the external hashchain We can see that the external hashchain plays the role of
is created it is published in the same way. the central repository effectively replacing an authority entity.
Any participant can create a new block for the external Since the external hashchain is global, it stores bits and
hashchain including published transactions into the block. But pieces of internal hashchains uniquely and reliably binding
this is not easy. To avoid chaos all participants follow a the tokens with their owners, at the same time making double-
particular set of rules – the protocol. And whoever does not spending impossible. The database of the external hashchain
play by these rules is ignored. The protocol is based on three is distributed among many not trusting each other parties, so
principles: it makes it more difficult to enforce the whole community
1) creating a new block requires significant computational of those parties to follow some externally applied regulations
effort; such as political laws.
2) creating a new block is rewarding, so many would make
en effort to successfully create a new block, and
VIII. S O W HAT IS B LOCKCHAIN ?
3) when branching occurs, the longest branch wins.
The first one simply requires that the hash taken from the block Blockchain is a particular organisation of hashchains inside
plus some random data, starts with a number of zero bits. So another hashchain. The external hashchain has to be based on
this random data is modified and the hash is calculated until a set or rules that make balance between usability, simplicity,
the condition of zero bits is achieved. That requirement makes incentive, and trust and authority. Its purpose is to replace
block creation difficult. the central access point that can be controlled and possibly
On the other hand whoever creates a block receives a num- abused by a human. Internal hashchains are required to have
ber of newly created internal hashchains representing some authorisation mechanism so one party can own something
value, bitcoins. That also is part of the protocol. Moreover of particular value. The authorisation mechanism may not
since the bitcoins represent a kind of currency and internal necessarily be PKC. For example, Hasq hashchain is a much
hashchains represent transactions with that currency, the trans- simpler hashchain using only hash functions as authorisation.
action owners can give a small portion of the transaction value

You might also like