Oblivious Access for Decentralized Database Systems: A New Asymmetric Framework from Smart Contracts †
Abstract
:1. Introduction
1.1. Contributions
- We propose a decentralized database system with oblivious access in a (parallel) smart contract model, aiming to provide the service of decentralized cloud storage that hides the data access pattern and overcomes the overhead associated with ORAM.
- In our construction, we combine smart contracts with ORAM and garbled circuits [8] to ensure that this system enables more secure and confidential personal data protection. Hence, the user of this system can access and upload their personal data as frequently as they wish without any privacy concerns.
- The abstraction design of our construction could be easily applied to the parallel smart contract (PSC) model that is proposed by Yu et al. [9]. It uses multi-thread technology [10] to execute smart contracts in parallel. Using this new model to process transactions could reduce the average time cost and improve performance.
1.2. Organization
2. Related Work
2.1. Oblivious Random Access Machine (ORAM)
- Hierarchical ORAMs: This kind of ORAM uses hash functions for data lookup and it requires stashes and buckets to deal with hash collisions. To the best of our knowledge, the balanced ORAM [17] achieves high communication efficiency among hierarchical ORAMs.
- Tree-based ORAMs: This kind of ORAM uses an index for data lookup and it requires the user-side storage to maintain the index. However, if the number of data blocks is quite large, this may be infeasible. If the user cannot store the index on user-side storage, it can outsource the index to the server in a manner similar to storing real data blocks. This may increase the cost of communication. The path ORAM proposed by Stefanov et al. [6] is a typical scheme in this category.
2.2. Blockchain and Smart Contract
2.3. Applications of Blockchain
3. Preliminaries
3.1. Garbled Circuits
- : This algorithm takes as input a security parameter and a circuit C, then outputs a garbled circuit and , which is a set of input labels for each input wire of C.
- : This algorithm takes as input a garbled circuit and a garbled input , then outputs the evaluated value y.
- -
- chooses a circuit C. The experiment runs and sends to . outputs an input i and the experiment outputs .
- -
- chooses a circuit C. The experiment runs and sends to . outputs an input i and the experiment runs and outputs .
3.2. ORAM
4. System Framework
4.1. Model
- It allow users to upload their personal data to the smart contract.
- It allow users to access their data without revealing data access patterns.
- : This algorithm takes as input two security parameters and the user’s ID , then outputs a secret key , the user’s private key , and the user’s public key .
- : This algorithm takes as input two security parameters , the secret key , the user’s private key , the user’s public key , a transaction T, and a set of the user’s personal data and corresponding IDs , then outputs an index I, an oblivious database that consists of a set of encrypted data , a signature of the transaction , and a verification of the transaction v.
- : This algorithm takes as input the security parameter and the target data’s ID , then outputs a hidden ID .
- : This algorithms takes as input the user’s private key and the user’s public key , the target data’s ID , the oblivious index I, a transaction T, and the oblivious database , then outputs a set of the encrypted data , a signature of the transaction , and a verification of the transaction v.
- : This algorithm takes as input the secret key and a set of the encrypted data , then outputs a set of plaintext data and corresponding IDs .
- : This algorithm takes as input the user’s private key , the user’s public key , the secret key , a set of plaintext data and corresponding IDs , a transaction T, and a random number , then outputs the re-encrypted data , an updated oblivious index , an updated oblivious database , a signature of the transaction , and a verification of the transaction v.
4.2. Security Definition
5. The Proposed System
5.1. Building Blocks
5.1.1. Data Block Format
5.1.2. Service-Side Storage
5.1.3. User-Side Storage
5.1.4. Algorithms on Service Side
- : This algorithms takes as input a set of ciphertext data blocks , the garbled position map , a garbled circuit for evaluation, and a garbled circuit for replacing labels, then outputs a transaction and an oblivious database .
- : This algorithm takes as input a garbled label of the target data’s ID , the garbled position map , and a garbled circuit for evaluation, then outputs a transaction and , which is the location of the target data’s ID on the position map.
- : This algorithm takes as input the location of the target data’s ID on the position map , then outputs a transaction and a set of the ciphertext data blocks based on the path on the position map.
- : This algorithm takes as input re-encrypted data blocks and a random path p, then outputs a transaction and an updated oblivious database .
- : This algorithm takes as input the garbled position map and a garbled circuit for replacing the label, then outputs a transaction and as the garbled position map to the next round.
- : This algorithm takes as input a garbled circuit for updating the old one and a garbled circuit for updating the old one, then outputs a transaction .
5.1.5. Algorithms on User Side
- : This algorithm takes as input a security parameter , then outputs a secret key .
- : This algorithm takes as input a secret key , a set of ciphertext data blocks , and the target data’s ID , then outputs a set of the user’s personal data and the corresponding IDs .
- : This algorithm takes as input a secret key , a set of plaintext data blocks and corresponding IDs , then outputs a set of ciphertext data blocks .
- : This algorithm takes as input a security parameter and a circuit C, then outputs a garbled circuit and , which is a set of input labels for each input wire of C.
- : This algorithm takes as input the target data’s ID and a set of labels , then outputs a garbled ID .
- This algorithm takes as input a security parameter and the number n of path, then outputs a set of random paths where and N is the number of the leaf nodes.
- This algorithm takes as input the IDs of the user’s data and a set of random paths , then outputs a position map .
- : This algorithm takes as input the position map and a set of labels , then outputs the garbled position map .
Algorithm 1: Evaluation circuit |
Algorithm 2: Replacing circuit |
5.2. Full Construction
- :
- The user invokes with the security parameter to generate the secret key for encryption and decryption of the data blocks.
- :
- The user invokes with the secret key to encrypt the user’s data and the corresponding IDs and generates the ciphertext data blocks . Following this, the ciphertext data blocks are ready to upload to the smart contract.
- After generating the ciphertext data blocks, the user has to build the position map. First, the user invokes with the security parameter to generate a set of the random paths based on the number of the ciphertext data blocks .Second, the user invokes with the data’s ID and a set of random paths to create the position map .
- In order to use the scheme of garbled circuits on the smart contract, the user has to perform some preprocessing locally. The user invokes with the security parameter and the evaluation circuit to generate the garbled circuit for evaluation and the corresponding garbled labels . The design of the evaluation circuit is shown in Figure 7.
- After generating the garbled labels , the user invokes to garbled the position map . The ID field of will be replaced by and the position map will become the garbled position map . Thus, the data’s ID will not be learned by the smart contract.
- As the garbled circuit can only be used once, the user has to update the labels on the garbled position map . The user invokes with the security parameter and the replacing circuit to generate the garbled circuit for replacing labels and the corresponding garbled labels . The design of the replacing circuit is shown in Figure 8.
- The user builds the oblivious structure on the smart contract and stores the ciphertext data blocks in it based on the position map . The user deploys the smart contract to the Ethereum blockchain by sending the transaction , which contains the ciphertext data blocks , the garbled position map , and the garbled circuits and . Next, it will generate the corresponding transaction and the oblivious database .
- :
- After the oblivious database is built on the smart contract, the user is ready to access the data. Before that, the user must invoke with to garble the target data’s ID into . Therefore, the target data’s ID will not be learned by the smart contract.
- :
- As the garbled position map and garbled circuit have been uploaded to the smart contract, the user invokes with the target data’s garbled ID to generate the corresponding transaction and the target data’s location on the garbled position map .
- The user invokes with to generate the corresponding transaction and gets a set of ciphertext data blocks that contains the target data.
- After the garbled position map is used by the evaluation circuit, the user has to replace the labels by invoking with . Next, it will generate the corresponding transaction and the updated garbled position map .
- :
- After getting a set of ciphertext data blocks , the user invokes with the secret key and target data’s ID to recover the data blocks and gets a set of the user’s personal data and corresponding IDs . Next, the user obtains target data based on the target data’s ID .
- :
- After getting the target data, the user invokes with the secret key to re-encrypt a set of plaintext data blocks and corresponding IDs . Next, it will generate a set of re-encrypted data blocks , which is ready to be uploaded to the smart contract.
- In order to hide the data access pattern, the user has to refresh the path on the position map. Therefore, the user invokes to generate the random path , which is ready to be uploaded to the smart contract.
- After re-encrypting the data and generating the random path, the user invokes to upload a set of re-encrypted data blocks and the random path . The target data block will be put in the child node of the previous path and the updated path. Other data blocks will be put back to the original node. It will then generate the corresponding transaction and the updated oblivious database .
- Because the garbled circuit on the smart contract has been used by the user, the user has to re-generate the garbled circuit for the next round. Thus, the user invokes with the security parameter and the evaluation circuit to generate the next round garbled circuit and the corresponding garbled labels .
- As noted above, because the garbled circuit on the smart contract has been used by the user, the user has to re-generate the garbled circuit for the next round. Thus, the user invokes with the security parameter and the circuit to generate the next round garbled circuit and the corresponding garbled labels .
- After re-generating the garbled circuits for the next round, the user invokes to upload garbled circuits and . Next, it will generate the corresponding transaction .
5.3. Security Proof
- -
- In the phase of , chooses circuit and to generate the garbled circuit. The experiment runs the following algorithms and sends and to .In order to hide the data’s ID on the position map, outputs as input. The experiment then runs the following algorithm to generate .In the phase of , in order to hide the target data’s ID, outputs as input. The experiment then runs the following algorithm to generate .In the phase of , the experiments runs the following algorithms to get the target data from the smart contract.
- -
- In the phase of , chooses circuit and to generate the garbled circuit. The experiment runs the following algorithms and sends and to .In order to hide the data’s ID on the position map, outputs as input. The experiment then runs the following algorithm to generate .In the phase of , in order to hide the target data’s ID, outputs as input. The experiment the runs the following algorithm to generate .In the phase of , the experiments runs the following algorithms to get the target data from the smart contract.
6. Implementations and Discussion
6.1. Garbled Circuit Implementations
6.2. Smart Contract Implementation and Experiments
6.3. Discussion of the Proposed System
6.4. Extension on Parallel Smart Contract Model (If Possible)
- : This algorithm groups the transactions and leaves no shared variables for each transaction group. It takes as input the transactions , then outputs the transaction sets .
- : This algorithm takes as input the transaction sets , then outputs the threads to execute the transaction sets in parallel.
7. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Acknowledgments
Conflicts of Interest
References
- Dorri, A.; Kanhere, S.S.; Jurdak, R. Towards an optimized blockchain for IoT. In Proceedings of the 2017 IEEE/ACM Second International Conference on Internet-of-Things Design and Implementation (IoTDI), Pittsburgh, PA, USA, 18–21 April 2017; pp. 173–178. [Google Scholar]
- Nakamoto, S.; Bitcoin, A. A Peer-to-Peer Electronic Cash System. 2008. Available online: https://bitcoin.org/bitcoin.pdf (accessed on 17 March 2022).
- Szabo, N. Formalizing and securing relationships on public networks. First Monday 1997, 2. [Google Scholar] [CrossRef]
- Zhou, L.; Wang, L.; Sun, Y.; Lv, P. Beekeeper: A blockchain-based iot system with secure storage and homomorphic computation. IEEE Access 2018, 6, 43472–43488. [Google Scholar] [CrossRef]
- Goldreich, O.; Ostrovsky, R. Software protection and simulation on oblivious RAMs. J. ACM (JACM) 1996, 43, 431–473. [Google Scholar] [CrossRef] [Green Version]
- Stefanov, E.; Van Dijk, M.; Shi, E.; Fletcher, C.; Ren, L.; Yu, X.; Devadas, S. Path ORAM: An extremely simple oblivious RAM protocol. In Proceedings of the 2013 ACM SIGSAC Conference on Computer & Communications Security, Berlin, Germany, 4–8 November 2013; pp. 299–310. [Google Scholar]
- Wang, X.; Chan, H.; Shi, E. Circuit oram: On tightness of the goldreich-ostrovsky lower bound. In Proceedings of the 22nd ACM SIGSAC Conference on Computer and Communications Security, Denver, CO, USA, 12–16 October 2015; pp. 850–861. [Google Scholar]
- Yao, A.C. Protocols for secure computations. In Proceedings of the 23rd Annual Symposium on Foundations of Computer Science (SFCS 1982), Chicago, IL, USA, 3–5 November 1982; pp. 160–164. [Google Scholar]
- Yu, W.; Luo, K.; Ding, Y.; You, G.; Hu, K. A Parallel Smart Contract Model. In Proceedings of the 2018 International Conference on Machine Learning and Machine Intelligence, Stockholm, Sweden, 10–15 July 2018; pp. 72–77. [Google Scholar]
- Arora, N.S.; Blumofe, R.D.; Plaxton, C.G. Thread scheduling for multiprogrammed multiprocessors. Theory Comput. Syst. 2001, 34, 115–144. [Google Scholar] [CrossRef]
- Devadas, S.; van Dijk, M.; Fletcher, C.W.; Ren, L.; Shi, E.; Wichs, D. Onion ORAM: A constant bandwidth blowup oblivious RAM. In Proceedings of the Theory of Cryptography Conference, Beijing, China, 1–3 November 2016; Springer: Berlin/Heidelberg, Germany, 2016; pp. 145–174. [Google Scholar]
- Moataz, T.; Mayberry, T.; Blass, E.O. Constant communication ORAM with small blocksize. In Proceedings of the 22nd ACM SIGSAC Conference on Computer and Communications Security, Denver, CO, USA, 12–16 October 2015; pp. 862–873. [Google Scholar]
- Goldreich, O. Towards a theory of software protection and simulation by oblivious RAMs. In Proceedings of the Nineteenth Annual ACM Symposium on Theory of Computing, New York, NY, USA, 25–27 May 1987; pp. 182–194. [Google Scholar]
- Ostrovsky, R. Efficient computation on oblivious RAMs. In Proceedings of the Twenty-Second Annual ACM Symposium on Theory of Computing, Baltimore, MD, USA, 14–16 May 1990; pp. 514–523. [Google Scholar]
- Goodrich, M.T.; Mitzenmacher, M. Privacy-preserving access of outsourced data via oblivious RAM simulation. In Proceedings of the International Colloquium on Automata, Languages, and Programming, Zurich, Switzerland, 4–8 July 2011; Springer: Berlin/Heidelberg, Germany, 2011; pp. 576–587. [Google Scholar]
- Goodrich, M.T.; Mitzenmacher, M.; Ohrimenko, O.; Tamassia, R. Privacy-preserving group data access via stateless oblivious RAM simulation. In Proceedings of the Twenty-Third Annual ACM-SIAM Symposium on Discrete Algorithms, Kyoto, Japan, 17–19 January 2012; pp. 157–167. [Google Scholar]
- Kushilevitz, E.; Lu, S.; Ostrovsky, R. On the (in) security of hash-based oblivious RAM and a new balancing scheme. In Proceedings of the Twenty-Third Annual ACM-SIAM Symposium on Discrete Algorithms, Kyoto, Japan, 17–19 January 2012; pp. 143–156. [Google Scholar]
- Lu, S.; Ostrovsky, R. Distributed oblivious RAM for secure two-party computation. In Proceedings of the Theory of Cryptography Conference, Tokyo, Japan, 3–6 March 2013; Springer: Berlin/Heidelberg, Germany, 2013; pp. 377–396. [Google Scholar]
- Stefanov, E.; Shi, E.; Song, D. Towards practical oblivious RAM. arXiv 2011, arXiv:1106.3652. [Google Scholar]
- Shi, E.; Chan, T.H.H.; Stefanov, E.; Li, M. Oblivious RAM with O ((logN) 3) worst-case cost. In Proceedings of the International Conference on The Theory and Application of Cryptology and Information Security, Seoul, Korea, 4–8 December 2011; Springer: Berlin/Heidelberg, Germany, 2011; pp. 197–214. [Google Scholar]
- Dubovitskaya, A.; Xu, Z.; Ryu, S.; Schumacher, M.; Wang, F. Secure and trustable electronic medical records sharing using blockchain. In Proceedings of the AMIA Annual Symposium Proceedings, Washington, DC, USA, 4–8 November 2017; American Medical Informatics Association: Washington, DC, USA, 2017; Volume 2017, p. 650. [Google Scholar]
- Tian, F. An agri-food supply chain traceability system for China based on RFID & blockchain technology. In Proceedings of the 2016 13th International Conference on Service Systems and Service Management (ICSSSM), Kunming, China, 24–26 June 2016; pp. 1–6. [Google Scholar]
- Raju, S.; Boddepalli, S.; Gampa, S.; Yan, Q.; Deogun, J.S. Identity management using blockchain for cognitive cellular networks. In Proceedings of the 2017 IEEE International Conference on Communications (ICC), Paris, France, 21–25 May 2017; pp. 1–6. [Google Scholar]
- Dwork, C.; Naor, M. Pricing via processing or combatting junk mail. In Proceedings of the Annual International Cryptology Conference, Santa Barbara, CA, USA, 16–20 August 1992; Springer: Berlin/Heidelberg, Germany, 1992; pp. 139–147. [Google Scholar]
- Jakobsson, M.; Juels, A. Proofs of work and bread pudding protocols. In Secure Information Networks; Springer: Berlin/Heidelberg, Germany, 1999; pp. 258–272. [Google Scholar]
- Castro, M.; Liskov, B. Practical Byzantine fault tolerance. In Proceedings of the Third USENIX Symposium on Operating Systems Design and Implementation (OSDI), New Orleans, LA, USA, 22–25 February 1999; Volume 99, pp. 173–186. [Google Scholar]
- King, S.; Nadal, S. Ppcoin: Peer-to-peer crypto-currency with proof-of-stake. Self-Publ. Pap. August 2012, 19. Available online: https://bitcoin.peryaudo.org/vendor/peercoin-paper.pdf (accessed on 6 March 2022).
- Larimer, D. Delegated proof-of-stake (dpos). Bitshare Whitepaper 2014, 81, 85. [Google Scholar]
- Buterin, V. A next-generation smart contract and decentralized application platform. White Paper 2014, 3. Available online: https://blockchainlab.com/pdf/Ethereum_white_paper-a_next_generation_smart_contract_and_decentralized_application_platform-vitalik-buterin.pdf (accessed on 6 March 2022).
- Wood, G. Ethereum: A secure decentralised generalised transaction ledger. Ethereum Proj. Yellow Pap. 2014, 151, 1–32. [Google Scholar]
- Daniel Larimer, B.B. EOS.IO’s White Paper. 2017. Available online: https://github.com/EOSIO/Documentation/blob/master/TechnicalWhitePaper.md (accessed on 6 March 2022).
- Cachin, C. Architecture of the hyperledger blockchain fabric. In Proceedings of the Workshop on Distributed Cryptocurrencies and Consensus Ledgers, Chicago, IL, USA, 25 July 2016; Volume 310, p. 4. [Google Scholar]
- Salah, K.; Rehman, M.H.U.; Nizamuddin, N.; Al-Fuqaha, A. Blockchain for AI: Review and open research challenges. IEEE Access 2019, 7, 10127–10149. [Google Scholar] [CrossRef]
- Lu, Y.; Huang, X.; Zhang, K.; Maharjan, S.; Zhang, Y. Blockchain empowered asynchronous federated learning for secure data sharing in internet of vehicles. IEEE Trans. Veh. Technol. 2020, 69, 4298–4311. [Google Scholar] [CrossRef]
- Ouaddah, A.; Abou Elkalam, A.; Ait Ouahman, A. FairAccess: A new Blockchain-based access control framework for the Internet of Things. Secur. Commun. Netw. 2016, 9, 5943–5964. [Google Scholar] [CrossRef]
- Bera, B.; Saha, S.; Das, A.K.; Kumar, N.; Lorenz, P.; Alazab, M. Blockchain-envisioned secure data delivery and collection scheme for 5G-based IoT-enabled Internet of drones environment. IEEE Trans. Veh. Technol. 2020, 69, 9097–9111. [Google Scholar] [CrossRef]
- Zhang, S.; Yao, T.; Arthur Sandor, V.K.; Weng, T.H.; Liang, W.; Su, J. A novel blockchain-based privacy-preserving framework for online social networks. Connect. Sci. 2021, 33, 555–575. [Google Scholar] [CrossRef]
- Xie, L.; Ding, Y.; Yang, H.; Wang, X. Blockchain-based secure and trustworthy Internet of Things in SDN-enabled 5G-VANETs. IEEE Access 2019, 7, 56656–56666. [Google Scholar] [CrossRef]
- Steichen, M.; Fiz, B.; Norvill, R.; Shbair, W.; State, R. Blockchain-based, decentralized access control for IPFS. In Proceedings of the 2018 IEEE International Conference on Internet of Things (iThings) and IEEE Green Computing and Communications (GreenCom) and IEEE Cyber, Physical and Social Computing (CPSCom) and IEEE Smart Data (SmartData), Halifax, NS, Canada, 30 July–3 August 2018; pp. 1499–1506. [Google Scholar]
- Dai, Y.; Li, G.; Xu, B. Study on learning resource authentication in MOOCs based on blockchain. Int. J. Comput. Sci. Eng. 2019, 18, 314–320. [Google Scholar] [CrossRef]
- Lou, J.; Zhang, Q.; Qi, Z.; Lei, K. A blockchain-based key management scheme for named data networking. In Proceedings of the 2018 1st IEEE International Conference on Hot Information-Centric Networking (HotICN), Shenzhen, China, 17–19 August 2018; pp. 141–146. [Google Scholar]
- Pierro, G.A.; Tonelli, R.; Marchesi, M. An organized repository of ethereum smart contracts’ source codes and metrics. Future Internet 2020, 12, 197. [Google Scholar] [CrossRef]
- Pierro, G.A.; Tonelli, R. Paso: A web-based parser for solidity language analysis. In Proceedings of the 2020 IEEE International Workshop on Blockchain Oriented Software Engineering (IWBOSE), London, ON, Canada, 18 February 2020; pp. 16–21. [Google Scholar]
ORAM | ORAM on SC | Proposal | |
---|---|---|---|
Round | |||
Payload | |||
Client storage | |||
Security | Centralized | Decentralized | Decentralized |
Transaction | Gas Used | Transaction Fees (ETH) | Execution Time (ms) |
---|---|---|---|
4,607,129 | 0.0741 | 125 | |
483,250 | 0.0077 | 329 | |
483,250 | 0.0077 | 79 | |
295,445 | 0.0047 | 69 | |
295,445 | 0.0047 | 70 | |
2,877,953 | 0.0463 | 518 |
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |
© 2022 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Guo, Z.-Y.; Chen, Y.-C.; Lin, H.-P. Oblivious Access for Decentralized Database Systems: A New Asymmetric Framework from Smart Contracts. Symmetry 2022, 14, 680. https://doi.org/10.3390/sym14040680
Guo Z-Y, Chen Y-C, Lin H-P. Oblivious Access for Decentralized Database Systems: A New Asymmetric Framework from Smart Contracts. Symmetry. 2022; 14(4):680. https://doi.org/10.3390/sym14040680
Chicago/Turabian StyleGuo, Zhong-Yi, Yu-Chi Chen, and Hsiu-Ping Lin. 2022. "Oblivious Access for Decentralized Database Systems: A New Asymmetric Framework from Smart Contracts" Symmetry 14, no. 4: 680. https://doi.org/10.3390/sym14040680
APA StyleGuo, Z. -Y., Chen, Y. -C., & Lin, H. -P. (2022). Oblivious Access for Decentralized Database Systems: A New Asymmetric Framework from Smart Contracts. Symmetry, 14(4), 680. https://doi.org/10.3390/sym14040680