Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
1K views43 pages

BCD Assignment UC3F2007CS-Part2

The document discusses using blockchain technology to manage healthcare data from numerous sources. It proposes a blockchain-based solution with four main components: (1) placing the patient at the center by giving them control over access to their data, (2) ensuring data access and privacy through encryption and authorization, (3) providing complete information by allowing data sharing between authorized parties, and (4) using blockchain as a framework to securely store health records in a decentralized and immutable manner. The solution would involve collecting raw data from different sources, storing it on the blockchain, and allowing authorized users to access it through the blockchain network.
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)
1K views43 pages

BCD Assignment UC3F2007CS-Part2

The document discusses using blockchain technology to manage healthcare data from numerous sources. It proposes a blockchain-based solution with four main components: (1) placing the patient at the center by giving them control over access to their data, (2) ensuring data access and privacy through encryption and authorization, (3) providing complete information by allowing data sharing between authorized parties, and (4) using blockchain as a framework to securely store health records in a decentralized and immutable manner. The solution would involve collecting raw data from different sources, storing it on the blockchain, and allowing authorized users to access it through the blockchain network.
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/ 43

1

GROUP ASSIGNMENT
TECHNOLOGY PARK MALAYSIA
CT124-3-3-BCD
BLOCKCHAIN DEVELOPMENT

UC3F2007CS

MUHAMMAD SARMAD AIDRUS (TP050751)

SHARON RUVIMBO WUTETE (TP050904)

HAND OUT DATE: 23 SEPTEMBER 2020


HAND IN DATE: 26 OCTOBER 2020
WEIGHTAGE: 100%

INSTRUCTIONS TO CANDIDATES:
1 Submit your assignment at the administrative counter.
2 Students are advised to underpin their answers with the use of references (cited using the
Harvard Name System of Referencing).
3 Late submission will be awarded zero (0) unless Extenuating Circumstances (EC) are
upheld.
4 Cases of plagiarism will be penalized.
5 The assignment should be bound in an appropriate style (comb bound or stapled).
6 Where the assignment should be submitted in both hardcopy and softcopy, the softcopy
of the written assignment and source code (where appropriate) should be on a CD in an
envelope / CD cover and attached to the hardcopy.
7 You must obtain 50% overall to pass this module.
ACKNOWLEDGEMENT
This research was supported by Asia Pacific University. We would like to appreciate our
classmates and students from senior batch that supported us and provided us insights and
knowledge that assisted in the research. We are also vastly grateful to MR LEE KIM KEONG
for his supervision, instruction and response on the previous version of the research, although
any errors are entirely ours and should not stain the reputations of these highly esteemed people.
Table of Contents
ACKNOWLEDGEMENT ......................................................................................................... 2

1.0. INTRODUCTION TO THE BLOCKCHAIN SYSTEM FOR DIGITAL IDENTITY.. 5

1.1. Blockchain-Based Healthcare Applications ................................................................ 6

2.0. ANALYSIS OF HEALTHCARE DATA FROM NUMEROUS SOURCES ................ 7

2.1. Appointment Record ................................................................................................... 8

2.2. Employee Record ........................................................................................................ 8

2.3. Patients Record ............................................................................................................ 9

2.4. GMP Record.............................................................................................................. 10

3.0. ANALYSIS SOLUTION MODEL DESIGN DEMONSTRATING THE


BLOCKCHAIN INTEGRATION ........................................................................................... 12

4.0. TECHNIQUES IMPLEMENTED ................................................................................ 14

4.1. Hashing Algorithm .................................................................................................... 14

4.1.1. Implementation of Hashing Algorithm .............................................................. 16

4.1.2. Output of the hashing algorithm ........................................................................ 17

4.2. Cryptographic Algorithm .......................................................................................... 18

4.2.1. Asymmetric Cryptographic Algorithm Implementation .................................... 21

4.2.2. Output of Asymmetric Cryptography ................................................................ 24

4.2.3. Symmetric Cryptographic Algorithm Implementation ...................................... 25

4.2.4. Output of Symmetric Cryptography .................................................................. 28

4.3. Digital Signature ....................................................................................................... 29

4.3.1. Implementation of Digital Signature ................................................................. 30

4.3.2. Output of the Digital Signature .......................................................................... 32

