You are on page 1of 26

A SEMINAR REPORT ON

CRYPTOCURRENCY

Submitted in partial fulfillment of the requirements for the award of


the
degree of
BACHELOR OF TECHNOLOGY

In

COMPUTER SCIENCE AND ENGINEERING

Submitted by

KOTA AKHIL
18U91A0543

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING

SRI MITTAPALLI COLLEGE OF ENGINEERING

(APPROVED BY AICTE, AFFILIATED TO JNTUK, KAKINADA)

NH-16, TUMMALAPALEM, GUNTUR – 522233

2021-2022
SRI MITTAPALLI COLLEGE OF ENGINEERING
DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING
THUMMALAPALEM, NH-16
GUNTUR – 522233

CERTIFICATE
This is to certify that seminar entitled “Cryptocurrency” is being
submitted by KOTA AKHIL(18U91A0543) for the partial fulfilment for
the award of the degree of Bachelor of Technology in the Computer
Science and Engineering of Jawaharlal Technological University,
Kakinada during the year 2021-2022

Internal Examiner Head of theDepartment


T.Venkateswarlu M.Tech,Ph.D Dr. S Gopi Krishna M.Tech,Ph.D
Asst.Professor Professor
Contents
1 Introduction

1.1. Blockchain 2
1.2. Merkle Patricia Tree 3
1.3. The Process of Mining 4
1.4. Hash Algorithms 4
1.4.1 Bitcoin uses Hashcash(the algorithm used in SHA 256): 4
1.4.2 Ethereum uses EtHash: 5
1.4.3 Litecoin uses Scrypt: 5

2 Literature Survey

3 Algorithms

3.1 Hash Algorithms 7


3.1.1 SHA256: 7
3.1.2 EtHash: 8
3.1.3 Scrypt 9

4 Advantages/Disadvantages

4.1 Bitcoin: 11
4.1.1 Advantages 11
4.1.2 Disadvantages 12
4.2 Ethereum: 14
4.2.1 Advantages 14
4.2.2 Disadvantages 16
4.3 Litecoin: 16
4.3.1 Advantages 16
4.3.2 Disadvantages 17
5 Applications

6 Conclusion

7 References
List of Figures
1.1 Blockchain Diagram 2
3.1 Flowchart for the working of SHA256 7
3.2 Flowchart for the working of Ethash 8
3.3 Flowchart for the working of Scrypt 9

5.1 Applications of cryptocurrencies 18


ABSTRACT
Cryptocurrencies have emerged as an important financial software system. These
cryptocurrencies are generated by a process called mining. Mining is an integral process
that not only creates the currency but also, adds records of past transactions to the
distributed ledger known as blockchain. The use of blockchain and cryptography, enables
security in the environment and makes it robust in nature. Since, cryptocurrencies are
designed using a peer-to-peer system, they aren’t centrally owned by anyone. The peer-to-
peer version allows the digital signature to be a part of the solution, this reduces the need
for third party authentication. For the mining of such digital currency, we have to rely on
miners to validate the currency and its creation. For the proof of work each network
timestamps the transactions that occur by hashing them into an ongoing chain of hash-
based proof-of-work, forming a record that cannot be changes without re-doing the proof of
work. The longest chain serves as proof of the fact that it came from the largest pool of CPU
power. As long as majority of the CPU power is controlled by nodes that do not co-operate
with the attack network, it will generate a large chain that will space out all hackers and
attackers. Here we discuss the dierent mining processes for a variety of cryptocurrencies.
The importance of blockchain and its use in securing the environment, along with the
various hardware issues that miners may face are discussed. The strengths and weaknesses

of using various cryptocurrencies are outlined.

1
Chapter 1

