Two Fish Encryption Based Blockchain Technology for Secured Data Storage

Data security and sharing remains nuisance among many applications like business data, medical data, banking data etc. In this research, block chain technology is built with encryption algorithm for high level data security in cloud storage. Medical data security seems critical aspect due to sensitivity of patient information. Unauthorized access of medical data creates major issue to patients. This article proposed block chain with hybrid encryption technique for securing medical data stored in block chain model at cloud storage. New Two fish encryption model is implemented based on RSA Multiple Precision Arithmetic. MPA works by using library concept. The objective of using this methodology is to enhance security performance with less execution time. Patient data is processed by encryption algorithm and stored at blockchain infrastructure using encrypted key. Access permission allows user to read or write the medical data attached in block chain framework. The performance of traditional cryptographic techniques is very less in providing security infrastructure.


INTRODUCTION
In the modern medical field, medical data has been used for the invention of recent strategies and healing procedures for curing diseases [1].The medical data is very sensitive aspect where patients do not like to share with others.Security of medical data storage can be ensured by using two techniques.In the first technique, medical information is stored in the database locally and set up a privilege to access the medical information.In the second approach, the stored clinical data encrypted using patient's key value and in future it can be used by the patient's key.The main dilemma of the first approach, locally stored medical data may be modified or deleted.Also, it cannot be shared with doctors.During the diagnosis phase of the disease and treatment were taken by a patient, the key should not be shared with others, it creates a problem with the second approach.Above crisis will damage the availability of medical data in the local storage database.The key force for the above-stated declaration is due to the digitized medical data and accessing it employing professionals is suggested by recent articles [2] [3].To improve medical information governance and safety regulations like Health Insurance Portability and Accountability Acts (HIPAA) [4] in the USA or the General Data Protection and Regulation (GDPR) [5] at Europe needs high security of sharing the information.Privateness mode of data might cause severe consequences for activities of a healthcare information breach.
The existing cryptographic algorithm in medical data storage methods used a private cloud platform, which carry the limitations on sharing of data and scalability [6].As blockchain and cloud computing are considered as matured associated strategies which have performed fast development in clinical and fitness services, together with scientific normalization, healthcare services through mobile, e-commerce in medical and on-line mode facility [7].The block chain system connects the individuals in a P2P form.It includes P2P network design, encryption technology, implementing distributed algorithm and use of data storage [8].Implementing the limitations of blockchain technology by combining with other cryptographic techniques to discourse the security problems of storing medical data management [9].Lack of ability and consciousness in implementation, limitations arise in security side of blockchain based cloud storage works quite slow in progress.These above challenges cause delay in the approval of the blockchain technology by the medical institutions.Even though there are numerous start-ups procedures are completely based on blockchain technology, the medical organization refused for using this technology [10].Our proposed work, hybrid system of two fish with RSA MPA encryption algorithm provides solutions for secure storing of medical data via blockchain based cloud storage in an efficient manner.
In conventional encryption procedure, sender and receiver must generate the public key and private key.Before sending the textual content data, the sender (user) encrypts the textual content using public key of receiver.At the receiving side, the desired client decrypts the textual content data using private key.However, it calls lot of network issues and additionally occupies the memory [11].But our proposed hybrid system of two fish with RSA MPA encryption algorithm converts the textual content medical data encrypted by medical institution A's public key and decrypted by medical institution B's private key.By this way they can share the medical data [7].To guarantee the safety and the privateness of medical records, we want to expand a powerful asymmetric cryptographic algorithm is followed to encrypt textual medical data on this work, at a low cost and in an efficient way.A person tries to get medical data, he needs to recognize the corresponding decryption key [12].Our proposed work provides high dimensionality in the security of sharing medical data among various medical institutions in an efficient way.And also assures keeping the privacy of patient information.
Further, structure of this paper has been planned as follows: Section 2 demonstrate about related survey on block chain security.A proposed methodology structure is explained in Section 3. Section 4 describes about the experimented results and finally Section 5 concludes the paper with future scope.

