Security & Performance of Encrypted NoSQL Databases

Security and Performance Analysis of Encrypted NoSQL Databases
System & Network Engineering (SNE) Master’s Thesis — University of Amsterdam (2017)
Authors: M.W. Grim BSc and A.T. Wiersma BSc | Supervisor: F. Turkmen PhD
Research Findings at a Glance
- The Security Trade-Off: The more steps taken to assure complete data confidentiality, the more the performance of the database engine decreases.
- Encryption at Rest: Enabling MongoDB’s native AES-256-CBC encryption at rest introduces a very low performance overhead: 4.71% throughput reduction for inserts and 6.74% for reads/updates.
- End-to-End Encryption: Performing client-side encryption using ORE and Partially Homomorphic schemes successfully prevents server-side database compromise, but introduces significant latency: 11x to 53x overhead for reads, and 114x to 135x overhead for writes (due to network-based tree traversals during AVL-tree inserts/balancing).
- Threat Model Shift: Client-side encryption shifts the vulnerability to cold-boot attacks from the untrustworthy database/cloud server directly to the application server (where decryption keys must reside in memory).
Evaluation Scenarios
Scenario A: Encryption at Rest (Server-Side Encryption)
This approach highlights a key vulnerability where data exists in plaintext within the server’s volatile memory during processing. While the storage disk is encrypted (protecting against physical theft of drives), a cold-boot attack or process memory dump can expose the sensitive data while the application is running.Scenario B: End-to-End Encryption (Computation Over Encrypted Data)
This more secure approach demonstrates data that is encrypted before leaving the client. The critical difference is visible within the MongoDB server: data remains encrypted both in memory and on disk. By utilizing homomorphic encryption or searchable symmetric encryption (using ORE, Paillier, or ElGamal), the server can perform required computations and comparisons directly on the ciphertexts without ever decrypting them, effectively neutralising threats from server or memory compromise.
Research Abstract
This research evaluates the performance and security of NoSQL databases, specifically MongoDB, implementing two types of encryption. These types of encryption are at rest encryption performed at the server and end-to-end encryption done by the client, where the server is able to perform queries over the encrypted data using Order Revealing and Partially Homomorphic encryption schemes. For the latter case we extended earlier work done by Alves et al. by adding functionality to their Python MongoDB connector wrapper.
This research shows that enabling encryption introduces overhead in both the case of encryption at rest and the case of end-to-end encryption. Additionally this research shows that enabling end-to-end encryption prevents numerous attack vectors at the server side, albeit with the tradeoff of introducing a significant overhead in performance and limiting the number of supported queries.
Encryption Schemes Evaluated
- Order-Revealing Encryption (ORE): Uses the Lewi-Wu construction (FastORE C implementation) to build encrypted indexes. Values are stored in a serialized AVL-tree in the database, allowing range queries and sorting without the server knowing the plaintext values.
- Additive Homomorphism (Paillier): Public/private key-pair Paillier cryptosystem enabling addition and subtraction directly over ciphertexts on the server.
- Multiplicative Homomorphism (ElGamal): Uses the homomorphic properties of the ElGamal cryptosystem to allow multiplication directly over encrypted fields.
- Encryption at Rest: Native MongoDB Enterprise Advanced engine utilizing OpenSSL to encrypt active pages at the application level using AES-256-CBC.
Citation
Grim, M. W. and Wiersma, A. T.: Security and Performance Analysis of Encrypted NoSQL Databases, System and Network Engineering (SNE), University of Amsterdam, Amsterdam, Netherlands, 2017.