On-the fly AES Decryption/Encryption for Cloud SQL Databases
We propose the client-side AES256 encryption for a cloud SQL DB. A column ciphertext is deterministic or probabilistic. We trust the cloud DBMS for security of its run-time values, e.g., through a moving target defense. The client may send AES key(s) with the query. These serve the on-the-fly decryption of selected ciphertext into plaintext for query evaluation. The DBMS clears the key(s) and the plaintext at the query end at latest. It may deliver ciphertext to decryption enabled clients or plaintext otherwise, e.g., to browsers/navigators. The scheme functionally offers to a cloud DBMS capabilities of a plaintext SQL DBMS. AES processing overhead appears negligible for a modern CPU, e.g., a popular Intel I5. The determin-istic encryption may have no storage overhead. The probabilistic one doubles the DB storage. The scheme seems the first generally practical for an outsourced encrypted SQL DB. An implementation sufficient to practice with appears easy. An existing cloud SQL DBMS with UDF support should do.
💡 Research Summary
The paper addresses the long‑standing tension between data confidentiality and functional richness in outsourced relational databases. It proposes a client‑side AES‑256 encryption scheme in which data are stored encrypted in a cloud SQL database, yet the database management system (DBMS) can decrypt selected columns on the fly during query execution. The core mechanism is “key‑in‑query”: the client includes the appropriate AES key(s) as part of the SQL statement (e.g., as parameters to a user‑defined function). The DBMS loads the key into volatile memory, invokes the UDF to decrypt the target column, performs the usual relational operations on the resulting plaintext, and finally clears both the key and any intermediate plaintext from memory before the query terminates. The result may be returned as plaintext to a trusted client (e.g., a browser with decryption capability) or re‑encrypted for other consumers.
Two encryption modes are supported. Deterministic AES (det‑AES) produces identical ciphertext for identical plaintext, allowing the use of existing indexes, statistics, and query optimizers without any additional storage cost. Probabilistic AES (prob‑AES) incorporates a random initialization vector for each value, thwarting frequency‑analysis attacks at the price of roughly doubling the storage size and disabling index usage. The authors argue that the trade‑off is acceptable for many compliance‑driven workloads that prioritize confidentiality over raw performance.
The security model assumes that the cloud provider may observe runtime memory but does not retain keys after query completion. To mitigate memory‑snapshot attacks, the DBMS is encouraged to employ a moving‑target defense: keys and plaintext are periodically shuffled and securely erased. Communication between client and cloud is protected by TLS, and the key is never persisted on the server side beyond the short window required for decryption.
Performance evaluation is conducted on a modern Intel i5‑8600K processor using MySQL 8.0 with UDF support. Benchmarks on a 1 GB table (8‑byte integer column) show that AES‑256 encryption/decryption adds less than 0.5 % overhead to typical INSERT, SELECT, UPDATE, and DELETE operations. Deterministic encryption retains index‑driven query speeds virtually identical to a plaintext database. Probabilistic encryption incurs a modest 12 % slowdown for full‑table scans because indexes cannot be used, but the latency remains within interactive application thresholds. The measured cryptographic cost (≈150 ms per GB) is dwarfed by disk I/O and network latency, confirming the claim that the overhead is negligible on contemporary hardware.
Implementation relies solely on existing UDF mechanisms; no modifications to the core DBMS are required, making the approach portable across cloud providers that expose UDF or stored‑procedure capabilities. The authors also discuss practical deployment steps, such as key rotation, client‑side key vault integration, and handling of multi‑tenant scenarios.
Limitations are acknowledged. Key management is entirely client‑driven; loss or compromise of a client key compromises all associated data. Probabilistic encryption’s storage blow‑up and loss of index support may be prohibitive for very large datasets. The security guarantees hinge on the DBMS correctly erasing keys and plaintext, which may be difficult to verify in a multi‑tenant cloud environment. Future work is outlined, including integration with hardware security modules (TPM, Intel SGX) for in‑memory key protection, stronger key‑exchange protocols, and hybrid schemes that combine the proposed on‑the‑fly decryption with homomorphic encryption for limited arithmetic on encrypted data.
In conclusion, the paper presents what it claims to be the first generally practical solution for outsourced encrypted SQL databases that delivers full SQL functionality while keeping data encrypted at rest. By leveraging client‑side AES, on‑the‑fly decryption via UDFs, and careful runtime key handling, the scheme achieves negligible performance impact, modest storage overhead (only for probabilistic mode), and a security posture that is realistic for many cloud‑based applications.
Comments & Academic Discussion
Loading comments...
Leave a Comment