|
1 | 1 | SQLite3 with encryption support |
2 | 2 | ============================ |
3 | | - |
4 | | -For those in a hurry, click [here](#how) |
| 3 | +Original SQLite3 C library with support for full and transparent encryption |
5 | 4 |
|
6 | 5 | What? |
7 | 6 | ------ |
8 | | -This repository is dedicated to a set of my scripts which drastically decrease the time and effort you need to build SQLite3 DLL, SLL or shell on the Windows platform (Linux's nature allows it to be built easily natively). |
9 | | -It's based on [**wxSQLite3**][wxsqlite3-source] which includes an optional extension for SQLite3 supporting **key based** database file **encryption** using **128/256\* bit AES encryption**. Although wxSQLite3 is specifically designed for use in programs based on the [wxWidgets library](https://www.wxwidgets.org/), it **can be used just like a normal SQLite3 library**, because the encryption extension is compatible with the [amalgamated SQLite3 source](https://www.sqlite.org/amalgamation.html). |
| 7 | +- SQLite3 with a key based transparent encryption layer (128/256*-bit AES), which encrypts everything including metadata |
| 8 | +- fully compatible with your current databases and your codebase |
| 9 | + - you may for example encrypt your current databases, use them as long as you wish, then decide to decrypt them back to plain text and use them from the standard SQLite3 library |
| 10 | +- no external dependencies like _OpenSSL_, _Microsoft Visual C++ Redistributable Packages_, _Microsoft .NET Framework_, ... |
| 11 | +- build script currently generates only solution _(*.sln)_ files for Microsoft Visual Studio IDE, but as SQLite3 and wxSQLite3 are cross-platform, you may try to [download the original wxSQLite3 source code](https://sourceforge.net/projects/wxcode/files/Components/wxSQLite3) and built it yourself for your platform |
10 | 12 |
|
11 | | -_\*Support for 256 bit AES encryption is experimental_ |
| 13 | +_\*Support for 256 bit AES encryption is still experimental_ |
12 | 14 |
|
13 | 15 | ### What can be built with this solution? |
14 | 16 | > sqlite3-x{86, 64}.{dll, lib, exe} - ({128, 256}-bit AES) |
15 | 17 |
|
16 | 18 | ##### Dynamically linked library |
17 | | -- sqlite3.dll (128-bit AES) |
18 | | -- sqlite3-x64.dll (128-bit AES) |
19 | | -- sqlite3.dll (256-bit AES) |
20 | | -- sqlite3-x64.dll (256-bit AES) |
| 19 | +- sqlite3.dll (128/256-bit AES) |
| 20 | +- sqlite3-x64.dll (128/256-bit AES) |
21 | 21 |
|
22 | 22 | ##### Statically linked library |
23 | | -- sqlite3.lib (128-bit AES) |
24 | | -- sqlite3-x64.lib (128-bit AES) |
25 | | -- sqlite3.lib (256-bit AES) |
26 | | -- sqlite3-x64.lib (256-bit AES) |
| 23 | +- sqlite3.lib (128/256-bit AES) |
| 24 | +- sqlite3-x64.lib (128/256-bit AES) |
27 | 25 |
|
28 | 26 | ##### Command line shell |
29 | | -- sqlite3.exe (128-bit AES) |
30 | | -- sqlite3-x64.exe (128-bit AES) |
31 | | -- sqlite3.exe (256-bit AES) |
32 | | -- sqlite3-x64.exe (256-bit AES) |
33 | | - |
34 | | -**I should also highlight the fact that the produced binaries do NOT require any special runtime dependencies like _Microsoft .NET Framework_ or _Microsoft Visual C++ Redistributable Packages_** |
| 27 | +- sqlite3.exe (128/256-bit AES) |
| 28 | +- sqlite3-x64.exe (128/256-bit AES) |
35 | 29 |
|
36 | | -Why? |
| 30 | +Alternatives |
37 | 31 | ----- |
38 | 32 |
|
39 | 33 | There are more ways how to add a _native_ on-the-fly encryption layer to your SQLite3 DBs. Namely: |
40 | 34 |
|
41 | 35 | - [SQLite Encryption Extension](http://www.sqlite.org/see) - from authors of SQLite, commercial, $2000 |
42 | | -- [SQLCipher](http://www.zetetic.net/sqlcipher/) - partially opensource, but I didn't manage to get it working on Windows |
43 | 36 | - [SQLiteCrypt](http://sqlite-crypt.com) - commercial, $128 |
| 37 | +- [SQLCipher](http://www.zetetic.net/sqlcipher/) - partially opensource (I didn't manage to get it working on Windows though) |
44 | 38 |
|
45 | | -But after a few hours spent trying to build _SQLCipher_, I've decided to create something a bit easier to build. |
| 39 | +So after a few hours spent trying to build _SQLCipher_, I dived more deeply into the internet and found [wxSQLite3](http://wxcode.sourceforge.net/components/wxsqlite3/), did some scripting to ease the build and this is the result. |
46 | 40 |
|
47 | | -How? |
| 41 | +How to? |
48 | 42 | ----- |
49 | 43 |
|
50 | | -### How to get from this page to successful build? |
| 44 | +### Compile it |
51 | 45 |
|
52 | 46 | #### Requirements |
53 | 47 |
|
54 | | -- Windows with [MS Visual Studio](http://www.visualstudio.com/products/visual-studio-express-vs) 2012/13 *(2010 not tested)* |
| 48 | +- Windows with [MS Visual Studio](http://www.visualstudio.com/products/visual-studio-express-vs) 2012+ *(2010 not tested but should work too)* |
55 | 49 |
|
56 | 50 | #### Steps |
57 | 51 |
|
|
63 | 57 |
|
64 | 58 | **Following these steps and building all binaries in their _Release_ versions took me ~2 minutes on my laptop.** |
65 | 59 |
|
66 | | -### How to get those binaries without MSVS? |
| 60 | +### Download prebuilt binaries |
67 | 61 | Try to look for them [here](https://github.com/rindeal/SQLite3-Encryption/releases) |
68 | 62 |
|
69 | | -### How to update to the latest version of SQLite? |
| 63 | +### Update to the latest version of SQLite |
70 | 64 | Because developers of the wxSQLite extension needs to incorporate changes with every new version of SQLite, there is a time lag between a new version of SQLite and wxSQLite. If you want to update to the latest version of wxSQLite, you can do so in two ways: |
71 | 65 |
|
72 | 66 | #### 1. Automatic |
|
0 commit comments