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

2012-06-20 Thread Chris Angelico
On Thu, Jun 21, 2012 at 1:18 AM, elvis-85...@notatla.org.uk wrote: On 2012-06-17, Jon Clements jon...@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

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

2012-06-20 Thread D'Arcy Cain
On 12-06-20 11:18 AM, elvis-85...@notatla.org.uk wrote: On 2012-06-17, Jon Clementsjon...@googlemail.com wrote: Whatever you do - *do not* attempt to write your own algorithm. very true As they say, random number generation is too important to be left to chance. :-) -- D'Arcy J.M. Cain

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

2012-06-20 Thread Christian Heimes
Am 20.06.2012 17:25, schrieb D'Arcy Cain: As they say, random number generation is too important to be left to chance. :-) Hilarious! You made my day! :) -- http://mail.python.org/mailman/listinfo/python-list

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

2012-06-20 Thread Roy Smith
In article mailman.1344.1340205892.4697.python-l...@python.org, Chris Angelico ros...@gmail.com wrote: Well, for communication it's even easier. Pick up an SSL or SSH library and channel everything through that! +1 on this. Actually, plus a whole bunch more than 1. I worked on a project

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

2012-06-20 Thread Paul Rudin
elvis-85...@notatla.org.uk writes: On 2012-06-17, Jon Clements jon...@googlemail.com wrote: Whatever you do - *do not* attempt to write your own algorithm. very true If everyone took that advice then we'd have a problem -- http://mail.python.org/mailman/listinfo/python-list

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

2012-06-19 Thread Thomas Rachel
Am 18.06.2012 01:48 schrieb Paul Rubin: Steven D'Apranosteve+comp.lang.pyt...@pearwood.info writes: /dev/urandom isn't actually cryptographically secure; it promises not to block, even if it has insufficient entropy. But in your instance... Correct. /dev/random is meant to be used for

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

2012-06-17 Thread Rafael Durán Castañeda
El 17/06/12 06:48, Chris Angelico escribió: On Sun, Jun 17, 2012 at 2:18 PM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: Safe from what? What is your threat model? Are you worried about your little sister reading your diary? Or the NSA discovering your plans to assassinate the

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

2012-06-17 Thread Chris Angelico
On Mon, Jun 18, 2012 at 3:06 AM, Rafael Durán Castañeda rafadurancastan...@gmail.com wrote: The language Python includes a SystemRandom class that obtains cryptographic grade random bits from /dev/urandom on a Unix-like system, including Linux and Mac OS X, while on Windows it uses

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

2012-06-17 Thread Steven D'Aprano
On Mon, 18 Jun 2012 08:41:57 +1000, Chris Angelico wrote: On Mon, Jun 18, 2012 at 3:06 AM, Rafael Durán Castañeda rafadurancastan...@gmail.com wrote: The language Python includes a SystemRandom class that obtains cryptographic grade random bits from /dev/urandom on a Unix-like system,

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

2012-06-17 Thread Paul Rubin
Steven D'Aprano steve+comp.lang.pyt...@pearwood.info writes: /dev/urandom isn't actually cryptographically secure; it promises not to block, even if it has insufficient entropy. But in your instance... Correct. /dev/random is meant to be used for long-lasting cryptographically-significant

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

2012-06-17 Thread Jon Clements
On Sun, 17 Jun 2012 23:17:37 +, Steven D'Aprano wrote: On Mon, 18 Jun 2012 08:41:57 +1000, Chris Angelico wrote: On Mon, Jun 18, 2012 at 3:06 AM, Rafael Durán Castañeda rafadurancastan...@gmail.com wrote: The language Python includes a SystemRandom class that obtains cryptographic

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

2012-06-17 Thread Andrew Berg
On 6/17/2012 7:07 PM, Jon Clements wrote: I'm reminded of: http://xkcd.com/936/ http://xkcd.com/792/ There's also one where it's pointed out it's easier to brute force a person who has the code, than brute force the computer. [but can't find that one at the moment]

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

2012-06-16 Thread Yesterday Paid
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. Is it really random or safe enough to keep my data safe? --

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

2012-06-16 Thread Chris Angelico
On Sun, Jun 17, 2012 at 12:15 PM, Yesterday Paid howmuchisto...@gmail.com 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

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

2012-06-16 Thread Paul Rubin
Yesterday Paid howmuchisto...@gmail.com writes: I'm making cipher program with random.seed(), random.random() as the key table of encryption... Is it really random or safe enough to keep my data safe? No. Use os.urandom instead. -- http://mail.python.org/mailman/listinfo/python-list

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

2012-06-16 Thread Jon Clements
On Sun, 17 Jun 2012 12:31:04 +1000, Chris Angelico wrote: On Sun, Jun 17, 2012 at 12:15 PM, Yesterday Paid howmuchisto...@gmail.com 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

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

2012-06-16 Thread Steven D'Aprano
On Sat, 16 Jun 2012 19:15:34 -0700, Yesterday Paid 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. Start by reading the Fine Manual:

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

2012-06-16 Thread Chris Angelico
On Sun, Jun 17, 2012 at 2:18 PM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: Safe from what? What is your threat model? Are you worried about your little sister reading your diary? Or the NSA discovering your plans to assassinate the President? Or something in between?