[yunqa.de] Re: Faster DiSqlite Encryption solutions

  • From: "Edwin Yip" <mindvisualizer@xxxxxxxxx>
  • To: yunqa@xxxxxxxxxxxxx
  • Date: Wed, 11 Jun 2008 10:44:19 +0800

Hello Ralf,

It seems not as easy as implementing the compress/decompress functions.

Attached is the modified version of the DISQLite3_Performance_Test example
project, I added a check box to allow test in encrypted mode, would you mind
have a look if it does what I intend to do? If yes, than I think the perform
when operating on an encrypted DB is OK for me. Thanks.

I'll also add the option to allow test with the compress() and decompress()
SQL functions.

PS. You can include the modification into your package if you want.

On Tue, Jun 10, 2008 at 9:43 PM, Delphi Inspiration <delphi@xxxxxxxx> wrote:

> Edwin Yip wrote:
>
> >I need encryption in my application and I know that DiSqlite supplies AES
> encryption support, and after reading some articles I know that it's a
> pretty fast well-known encryption algorithm.
>
> This was the reason to choose AES encryption for DISQLite3. Concerning
> performance, the AES library used in DISQLite3 is known to be one the
> fastest available.
>
> >I don't know much about encryption but I'd like to know if there is
> simpler and faster a replacement for DISQLITE? I don't know the encryption
> strength as AES but I'd rather concern more about the performance.
>
> There are faster encryption alrogithms (see benchmark at
> http://www.cryptopp.com/benchmarks.html for examples), but DISQLite3 only
> comes with AES hardcoded into the library.
>
> >I have not compared the speed of an unencrypted DB with an encrypted DB
> yet,
>
> Performance loss with AES encryption enabled should be less than 50%,
> depending on your hardware. Since the DISQLite3 page cache stores pages
> unencrypted, an increased cache size (PRAGMA cache_size) helps performance
> because of reduced decryption / encryption.
>
> >maybe the speed of an encrypted DB  is acceptable for my case but I still
> want to ask you expert first, maybe there is a easy solution for me :), you
> know the faster the better.
>
> Given its encryption strength, AES scales pretty well. But if you must
> really replace AES with a faster alternative, you need to purchase the
> DISQLite3 source code to modify and recompile the encryption module, a
> single C file which links against the AES library. This is nothing trivial,
> but not impossible to do either. At least some knowlegde of C and an
> understanding of *.obj file linking with Delphi is recommended.
>
> I therefore recommend you to sketch up a few tests to see if you really
> need faster encryption. DISQLite3 is way faster than other Delphi database
> engines I have tested, so my guess is that you will hardly need it except
> for exremely huge amounts of data input / output. If this is so, then your
> application will benefit twice from an increased PRAGMA cache_size to reduce
> disk reading / writing as well as decryption / encryption IO and should be
> worth testing.
>
> Ralf
>
> _______________________________________________
> Delphi Inspiration mailing list
> yunqa@xxxxxxxxxxxxx
> //www.freelists.org/list/yunqa
>
>
>
>


-- 
Edwin Yip

Best Regards,
http://www.InnovationGear.com
MindVisualizer -- Visual Information Software Utilizing Mind Mapping and
Concept Mapping

Other related posts: