Vashistha 2020

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

BSCI Poster Session BSCI '20, October 6, 2020, Taipei, Taiwan

Document Management System using Blockchain and Inter


Planetary File System
Mohit Vashistha Ferdous Ahmed Barbhuiya
mohit6b@gmail.com ferdous@iiitg.ac.in
Indian Institute of Information Technology Indian Institute of Information Technology
Guwahati, Assam, India Guwahati, Assam, India
ABSTRACT
Blockchain Technology has been evolving from being a secure
and immutable ledger of transactions for cryptocurrencies to a
programmable interactive environment for building distributed
reliable applications. This system proposes a secure platform to
facilitate trustworthy document verification and management using
Blockchain and Interplanetary File System (IPFS) to store data in
the distributed and decentralized environment which is persistent
and does not have any file size constraints. IPFS system provides a
unique hash of the document based on the content of the document. Figure 1: Overall Architecture.
The system uses smart contracts to record all the hashes for all the
documents stored in the IPFS system. The system can efficiently
and securely capture, manage and validate documents and prevent 2.1 Ethereum
any malicious modification to the data. The document management system is built on top of the Ethereum,
a distributed public blockchain network. Ethereum is a worldwide
KEYWORDS network of interconnected computers that execute and validate
Blockchain; decentalized; IPFS(Inter Planetary File System); programs.[7]
ACM Reference Format:
Mohit Vashistha and Ferdous Ahmed Barbhuiya. 2020. Document Man-
2.2 Document Management System
agement System using Blockchain and Inter Planetary File System. In Pro- The document management model will mostly be using IPFS(InterPlanetary
ceedings of the 2nd ACM International Symposium on Blockchain and Secure file system) in which the document will be stored. IPFS system will
Critical Infrastructure (BSCI ’20), October 6, 2020, Taipei, Taiwan. ACM, New return a unique hash based on the content of the document.
York, NY, USA, 2 pages. https://doi.org/10.1145/3384943.3409443
2.3 Inter Planetary File System (IPFS)
1 INTRODUCTION Inter-Planetary File System (IPFS) is a protocol and network de-
As the data and the documents are increasing exponentially, ensur- signed to create a content-addressable, peer-to-peer method of
ing immutability and prevention of manipulation in documents has storing and sharing hypermedia in a distributed file system.[2] [3]
emerged as an important challenge.
In order to avoid data frauds such as data fabrication, under- 3 SYSTEM OVERVIEW
reporting of the results and falsifying the results to match research Access to the document is restricted using public-key encryption.
objectives in critical scientific research, the provenance of the data For the system, the truffle framework is used to implement client
has to be maintained. In this context, our system is defined as meta- applications. The client applications communicate with the smart
data that describes where the data of interest originated, who owns contract through Ganache and MetaMask extension.
the data and what were the transformations that were done to the
data. 3.1 Document Management Life Cycle
In single encryption cycle, the document will be picked up by the
2 SYSTEM MODEL system. The document will be encrypted by a symmetric key using
In this section, information about the tools used is provided. the AES cryptographic algorithm. The document will be signed by
the private key of the user who is storing the document in the IPFS.
Permission to make digital or hard copies of part or all of this work for personal or The document gets stored in IPFS, a unique document hash will
classroom use is granted without fee provided that copies are not made or distributed be generated by the IPFS system and will be sent to the user who
for profit or commercial advantage and that copies bear this notice and the full citation
on the first page. Copyrights for third-party components of this work must be honored. stores the document. After getting the document hash from the
For all other uses, contact the owner/author(s). IPFS, the user will push the document hash into the Blockchain. A
BSCI ’20, October 6, 2020, Taipei, Taiwan user having the document hash and the public key of the user who
© 2020 Copyright held by the owner/author(s).
ACM ISBN 978-1-4503-7610-5/20/10. uploaded the document can access the document. The uploaded
https://doi.org/10.1145/3384943.3409443 document can be decrypted by the public key of the user who

212
BSCI Poster Session BSCI '20, October 6, 2020, Taipei, Taiwan

uploaded the document. Blockchain will store the data in the form Algorithm 1: Process Flow
of hashes. Result: originalFile is same as inputFile
Steps involved in double encryption cycle are :
1 File inputFile, PrivateKey P, PublicKey p;;
1) Actual file will be encrypted by the up-loader of the document
2 key K = GenerateSymmetricKeyforAES(RandomData,
using an advanced encryption standard (AES) algorithm using a
symmetric key.[1] The sender will sign the file after symmetric InitialVector);
encryption using their private key. 3 encryptedFileSender = Encrypt(K)(inputFile);
2) Sender will send this file to the Interplanetary file system(IPFS) 4 signedFile = Sign(P)(encryptedFileSender);
using the ipfs-api in node package manager(npm) with the host as 5 bufferedFile = convertToArrayBuffer(signedFile);
ipfs.infura.io. IPFS system will send/return back a unique hash to 6 ipfsHash = sendFileToIPFS(bufferedFile);
the sender of the file. 7 if ((ipfsHash) & (key)& (receiverAddress) are not NULL ) then
3) Sender will use the web3 library of ethereum blockchain[6] to 8 storeHash(ipfsHash, K);
push this ipfs hash into the ethereum blockchain. Smart Contracts 9 publishToBlockChainRequest(receiverAddress, ipfsHash,
are used to write/publish data into the blockchain.[5] K) =>txnHash, timestamp;
10 mining(txnHash, timestamp)
if (mined properly) then
11 publish the data to the blockchain;
12 return blockNumber;
13 else
14 return "Error message - Could not mine";
15 end
16 else
17 return IPFSHASH OR KEY IS NULL;;
18 end
19 K, ipfsHash = getHashAndKey();
20 File signedFile = getFile(ipfsHash);
21 encryptedFileReceiver = Verify(p)(signedFile);
22 originalFile = Decrypt(encryptedFileReceiver);;

4 CONCLUSION
Figure 2: Process Flow
The underlying platform is built on the Ethereum platform with
the smart contracts for various events written in Solidity. We also
Deployment gives the smart contract a unique ethereum address
used various encryption techniques to provides more security to
of 160 bit. A function call will be made in which data payload will be
the document in transition. The IPFS storage provide distributed
the IPFS document hash of the file/document and the symmetric key
storage with content-based hashing which makes them more secure,
used while AES encryption and receiver’s address as the address
resilient and immutable. [4]
where the metadata of the deployed contract is present. It will
provide a unique transaction hash.
REFERENCES
4) The receiver will have the latest copy of the blockchain and
[1] [n.d.]. Advanced Encryption Standard. https://en.wikipedia.org/wiki/Advanced_
the receiver can verify the transaction and get the document’s IPFS Encryption_Standard.
hash and symmetric key from the received transaction. [2] [n.d.]. Inter Planetary File System. https://en.wikipedia.org/wiki/InterPlanetary_
File_System.
5) Recipient of the IPFS document hash will use the ipfs.infura.io [3] [n.d.]. Platform Inter Planetary File System. https://ipfs.io/.
with the available IPFS document hash to retrieve the encrypted [4] [n.d.]. Privacy of Transactions. https://en.wikipedia.org/wiki/Privacy_and_
document from the interplanetary file system. blockchain.
[5] [n.d.]. Solidity Documentation. https://solidity.readthedocs.io.
6) Decryption will take place on the side of the receiver. The re- [6] 2018. Cryptographic Hash Chain. https://en.wikipedia.org/wiki/Hash_chain.
ceiver will be very known for the policy and steps of the encryption [7] Aravind Ramachandran, Dr Kantarcioglu, et al. 2017. Using blockchain and smart
of the document to decrypt the document. contracts for secure data provenance management. arXiv preprint arXiv:1709.10000
(2017). https://arxiv.org/abs/1709.10000.
7) The receiver will first use the public key of the sender to
verify, authenticate the sender and then the receiver will use the
received symmetric key to decrypt the received document from the
interplanetary file system.
8) The receiver will have the original copy of the document
which traveled through the whole network in a safe, secure and
immutable environment by providing the high amount of security
to the document.

213

You might also like