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

Chris Angelico rosuav at
Sun Jun 17 04:31:04 CEST 2012

On Sun, Jun 17, 2012 at 12:15 PM, Yesterday Paid
<howmuchistoday at> wrote:
> I'm making cipher program with random.seed(), random.random() as the
> key table of encryption.
> I'm not good at security things and don't know much about the
> algorithm used by random module.

For security, you don't want any algorithm, you want something like
/dev/random (on Unix-like platforms).

I'm pretty sure Python includes crypto facilities. Unless it (most
oddly) lacks these batteries, I would recommend using one of them


More information about the Python-list mailing list