Queryable Encryption with the MongoDB EF Core Provider
- π
- π 2,059 words
- π 10 minutes
- π¦ Development
- π·οΈ Entity Framework, MongoDB
MongoDB's Queryable Encryption lets you encrypt sensitive database fields while keeping them searchable. Unlike traditional encryption-at-rest that renders data unreadable to the database, queryable encryption supports equality and range queries on encrypted fields without requiring decryption first.
For example, you can encrypt an employees email address and still query users.Where(u => u.Email == "[email protected]")
users.Where(u => u.Email == "[email protected]") or encrypt salaries and query employees.Where(e => e.Salary > 50000m)
employees.Where(e => e.Salary > 50000m) without any changes to your application code.