Introduction
Cryptocurrency is a digital or virtual currency, its money balance record is stored
electronically. The concept of digital currency existed as early as 1983, but its first practical
use was made in 1990 when David Chaum founded DigiCash, an electronic cash company. In
between 1990 and 2008 there were companies like Paypal and eGold that used the concept
of digital currencies. But it was not until 2009 that virtual currencies were recognised
globally. In 2009, Satoshi Nakamoto (possibly an alias) designed a cryptocurrency called
Bitcoin which began an evolution in the field of digital currency. Bitcoin was the first
decentralized currency. Cryptocurriences are a peer-to-peer digital exchange system where
cryptography is used to generate and distribute currency units. To avoid any central
authority, this process requires distributed verication of transactions. This can be done by a
process called mining. Mining is a process where we ensure that the payer has the currency
that they are trying to spent, also to ensure that the currency is not spent twice. Various
cryptocurrencies are created to satisfy various purposes, for example some cryptocurrencies
focus on restricting the number of transactions that are validated per unit time, while others
focus on achieving fast, lightweight services. We shall be surveying or comparing three
dierent cryptocurrency systems i.e. bitcoin, ethereum and litecoin. A cryptocurrency is
formed by a process called mining, this process involves verification and validation of
information. Once the verification and validation of information is completed a new block is
added to a chain called the blockchain. A blockchain is a distributed public ledger that is
basically used for maintaining the integrity of decentralised cryptocurrency. This blockchain
is stored in the data structure called Merkle Particia tree. The concept of mining, blockchain
and Merkle Particia are explained in brief below.

1.1 Blockchain:
Each veried transaction is put together or accumulated in a block, this block is also known as
blockchain. A blockchain is a ledger that is public and each cryptocurrency has its own public
ledger. The maximum size of a block diers from cryptocurrency to cryptocurrency. But each

2
cryptocurrency has its own upper bound for each block. For example, the maximum size of a
bitcoin block is 1MB. Bitcoin and Litecoin consists of ve elds in its block, namely:

1. Magic number
2. Block size
3. Block header
4. Transaction counter
5. Transactions

6.
7. Figure 1.1: Blockchain Diagram

1.2 Merkle Patricia Tree:


A hash tree or Merkle tree is a tree in which every leaf node is labelled with the hash of a
data block and every non-leaf node is labelled with the cryptographic hash of the labels of
its child nodes. Hash trees allow ecient and secure verication of the contents of large data
structures. Hash trees are a generalization of hash lists and hash chains. Merkle Patricia tree
is used to verify the integrity of transactions within a block. Transactions are hashed and
concatenated repeatedly until one hash is left, i.e., Merkle root. Merkle root is a single hash
combines all transactions included in a block, it is kept in the block header and used by SPV
clients to verify transactions without the need to download the whole blockchain .

The MPT is a hashes of hashes and has the following functions:

(1) storing key-value key-value data of any length

(2) providing a mechanism for quickly calculating the hash of the maintenance data set

3
(3) providing a fast state the rolling mechanism

(4) providing a method called proof Merkel proof

(5) lightweight expanded node (6) simple payment verification

1.3 The Process of Mining:


Almost all the cryptocurrencies i.e. bitcoin, litecoin, namecoin, peercoin etc, use the
distributed public ledger called Blockchain, which is stored in a data structure called Merkle
Patricia tree. When a payer send some currency to the payee a transaction is created. Once
mining validates the transaction it is added to the public ledger. While a transaction is taking
place a miner will check that the currency belongs to the payer or if the payer is trying to
double spend. Malicious users may create multiple nodes and try to validate an invalid
transaction, since the ownership of the currency is available in the Blockchain. To prevent
such malicious users, miners have to solve a resource intensive task. Resource intensive task
can be any of the following:

1. Proof of Work.

2. Proof of Stake.

3. Proof of Retrievability.

1.4 Hash Algorithms


The three cryptocurrencies in discussion are: bitcoin, ethereum and litecoin all three coins
use dierent hashing algorithms.

1.4.1 Bitcoin uses Hashcash(the algorithm used in SHA 256):


It is a secure hash function which contains six dierent algorithms that produce results of
dierent lengths. SHA 256 produces a result of 256 bits, it also satisfies unidirectional hashes.

4
1.4.2 Ethereum uses EtHash:
This algorithm is exclusive for Ethereum. This algorithm was designed to prevent the
dominance of ASICs over CPUs and GPUs. The verication of correctness for the proof of work
is very fast in this algorithm.