5.0. CRITICAL EVALUATION OF DEVELOPED SOLUTION ..................................... 33

5.1. Benefits of the Proposed Solution ............................................................................. 40

6.0. CONCLUSION ............................................................................................................. 42

7.0. REFERENCES ............................................................................................................. 42


1.0. INTRODUCTION TO THE BLOCKCHAIN SYSTEM FOR DIGITAL
IDENTITY
Health is the establishment of an engaged and happy life and the present-day people have been
the lucky recipients of the extraordinary advances in medical technology. With each invention,
more signs become accessible to translate the issues thar affect health. The advent of
individualized data from less expensive genome sequencing, the Internet of Things and
collection of health data on a widespread scale may allow researchers to bring solutions for
inaccessible problems in health (Engelhardt, 2017). In order to solve the challenges in the
management of health data, the innovators are paying attention to four main areas which are:

1. Putting the patient at the centre

For several patients, sustaining health includes interaction using healthcare providers and tools
for data collection which all collects information necessary for decision making in healthcare.
In the present day, they have been agreement on patients access to information to ensure they
are active agents in their own care and participation of patients becomes important in the
modern medical practise. The healthcare staff also require access to the medical information
though patients may need to be in control of what information they may receive and under what
circumstances (Engelhardt, 2017).

2. Access and Privacy

Health care information is very sensitive and confidential. This information must be private
and only accessible to those with authorised access (Engelhardt, 2017).

3. Information Completeness

As of now information is accessed frequently by individual providers and private data


collectors without the full access of the patient. This however limits how patients explore their
options, correct and contribute changes to errors in their data and sharing information with the
practitioners. Information that is patient-centred should allow the patient to have increased
control for making sure that health information that is complete is shared with those with
authorised access. Lack of information interoperability is detrimental to the utilization of data
based diagnostic technologies that are new (Engelhardt, 2017).
Blockchain technology has the possibility to hold and control the access to the large volumes
of health data that is anonymized, allowing for new research and new bits of knowledge, while
simultaneously keeping the privacy of patients safe. Significantly, blockchain technology
works as a protocol to bring together important stakeholders to the data with no use of a costly
data layer of data mediators, eliminating middle management and the costs associated with it
from the equation of data sharing (Engelhardt, 2017). Blockchain is described as an immutable
database or ledger which is distributed in network by peers, in which the transactions are
updated in a chronological order. An important feature which is beneficial to the healthcare
industry is decentralisation. This allows the applications not to rely on a centralized authority
and since the information used in blockchain is replicated amongst the nodes which creates
transparency. This allows the patients to know how and who their data is shared with. If one
node in the blockchain is compromised this has no effect on the ledger state as the information
is replicated over multiple nodes. This helps protect the data from any loss of data, modification
and security attacks. Another property of a blockchain is immutability which means that any
record cannot be altered or modified which has been updated to the blockchain. This ensures
data integrity and validity of the health records of patients. Blockchain uses cryptographic
algorithms to encrypt data which makes sure that the users who access the data have the
legitimate permissions before and can decrypt which increases data privacy and security. In
blockchain the identities of patients are pseudonymized utilizing cryptographic keys. This
allows the health data of patients to be shared without the patient identities revealed (Agbo, et
al., 2019).

1.1. Blockchain-Based Healthcare Applications


Firstly, the data from the medical devices, labs and numerous sources is brought together and
raw data is created that subsequently became big data. This data is necessary as an ingredient
for the whole blockchain-based healthcare and this creates the first layer of the stack which is
the principal component. Blockchain technology is found at the top of the layer of raw data
which is the core framework for the creation of a secure healthcare architecture which is split
into four components. Every blockchain platform is different from the next and has features
that are different such as consensus algorithms and protocols. Using blockchain users can
create and manage transactions. Primary components of blockchain are smart contracts, digital
assets and membership. For communication with other programs and systems, a wide range
of protocols are utilized which are P2P, centralized, distributed and decentralized. After
implementation of the blockchain technology on the created platform, ensuring integration into
the whole system is next. Blockchain-based technologies are split into three broad classes
which are data management, data storage and EHRs. At the top of the layer lastly is the
stakeholder layer. This consists of the different parties who benefit from blockchain based
healthcare applications (Khezr, et al., 2019).

