Trying to workout SQLite database security for the following situation:
I have a clinical database (Firebird database with patient data) from which I download data daily and unattended and move that data to a SQLite file.
This process is done in VBA and VB6. The previous SQLite file (from the previous day) is just killed, so no trace of that is left and a completely new file is made from fresh data from the Firebird database.
This SQLite file is this then copied to a WM device and the data is accessed with a Basic4PPC interface.
Security of all this should be as follows:
The SQLite file will be encrypted. This has to be done in VB or VB6 on the desktop and it can be done either when the SQLite file is newly created or after the file has been filled with data.
To connect to this SQLite file with the B4P interface the user will have to supply a password that allows connecting to the encrypted SQLite file.
As I see it the B4P side of things is simple, just input the right password and you can connect and see the data. With the new B4P 6.8 this is easy and as far as I can see performance is very good, meaning having the SQLite file encrypted doesn't make it much slower.
The difficulty is with the VBA/VB6 side of things. Once the user has chosen a password this will have to be stored somewhere as it will need to be used everytime a new SQLite file is made and encrypted. So, this password willl need to be hashed or whatever and stored somewhere in an altered form.
Then there also needs to be the option to alter the password, either from the WM device or from the desktop application that does the daily data download.
Would there be a safe way to handle the above situation and what would be the best algorithm to do this? I just had a look at a VB implication of Blowfish
and that looks promising.
Thanks for any thoughts/advice on this.
RBS
I have a clinical database (Firebird database with patient data) from which I download data daily and unattended and move that data to a SQLite file.
This process is done in VBA and VB6. The previous SQLite file (from the previous day) is just killed, so no trace of that is left and a completely new file is made from fresh data from the Firebird database.
This SQLite file is this then copied to a WM device and the data is accessed with a Basic4PPC interface.
Security of all this should be as follows:
The SQLite file will be encrypted. This has to be done in VB or VB6 on the desktop and it can be done either when the SQLite file is newly created or after the file has been filled with data.
To connect to this SQLite file with the B4P interface the user will have to supply a password that allows connecting to the encrypted SQLite file.
As I see it the B4P side of things is simple, just input the right password and you can connect and see the data. With the new B4P 6.8 this is easy and as far as I can see performance is very good, meaning having the SQLite file encrypted doesn't make it much slower.
The difficulty is with the VBA/VB6 side of things. Once the user has chosen a password this will have to be stored somewhere as it will need to be used everytime a new SQLite file is made and encrypted. So, this password willl need to be hashed or whatever and stored somewhere in an altered form.
Then there also needs to be the option to alter the password, either from the WM device or from the desktop application that does the daily data download.
Would there be a safe way to handle the above situation and what would be the best algorithm to do this? I just had a look at a VB implication of Blowfish
and that looks promising.
Thanks for any thoughts/advice on this.
RBS