1.4.3 Litecoin uses Scrypt:


It was designed to perform as a key derivation function. It takes an input and then generates
a large vector of pseudo-random bits. This algorithm requires large memory.

5
Chapter 2

Literature Survey
a. Mukhopadhyay, Ujan, et al. A Brief Survey of Cryptocurrency Systems. 2016 14th
Annual Conference on Privacy, Security and Trust (PST), 2016: In this paper, the author
discusses the life cycle of a cryptocurrency. Important aspects like mining, blockchain and
hash algorithms are discussed. Various resource intensive tasks are also discussed, and their
vulnerabilities are listed.

b. Watanabe,Hiroki, et al. Blockchain Contract: A Complete Consensus using Blockchain


, 2015 IEEE 4th Global Conference on Consumer Electronics (GCCE): It discusses the use of a
new technology. The use of blockchain for the validation of smart contracts. This technology
could also be used for recording contracts. An example of such technology is ethereum.

c. Bitcoin: A Peer-to-Peer Electronic Cash System Satoshi Nakamoto : This paper, was
the paper that was written by the creator of bitcoin. It talks of the decentralised system of
cryptocurrencies. It also emphasises on the use of peer- to - peer technology. It explains the
need of blockchain and how that would prevent hackers from attacking and manipulating
the system.

6
Chapter 3

Algorithms
3.1 Hash Algorithms
It is a mathematical algorithm that maps data of arbitrary size to a bit string of a fixed size (a
hash) and is designed to be a one-way function, that is, a function which is infeasible to
invert. The only way to recreate the input data from an ideal cryptographic hash functions
output is to attempt a brute force search of possible inputs to see if they produce a match.

3.1.1 SHA256:
SHA 256 is a set of Secure Hash Functions that has six algorithms, which produce digests
(results) that are of different bit lengths. SHA 256, produces a digest of 256 bits. SHA 256
satisfies the requirement of unidirectional hashes (that is, any change in the input, however
insignificant, leads to a completely different hash, and determining the input from the hash
is practically impossible). Also, the same input will always produce the same digest. SHA 256
pads input to convert its length to a multiple of 512 bits. Then, it divides the input into
blocks of 512 bits each.

The round function of SHA-256 is as follows: The XOR of the following three quantities:

• the fifth word in the block rotated right 6 places

• that word rotated right 11 places

• that word rotated right 25 places

7
Figure 3.1: Flowchart for the working of SHAA256

3.1.2 EtHash:
Ethash is the poof-of-work function in Ethereum-based blockchain currencies. It was
designed to thwart the dominance of ASICs vis a vis CPUs and GPUs. The verification of
correctness of this proof of work is fast, taking .01 seconds for a light client. The general
route that the algorithm takes is as follows:

• There exists a seed which can be computed for each block by scanning through the
block headers up until that point.

• From the seed, one can compute a 16 MB pseudo random cache. Light clients store
the cache.

• From the cache, we can generate a 1 GB data set, with the property that each item in
the data set depends on only a small number of items from the cache. Full clients and
miners store the data set. The data set grows linearly with time.
• Mining involves grabbing random slices of the data set and hashing them together.
Verification can be done with low memory by using the cache to regenerate the specific
pieces of the dataset that you need, so you only need to store the cache.

8
The large data set is updated once every 30000 blocks, so the vast majority of a miner’s
effort will be reading the data set, not making changes to it.

Figure 3.2: Flowchart for the working of Ethash

3.1.3 Scrypt:
Scrypt was designed to be a Key-Derivation Function (KDF). All Key-Derivation Functions are
resource intensive in order to mitigate large-scale custom hardware attacks. Scrypt takes an
input and generates a large vector of pseudo-random bits. Since these vectors are
generated at runtime, the algorithms require large memory. More memory leads to faster
computation. Within the algorithm, there are two functions called Smix and Blockmix.
Blockmix performs permutation operations on the input blocks using binary logic operands
and, in each iteration, the output of the Blockmix is again processed in Smix, which performs
bitwise permutations. Scrypt was modified for the purposes of mining. Since the original
Scrypt uses pseudo-random bits, the outputs of the same input would be different. This
makes it harder to verify. When Scrypt was used for KDF, there was no need for such
verification.