RELATED WORKS
Due to the development of medical field, storing of medical data in a secure way considers as a significant role, the conventional centralized scheme of medical data storage has been developed and it does not satisfy the requirements of available data with the high hazard of privacy expose is proposed in paper [13][14][15].The various researchers are focused on blockchain technology to provide more secure on medical data.The introduction of blockchain technology creates more efficient infrastructure to manage and maintained the digitalized medical data was suggested by Vazirani et al., [16].To improve the health care consequences without comprising the safekeeping of patient's information, a feasibility study on utilizing of blockchain technology with cloud storage scheme is developed in paper [17][18].
The combination of blockchain based technology with attribute-based scheme is used to provide security in sharing and storing of medical records and to access digital health care records was suggested in [19].Another tendency revealed from blockchain technology in the concept of traditional security adopted in a single domain administrative for sharing of medical data is insufficient with multiple healthcare domains.Therefore, advanced cryptographic algorithms are required with the features of rich access control and strict high dimensionality secure enforcement.Nowadays, adopting advanced features of cryptographic algorithms research projects are carried out to provide secure processing of clinical data in the cloud storage [9].
To provide a more efficient and friendly service for medical data storage schemes, various solutions are available at cloud technology.Security management was proposed in paper [20][21][22][23][24][25][26].Patient's medical information is a crucial thing, to store in high secure and privacy with cloud-based storage platform.To guarantee the security and data privacy over a patient's data, we should implement a smart storage method which include the smart IoT-based healthcare architecture is discussed in [27].Other solutions for sharing delicate medical data on several methods like medical data accumulation of non-standard diagonal method was suggested in [28], sharing of medical data with a cloud-based model used in [29], a hybrid solution of sharing medical data in [30,31], storage structure of scalable privacy with data preserving scheme [32], a secure system using a fog computation technique in [33], and a distributed based architecture with doubles tag micro aggregation scheme in [34] are implemented.The main problems among these techniques are computational complexity and more time consumption.However, most of the users do not trust the third party of the organization in keeping their medical data secure and in a confidential manner.
Decentralized ledger is used in Blockchain technology to record every medical transaction.It records transaction event as product of source state to present state permanent storage scheme, which was used in paper [35][36][37].The features of Blockchain technology are decentralization, immutableness, and verifiability which are essential in the field of medical healthcare, exclusively in the handling of medical records in a secure way.
The improved encrypted version of proxy scheme called Fuzzy based Conditional Identity (FCI), in which exchange of medical data in a privacy-preserving where keys are extracted from user's biometric measures.The content of medical data transactions kept in privacy and consensus efficiency by using blockchain-based medical data storage platform [38].The ring signature scheme is adopted the elliptic curve model to enhance a privacy medical data storage protocol in user's identity privacy and protection of medical data.The protection of medical data transaction's privacy ring signature scheme is not an applicable one [39].A new approach of medical data sharing scheme is implemented by combining the ML, Blockchain and cloud storage scheme.This combined scheme can easily and effectively share of medical data transactions between different medical organizations.However, it cannot provide the assurance of receiving exact medical data [40].By analysing the existing schemes and various traditional methods, it can be found that combining blockchain-based cloud storage in medical institutions has simplified the enrichment of service quality.Preserving of valuable content of medical data is a challenging task between patients and medical research institutions, especially in distributing the data with various entities in smart contracts with all-inclusive privacy considerations.Furthermore, few types of research have focused on this challenging task of whether the collection of medical data obtained from patients that meets their requirements and keep securely is a great challenge [15].The table 1 shows the related works that can be implemented in security of medical information on blockchain technology.
Table 1: Review on other techniques

Papers Description
Xia et al [41] smart contracts contain secret keys Omar et al. [42] Getting decryption key from the owner of medical data.
Ferdous et al. [43] DRAMS is to deploy a decentralized architecture Guo et al. [44] multi-authority attribute-based signature scheme Zyskind et al [45] It is a proposed decentralized computation platform Yue et al. [46] Encrypted data is stored in private blockchain technology with health care data gateway architecture.
Alevtina et al. [47] Encrypted data is stored in cloud sever.
Azaria et al. [48] Accessing rights to get medical data .

