partial search on an encrypted field

120 views
Skip to first unread message

David Vergison

unread,
Oct 22, 2019, 10:48:11 AM10/22/19
to mongodb-user
Hello,

I would like to know if it is possible to make a partial search (for exemple with the 3 first letters of a lastname) on an encrypted field with mongodb enterprise ?

Thanks !

Kevin Adistambha

unread,
Oct 29, 2019, 1:01:17 AM10/29/19
to mongodb-user

Hi David,

I would like to know if it is possible to make a partial search (for exemple with the 3 first letters of a lastname) on an encrypted field with mongodb enterprise ?

No it’s not possible unless you store that first three letters in another field. Any encryption scheme should encrypt the whole field. You cannot have a partially-encrypted field since by definition the field is not encrypted anymore.

Having said that, note that I would personally consider storing the first three letter unencrypted as a security hole since you have a hint of the content of the field.

I’m curious about the use case that requires you to search an encrypted field. Could you elaborate further?

Best regards,
Kevin

Reply all
Reply to author
Forward
0 new messages