9
Figure 3.3: Flowchart for the working of Scrypt

10
Chapter 4

Advantages/Disadvantages:
4.1 Bitcoin:

4.1.1 Advantages:

• Freedom in Payment
✓ With Bitcoin it is very possible to be able to send and get money anywhere in
the world at any given time
✓ You don’t have to worry about crossing borders, rescheduling for bank
holidays, or any other limitations one might think will occur when
transferring money.
✓ You are in control of your money with Bitcoin. There is no central authority
figure in the Bitcoin network.
• Control and Security
✓ Allowing users to be in control of their transactions help keep Bitcoin
safe for the network.
✓ Merchants cannot charge extra fees on anything without being noticed.
They must talk with the consumer before adding any charges.
✓ Payments in Bitcoin can be made and finalized without ones personal
information being tied to the transactions
✓ Due to the fact that personal information is kept hidden from prying
eyes, Bitcoin protects against identity theft.
✓ Bitcoin can be backed up and encrypted to ensure the safety of your
money.
• Information is Transparent
✓ With the block chain, all finalized transactions are available for everyone
to see, however personal information is hidden.

11
✓ Your public address is what is visible; however, your personal
information is not tied to this.
✓ Anyone at anytime can verify transactions in the Bitcoin block chain.
✓ Bitcoin protocol cannot be manipulated by any person, organization, or
government. This is due to Bitcoin being cryptographically secure.
• Very Low Fees
✓ Currently there are either no fees, or very low fees within Bitcoin
payments.
✓ With transactions, users might include fees in order to process the
transactions faster. The higher the fee, the more priority it gets within
the network and the quicker it gets processed.
✓ Digital Currency exchanges help merchant process transactions by
converting Bitcoins into fiat currency. These services generally have
lower fees than credit cards and PayPal.
• Fewer Risks for Merchants
✓ Due to the fact that Bitcoin transactions cannot be reversed, do not
carry with them personal information, and are secure, merchants are
protected from potential losses that might occur from fraud.
✓ With Bitcoin, merchants are able to do business where crime rates and
fraud rates may be high. This is because it is very hard to cheat or con
anyone in Bitcoin due to the public ledger, otherwise known as the
block chain.

4.1.2 Disadvantages:

• Lack of Awareness Understanding


✓ Fact is many people are still unaware of digital currencies and Bitcoin.
✓ People need to be educated about Bitcoin to be able to apply it to their
lives.
✓ Networking is a must to spread the word on Bitcoin.

12
✓ Businesses are accepting Bitcoins because of the advantages, but the list
is relatively small compared to physical currencies.
✓ Companies like TigerDirect and Overstock accepting Bitcoin as payment
is great. However, if they do not have a knowledgeable staff that
understands digital currencies, how will they help customers understand
and use Bitcoin for transactions?
✓ The workers need to be educated on Bitcoin so that they can help the
customers. This will definitely take some time and effort. Otherwise,
what is the benefit of such large companies accepting Bitcoin if its staff
doesn’t even know what digital currencies are?
• Risk and Volatility
✓ Bitcoin has volatility mainly due to the fact that there is a limited
amount of coins and the demand for them increases by each passing
day.
✓ However, it is expected that the volatility will decrease as more time
goes on.
✓ As more businesses, medias, and trading centers begin to accept Bitcoin,
its price will eventually settle down.
✓ Currently, Bitcoins price bounces everyday mainly due to current events
that are related to digital currencies.
• Still Developing
✓ Bitcoin is still at its infancy stage with incomplete features that are in
development.
✓ To make the digital currency more secure and accessible, new features,
tools, and services are currently being developed.
✓ Bitcoin has some growth to do before it comes to its full and final
potential.
✓ This is because Bitcoin is just starting out, and it needs to work out its
problems just like how any currency in its beginning stage would need
to further development.

