Professional Documents
Culture Documents
A PROJECT REPORT
Submitted in partial fulfillment of the requirements for the award of the degree of
Bachelor of Technology
in
BY
P. Manasa Komali M. Sethu Pavan
(Roll No: 15331A05B4) (Roll No: 15331A05A5)
M. Naveen Kumar L. Sudheer
(Roll No: 15331A0589) (Roll No: 15331A0584)
A PROJECT REPORT
Submitted in partial fulfillment of the requirements for the award of the degree of
Bachelor of Technology
in
BY
P. Manasa Komali M. Sethu Pavan
(Roll No: 15331A05B4) (Roll No: 15331A05A5)
M. Naveen Kumar L. Sudheer
(Roll No: 15331A0589) (Roll No: 15331A0584)
External Examiner
ACKNOWLEDGEMENTS
I owe a great lot of thanks to many people who have helped me and supported me during the
course of my project.
I am very grateful to our beloved HOD Dr. M. Kalyan Chakaravarthi, Professor and my
guide Dr.P. Sateesh , Associate Professor who spent a lot of their precious time with me on
my work in spite of being very busy with the academic works of the department, for their
background knowledge and patience in the completion of my project. I extend my sincere
thanks for their esteemed guidance and support during the entire project. Their constant
encouragement and suggestions helped me a lot. I have whole heartedly enjoyed the
challenge of examining and researching a controversial issue that might make an impact on
the Design instead of performing another educational study.
I am grateful to Adil Moujahid for implementation of blockchain using python with the
reference of the application we have implemented our project.
I am grateful to our beloved Dr. K. V. L. Raju, Principal, for giving me access to all the
facilities in the college at any odd hour.
I thank my parents for their great support during the whole work of my project.
I am also thankful to Dr. N. Aruna kumari, Associate professor for his guidance and help
by contributing us blockchain technology in health care which is the heart of the project.
I am also thankful to P.K.Santosh Naidu, professor who helped me and gave valuable
suggestions in order to accomplish smooth running of my project.
I also thank all the other faculty and support staff of the Computer Science Department
who have helped me in doing work with ease and perfection.
ABSTRACT
Acknowledgement
Abstract
Table of contents
Page No
List of Abbreviations i
List of Tables ii
List of Figures iii
1. Introduction
1.1 About Block Chain 1
1.2 History of Blockchain
1.3 Structure
1.4 Decentralization
1.5 Uses
1.6 Types of Blockchain
2. Literature Survey
3. Theoretical Background
3.1Blockchain
3.1.1 Introduction
3.1.2 Double Spending Problem
3.1.3 A Decentralized solution for Double spending problem
3.1.4 Public key Cryptography
3.2 Uses of Blockchain for health data
3.3 Health care industry on security
References
Appendix A
List of Abbreviations
1.1About Blockchain:
Blockchain was invented by a person using the name Satoshi Nakamoto in 2008 to serve as
the public transaction ledger of the cryptocurrency bitcoin. The identity of Satoshi Nakamoto
is unknown. The invention of the blockchain for bitcoin made it the first digital currency to
solve the double-spending problem without the need of a trusted authority or central server.
The bitcoin design has inspired other applications,and blockchains which are readable by the
public are widely used by cryptocurrencies. Blockchain is considered a type of payment
rail.Private blockchains have been proposed for business use.
In August 2014, the bitcoin blockchain file size, containing records of all transactions that
have occurred on the network, reached 20 GB (gigabytes). In January 2015, the size had
grown to almost 30 GB, and from January 2016 to January 2017, the bitcoin blockchain grew
from 50 GB to 100 GB in size.
The words block and chain were used separately in Satoshi Nakamoto's original paper, but
were eventually popularized as a single word, blockchain, by 2016.
Smart contracts which run on a blockchain, for example ones which "create invoices that pay
themselves when a shipment arrives or share certificates which automatically send their
owners dividends if profits reach a certain level." require an off-chain oracle to access any
"external data or events based on time or market conditions that need to interact with the
blockchain."
IBM opened a blockchain innovation research center in Singapore in July 2016. A working
group for the World Economic Forum met in November 2016 to discuss the development of
governance models related to blockchain.
1.3 Structure:
A blockchain is a decentralized, distributed and public digital ledger that is
used to record transactions across many computers so that any involved record cannot be
altered retroactively, without the alteration of all subsequent blocks.This allows the
participants to verify and audit transactions independently and relatively inexpensively. A
blockchain database is managed autonomously using a peer-to-peer network and a distributed
timestamping server.
1.4 Decentralization:
1.5Uses:
Blockchain technology can be integrated into multiple areas. The primary use
of blockchains today is as a distributed ledger for cryptocurrencies, most notably bitcoin.
There are a few operational products maturing from proof of concept by late 2016.
Cryptocurrencies
Smart contracts
Financial Services
Banks are interested in this technology because it has potential to speed up back office
settlement systems.
Banks such as UBS are opening new research labs dedicated to blockchain technology in
order to explore how blockchain can be used in financial services to increase efficiency and
reduce costs.
Berenberg, a German bank, believes that blockchain is an "overhyped technology" that has
had a large number of "proofs of concept", but still has major challenges, and very few
success stories.
Some video games are based on blockchain technology. The first such game, Huntercoin, was
released in February, 2014.Another blockchain game is CryptoKitties, launched in November
2017. The game made headlines in December 2017 when a cryptokitty character - an-in game
virtual pet - was sold for US$100,000. CryptoKitties illustrated scalability problems for
games on Ethereum when it created significant congestion on the Ethereum network with
about 30% of all Ethereum transactions being for the game
Cryptokitties also demonstrated how blockchains can be used to catalog game assets (digital
assets).
The Blockchain Game Alliance was formed in September 2018 to explore alternative uses of
blockchains in video gaming with support of Ubisoft and Fig, among others.
Other uses
Blockchain technology can be used to create a permanent, public, transparent ledger system
for compiling data on sales, tracking digital use and payments to content creators, such as
wireless users or musicians. In 2017, IBM partnered with ASCAP and PRS for Music to
adopt blockchain technology in music distribution. Imogen Heap's Mycelia service has also
been proposed as blockchain-based alternative "that gives artists more control over how their
songs and associated data circulate among fans and other musicians." Everledger is one of the
inaugural clients of IBM's blockchain-based tracking service.
Walmart and IBM are running a trial to use a blockchain-backed system for supply chain
monitoring — all nodes of the blockchain are administered by Walmart and are located on the
IBM cloud.
New distribution methods are available for the insurance industry such as peer-to-peer
insurance, parametric insurance and microinsurance following the adoption of blockchain.The
sharing economy and IoT are also set to benefit from blockchains because they involve many
collaborating peers. Online voting is another application of the blockchain.
Proof of Existence is an online service that verifies the existence of computer files as
of a specific time
1.6 Types of blockchains:
Currently, there are three types of blockchain networks — public blockchains, private
blockchains and consortium blockchains.
Public blockchains
A public blockchain has absolutely no access restrictions. Anyone with an internet connection
can send transactions to it as well as become a validator (i.e., participate in the execution of a
consensus protocol).[84][self-published source?] Usually, such networks offer economic
incentives for those who secure them and utilize some type of a Proof of Stake or Proof of
Work algorithm.
Some of the largest, most known public blockchains are Bitcoin and Ethereum.
Private blockchains
A private blockchain is permissioned.[42] One cannot join it unless invited by the network
administrators. Participant and validator access is restricted.
This type of blockchains can be considered a middle-ground for companies that are interested
in the blockchain technology in general but are not comfortable with a level of control offered
by public networks. Typically, they seek to incorporate blockchain into their accounting and
record-keeping procedures without sacrificing autonomy and running the risk of exposing
sensitive data to the public internet.
Consortium blockchains
TITLE OF PAPER:
Blockchain Technology in Healthcare By.Matthias Mettler. M.A.HSG
Abstract:
A decentralized database which is consistently held up to date presents many
advantages to the healthcare industry.These advantages become especially interesting, when
many different parties need access to the same information.The Gem Health Network based
on the Ethereum Blockchain technology . Through this shared network infrastructure,
different healthcare specialists can access the same information. The Gem Health Network
represents a healthcare ecosystem that combines both businesses, individuals and experts and
which, at the same time, improve patient-centered care while address operational efficiency
issues.
TITLE OF PAPER:
A Peer-to-peer Electronic cash system by Satoshi Nakamoto
Abstract:
A purely peer-to-peer version of electronic cash would allow online
payments to be sent directly from one party to another without going through a financial
institution. Digital signatures provide part of the solution, but the main benefits are lost if a
trusted third party is still required to prevent double-spending. We propose a solution to the
double-spending problem using a peer-to-peer network. The network timestamps transactions
by hashing them into an ongoing chain of hash-based proof-of-work, forming a record that
cannot be changed without redoing the proof-of-work. The longest chain not only serves as
proof of the sequence of events witnessed, but proof that it came from the largest pool of CPU
power. As long as a majority of CPU power is controlled by nodes that are not cooperating to
attack the network, they'll generate the longest chain and outpace attackers. The network itself
requires minimal structure. Messages are broadcast on a best effort basis, and nodes can leave
and rejoin the network at will, accepting the longest proof-of-work chain as proof of what
happened while they were gone.
TITLE OF PAPER:
MedRec:- Using Blockchain for Medical Data Access and Permission Management
Abstract:
Years of heavy regulation and bureaucratic inef-ficiency have slowed innovation for
electronic medical records(EMRs). In this paper, we propose MedRec: a novel, decentralized
record management system to handle EMRs, using blockchain technology. Our system gives
patients a
comprehensive, immutable log and easy access to their medical
information across providers and treatment sites. Leveraging unique blockchain properties,
MedRec manages authentication, confidentiality, accountability and data sharing– crucial
considerations when handling sensitive information. We incentivize medical stakeholders
(researchers, public health authorities, etc.) to participate in the network as blockchain
“miners”. This provides them with access to aggregate, anonymized data as mining rewards,
in return for sustaining and securing the network via Proof of Work.
TITLE OF PAPER:
Blockchain Solutions for Big Data Challenges
Abstract:
This paper describes our blockchain architecture as a new system solution to supply a
reliable mechanism for secure and efficient medical record exchanges. The Advanced Block-
Chain (ABC) approach was designed to meet the demands in healthcare growth as well as in
the new form of social interactive norms. It is going to revolutionize the e-
Health industry with greater efficiency by eliminating many of
the intermediates as we know them today.
Problem Definition:
Decentralized electronic health record(EHR) system which manages authentication,
confidentiality, accountability and data sharing using blockchain technology.
Source of data:
Inputs:- Patient details,Patient reports,Doctors details,Hospital details.
Outputs:- A decentralized Electronic Health record with contains all the details of
patients and their diseases.
3. Theoritical Background
3.1 Blockchain
3.1.1.Introduction:
In the original Bitcoin white paper, Satoshi described how to build a peer-to-peer electronic
cash system that allows online payments to be sent directly from one party to another without
going through a centralized institution. This system solves an important problem in digital
money called double-spending.
3.1.2 Double Spending Problem:
Suppose that Alice wants to pay Bob 1$. If Alice and Bob use physical cash, then Alice will
not longer have the 1$ after the transaction is executed. If Alice and Bob use digital money,
then the problem gets more complicated. Digital money is in digital form and can be easily
duplicated. If Alice sends a digital file worth 1$ to Bob by email for example, Bob cannot
know for sure if Alice has deleted her copy of the file. If Alice still has the 1$ digital file, then
she can choose to spend the same file to Carol. This problem is called double-spending.
management are two great examples of principal concepts influencing and being impacted by
possible blockchain adoption. Let’s take a brief look at each one:
Healthcare: Better data sharing between healthcare providers means a higher
probabaility of accurate diagnoses, more effective treatments, and the overall
increased ability of healthcare organizations to deliver cost-effective care. Blockchain
technology can allow various stakeholders in the healthcare value-chain to share
access to their networks without compromising data security and integrity, by
allowing them to track data provenance as well as any changes made.
Supply Chain Management: One of the most universally appilicable aspects of
blockchain technology is that it enables more secure and transparent monitoring of
transactions. With blockchain, the transactions can be documented in a permanent
decentralized record reducing time delays, added costs and human errors.
Data managed by medical organizations includes:
Since blockchain are cryptographically secure and the data present there can be authenticated
using digital signature that are unique to each person, this technology could be the answer to
most of these concerns.
4. Design and Implementaion (Methods/Techniques):
All Bitcoin transactions are grouped in files called blocks. Bitcoin adds a new block of
transactions every 10 minutes. Once a new block is added to the blockchain, it becomes
immutable and can't be deleted or modified. A special group of participants in the network
called miners (computers connected to the blockchain) are responsible for creating new
blocks of transactions. A miner has to authenticate each transaction using the sender's public
key, confirm that the sender has enough balance for the requested transaction, and add the
transaction to the block. Miners are completely free to choose which transactions to include in
the blocks, therefore the senders need to include a transaction fee to incentivise the miners to
add their transactions to the blocks.
For a block to be accepted by the blockchain, it needs to be "mined". To mine a block, miners
need to find an extremely rare solution to a cryptographic puzzle. If a mined block is accepted
by the blockchain, the miner receive a reward in bitcoins which is an additional incentive to
transaction fees. The mining process is also referred to as Proof of Work (PoW), and it's the
main mechanism that enables the blockchain to be trustless and secure.
To understand the blockchain's cryptographic puzzle, we need to start with hash functions. A
hash function is any function that can be used to map data of arbitrary size to data of fixed
size. The values returned by a hash function are called hashes. Hash functions are usually
used to accelerate database lookup by detecting duplicated records, and they are also widely
used in cryptography. A cryptographic hash function allows one to easily verify that some
input data maps to a given hash value, but if the input data is unknown, it is deliberately
Difficult to reconstruct it by knowing the stored hash value.
Bitcoins uses a cryptographic hash function called SHA-256. SHA-256 is applied to a
combination of the block's data (bitcoin transactions) and a number called nonce. By changing
the block data or the nonce, we get completely different hashes. For a block to be considered
valid or "mined", the hash value of the block and the nonce needs to meet a certain condition.
For example, the four leading digits of the hash needs to be equal to "0000". We can increase
the mining complexity by making the condition more complex, for example we can increase
the number of 0s that the hash value needs to start with.
Block Structure:
Index: The height of the block in the blockchain.
Data: Any data that is included in the block.
Time stamp: A time stamp.
Hash: A SHA-256 hash taken from the content of the block.
Previous hash: A reference to the hash of the previous block. This value explicity
defines the previous block.
The hash is calculated over all data of the block.This menas that if anything in the
block changes ,the original hash is no longer valid.
The blockchain can also be thoigh as the unique identifier of the block. For instance
blocks with same index can apper biut they all have unique hashes.
1) Generating a Block:
To generate a block we must know the hash of the previous block and create
the rest i.e; index,hash,data and time stamp.
The main block that is the first block does not contain any previous hash key.
The index of the block must be one number larger than the previous hash.
The previous hash of the block match the hash of the prev block.
3) Storing a block:
4.3.1General description:
SHA-256 (secure hash algorithm, FIPS 182-2) is a cryptographic hash function with digest
length of 256 bits. It is a keyless hash function; that is, an MDC (Manipulation Detection
Code).
Each of them operates on 32-bit words. For the last operation, binary words are interpreted as
integers written in base 2.
RotR(A, n) denotes the circular right shift of n bits of the binary word A.
Ch(X, Y, Z) = (X ∧ Y ) ⊕ (X ∧ Z),
M aj(X, Y, Z) = (X ∧ Y ) ⊕ (X ∧ Z) ⊕ (Y ∧ Z),
and the 64 binary words Ki given by the 32 first bits of the fractional parts of the cube roots of
the first 64 prime numbers.
3.3.4 Padding:
To ensure that the message has length multiple of 512 bits:
next, k bits 0 are appended, with k being the smallest positive integer such that l+ 1 +
k ≡ 448 mod 512, where l is the length in bits of the initial message,
finally, the length l < 2 64 of the initial message is represented with exactly 64 bits,
and these bits are added at the end of the message.
The message shall always be padded, even if the initial length is already a multiple of 512.
M = W1kW2k · · · kW15kW16
• the remaining 48 are obtained with the formula:
Next, the blocks M(1) , M(2), . . . , M(N) are processed one at a time:
For t = 1 to N
set
T1 = h + Σ1(e) + Ch(e, f, g) + Ki + Wi
T2 = Σ0(a) + M aj(a, b, c)
h=g
g=f
f=e
e = d + T1
d=c
c=b
b=a
a = T1 + T2
H 1(t) = H 1(t−1) + a
H 2(t) = H 2(t−1) + b
H 3(t) = H 3(t−1) + c
H 4(t) = H 4(t−1) + d
H 5(t) = H 5(t−1) + e
H 6(t) = H 6(t−1) + f
H 7(t) = H 7(t−1) + g
H 8(t) = H 8(t−1) + h
End for
The hash of the message is the concatenation of the variables H iN after the last
block has been processed
output: a positive integer in the interval [0, 2 256), the value of the hash of M.
Input 61 62 63
Input 61 62 63 64 62 63 64 65 63 64 65 66 64 65 66 67 65 66 67 68 66 67 68 69 67 68 69
6a 68 69 6a 6b 69 6a 6b 6c 6a 6b 6c 6d 6b 6c 6d 6e 6c 6d 6e 6f 6d 6e 6f 70 6e 6f 70
71
RSA involves a public key and private key. The public key can be known to everyone, it is
used to encrypt messages. Messages encrypted using the public key can only be decrypted
with the private key. The keys for the RSA algorithm are generated the following way:
1. Key Generators:
Compute n=pq
2. Encryption of m: c = me mod n
In other words, recover m from ciphertext c and public key (n,e) by taking eth
root of c modulo n
Factoring problem: given positive integer n, find primes p1, …, pk such that n=p1 e1p2
e2
…pk ek
If factoring is easy, then RSA problem is easy, but may be possible to break RSA without
factoring n
4.5 Nonces Algorithm:
The nonce is a 32-bit number. It stays in the block header along with other key data, such as
the difficulty target and timestamp. When miners build blocks, they randomly choose a nonce
and input it into the block header, creating a new block header hash.
The hash is a 256-bit number and has to start with a huge number of zeros, i.e. have an
incredibly small value. If it does not have the sufficient number of zeros, then the miner
discards the hash and tries a new nonce. This process is repeated until a miner discovers a
nonce that produces a hash with a value less than or equal than that set by the difficulty.
The 32-bit size of the nonce means that there are four billion possible combinations. Although
technically, it is much higher due to something called the extra nonce. This is additional space
for a longer nonce, meaning you can have tens of billions of combinations.
The nonce is the only parameter that the miner changes, all others remaining static. If the
miner finds the golden nonce they add that block to the blockchain and receive the block
reward. Currently, there is no way to speed up the process of finding the correct nonce. This
means miners are just operating in trial and error until they find a golden nonce. This process
is what constitutes the work, in proof of work.
Fig 4.5.1 Working of Nonce Algorithm
5. Experimental Results and Discussion:
5.1Patient Dashboard
5.2Patient Details
5.3 Patient Details Transaction
5.4Patients Blockchain
5.5Patient’s Mined Blockchain