Skip to content

Using encrypted databases

SQLite Expert Professional can open and manage encrypted databases, provided you supply a SQLite library that includes encryption support. For legal reasons, such a library is not bundled with SQLite Expert, so you need to add one yourself.

Choosing a SQLite library

Open Tools → Options → SQLite Library to see the list of SQLite library DLLs found in the installation directory. To use a library other than the default, copy its DLL into the installation directory and select it here.

The folder is read when SQLite Expert starts, so a library copied in while the program is running is not listed yet. Press Refresh, below the list, to look again — there is no need to restart.

Several libraries with encryption support are available, as open-source or commercial products:

Working with encryption keys

When a library that supports encryption is active, the following commands appear on the database tree pop-up menu:

  • Set an encryption key on a database that was previously unencrypted — this encrypts the database with the key you provide.
  • Enter the encryption key to open an existing encrypted database. This only unlocks the database for the session; it does not change its contents.
  • Change the encryption key — re-encrypts the database with a new key. To remove encryption entirely, enter an empty key. SQLite Expert asks Remove encryption key? before it does, defaulting to No: an empty key leaves the file readable by anyone who has it, which is worth a moment's thought when it was not what you meant to type.
  • Enter a default encryption key — a key that SQLite Expert tries first for every encrypted database. Clearing this one is confirmed too, with Clear the default encryption key?

The question is only asked where a key is actually being taken away. Leaving the box empty on a database that was never encrypted changes nothing, and entering nothing at the prompt that asks for the key to open a database is the ordinary answer when it turns out not to need one — neither is queried.

Remembering keys between sessions

If you would like SQLite Expert to remember your encryption keys (including the default key) between sessions, enable Remember encryption keys under Tools → Options → General → Startup. The keys are then stored, encrypted, with the program settings.

Warning

Remembering keys is more convenient but less secure, because the keys are stored on disk. For this reason the option is disabled by default. Leave it off on shared or untrusted computers.

See also: Performing an online backup of a database · Changing options