Concept - Querying an Encrypted Database
- Equality works:
WHERE Did = 15is sent asWHERE Did = 1000110111001110(the encrypted value) (s.32). - Range queries fail:
WHERE Salary > 7000cannot work because the encrypted values do not preserve the ordering of the original attribute (s.33). - Fix (s.34-36): encrypt each row as one block and keep an index per attribute that maps value ranges to index numbers (Eid 1-200 1, 201-400 2, 401-600 3, 601-800 4, 801-1000 5; names A,B 1 … I,J 5).
Worked example (s.36): query “eid < 300”.
- Query processor requests all records with (s.36). Using the index table on s.34, index 2 covers Eid 201-400, so it overshoots.
- Server returns those encrypted rows.
- Processor decrypts all rows returned and discards those that do not match the original query (e.g. Eid 320, from the table on s.34-35).
- It returns the plaintext rows to the user.
Further research solutions: CryptDB (link on s.37).
Related: Concept - Database Encryption. Appears in 05 Database Security - Chunk 01 (s.1-38).