MEDICAL FILE STORAGE AT BLOCKCHAIN WITH CLOUD STORAGE
In sharing of clinical data/information using blockchain technology, the foremost step is to ensure the reliable in communication and also in security of medical data storage, it is important to build a chain architecture, effectively decide the identification of two entries, that is initiator identity of service and identity of recipient.The system model of medical data storage based on block chain with cloud storage is shown in Fig 1.

Certificate Authority (CA)
CA act as a authority provider to generate keys, manage, distribute the digital certificate and system administrator.CA eliminates the malicious nodes and confirm the health of system.For decrypt the data CA uses patient's private key and maintaining perfectness on the information / data which are stored in the block for medical research.

User Layer
Different categorize of users are involved in the user layer for their research or other useful purposes in accessing of medical data from the cloud server.All patient's information is maintained as data privacy.The patient gets details of the existing medical records, which are stored in chain or block by using their private key.Example: healthcare organizations like research institutions, medical institutions, research institutions and governmental bodies.

Block Chain Layer & Cloud storage
The blockchain layer helps to connect all distributed health field and contracts are responsible for distribution of data across various medical association.In the cloud storage all medical data are collected from patients or from hospitals in different locations or from researchers combined and put into the storage.It is accessed by only authorized users.

Public User Layer
It consists of different categorize of users, researchers, general community in medical platforms.They can access the medical information for the need of their medical investigation, gives treatment for the needy people.Through the proper access only we can able to get the storage data for the medical purpose.

Implementation of Two Fish Algorithm
Patient's medical records contain diagnosis information, laboratory test reports, medical imaging data like CT, MRI, X-ray image details, treatment details, special examination details are important information.For the development in medical industry, we have to share these medical records among with patients, medical institutions and researchers [49].This work implements blockchain based cloud storage.Here medical data is divided into multiple encrypted segments or blocks that are interlinked through a hashing function.This paper implements two fish encrypted algorithm.Two fish cryptographic algorithm is a symmetric key block of cipher text with 128 bits block size and the generated key sizes are up to 256 bits.Implementation of two fish encryption algorithm is shown in fig 2 .Fig. 2: Implementation of two fish Cryptographic Implementation steps of Two Fish Cryptographic algorithm is given below [28][29][30]: Step 1: Input block size is 128 bits would be divided into four sections, each for 32 bits words.
Step 2:32-Bit word is XOR input with the four key parts. 0, =  ⊕   ;  = 0  3 Where K is a key and   is a sub key i= 0 to 3. The first key part of word is XOR with  0 , second key part of word is XOR with  1 and so on.
Step 3: Two fish algorithm uses a Feistel network and it consists of 16 iterations.
Step 4: The first key part of word is split up as 4 bytes, where each part is applied to a substituted box.The second key part of word will be first rotated in 8 bits in left and it is also applied to the same set of substitution boxes.
Step 5: Diffusing newly substituted data of the 32-bit word, by applying the both the first and second key part of words to MDS matrix (Maximum Distance Separable).
Step 6: Then the first key part of word is applied to a pseudo-Hadamard Transform: pp′ = pp + qq where p is the first key part of word, q is the second key part of word and p' is the new first key part of word.
Step 7: A first key part 'new' is used as input of word p', the second key part of word q is applied to the same transform, which can be represented as: qq′ = pp + 2qq Step 8: Repeat Steps 4 to Steps 7 for 16 iterations.
Step 9: The first and second key part of words are swapped with the third and fourth key part of words, the words are XOR to form one more set of round keys for producing the cipher text.
By the above procedure, the medical records are encrypted and stored in blocks.It stores patient's medical report in blockchain and the index value location details are stored in cloud database.Storing of encrypted data and retrieving of decrypted data is done by implementing two fish algorithms [50].Transaction bodies in medical block chain are Patients, clinical institutions and third-party participants like public users, insurance companies, researchers.Medical records are generated in the medical institutions for the diagnosing the disease and suggest the treatment which is stored at cloud server through block chain.Physicians generates the summaries of medical report of their patients from different medical institutions.These summaries are also processed in the cloud server for storage through block chain.The corresponding patients have ownership for their own medical information.The third-party users or unauthorized users can access this data from chain with proper permission getting by CA.Also, that they provide some services, like recommendation and appointment registration of medical institution.The permissions for the transaction bodies are given in Table 2.The blockchain is responsible for the creation blocks with medical data.When newly medical data is generated for the patient, this is validated and converted into new block, then added to the main chain for the security purpose.The medical data in the blockchain is authenticated by two fish encryptions for the security purpose.For sharing authorization medical data with another medical institution, it needs to get public key of receiver's medical institution.When a user sends a request to access these medical data along with public key, encrypted text of data will return to the user.At the receiving end user decrypts this cipher text files to get the original medical data [51].If unauthorized user tries to access the medical data, chain cannot allow them to decrypt the medical data.Each medical institution generates a two fish encrypt of medical data D, and encrypts the medical data and stored at cloud at L location using public key value pk of all medical institution to send the medical blockchain.

