Is that safe to use ramdom.random() for key to encrypt?

Chris Angelico rosuav at gmail.com
Wed Jun 20 11:24:50 EDT 2012


On Thu, Jun 21, 2012 at 1:18 AM,  <elvis-85496 at notatla.org.uk> wrote:
> On 2012-06-17, Jon Clements <joncle at googlemail.com> wrote:
>> I generally find a separate partition with an encrypted file-system
>> (which is fairly straight forward on *nix systems or I think there's a
>> product out there that works with Windows), is a lot easier and puts the
>> load on the filesystem/OS instead of having to be handled in your
>> application is a lot simpler.
>
> That assumes he is doing storage rather than communication.

Well, for communication it's even easier. Pick up an SSL or SSH
library and channel everything through that! Added bonus of SSL/TLS is
that, with many languages/libraries, you can write all your code with
a simple unencrypted session and test it with telnet, and then "turn
on" encryption without changing any of your code outside of your
initialization.

Whatever platform you're targeting, there's a better option than
writing your own encryption. Guaranteed. Even if it means writing glue
code to interface to a C library.

ChrisA



More information about the Python-list mailing list