Fig 1: Workflow in a Blockchain-based healthcare application (Khezr, et al., 2019)

2.0. ANALYSIS OF HEALTHCARE DATA FROM NUMEROUS SOURCES


The data for the health care industry is collected from different sources and the data is both
sensitive and non- sensitive but either was needs to be protected so that the data is not modified
or falls into the hands of those with unauthorized access. For the research, the data used was
collected from Kaggle. Kaggle is a data science community that allows users to find and publish
set of data. The different sources used for data collection were appointments, employee records,
patients record and GMP.
2.1. Appointment Record
An appointment is defined as an arrangement or to meet up with someone at a pre-set date,
time and venue. The attributes of the appointment record are PatientID, AppointmentID,
Gender, ScheduleDay, AppointmentDay and Age. The PatientID uniquely identifies the patient
in the appointment record and the AppointmentID uniquely identifies the appointment made.
The Gender shows the sex of the patient and the attribute ScheduleDay shows the date on which
the appointment is made. The AppointmentDay attribute clearly shows the date the
appointment is schedule for, and the Age attribute shows the age of the patient with the
scheduled appointment.

Fig 2: Some of the data collected from the appointments in the Appointment Record

For identity management purposes when a patient shows up for their appointment scheduled,
they may provide the PatientID or Appointment ID as these two attributes uniquely identify a
patient and their record instantly pop ups after a search.

2.2. Employee Record


The employee record stores the information of the employees employed at a healthcare
institute. The record had many attributes but was skimmed to important fields that were
necessary for modelling the blockchain. The attributes of the employee record are EmpID,
FirstName, LastName, Email, Age, Salary, SSN, Phone Number, Country, Username and
Password. The EmpID stores the ID number of the employee and this field uniquely identifies
the employee and the FirstName field stores the first name of the employee. The LastName
field stores the last name of the employee and the Email field stores the e-mail address of the
employee. The Age field shows the age of the employee and the Salary attribute shows the
salary of the employee. The Phone Number field stores the phone number of the employee and
the Country field stores the country the employee is from. Lastly the Username field stores the
username the employee uses to log in to the system and the Password field stores the password
the employee uses to gain access.

Fig 3: Some of the data collected from the employees stored in the Employee Record

For the management of identity, in order to access the record of an employee the EmpID may
be used as the EmpID is unique and is not duplicated on any other record or the username
through log in.

2.3. Patients Record


The Patient record stores the information pertaining to patients in the health care institute. The
Patient Record had many attributes and fields like the PatientBed but was skimmed to the
necessary fields to be modelled into the blockchain. The attributes of the patient record are ID,
First Name, Last Name, Gender, Age, Email, Phone, Marital Status, Number of Children and
Disease. The ID field stores the Identification Number assigned to each patient and this ID is
unique to each patient. The First Name field stores the first name of the patient and the Last
Name field stores the last name of the patient. The Gender field stores the sex of the patient
and the Age field stores the age of the patient. The Email field stores the e-mail address of the
patient and the Phone fields stores the phone number of the patient. The Marital Status Field
stores the marital status of the patient on whether single, married, divorced or widowed and the
Number of Children stores the number of children the patient has. Lastly, the Disease attribute
stores the name of the disease the patient is suffering from.

Fig 4: Some of the data collected from the patients stored in the Patient Record

For the management of identity, in order to access the record of a patient the ID may be used
as the ID is unique and is not duplicated on any other record, it uniquely identifies the patient.

2.4. GMP Record


The GMP record stores the information pertaining to different hospitals and their location. The
record was also skimmed to the necessary fields which are shown in the figure below. The
attributes and fields of the GMP record are Service Provider, Hospital Name, Hospital Address,
City, Zip Code, Phone Number, Hospital Type and Hospital Ownership. The Service Provider
field stores the number that uniquely identifies each hospital and the Hospital Name filed stores
the name of the hospital. The Hospital Address field stores the address of the hospital and the
City attribute stores the city the hospital is located in. The Zip Code attribute store the zip code
of the city the hospital is in and the Phone Number field stores the phone number of the hospital.
The Hospital Type field stores the type of the hospital and lastly the Hospital Ownership field
stores the ownership the hospital falls under.