RSA using multiple Precision Arithmetic Library
For providing security authentication for sharing of medical data, we used block chain of P2P network with all the nodes.Each network node generates two keys; sender encrypts medical data by using public key of receiver.At the same time receiver decrypt the medical data by using private key.For the security authentication scheme, in this work we proposed RSA algorithm using MPA Library (multiple Precision Arithmetic).The implementation steps are given below: Algorithm 2: Step 1. Key Generation Medical Institution A and Medical Institution B request the CA to generate their public key and private key.Sender encrypts medical data by using public key of receiver.At the same time receiver decrypt the medical data by using private key.For the key generation, RSA algorithm uses two large prime numbers , .Step 6:Calculate  ( ) and  ( private key) Step 7:The decrypted cipher text with key  is generated and transmit to the cloud server.
Step 8: By using this algorithm, the public key is generated with the second layer of cipher text, for construct decryption key with public key is generated with the first-layer of cipher text.
Step 9: Generate new cipher text, the cloud server uses the decryption key uploaded by Medical Institution A.
Step 10: Medical Institution B requests data and  → (,   ) Step 11: Medical Institution B requests to decrypt the data in cloud.The cloud server sends the decrypted text to Medical Institution B and decryption uses RSA to obtain the original text data [7].The working principle of this algorithm is shown in the Figure 3.The MPA library is used to provide the fastest key generation, encryption and decryption routines.

Proposed Hybrid system of Two Fish with RSA-MPA Library Encryption Algorithm
In general, using hybrid method for encryption, ciphers medical data with public and private keys are highly protected while sharing of medical data [52].Figure 4 shows the proposed (Two Fish + RSA) hybrid architecture.In the beginning key will be generated with two fish algorithm and medical data uses RSA for encryption using MPAL.Finally, encryption of the cipher text medical data is processed at receiver side.When compared with other traditional algorithms like key-aggregate cryptosystem(KAC), Attribute-based encryption (ABE) requires public key for encryption and it is fully dependent on attributes [53].Similarly, compared with other existing algorithms with the concept of privacy protection and secure storage of tamper-proof algorithm will not work effectively.Taking into encryption time of ABE, KAC, two fish, AES algorithm our proposed hybrid algorithm of Two fish and RSA MPA algorithm requires less time and also keeps high security level.

PERFORMANCE ANALYSIS
The main contribution of our work is to provide security in storing and sharing of medical data.Algorithm 1 describes the design of two fish encrypted concept.It interacts with blockchain based cloud storage, and access the stored medical records with proper permission assign to the user.By using JMeter, accessing of medical data is analysed.Latency is calculated by number of user's requests between 10 and 100 within the time periods of 2, 5, 15, 20 and 45 minutes.The latency time has been calculated by evaluating the time occupied to deliver the data by user's request.This is shown in table 3.

