0

MongoDB recently announced their new field-level-encryption method for helping tackle DB breaches. (https://www.wired.com/story/field-level-encryption-databases-mongobd/)

In other articles it is covered in some more technical detail (https://www.csoonline.com/article/3403676/new-mongodb-field-level-encryption-can-help-prevent-data-breaches.html) and clearly says "there is no additional performance impact on the server".

Given a simple query in which you'd want to filter by particular values in an encrypted field, how does it perform the same as in the case when decryption (to interrogate a value) is not required? Why is there no performance hit here when you'd have to decrypt fields first before effectively querying them?

3

As explained in the links you provided, the encryption/decryption is done on the client side and the server only sees the encrypted values.

There is no performance impact on the server, because the hard work of encryption/decryption is done on the client's machine and not on the server. The server just gets a blob of data to store and it may keep track of the fact that the data is encrypted.

There is a impact on the types of queries you can do. As the server only sees the encrypted data, the only kind of query that it can do is looking for an exact match. Sub-string, like and less-than/greater-than matches will not be possible on encrypted fields.

  • This is a very important limitation, it seems! – T. Sar Jun 19 at 12:38
1

The performance hit is moved to the client, but from the server standpoint there's no difference.

For encrypted data, instead of filtering with let's say "fox", you end up filtering with the encrypted value of "fox" which let's say is "x1H". The driver handles the conversion transparently.

From the server point of view it's just data, and it doesn't care whether it's plaintext or ciphertext.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.