Fig 5: Some of the data collected for different hospitals stored in the GMP Record

When searching for a hospital, the Service Provider may be used as it uniquely identifies each
hospital and is not duplicated on any other record.
3.0. ANALYSIS SOLUTION MODEL DESIGN DEMONSTRATING THE
BLOCKCHAIN INTEGRATION

Fig 6: Overview of the Hospital Digital Management System


Fig 7: Flowchart of the system
Fig 8: Blockchained System Model

4.0. TECHNIQUES IMPLEMENTED


For successful implementation the solution using blockchain technology, different techniques
were used which included the Hashing Algorithm, Cryptography algorithm and the Digital
signature.

4.1. Hashing Algorithm


Hashing is an algorithm that is used for calculation from a file of a fixed-size bit string file. A
file is collection of data blocks and the process of hashing changes the data into a value that is
far shorter and of fixed length or a key which stands for the original string. A hashing algorithm
that is considered good has the avalanche effect as a property. This means that the output of
the hash algorithm can change significantly when a single byte or bit in the file has been
transformed. If the hash function does not exhibit this, it is considered to possess poor
randomization which easily allows hackers. The hash is usually in the form of a hexadecimal
string with various characters. The hashing process is unidirectional and cannot work
backwards in order to obtain the original data. The hash algorithm should not produce a hash
value that is similar from the two different inputs to prevent a hash collision (Chung, 2020).
Therefore, a hashing algorithm is defined as a mathematical function that converts the given
data to a numeric string size that is fixed. The output string is usually smaller as compared to
the original string.

Benefits of Hashing

• Helps compare the two files in question to determine equality without opening them
(Chung, 2020)
• Verification of the file integrity after transfer from source to another using the hash
value (Chung, 2020)

There are two common types of hashing algorithms which are MD5 and SHA-2. The MD5
function allows the encoding of a string of data and encodes it into a bit fingerprint of 128. This
hashing algorithm is often used as the checksum for data integrity verification. SHA-2 (Secure
Hashing Algorithm) was developed by NSA which in full stands for National Security Agency
and is a hash function that is cryptographic. The SHA-2 algorithm has a significant amount of
changes inherited from its predecessor which is SHA-1 (Chung, 2020).
4.1.1. Implementation of Hashing Algorithm
The figure below shows the code snippet showing the implementation of hashing in the Login
Block.

Fig 9: Code snippet showing implementation of hashing in the Login block

In the code snippet above in order to be able to use the hashing algorithm, the import
java.security.MessageDigest is imported. Java provides the class which is called
MessageDigest which belongs to the package java.security and supports SHA-1, SHA 256 and
MD5 algorithms. The MessageDigest class gives a method which is called getInstance() which
accepts a string variable which shows the name of the algorithm to be used and returns the
MessageDigest object implementing specific algorithm. Initially the message digest instance
of the algorithm is created. The message is then passed to the message digest object after it has
been created. The update method of the MessageDigest class is used and it takes the byte array
that stands for the message in this case the blockbytes and passes it to the created
MessageDigest object. The message digest is then generated using the digest() method of the
MessageDigest class which then created a hash function on the current object. After it has been
created it is returns the hashcode in the form of a byte array. The hashcode is then converted
into hexadecimal format.

4.1.2. Output of the hashing algorithm

Fig 10: The Registration page

Fig 11: Hashing of the login details


Fig 12: Login file and Secret file

4.2. Cryptographic Algorithm


Cryptography means something hidden or a secret and helps ensure that the message contents
are kept confidential through transmission and avoids any modification to a message.
Cryptography ensures that the data is transmitted through a network in a way that is
unidentifiable to ensure that intruders or hackers cannot comprehend the data with the sender
and the receiver the only people who can comprehend the message. Cryptography has some
important terms which are plain text which is defined as a message or information that can be
read and is the one to be encrypted. A cipher text is known as an encrypted message or data
which is encrypted using a key. A key is defined as value or word that is utilized for plain text
encryption and decryption. Encryption is the process of converting data into an encrypted form
known as the cipher text. Decryption is the process of converting the cipher text into plain text
utilizing a key and a crypto analyst is the expert in cipher text breaking, cipher and
cryptosystem (Rawal, et al., 2019).

Objectives of Cryptographic

• Authentication: establish proof of identities


