GDPR, encryption - fastest way ?

Discussion of open issues, suggestions and bugs regarding IBDAC (InterBase Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Rastislav
Posts: 15
Joined: Tue 03 Apr 2018 10:18

GDPR, encryption - fastest way ?

Post by Rastislav » Fri 06 Apr 2018 15:15

Hello,

I want use encryption in my application (+Firebird database) due to a new European law GDPR. Your solution is perfect and I thank you very much for it !!! :)
But I want optimize it for speed and I am looking for best way :
I have table CUSTOMERS with 20 fields (CHAR 80 each, approx.) and I want encrypt all this fields. All this fields will be showed in DBGrid and I want change sorting, search ...
I understand, that decryption is performed in the application (after fetching data from database/table) and data are decrypted and cached ? Now user can change sorting or search.
But what is faster way ?

1. When all fields will be encrypted/decrypted individually (it mean 20 field for one record)

or

2. I create any common data field (BLOB) where I put all this 20 fields together and application will encrypt/decrypt only this one field (naturally, I will create 20 "calculated"
fields for table and load it in OnCalcFields event.

Or shorten - what is faster - encrypt/decrypt of 20 short fields or encrypt/decrypt of 1 longer field ?

Thank you for explanation ...

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: GDPR, encryption - fastest way ?

Post by ViktorV » Wed 11 Apr 2018 06:56

Time for encrypting/decrypting one large field will be less than the time spent on a similar operation for 20 smaller fields. But the time spent on "decomposing" and "merging" data into 20 calculable fields can override the previously mentioned performance gain. Therefore, the most effective implementation is chosen independently empirically.

Rastislav
Posts: 15
Joined: Tue 03 Apr 2018 10:18

Re: GDPR, encryption - fastest way ?

Post by Rastislav » Wed 11 Apr 2018 16:38

Thank you for answer, I will test it ...

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: GDPR, encryption - fastest way ?

Post by ViktorV » Fri 13 Apr 2018 06:43

Thank you for the interest in our products.
If you have any questions during using our products, please don't hesitate to contact us - and we will try to help you solve them.

Post Reply