Security Analysis
In accessing medical data in a secure way, we proposed hybrid of two fish and RSA MPA Library access data successfully, must meet some criteria and decrypt the medical data.Table 5 shows the comparison between some traditional methods and the proposed scheme.In the observation of the above table 5, the blockchain system with cloud storage plays a significant role in accessing of clinical data in secure way and sharing.To streamline and perform encryption as well as decryption of any given medical data passed in our proposed scheme of hybrid system of two fish with RSA MPA library measures the better performance on the basis of privacy, integrity, anonymous, attack resistance, tamper proof and less computing time produces more secure in storing and sharing of medical data through blockchain technology.For experimental purposes our proposed work, hybrid system of Two fish with RSA MPA library algorithm stored medical data in various sized text files and the outcomes gives the best result in terms of encrypted and decrypted time of the medical data.Key length uses 256 bits and 16 bytes of block size is used in Two fish algorithm.For the proposed work RSA-MPAL algorithm generates 2048 bits key pair.This technique can encrypt medical data using public key as well as decrypts the data using private keys.The benefits of proposed work are speed of encryption and decryption time because it uses MPA library concept.The analysis of the result of encrypted data time calculation is shown in Fig. 5 Fig. 5: Analysis of Encrypted Data time calculation in seconds In the observation, it shows, that throughout the encryption medical data text file, the encryption time is increased proportionally depends upon the size of medical data text file.Comparison results on algorithms Twofish, RSA, Twofish + RSA and Twofish + RSA MPA in terms of encryption time criteria the Twofish + RSA MPA algorithm is better and needs less time comparatively to other algorithms.The analysis of the result of encrypted data time calculation is shown in Figure 6.

CONCLUSION
Hybrid system of Twofish with RSA MPA library algorithm successfully implemented to maintain high secure of medical data sharing through blockchain based cloud storage.This paper presents an analysis of Twofish, RSA, Twofish + RSA and Twofish with RSA-MPA algorithm in terms of size of file, level of security, latency, time taken to encrypt the file, time taken to decrypt the filewere used.This research helps to conclude that among the provided criteria, new hybrid system of Twofish with RSA MPA takes all benefits from traditional methods so it is significantly secure and faster retrieval of medical data.For future work, proposed hybrid models can be implemented by entropy index value.Additionally, our hybrid system could be improved through analysis and implementation of highperformance message passing computing library, such as, Message Passing Interface (MPI).

Fig. 1 :
Fig. 1: Medical information storage at block chain with cloud storage This model is combined into four layers: Certificate Authority, User Layer, Block Chain Layer with cloud storage and public user layer.

Step 2 : 3 : 4 : 5 :
Encryption file generationEncrypted file E1 is generated, at first RSA-MPA with public key is used by Medical Institution A. By using second layer, encrypted file E2 is generated by Medical Institution A. Uploading the encrypted files E1 & E2 of Medical Institution A into the server.= (,   )Step Make is the encrypted information.Step Calculate cipher text by using following formula,  =    ,  <  ∁ is Cipher text;  is Palin text;  is a Encryption key and n is a block size.Step Construct decryption key  =     Medical Institution A encrypts medical data by using public key of Medical Institution B. At the same time Medical Institution B decrypt the medical data by using private key of Medical Institution A.

Fig. 6 :
Fig. 6: Analysis of Decrypted Data time calculation in seconds

Table 2 :
Access Permission mode

Table 3 :
Latency time per number of user's requests

No. of active Users Latency time (Sec)
An important observation of table3shows on the latency time is increases as per the request of user increases.This happens because of trade between the securities on medical data over low latency.Even though the latency time increases but efficiency is maintained by two fish encryption algorithm.The speed of program is evaluated using execution process based upon the encryption and decryption of the file with a different size.Comparison table of encryption and decryption using various methods is given in the table 4.

Table 4 :
Execution time for Encryption & Decryption in seconds

Table 5 :
Comparison between proposed system with other traditional systems.