On 22 Feb 2011, at 15:41, Max Vlasov wrote:
> The obvious solution is public-key cryptography. The question is about
> different ways how it could be implemented with sqlite. The requirement for
> this system is that it should operate in two modes:
> - insert-only when no reading operation is used. This mode uses public key
> to store the data
> - full-mode when the private key is supplied and any operation is possible.

It might work, but it wouldn't be quick. Public-key cryptography is very slow. 
There are benchmarks on this page (http://www.cryptopp.com/benchmarks.html) but 
most of what you need to know is in the choice of scale: AES and other shared 
key systems are in cycles-per-byte and RSA/friends are in 
megacycles-per-operation.

Who are you trying to hide the data from? If it's someone with access to the 
account running the program on the machine on which it's running they could 
fairly easily trap the appropriate entry point in the SQLite code using the 
platforms debugging facilities and log all the data you're trying to write 
before it's written. If it's someone less determined/knowledgeable than that 
then a simple xor-all-bytes-with-0x42-obfuscation for input and output would 
work just as well, be considerably faster, and could be implemented in a VFS 
plugin.

Best Regards,

Phil Willoughby
-- 
Managing Director, StrawberryCat Limited

StrawberryCat Limited is registered in England and Wales with Company No. 
7234809.

The registered office address of StrawberryCat Limited is:

107 Morgan Le Fay Drive
Eastleigh
SO53 4JH

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to