• Access Control: shows who has control to the access of data
• Availability: shows the resources needed for approving users
• Confidentiality: ensures that only the sender and receiver can comprehend the message
• Integrity: ensures that the data transmitted remains the same when the receiver receives
it
• Nonrepudiation: makes sure that the user cannot deny the sending of data (Rawal, et
al., 2019)

Fig 13: Classification of Encryption Algorithms (Abood & Guirguis, 2018)

Cryptographic Algorithms have three general classes of NITS-approved cryptographic


algorithms which are explained by the type or number of cryptographic keys used for each.
Hash functions

The Cryptographic hash function does not utilize keys for the operations that are basic and
creates a “hash value” from a vast amount of data using a one-way process. The hash functions
are utilized in the creation of building blocks which are utilized in the key management and
give security services (Turner, 2019).

Symmetric-key algorithms

This is also known as a secret-key algorithm and converts the data to an encrypted form which
cannot be viewed without a secret key. The key is known as a symmetric key because it is
utilized for both encryption and decryption (Turner, 2019).

Asymmetric-key algorithms

The asymmetric-key algorithms are also known as public-key algorithms because they use
paired keys which is both a public and private key for the process of encryption and decryption.
The public key is known to both the sender and the receiver (to all) and the private key is known
by the owner of the key pair. The algorithm is used for the computation of digital signatures,
establishment of cryptographic material for keying and the management of identity (Turner,
2019).
4.2.1. Asymmetric Cryptographic Algorithm Implementation

Fig 14: Key maker implementation


In the public class, the KeyPairGenerator and the Keypair are initialised. The new
instance of the KeyPairGenerator that uses the algorithm specified by the provider is
returned and stored in the keygen variable. The KeyPairGenerator is initialized with a
key size of 0124. In the mkkeypair method, the Keymake object is instantiated. The
public key is generated and stored in the pubkey variable and the private key is
generated and stored in the prvkey variable.
Fig 15: Key Maker Implementation Continued
The generated keypair is then stored in a file and in the main class the make key pair
function is called to run.

Asymmetric Cryptographic Algorithm

Fig 16: Imports necessary for implementing Asymmetric Cryptographic Algorithm

The java.security.NoSuchAlgorithmException is used to throw an exception when a specific


cryptographic algorithm request is unavailable in the environment of use. The
java.security.PrivateKey import specifies the multi-prime private key of the RSA and the
javax.crypto.Cipher offers the functionality of cryptographic cipher for the purposes of
encryption and decryption. The javax.crypto.NoSuchPaddingException ensures that an
exception is thrown if a padding scheme in the transformation is unavailable (Oracle, 2020).
Fig 17: Code snippet showing Asymmetric Cryptographic Implementation

In the code snippet above, in the public class AsymetricCrypto, a new cipher is created, and
the installed provider is used for creation of the cipher after searching. If no provider is found,
an exception is thrown. After the cipher is created, encryption process is initiated. The
ciphertext is initialised to a null value and a cipher instance is created and initialized to
encryption mode. The doFinal method is used to encrypt the data in a single part operation.
The encrypted data will then be encoded into Base64 representation and packed it into a string
and stored in the ciphertext variable. The return value is the encoded ciphertext.

In the decrypt class the input used are the cipher text and the private key which will be used
for the decryption process. The original message declared as origin will be initialised to null.
An instance of the class is created, and the cipher is reinitialised to decryption mode using the
private key. The cipher bytes are then decoded using the base64 encoding scheme. The data is
then decrypted in a single part operation using doFinal and the decrypted data is stored in the
variable origin. The returned value is the original message which is stored in the variable origin.

4.2.2. Output of Asymmetric Cryptography

Fig 18: Asymmetric encryption applied on the patient disease


Fig 19: Private key text file output

4.2.3. Symmetric Cryptographic Algorithm Implementation

Fig 20: Random secret key generation


For the generation of a random secret key, specific libraries must be imported for use. The
java.security.SecreRandom library is used to provide a cryptographically random number
generator that is strong. The javax.crypto gives interfaces and classes that are used for
cryptographic operations. In the RandomSecretKeyGenerator class, the algorithm and the key
size of use are assigned which are AES and 256 respectively. The key generator and the secret
key are initialized, and the secret key is converted into a string. The key generator instance is
created using the algorithm specified which is AES. After the instance of the key generator has
been created, the key generator instance is initialized for the specified key size and using secure
random class and a secret key is generated.

