1 (edited by rjkantor 2016-03-15 17:05:57)

Topic: FULL DB Encryption

Has there been any further efforts to implement  Full DB Enryption into the MVD product www.zetetic.net/sqlcipher/ ?

This is sorely needed if we are to deploy software solutions to third party and do not want unintended access to the databases.

Thank you,
  Robb

Re: FULL DB Encryption

Hello,


It is still expensive for me..


I can recommend you to use MySQL database and server, thus clients will not have access to database files.

Dmitry.

3 (edited by rjkantor 2016-03-16 21:03:57)

Re: FULL DB Encryption

I believe this version of the sqlite3.dll supports encryption. https://www.dropbox.com/s/k831y7goyc5dj … 3.dll?dl=0

If I create a simple mvd and put 

s := sqlExecute('PRAGMA rekey="hello"');

in the script and I rerun the project a second time I get an error that the db is encrypted.

Since I cannot set the password at the time of connection I cannot use this db any further.

Can you see if you can leverage the encryption built into the dll?

I understand the two commands are
PRAGMA key="password"

or

PRAGMA rekey= "new password"

Re: FULL DB Encryption

rjkantor
I made some change to this pragma is works, please download latest version here:
https://www.dropbox.com/s/kfh2q7h8l73lx … a.zip?dl=0


1. You should delete sqlite.db file from your project.


2. Put PRAGMA key="password" to between begin end. in your script project.
example:

begin
    SQLExecute('PRAGMA key = ''passphrase'';');
end.

3. Save the project.
4. Copy your sqlite.dll to the project folder.
5. Run your project from the project folder. (if you run the project from MVD, your file sqlite.dll will be replaced original version)

Dmitry.

Re: FULL DB Encryption

Yes, it seems that works.

1. If I put "my" sqlite.dll into the mvd program directory, it uses my version for all projects.
2. if I use the PRAGMA KEY= and then use the PRAGMA REKEY= you can change an existing password (or remove it) on the db.

Thank you,
  Robb

Re: FULL DB Encryption

Let me see if I understand how this all works. So if I use Robb's "Sqlite3.dll", the latest version of MVD, and place the Pragma Key code in my script, that this will encrypt my database and assign a password. Will 3rd party software such as SQLite Studio ask for a password to gain access to the database tables?

Re: FULL DB Encryption

Yes, it encrypts the database.  If it is a preexisting db, you may need to use the PRAGMA rekey= to encrypt.  Then you can change to PRAGMA key=.  Please ensure you backup your data before trying to encrypt preexisiting dbs.

Yes, third party tools will prompt for password, but they may not be able to decrypt depending on which encryption extension they employ.
I have tried SQLiteManager and wxSQLitePlus and neither will open an encrypted db using my dll.

Robb

Re: FULL DB Encryption

I found a third party tool which will open the encrypted db file.

SQLite2009 Pro
http://sqlite2009pro.azurewebsites.net/

When you select the db, it will show a dialog, File is encrypted or is not a database! click OK

The Enter DB Password screen will come up.

Enter the Encryption Key - same as the PRAGMA key.
Then select the RSA (Compatible with ADO.NET Provider) radio button and then select OK

You should have successfully attached the db.
Enjoy!

Re: FULL DB Encryption

Robb, thanks for that info. I'll give it a try.

Re: FULL DB Encryption

DriveSoft wrote:

rjkantor
I made some change to this pragma is works, please download latest version here:
https://www.dropbox.com/s/kfh2q7h8l73lx … a.zip?dl=0


1. You should delete sqlite.db file from your project.


2. Put PRAGMA key="password" to between begin end. in your script project.
example:

begin
    SQLExecute('PRAGMA key = ''passphrase'';');
end.

3. Save the project.
4. Copy your sqlite.dll to the project folder.
5. Run your project from the project folder. (if you run the project from MVD, your file sqlite.dll will be replaced original version)

Файл то ттю-тю

Re: FULL DB Encryption

Игоревич
Увы я не могу помочь с поиском пиратских програм.

Dmitry.

12 (edited by v_pozidis 2018-07-13 16:22:43)

Re: FULL DB Encryption

Dmitry can we use this dll with the encrypt property?

Re: FULL DB Encryption

v_pozidis wrote:

Dmitry can we use this dll with the encrypt property?

Why you ask me about that? )
I can't forbid you.

Dmitry.

Re: FULL DB Encryption

DriveSoft wrote:
v_pozidis wrote:

Dmitry can we use this dll with the encrypt property?

Why you ask me about that? )
I can't forbid you.


I ask because you gave somewhere an answere in a language I do not understand. 
Anyway I use the original dll. I always use registered software. Do not know if this dll is legal or not.