Building Enclave-Native Storage Engines for Practical Encrypted

Building Enclave-Native Storage Engines for Practical Encrypted

Building Enclave-Native Storage Engines for Practical Encrypted Databases Yuanyuan Sun, Sheng Wang, Huorong Li, Feifei Li Alibaba Group {yuanyuan.sun,sh.wang,huorong.lhr,lifeifei}@alibaba-inc.com ABSTRACT attacks — this outsourced infrastructure could be compromised by Data confdentiality is one of the biggest concerns that hinders insiders, such as malicious co-tenants and curious stafs, who might enterprise customers from moving their workloads to the cloud. look into the data (e.g., in databases) and cause data breaches. In Thanks to the trusted execution environment (TEE), it is now fea- other words, anyone with privileges (or even physical access [31]) sible to build encrypted databases in the enclave that can process on that server can easily steal the data for his/her own interest. customers’ data while keeping it confdential to the cloud. Though However, customers have no control of administrative privileges some enclave-based encrypted databases emerge recently, there re- to the machines that host their data, which is completely diferent mains a large unexplored area in between about how confdentiality from on-premise deployments. Given this serious situation, it is can be achieved in diferent ways and what infuences are implied critical to protect the confdentiality of customers’ data during the by them. In this paper, we frst provide a broad exploration of possi- operation of cloud databases. Note that existing database security ble design choices in building encrypted database storage engines, mechanisms, such as access control and data-at-rest encryption, rendering trade-ofs in security, performance and functionality. We can be easily bypassed by attackers in this context [2]. observe that choices on diferent dimensions can be independent In order to tackle this problem, many research works [5, 6, 25, and their combination determines the overall trade-of of the entire 47, 49, 50, 58, 61] have built encrypted databases, which prevent storage. We then propose Enclage, an encrypted storage engine attackers with privileges on the database (or on the server that that makes practical trade-ofs. It adopts many enclave-native de- hosts the database) from accessing users’ data in plaintext. One signs, such as page-level encryption, reduced enclave interaction, line of work, e.g., CryptDB [49] and Arx [47], takes advantage and hierarchical memory bufer, which ofer high-level security of special cryptographic primitives to support direct operations guarantee and high performance at the same time. To make better over ciphertext (e.g., homomorphic encryption [28], searchable use of the limited enclave memory, we derive the optimal page size encryption [54], and garbled circuit [63]). However, they usually in enclave and adopt delta decryption to access large data pages introduce signifcant overheads and only allow limited types of with low cost. Our experiments show that Enclage outperforms the operations [19, 36, 46, 47, 49]. This makes them unsuitable for baseline, a common storage design in many encrypted databases, general-purpose cloud database infrastructures. by over 13× in throughput and about 5× in storage savings. Instead, we follow another line of work that uses trusted execu- tion environments (TEE), like Intel SGX and AMD SEV, to operate on PVLDB Reference Format: confdential data in an isolated enclave. Due to the recent advance- Yuanyuan Sun, Sheng Wang, Huorong Li, Feifei Li. Building ment of Intel SGX (software guard extensions), many enclave-based Enclave-Native Storage Engines for Practical Encrypted Databases. PVLDB, encrypted databases and storage systems have emerged [5, 9, 25, 40, 14(6): 1019-1032, 2021. 42, 50, 61, 64]. Although all these systems target data confdential- doi:10.14778/3447689.3447705 ity, their protection strengths are sometimes either too “strong” or too “weak”. Some of them make user data completely inaccessible 1 INTRODUCTION or indistinguishable from the server. For example, EnclaveDB [50] Due to the rapid advancement of cloud computing, many com- puts all data in enclave-protected memory, and ObliDB [25] adopts panies have moved their enterprise workloads from on-premise oblivious data access to untrusted memory. However, such a strong data centers to cloud services, who ofer many attractive features, protection signifcantly compromises either system capability or such as elasticity, high availability, and low cost. From the security performance. On the contrary, others ofer confdentiality protec- perspective, the cloud tends to be less vulnerable than on-premise tion as add-on features to legacy database systems. For example, deployments. The service provider can employ a large team of secu- Always-encrypted [5] and StealthDB [61] ofer a few enclave-based rity experts to adopt state-of-the-art protection mechanisms timely functions for computation over ciphertext with marginal modi- and continuously to the entire infrastructure. In this case, even fcations to SQL Server and PostgreSQL. We observe that such a huge security investments become afordable as they are amortized non-intrusive design leads to severe information leakage and perfor- over all customers. However, there exposes a new dimension of mance degradation (Section 3.3). In summary, there still remains a large unexplored area between above two extreme scenarios — how This work is licensed under the Creative Commons BY-NC-ND 4.0 International confdentiality can be achieved in encrypted databases where users License. Visit https://creativecommons.org/licenses/by-nc-nd/4.0/ to view a copy of this license. For any use beyond those covered by this license, obtain permission by have more practical considerations for trade-ofs among security, emailing [email protected]. Copyright is held by the owner/author(s). Publication rights performance and functionality. licensed to the VLDB Endowment. Proceedings of the VLDB Endowment, Vol. 14, No. 6 ISSN 2150-8097. doi:10.14778/3447689.3447705 1019 In this paper, we consider the design of an encrypted storage with our experiments. A delta decryption protocol is applied engine, which is a fundamental building block for full-fedged en- to access records in data pages efciently, having no memory crypted databases. Instead of proposing a concrete design directly, contention against the index. we frst provide a comprehensive exploration of possible design • We conduct extensive experiments to evaluate the efciency choices for encrypted storage engines. These choices achieve dif- of Enclage, as well as the efectiveness of individual designs ferent trade-ofs among security, performance and functionality, adopted by it. Enclage outperforms the baseline, a common and can be further categorized into fve dimensions (i.e., encryption storage design in existing encrypted databases [5, 61], by granularity, execution logic in enclave, memory access granularity, over 13× in throughput and about 5× in storage savings. enclave memory usage, record identity protection) as shown in Table 1. We observe that the decision on each dimension can be 2 BACKGROUND made independently, and their combination determines the overall In this section, we brief the concept of trusted execution environ- trade-of of the entire storage. Moreover, not all combinations are ment and Intel SGX, and then discuss the challenges in designing equally useful in practice as we will discuss later. This analysis SGX-based encrypted databases. should be able to help database practitioners to well understand the efect of each decision, and guide them to fnd the best choices 2.1 Trusted Execution Environment and SGX for their own needs. A trusted execution environment (TEE) is a secure area, which After exploring the design space, we further make choices on guarantees the confdentiality and integrity of computation and each dimension, rendering a good trade-of for practical database data in it. It can be used to build secure applications in untrusted usage. Under this circumstance, we propose Enclage, an enclave- environments (e.g., on a public cloud), where the host may conduct + native database storage engine that includes a B -tree-like index malicious actions. Intel Software Guard Extensions (SGX) is a state- structure and a heap-fle-like table store. It allows data to be securely of-the-art implementation of TEE, receiving broad attention from maintained in untrusted memory and disk by encrypting individual both industry and academia. SGX is an extension of x86 instruction index and data pages. This mitigates ciphertext amplifcations and set architecture, and it ofers protections using a concept called prevents information leakage inside a page. To avoid unnecessary enclave. Readers can refer to [22, 33, 35] for more details on its context switches between enclave and non-enclave executions, we implementation and features, e.g., isolation, sealing and attestation. carefully implement the main execution logic of index (i.e., entry An enclave is an isolated virtual address space in a process, where search and update) and table (i.e., record read and write) inside the both code and data are stored in protected memory pages called enclave. It is able to reduce the number of enclave entries per request enclave page caches (EPC) that cannot be accessed by the host, to one in most cases, and minimize it when external interactions i.e., the rest of the process outside the enclave. The data in EPC (e.g., I/Os) are required. We further utilize protected memory in is encrypted by a memory encryption engine (MEE), which only enclave to cache

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    14 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us