Il 27/03/2019 07:42, Tony Shelver ha
scritto:
It is, I was planning to use UUID That's the first idea that came in my mind. Unfortunately, the customer needs to do "real time" search in personal data, so for each key that's pressed, I need to query the whole table filtering the encrypted value (1st layer of slowness) LIKE (2nd layer of slowness) the value the user is typing. I ran a test on my i7-2660 with SSD and 16G RAM and on a 2500 rows table these queries last about 2 seconds each keypress. So it's not the way to go, we have to find something different. Same thing with clinical data, it would be a mess because when I open the patient clinical record I need to see all treatments, or all drugs that have been prescripted, all diseases and so on, and it would be not-so fast if every clinical data name (i.e. all drug names) is encrypted. Hmmm... if user.id and medications.user_id are the same, I can link user with medication... and GDPR rule does not apply..... or am I missing something? GDPR is almost the same concept, even if some rules may differ You sure? :-) Profiling, IMHO, has to be designed in application, here I'm trying to find a way so nobody can, without the use of the application, match a patient with their clinical records (i.e. someone breaking into the server -- data breach) It is a system generated ID, obviously the query is more logical and quicker if i look from master into detail, so I SELECT something FROM medications WHERE medications.user_id = encrypt(user.id). Encrypting the (ex-)FK appears the best solution so far, but I'm afraid of the consequences of losing RI.
Having everything encrypted would be a big performance hit. We
are trying to achieve best performance with the right masking. Thanks Moreno.- |