Comments (4)
No, it is not possible, because encrypted fields can only be searched for an exact match. (Otherwise the encryption would be pointless. On the database side, all encrypted fields are stored as binary data.)
It is only going to make a case insenitive match so that the lowercase value is stored in the encrypted column.
from harrison314.entityframeworkcore.encryption.
Ok, clear. Need to understand how to combine this with a table with potentially million of records.
Thank you for your answer.
from harrison314.entityframeworkcore.encryption.
Like this. If it is to be searched (substring, compare numbers,...) by column or indexed, it cannot be encrypted in the database.
If the column is encrypted with the option EncryptionMode.Deterministic
, then it is possible to search it for an exact match. But that has its problems, for example, it is possible to statistically estimate what the individual values ββmean. In this mode, I recommend encrypting unique data (eg. social security number).
If the column is encrypted with the option EncryptionMode.Randomized
, it is not possible to search against that column. But the data stored in this way is resistant to statistical attacks.
from harrison314.entityframeworkcore.encryption.
The column is encrypted with the option EncryptionMode.Deterministic
, the point is that I have two requirements:
- Encrypt the personal data (name and surname);
- Implement a user friendly search for name and surname... which means "contains with case insensitive".
I totally understand that this two requirements are not coherent, at least with the solutions available right now.
The point is that we have a lot of data in that table, at the moment the only way is to retrieve all the information from the DB (translate the entities to a list of entities) then search on the list, in stead of let SQLServer search for the records and return only the records that match.
from harrison314.entityframeworkcore.encryption.
Related Issues (10)
- Add support .Net 5 HOT 1
- Crate nuget package
- Add Pkcs11 IDbContextEncryptedCryptoProvider HOT 1
- Add remote IDbContextEncryptedCryptoProvider HOT 1
- Add support nullable types
- Add killswitch to encryption provider HOT 3
- Perform a security audit
- Update Cake.build
- Better calculate IV for deterministic encryption HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from harrison314.entityframeworkcore.encryption.