[Tutor] how to manage an encrypted file?

Daniele d.conca at gmail.com
Mon Jun 22 09:46:38 CEST 2009

> From: Wayne <srilyk at gmail.com>

> If you want the most basic encryption you could simply XOR the file. It's fairly easy to break, though, because the same character patterns will be present as with your original file.

Actually if you do it properly this kind of encryption is unbreakable,
but you'd have to:
1. generate a random key long enough to cover your data
2. keep the key secure and in a separate place
3. DON'T use the key twice

there must be a Security Now episode that explains the thing pretty
well (could be this one http://www.grc.com/sn/sn-011.htm).
Some arguments may rise against the randomness of the key, but I don't
think its the case to go into that.

You could also use TrueCrypt which is an extremely powerful
cryptographic software (open source), I found this article that can
help you linking it with python:

More information about the Tutor mailing list