Symmetric Cryptography Algorithm

Fig 21: Symmetric Cryptography Implementation


For the implementation of the symmetric cryptography, different imports are needed. The
java.security.* provides interfaces and classes which are necessary for implementing security
frameworks. The java.util.Base64 provides static methods for getting the encoders and
decoders for the encoding scheme for Base64. The java.crypto.Cipher gives the functionality
for the implementation of encryption and decryption using a cryptographic cipher. The
javax.crypto.NoSuchPaddingException is an exception thrown if a specific mechanism for
padding is requested but cannot be in the given environment. Lastly, the
javax.crypto.spec.SecretKeySpec specifies the secret key which is the provider-independent
fashion. Initially in the public class, the secret string is initialised as “twinkletwinlittlestars”
and the algorithm for use. The private key is declared and the method for obtaining the private
key is created.

Fig 22: Symmetric Cryptography Implementation continued


The secret key is constructed and returned from the byte array using the first 16 bytes of the
key. The cipher is declared as a private variable. In the symmetric cryptography method, a new
cipher is created using the installed providers but if no provider is found an exception is thrown.
A cipher instance is created and initialized to encryption mode. The init method is necessary
to be called because failure to use it results in an IllegalStateException. Once the encryption is
set up, data can be fed into it and accepted. The doFinal method is used to encrypt the data in
a single part operation. The encrypted data will then be encoded into Base64 representation
and packed it into a string and stored in the ciphertext variable. The return value is the encoded
ciphertext.

To decrypt, the cipherText is used as the input. The cipher is then reinitialised to the decrypt
mode and then decoded using the base64 encoding scheme. The return value are the decoded
databytes.

4.2.4. Output of Symmetric Cryptography

Fig 23: Symmetric encryption applied on the password


Fig 24: Symmetric encryption output

4.3. Digital Signature


A digital signature is a signature that is electronic utilized for the purpose of verification on the
identity of the sender of a message or data for ensuring that the message or the data transmitted
is correct and valid (Mcmc, 2020). Digital signatures use the public key cryptography which is
also known as asymmetric cryptography. Digital signatures work using the public key
cryptography’s mutually authenticating cryptographic keys. The technology that uses digital
signature requires all the involved parties to trust and ensure that the individual generating the
signature can keep the private key a secret. In the case that someone has access to the private
key of the signer then this creates a risk of creation of a fraudulent digital signature in the name
of the holder of the private key (Rouse, 2020).
4.3.1. Implementation of Digital Signature

Fig 25:Code snippet showing implementation of the digital signature

For the implementation of the digital signature, different libraries must be imported. As shown
in the code snippet above java.security.KeyPair holds the pair of the public and the private key.
The java.security.KeyPairGenerator is used for the generation of the pair of the private and
the public key. The java.security.SecureRandom provides a cryptographically random number
generator that is strong and the java.security.signature provides the functionality of the
algorithm for digital signatures. The javax.xml.bind.DataTypeConverter is utilized for the
purpose of customization of the binding XML schema data type to the Java data type. In the
class digital signature, the function to implement the digital signature is created using the
SHA256 and RSA algorithm by passing the private key.
Fig 26:Code snippet showing implementation of the digital signature continued

To start the process of signing, we create an instance of the Signature class. A signing algorithm
is needed. The Signature with the private key is then initialized and updates the input to be
signed using the specified byte[] and returned the signature. After that, the asymmetric key pair
is generated using the SecureRandom class and the RSA algorithm. To start the generation, an
object of the SecureRandom class is initialized and an instance of the object of the
KeyPairGenerator is created using RSA algorithm. The KeyPairGenerator is initialized with
the key size of 2048 and SecureRandom as the parameters. A new unique KeyPair is then
computated and returned. A function for verifying the digital signature using the public key is
then constructed with the input, the signature to be verified and the public key as the
parameters. In the class, initially the signature instance is created using the signing algorithm.
The signature instance is initialized using the public key for signature verification. The input
to be verified is updated using the byte[] and return the signature to be verify. The Verify
function shows whether the signature to be verified cab be verified using either a certificate or
a public key. The instance of the signature is then rest to the last initialization state for
verification purposes.
4.3.2. Output of the Digital Signature

