Hi,

recently I was thinking about a system when logs about something are written
encrypted without interaction with the user, but for reading the contents
one would need the key.

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.

Random thoughts... VFS layer is not an option since due to virtual approach
to the data stored, sqlite sometimes will need to read data so we losing
"insert-only" mode. The easiest way seemed to be by using a blob field
encoded and decoded on the user side. But in this case one loses the
flexibility of sqlite (for example querying against particular fields).
Another option is virtual tables that is probably can solve the task but
since I never implemented one, I'm not sure.

The questions:
- Are there other ways you see in implementing this?
- Are virtual tables is flexible enough to fit the requirements for
insert-mode? In other word, if the only operation is INSERT and no indexes
are defined, can one be sure there will be no reading request for a
particular table? Probably it's not possible if we remember how important
rowid is, but I'm ready at least to make rowid public and not encrypted.
- Is there something I

Thanks in advance,

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

Reply via email to