13
4.2 Ethereum:
4.2.1 Advantages:

• The Mining process:


The mining process is the first point that stands out to those who prefer Ethereum.
You can mine ethers using graphics processing units (GPUs), also known simply as
graphic cards.
The process is different from Bitcoin mining, which uses the more expensive
customized application-specific integrated circuits (ASICs). Indeed, owing to its ever
growing cost, Bitcoin mining has become the preserve of companies backed by
venture capitalists.
The Ethereum community is considering doing away with the proof-of-work(POW)
consensus-making protocol on which Bitcoin is run. They want to replace it with
proof of stake(POS), which only require users to hold in stake the amount of ether
necessary for mining, instead of requiring people to buy expensive, specialized
hardware and pay for large amounts of electricity.
• Unconstrained block size:
The constrained Bitcoin block size has been a source of contention within the Bitcoin
community. It has led some like Mike Hearn, a former core developer, to declare
Bitcoin a failed experiment.
Satoshi Nakamoto capped the Bitcoin block size at one megabyte to protect the
network from DDOS attacks. However, with growing mass adoption, the safety
measure is turning out to be an obstacle. Furthermore, with no governance
structure, the community is finding it hard to agree on how to scale Bitcoins block
size.
Ethereum doesn’t have a capped block size. Blocks expand and shrink depending on
the need at hand. This opens the cryptocurrency up for mass adoption, with little
need for tweaking
• Faster Transactions:

14
The Ethereum network, on its part, confirms a transaction in about 14 seconds.
Closely related to the block size is the time the network takes to confirm a
transaction. The Bitcoin network takes about ten minutes. Occasionally it might run
into hours. Or even days.
This works against Bitcoins adoption. The delays especially make it inconvenient as a
payment method. Users don’t want to wait longer at checkout for the network to
confirm a transaction, just so they can purchase a bottle of soda. The Ethereum
network, on its part, confirms a transaction in about 14 seconds. This makes the
ether a more convenient method of payment.
• More applications accommodated:
Ethereum founder, Vitalik Buterin, designed the platform with many of Bitcoin
limitations in mind. In one post, he said Bitcoin was intended to be a simple mail
transfer protocol (SMTP) for digital value. He wrote: It’s a protocol that is very good
at one particular task. It is good for moving money, but it was not designed as a
foundational layer for any kind of protocols to be built on top.
Instead of being just a virtual currency, Ethereum is a virtual machine on which you
can run various applications. Making this possible is its feature of being Turing
complete, which gives it unlimited resources to accommodate the execution of
infinite loops. Indeed, Vitalik has in the past said that Ethereum does not have
features; it just has a programming language.
• Lighter to run:
Ethereum blockchain is lighter than Bitcoins. This is not because the former is
younger than the latter, but because Bitcoins blockchain is growing by approximately
three gigabytes per month, while Ethereum averages one gigabyte in the same
period.
Keeping the transactional history of Ethereum on your desktop will always be easier
than storing Bitcoins history. This is especially important when you consider that
cryptocurrencies are supposed to be decentralized and free from control by
gatekeepers.
The bulkiness of Bitcoin makes it hard for everyone to be part of the network. Only
those with enough resources can take part in the system that maintains and secures
the services, and this leads to the problem of centralization.

15
Indeed, Ethereum is full of features that will never be implemented on the Bitcoin
blockchain. It has the potential to give users a wide range of experiences beyond
what Bitcoin offers.

4.2.2 Disadvantages:
Ethereum also has its downsides. One is security risk. This has already been witnessed with
the theft in June of close to USD 60 million from the DAO, the first decentralized anonymous
organization to be built on the Ethereum blockchain. Ethereum also has its downsides. One
is security risk. Ethereum also has features that make it weaker than Bitcoin. For one
example, Bitcoin is deflationary, meaning the highest number of Bitcoins that will ever be
placed in circulation is capped at 21 million. Ether, on the other hand, is inflationary,
meaning it can have an infinite supply.

4.3 Litecoin:

4.3.1 Advantages:
• Faster transaction times
• Less expensive transactions
• First to successfully implement Lightning network for instant, zero-fee transactions
• First to complete a cross-chain atomic swap (with Decred)
• In the process of adding confidential transactions
• Faster to adopt new technology, without community infighting over upgrades

There will be 4x as many Litecoin produced than Bitcoins. As Bitcoin’s limit is set to 21
million and Litecoin’s is set to 84 million. So the coins should be cheaper, more
widespread and easier to acquire.

In order to create Litecoin you need a computer with a powerful graphics card (GPU) not
just faster processing chips (which is the way with Bitcoins), this is because the
algorithms used to create Litecoin are more memory intensive than processor intensive.
What this means is that instead of a few people with specialist computers mining the

16
coins, Litecoin can be mined by a wider base of users, for example a PC built for gaming
would be perfect for mining Litecoin.

The time it takes to officially confirm a Bitcoin transaction has taken place is 10 minutes,
and for a Litecoin it’s just 2 and a half minutes, meaning purchases online or in stores
can be performed much faster.

4.3.2 Disadvantages:
• Currently very few stores accept payment in Litecoin, though this is changing by the
day.
• Litecoin is still relatively unknown compared to Bitcoin. This is mainly due to there
being no central Litecoin authority.
• The largest virtual currency trading websites still don’t support Litecoin. Though this
should change in the near future.

17
Chapter 5

Applications:
Cryptocurrency is a form of digital money that is designed to be secure and, in many cases,
anonymous. It is a currency associated with the internet that uses cryptography, the process
of converting legible information into an almost uncrackable code, to track purchases and
transfers. Cryptography was born out of the need for secure communication in the Second
World War. It has evolved in the digital era with elements of mathematical theory and
computer science to become a way to secure communications, information and money
online.

It has various applications:

• Payments can be performed with ease, money can be transferred hassle free without
any losses.
• Inter-company transactions can be easily performed.
• Cryptocurrencies like Ethereum can be used for keeping track of contracts, it has a
system called smart contracts which can keep track of and validate contracts.
• Faster international transactions, which are free of cost.

18
Figure 5.1: Applications of Cryptocurrencies

19
Chapter 6

Conclusion and Future Scope


6.1 Conclusion
Thus we understood the working of cryptocurrencies, the various domains it can be used in
other than as an alternative payment. We also acquainted ourselves with the concept of
mining and how a currency is formed. We understood the various security issues and how
implementation of blockchain prevents malicious users from using the system in their
advantage. We finally understood the various hashing algorithms and the resource intensive
tasks.

6.2 Future Scope

• Cryptocurrencies could be widely used in the domain of smart contracts.


• It could also become a recognized currency which could later be used for free
transactions.
• With the introduction of cryptocurrencies like Dash and Zcash, which use anonymity
in blockchain, the use of cryptocurrency may see and increase.

20
References
[1] Mukhopadhyay, Ujan, et al. A Brief Survey of Cryptocurrency Systems. 2016 14th Annual
Conference on Privacy, Security and Trust (PST), 2016

[2] Watanabe,Hiroki, et al. Blockchain Contract: A Complete Consensus using Blockchain ,


2015 IEEE 4th Global Conference on Consumer Electronics (GCCE)

[3] Bitcoin: A Peer-to-Peer Electronic Cash System Satoshi Nakamoto

[4] Understanding the Ethereum Trie. Easy There Entropy, 27 Aug. 2015,
easythereentropy.wordpress.com/2014/06/04/understanding-the-ethereumtrie/.

[5] MerklePatriciaTree-Steemit.-Steemit,Nadifsd,1Oct.2017,
steemit.com/cryptocurrency/@nadifsd/merkle-patricia-tree.

[6] Ethereum/WikiGitHub,Dwardu, 19 Dec. 2017,


github.com/ethereum/wiki/wiki/Problems.

[7] 1 And SHA-256. Description of SHA, quadibloc.com/crypto/mi060501.htm.

21

You might also like