1. A Seminar Write-up On
Cryptocurrency-Bitcoin
In partial fulfillment of the requirements for the award of
Bachelor of Technology
In
Information Technology
2. Abstract
Cryptocurrency has emerged as a digital evolution in the age of the human era. Cryptocurrency created
by a process called mining. Mining not only avails to creation of currency however withal avails to
integrate the transactions to a public ledger called Blockchain. Blockchain avails to keep data secure and
store all the transactions ever transpired since the currency has been created. Cryptocurrency is made
decentralized so that people don't face any obstruction while doing a transaction like they have to face in
banks, consequently cryptocurrency uses peer to peer system. Miners additionally validate the transaction
then only they are integrated to a blockchain. To keep these cryptocurrencies secure a cryptographic hash
function is utilized called Secure Hash Algorithm 256-bit
Here we will discuss Bitcoin, the first cryptocurrency created. Bitcoin uses the proof of work algorithm
in a blockchain network. How transactions take place in Bitcoin and how their difficulty level changes
while solving the problem.
.
3. List of Contents
Chapter 1
1) Introduction…………………………………………………………………………………….1.1
2) Bitcoin……………………………………………………………………………………...........1.2
1.Bitcoinwallet…………………………………………………………….……………….1.2.1
2.Blockchain………………………………………………………………………………..1.2.2
Cryptographic Hash Function………………………………………….1.2.2.1
Mining…………………………………………………………………….1.2.2.2
Chapter 2
1) How coins are created………………………………………………………….........................2.1
1.ProofofWork…………………………………………………………………………...2.1.1
2.SHA256…………………………………………………………………………………..2.2.2
3.Target…………………………………………………………………………………….2.2.3
4.Difficulty…………………………………………………………………........................2.2.4
Chapter 3
1)Legality of Bitcoin………………………………………………………………………………3.1
2) Advantages and Disadvantages………………………………………………………………..3.2
3) Conclusion………………………………………………………………………………………3.3
References
List of Figures
1-Market capitalization of types of cryptocurrencies……………………………………………1.1
2 Blockchain diagram……………………………………………………………...........................1.2
3- Flowchart of proof of work………………………………………………………………….......2.1
4. CHAPTER 1
1.1 Introduction
Crypto is a way of keeping a piece of information secure by turning it into an unreadable text.
Cryptocurrency is a digital currency that is utilized as an exchange of goods and services online. It is
based on a network that is distributed across an immense number of computers called nodes.
Cryptocurrency additionally utilizes some cryptographic techniques which avail to protect the
information using mathematics. Cryptocurrency follows a decentralized structure that does not involve
any middle-person for transactions or there is no control of the central ascendancy. For any transaction,
banks take a cut and most international payments take a long time. But in cryptocurrency transaction fee
is cut sometimes mostly on mostly on a big amount of transactions, transaction across the globe are more
expeditious.
Types of Cryptocurrency
There are 5000+ cryptocurrencies in the world but there 1600 active cryptocurrencies right now. Some of
them are listed below-:
∙ Bitcoin
∙ Ethereum
∙ Ripple
∙ Litecoin
∙
Fig 1.1 Chart shows market capitalization of cryptocurrency. Bitcoin holds highest market
capitalization.
5. 1.2 Bitcoin
Bitcoin is the first cryptocurrency that is most widely used. It was launched in 2009 by Satoshi
Nakamoto. It follows a decentralized structure; there is no central authority that holds control over
Bitcoin means all those people who are part of Bitcoin have equal power. Bitcoin is a peer-to-peer
system denotes there are computers connected directly without any central server. Files can be shared
directly on the network without the need for a central server. There is a limited supply of Bitcoin so there
are 21 million bitcoin available, value of bitcoin keeps on varying as Bitcoin is based on supply and
demand. For transactions, there is also a smaller denomination of Bitcoin i.e. 1 satoshi and 1 satoshi=
0.00000001 BTC. Bitcoin keeps a record of transactions of who sent the money to whom and how much
amount, which is stored in a public ledger called Blockchain. If a person has to send some bitcoins to his
friend the person needs to have a Bitcoin wallet.
1.2.1 Bitcoin Wallet
Bitcoin wallet is a software program that facilitates the sending and receiving of bitcoins and gives
ownership of bitcoin balance to the user. Wallets are used to store two types of keys one is a private key
and the other is a public key. Private Key is a long hexadecimal code of 64 bit known only to the owner
of Bitcoin wallet; it is used to sign transactions to spend the money. A public key is another hexadecimal
code that is derived from a private key, it acts as the bitcoin address which is visible to everyone in the
Bitcoin network, and it also helps to receive bitcoins. To safely transfer bitcoin there is a requirement of
digital signature. Each message uniquely derives a digital signature Private Key and the message helps to
generate a digital signature whereas public key, message, and signature help to verify the signature since
the public key and private key are linked to each other. If Alice wants to send 5 bitcoin to Bob so she has
to mention Bob's public key as a sent to address, amount, and put signature using her private key. Bob
can check that if the message is coming from Alice only he can verify the signature on the message using
Alice's public key.
Bitcoin wallets are of several types some of them are-:
1) Desktop Wallet – These are installed on our computer. With a desktop wallet, we are in total control
of our coins and their security. It requires a malware-free computer system.
6. 2) Mobile Wallet – As its name suggests this type of wallet is stored on our mobile. These wallets are
useful for quickly transacting small amounts of bitcoin on the go. These are highly convenient and
portable but they are less secure.
3) Web Wallet – Bitcoin transaction through a web browser. If we use a web wallet we are dependent on
the online service provider. These are the least secure.
4) Paper Wallet – A paper wallet consists of both private key and public key in a printed form on
whatever material we decide to print on.
5) Hardware Wallet – Hardware wallet involves the physical storage of a private key on hardware. Like
on a pen drive or hard drive. These are also secure only if they are not lost.
1.2.2 Blockchain
Blockchain is a distributed public ledger of transactions stored as an immutable block that is connected
hence forming a chain. Each block contains a cryptographic hash of the previous block, timestamp,
transaction data, difficulty, and the hash of the current block. Each block contains on average more than
500 transactions. The size of a block is around 1MB.
FIG 1.2 Blockchain
1.2.2.1 Cryptographic Hashing
7. Cryptographic Hashing comes under hashing which maps input data of arbitrary length into data of fixed
size output. Bitcoin uses the Secure Hash Algorithm SHA256. SHA256 output a fixed length.
. There are certain properties of cryptographic hash function-:
1- No matter how many times we pass a particular string through the hash function it will give the same
set of strings all the time.
2- A good hash function should be easy to compute and give a quick hash of the input string 3- It must be
infeasible to find the input of the current hash output.If H(A) is hash so it should be infeasible to find A.
4- Small change in input would result in a different hash.
5- Given two inputs A and B.So it is infeasible for H (A) to be equal to H (B) (Collision Resistant).
1.2.2.2 Mining
Mining involves adding bitcoin transactions to the public ledger by solving a mathematical problem.
Miners on the blockchain are nodes that add the block to the blockchain by solving the proof of work
problem. Miners not only add a block to the blockchain but also verify the block and the transaction.
They also maintain the public ledger. Several transactions are going on around the world, several miners
try to add their block in the blockchain for that they need to have high computation power to get their
block to be added to the blockchain. For mining miners receive a reward whenever they solve a
mathematical problem.
8. CHAPTER 2
2.1 How coins are created with the help of a transaction process
If Alice wants to send 5 bitcoin to Bob, she has to mention Bob's public key, amounts to be transferred,
and put signature using her private key. This message of transferring from Alice to Bob will broadcast to
the whole Bitcoin network where miners will verify the transaction is valid by checking if Alice has a
specified amount of bitcoin by going through her previous records or by checking her signature using
public. Transactions are then bundled into blocks. Miners try to add the block to the blockchain by
solving the proof of work problem. If a miner successfully added a block to the blockchain then that
miner will receive a reward. After this whole process, Bob can claim his 5 bitcoin. In Bitcoin, reward
money keeps halving every 4 years beginning from 50 BTC in 2009 and today in 2020 it is 6.25 BTC.
This is how coins are created in Bitcoin. In brief, miners are the one who helps to create coins in
Bitcoin by receiving a reward.
2.2.1 Proof of Work
A proof of work is an algorithm that is costly and time-consuming to produce a piece of data. With PoW
miners compete against each other to get their block added to the blockchain and get rewarded. Since
miners compete against each other they need to have good computing power to win the reward first. For
receiving a reward, miners should prove that they did a certain amount of work. Miners have to show
proof of their work and they do it by solving a mathematical problem. What miners had to do, they have
to find a hash of the candidate block (the block which miners are trying to add in the blockchain is called
a candidate block) such that the hash must be less than or equal to the target hash. This is done by
combining the hash of the previous block and a nonce to produce a hash using Secure Hashing
Algorithm SHA256. The mathematical puzzle that miners solve is to identify the value of the nonce. A
nonce is a 32-bit number that can only be known by guessing. Since the hash of the previous block will
always remain the same so therefore we have to change nonce.
2.2.2 SHA256
SHA256 or Secure Hash Algorithm is a cryptographic hash function with the output hash of size 256
bits (combination of 1's and 0's). It can take a maximum input size of up to 2^64 bit (2.3 billion
gigabytes). It was designed by National Security Agency to keep data secure.
9. FIG 2.1 Proof of Work
2.2.3 Target
Target is a 256-bit long string that is shared by the entire Bitcoin network. This value decided the
difficulty of finding the solution to the proof of work problem. The solution must be less than or equal to
the target hash. As the target decreases, difficulty increases. The difficulty is adjusted after every 2016
blocks are successfully added to the Blockchain and on average each block is mined every 10 minutes.
Hence 2016 blocks take around 2 weeks. The actual time to create the current 2016 blocks is compared
to the last 2016 block and accordingly, the target is adjusted. If the current 2016 blocks took less time
than the time taken by the last 2016 blocks this means then it was easy for miners to mine Bitcoin so the
target is reduced and difficulty increases. Target determines how many zeros are there at the beginning of
the hash. Take an example if there are numbers from 1 to 100 and we have to find a number less than 100
10. we take 1 minute but if we had to find a number less than 50 it will take 2 minutes but if the target is
again reduced to 20 then it would take 5 minutes. Hence target decreases difficulty increases. Similarly,
there is a variation in finding the target hash Finding the target hash beginning with one 0 will be easy
but finding the hash with two 0's will be difficult, and so on, as the number of zeros increases in the
target hash difficulty increase.
2.2.4 Difficulty
The difficulty is the mechanisms used by Bitcoin to maintain the rate of creation of new blocks even as
more miners join the network i.e. creation of new blocks every 10 minutes
New difficulty= Old difficulty*(expected time to mine 2016 blocks in milliseconds) / (Actual time taken
to mine 2016 blocks in milliseconds)
The expected time to mine a block is equal to 2016*10 minutes
If the actual time taken by the last 2016 block is less than 10 minutes difficulty will increase else if the
actual time taken by the last 2016 blocks greater than 10 minutes then difficulty decreases.
11. CHAPTER 3
3.1 Legality of Bitcoin
The legal status of Bitcoin varies from state to state and is still undefined and keeps changing in many of
them. The majority of countries do not use Bitcoin for trade, while some countries follow certain rules
for the implementation of Bitcoin. While some states have explicitly allowed its use and trade others
have banned and restricted it. There some other countries where cryptocurrency is not banned but still
people don't use it. In India government banned all cryptocurrencies in 2018 but later in February 2020
government lifted the ban.
3.2 Advantages and Disadvantages
Advantages
1) No restrictions on Payment – There is freedom of payment, as there is no involvement of the
government. We can trade any amount of money without having restrictions
2) Maintenance of Anonymity – All the addresses in Bitcoin do not reveal the true owner of bitcoin. It
protects from identity theft.
3) No Third-Party Involvement – Cryptocurrencies are also popular because there is no third-party
involvement or approval is required. It removes delays in payments.
4) Free or Very Less Transaction – Most cryptocurrency transactions are normally a fee. Anyone can
exchange without paying any exchange fees which is very beneficial compared to the banking system.
But some of them also offer transaction fees.
5) Speed of Exchange – In banks we have to stand in line just to get our money, what if we realize we
need money but it's a bank holiday. That's not what we have to worry about as cryptocurrencies offer
very fast transactions.
6) Transparency – With blockchain, all finalized transactions are available for everyone to see,
however, personal information is hidden. Your public address is visible to everyone; your personal
information is not tied with it.
12. Disadvantages
1) Lack of Knowledge – People are still unaware that digital coins like Bitcoin still exist. People need to
be educated about Bitcoin.
2) Victim of Theft and Scam – People still find it difficult to use cryptocurrency or how it works, so
they often become victims of theft and scam by letting other people keep a record of their transactions.
3) Not Acceptable worldwide – Though cryptocurrencies are famous and rising each passing day.
Some countries around the globe have still not accepted and legalized the use of cryptocurrencies, so it
might be difficult to trade across the world.
4) Not able to reverse payments – Once you have sent the money you cannot reverse it. If you have
sent money to someone else mistakenly and the person is not ready to reverse it then you can do nothing
about it.
5) Its price fluctuates too much – Since all the cryptocurrencies are based on supply and demand
therefore its price keeps on changing like today.
6) May not be exchanged with fiat currency – Due to price fluctuation, it is difficult for companies to
exchange bitcoins instead of fiat currency. On one day prices are too high then the company had to pay a
huge amount of fiat currency in exchange for bitcoins, and then the company had to suffer a huge loss.
7) Black Market – As personal identity isn't shown anywhere, anonymity can give rise to the black
market. There was a marketplace Silk Road which used Bitcoin, facilitating illegal drug purchases and
other illicit activities before it was shut down in 2014.
3.3 Conclusion
Thus we understood the concept of cryptocurrency by understanding the first cryptocurrency, Bitcoin.
We acquainted ourselves with the concept of Bitcoin mining and how coins are created. We understood
the technology behind Bitcoin i.e. Blockchain. Blockchain was first implemented in Bitcoin and today it
is conquering the industry level which demands an increasing degree of trust and privacy protection and
how it uses proof of work algorithm to solve the problem. The question is will cryptocurrency work as a
medium of exchange in the future. Bitcoin may replace the existing forms of currencies in the future.
Bitcoin can be used as a reliable alternative for fast cashless payments. The low transaction fee and
instant availability of Bitcoins may attract the merchants. It may cease the foreign exchange policy as it
will be accepted worldwide.