<br><br><div class="gmail_quote">On Sun, Sep 27, 2009 at 11:42 AM, Steven D'Aprano <span dir="ltr"><<a href="mailto:steve@remove-this-cybersource.com.au">steve@remove-this-cybersource.com.au</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="im">On Sun, 27 Sep 2009 16:11:52 +0200, Stef Mientki wrote:<br>
<br>
> hello,<br>
><br>
> I've a Python desktop application, running under Widows, that stores the<br>
> data in a central SQLite database.<br>
><br>
> Depending on the user login on the system, some of the data from the<br>
> database is allowed and other data is forbidden.<br>
><br>
> I can read the current logged in user. The authorization for each user<br>
> is stored encrypted in the database. The program is delivered as pyc<br>
> files, but from what I read, these can easily be reversed engineered.<br>
<br>
</div>What does that have to do with anything? You're not storing the user's<br>
password in the source code are you?<br>
<div class="im"><br>
<br>
> There is even an encrypted version of SQLite (not freeware), but as long<br>
> as test the authorization in Python, it doesn't seem to be a good<br>
> protection.<br>
<br>
</div>What exactly are you doing to authenticate the user?<br>
<div class="im"><br>
<br>
> So at first thought, a better way might be the following process: -<br>
> encrypt the whole database<br>
<br>
</div>What is your threat model? What are you trying to protect against?<br>
<br>
If your threat model is that desktop users will sneak into the server<br>
room while the boss is away, boot the server in single-user mode, and<br>
then use a disk utility to inspect the raw bytes on disk to read the data<br>
in the database (or that the government will swoop in and seize your<br>
computer and do the same), then encrypting the entire database may be a<br>
good idea.<br>
<br>
(But if your threat model is the government, then what are you going to<br>
do when they arrest you and demand you hand over the encryption keys?)<br></blockquote><div><br><a href="http://en.wikipedia.org/wiki/Deniable_encryption">http://en.wikipedia.org/wiki/Deniable_encryption</a><br><br>cool stuff.</div>
<br>Geremy Condra<br></div><br>