Fig 27:Digital signature for verifying patient appointments

Fig 28:Digital signature output


5.0. CRITICAL EVALUATION OF DEVELOPED SOLUTION

Fig 29: Hospital Identity Management System Welcome GUI

The implementation solution is a Hospital Identity Management System for handling and
managing the data obtained from different sources. When the user accesses the system the
Hospital Management System welcome page is displayed which gives the user the option to
log in.
Fig 30: Hospital Management Identity System Registration Page

Once the user clicks on the log in button, the user is instantly redirected to Registration page.
The Registration page allows the user to create an identity if they do not have one for log in
credentials. For registration the user enters their prefereed username and password for use and
clicks on the submit button. For the submit button to redirect to the next page, the password
entered must match the password entered in the confirm password part.

Fig 31: Hashing of the Username and Password

Fig 32: The Secret.txt file and the Login.txt file respectively

After the user clicks on submit button, the username and the password are hashed and stored
in Secret.txt and Login.txt. The4 login details are stored in a block for login. When the user
goes back to the Login page, they use the credentials created in the Registration process which
are the username and the password respectively.
Fig 33: Hospital Identity Management System Record options

After logging in successfully, the user is directed to page with the health records and the user
may select the record they wish to access.

Fig 34: Sign in/ Registration page to health records


When the user clicks on a health record to access, access is not instantly granted but the user
needs to log in again. This feature was put in place for extra security and verification to ensure
that only those with the right and authorized access can gain access to a specific record. The
data stored in the four records is obtained from the corresponding excel files. The data for each
record is read from an excel file and stored in a block.

Fig 35: Hospital Blockchained Data

For the hospital data, after 50 records are stored in the block, the Hospital Blockchained Data
GUI comes up. In the block, one can navigate to the next record or choose to navigate to the
previous record. Navigation to the previous record brings an error which is handled. The
blockchain data is stored in a file known as the ledger.txt.
Fig 36: To view the previous record

Fig 37: To view the next record


Fig 38: Hospital Blockchain Patient Data

For the patient data as shown in the figure below asymmetric encryption is used. Asymmetric
key encryption is applied on the disease of the patient. The data is read from the file. The
disease of the patient is encrypted and shown in the encrypted disease field and the decrypted
disease name is shown in the original message slot.
Fig 39: Hospital Blockchain appointments

In the Hospital Blockchain Appointments, the digital signature technique is implemented as


shown in the figure below. The digital signature provides security and verification of the
appointment so that if someone books an appointment on your behalf, one can check and
confirm if this appointment has been confirmed or initiated by him/her. The patient ID is
encrypted using RSA/ECB/PKCS1Padding technique. was used. The signature is signed using
SHA256withRSA. In the GUI, the encrypted PatientID is shown and the value of signature
created using the digital signature. Once the user verifies the digital signature and a match is
found, the verification slot is set to true.
Fig 40: Hospital Blockchain Employee Data

The Employee data, the symmetric key technique is implemented. The data is read from the
file and the password of the user is encrypted using the symmetric key encryption technique.
The secret key is generated in the last row.

5.1. Benefits of the Proposed Solution


The proposed solution makes uses of four fundamental techniques of blockchain. The
healthcare industry holds a vast amount of sensitive information which needs to be handled
with a high degree of care and precision. If this data and information lands in the hands of
individuals with unauthorised access, it may be very risk and result in corruption and misuse.
The techniques implemented are hashing, digital signature, asymmetric cryptography and
symmetric cryptography. In the proposed solution hashing is implemented to the log in
credentials of the user which are the username and the password stored in the login.txt file and
secret.txt file respectively. Hashing allows the comparison of two files for equity without
opening them. The hash values which are calculated allow the user to know if there is a
difference in the values. This is important for the username and password because the system
can easily locate a match in the username and password and grant access to the system.

The digital signature is implemented on the appointment data. The appointment can be
modified and altered when mishandled leading to confusion and patients missing important
appointments with health professionals or booking a slot already booked for an appointment
by another patient. The digital signature minimizes duplication and modification of the
appointment data through verification, authenticity and legitimacy. The availability of the time
stamp means that the date and the time of the signature us provided for tracking purposes
improving transparency and time efficiency. If one does not have the digital signature, risk of
forging is reduced.

The asymmetric key encryption is implemented on the data of the patient. The patient record
contains a lot of sensitive and highly confidential information of a patient, and in the proposed
solution the patient disease is encrypted using the asymmetric key encryption. Asymmetric
uses two keys, a public key and a private key for the encryption of the disease. The individual
who only has the private key can decrypt the disease to know what disease the patient suffers
from. As they are two keys used for the process, the private key does not require any
transmission suing a secure channel for a successful encryption process. This improves
authentication of the data too. Symmetric key encryption is implemented on the data of the
employee. A password as is already known is very confidential and can only be known by the
owner for safety purposes. In the employee data, the password is encrypted using the symmetric
key encryption technique. Symmetric encryption is faster and efficient when dealing with large
data volumes and is extremely secure. This ensures that the employee password cannot be
modified or altered if anyone does not have the key.

In a nutshell, modelling the solution using blockchain technology improves the security of data
and the accessibility when it comes to the health records which brings about a lot of
transparency. The health care industry manages and handles large volumes of confidential
information which needs quick access when needed, blockchain streamlines the records and
allows sharing of data securely.
6.0. CONCLUSION
The investigation and research dwelled on the healthcare industry at large and gave an insight
on how blockchain technology has been successfully incorporated and implemented in the
healthcare industry. Different techniques were implemented and displayed with the sole
purpose of improving the integrity and transparency of the information and data handled in the
healthcare industry such as hashing algorithms, cryptography algorithms (symmetric and
asymmetric cryptography) and the digital signature. Blockchain is high on security
maximisation and accessibility and has found its application in many areas in the healthcare
industry particularly for patient information and identity management as implemented and
shown in the research and investigation. Blockchain is slowly becoming very relevant and has
the potential to shift the healthcare hierarchy by giving authority over medical records and
health data of patients. In a nutshell, incorporation of blockchain in the healthcare industry
leads to faster and more efficient problem-solving techniques improving transparency, integrity
and security.

7.0. REFERENCES
Abood, O. G. & Guirguis, S., 2018. A Survey on Cryptography Algorithms. International
Journal of Scientific and Research Publications, 8(7), p. 495 to 516.

Agbo, C. C., Mahmoud, Q. H. & Eklund, M. J., 2019. HealthCare. [Online]


Available at: file:///C:/Users/Wutete/Downloads/healthcare-07-00056.pdf
[Accessed 8 October 2020].

Chung, C., 2020. 2Bright Sparks. [Online]


Available at: https://www.2brightsparks.com/resources/articles/introduction-to-hashing-and-
its-uses.html
[Accessed 12 October 2020].

Engelhardt, M. A., 2017. Technology Innovation Management Review. [Online]


Available at: https://timreview.ca/article/1111
[Accessed 8 October 2020].

Khezr, S., Moniruzzaman, M., Yassine, A. & Benlamri, R., 2019. Applied Sciences. [Online]
Available at:
file:///C:/Users/Wutete/Downloads/Blockchain_Technology_in_Healthcare_A_Comprehensi
v.pdf
[Accessed 8 October 2020].

Mcmc, 2020. MALAYSIAN COMMUNICATIONS AND MULTIMEDIA COMMISSION.


[Online]
Available at: https://www.mcmc.gov.my/en/sectors/digital-signature
[Accessed 12 October 2020].

Oracle, 2020. Oracle. [Online]


Available at: https://docs.oracle.com/javase/8/docs/api/javax/crypto/Cipher.html
[Accessed 12 October 2020].

Rawal, A., Chhikara, G., Kaur, G. & Khanna, H., 2019. Cryptography Algorithm. Journal of
Analog and Digital Communications, 4(1), p. 31 to 38.

Rouse, M., 2020. Search Security. [Online]


Available at: https://searchsecurity.techtarget.com/definition/digital-signature
[Accessed 12 October 2020].

Turner, D. M., 2019. Cryptomathic. [Online]


Available at: https://www.cryptomathic.com/news-events/blog/summary-of-cryptographic-
algorithms-according-to-nist
[Accessed 12 October 2020].

You might also like