Re: lightweight encryption of text file

2010-01-18 Thread Aahz
In article , Daniel Fetchinson wrote: > >Well, that's sort of true about learning a complex API :) But it's >also true that I'm not storing anything really valuable in the file >but still wouldn't want to leave it lying around in plain text. In >case I lose the laptop with the file I seriously do

Re: lightweight encryption of text file

2010-01-12 Thread Ethan Furman
Anthra Norell wrote: > I consider the encryption unbreakable [...] (from previous thread) I am not a cryptographer. (from this thread) Then you shouldn't be making claims about your encryption algorithms. ~Ethan~ -- http://mail.python.org/mailman/listinfo/python-list

Re: lightweight encryption of text file

2010-01-12 Thread Anthra Norell
Robert Kern wrote: On 2010-01-12 05:59 AM, Anthra Norell wrote: Robert Kern wrote: On 2010-01-11 14:09 PM, Anthra Norell wrote: Robert Kern wrote: On 2010-01-09 03:52 AM, Anthra Norell wrote: Upon which another critic conjured up the horror vision of gigahertzes hacking my pathetic little

Re: lightweight encryption of text file

2010-01-12 Thread Steve Holden
Robert Kern wrote: > On 2010-01-12 05:59 AM, Anthra Norell wrote: [ping, pong, ping, pong] > If the OP uses a real encryption algorithm, he can rely on the fact that > he can use the algorithm for large files or for plaintexts that a > malicious agent might choose even if he did not communicate (or

Re: lightweight encryption of text file

2010-01-12 Thread Robert Kern
On 2010-01-12 05:59 AM, Anthra Norell wrote: Robert Kern wrote: On 2010-01-11 14:09 PM, Anthra Norell wrote: Robert Kern wrote: On 2010-01-09 03:52 AM, Anthra Norell wrote: Upon which another critic conjured up the horror vision of gigahertzes hacking my pathetic little effort to pieces as

Re: lightweight encryption of text file

2010-01-12 Thread Anthra Norell
Robert Kern wrote: On 2010-01-11 14:09 PM, Anthra Norell wrote: Robert Kern wrote: On 2010-01-09 03:52 AM, Anthra Norell wrote: "Don't use a random generator for encryption purposes!" warns the manual, of which fact I was reminded in no uncertain terms on this forum a few years ago when I p

Re: lightweight encryption of text file

2010-01-12 Thread John Bokma
Anthra Norell writes: > Why EVER make anything yourself when you can buy it? Do you make your own processors? Your own hard disk drives? Why not? -- John Bokma Read my blog: http://johnbokma.com/ Hire me (Perl/Python): http://castleamber.com/ -- http://mail.python.org/mailman/listinfo/python

Re: lightweight encryption of text file

2010-01-12 Thread Paul Rubin
John Bokma writes: >> Why EVER make anything yourself when you can buy it? > > Do you make your own processors? Your own hard disk drives? > Why not? Well, if you try to make your own processors or hard drives, worst normal outcome is they don't work and you try something else instead. This is mo

Re: lightweight encryption of text file

2010-01-11 Thread John Bokma
Paul Rubin writes: > John Bokma writes: >>> Why EVER make anything yourself when you can buy it? >> >> Do you make your own processors? Your own hard disk drives? >> Why not? > > Well, if you try to make your own processors or hard drives, worst > normal outcome is they don't work and you try so

Re: lightweight encryption of text file

2010-01-11 Thread Robert Kern
On 2010-01-11 14:09 PM, Anthra Norell wrote: Robert Kern wrote: On 2010-01-09 03:52 AM, Anthra Norell wrote: "Don't use a random generator for encryption purposes!" warns the manual, of which fact I was reminded in no uncertain terms on this forum a few years ago when I proposed the following

Re: lightweight encryption of text file

2010-01-11 Thread Paul Rubin
Anthra Norell writes: > Why EVER make anything yourself when you can buy it? http://en.wikipedia.org/wiki/Dunning-Kruger_effect -- http://mail.python.org/mailman/listinfo/python-list

Re: lightweight encryption of text file

2010-01-11 Thread Anthra Norell
Robert Kern wrote: On 2010-01-09 03:52 AM, Anthra Norell wrote: Daniel Fetchinson wrote: > I have a plain text file which I would like to protect in a very > simple minded, yet for my purposes sufficient, way. I'd like to > encrypt/convert it into a binary file in such a way that possession

Re: lightweight encryption of text file

2010-01-11 Thread Robert Kern
On 2010-01-09 03:52 AM, Anthra Norell wrote: Daniel Fetchinson wrote: > I have a plain text file which I would like to protect in a very > simple minded, yet for my purposes sufficient, way. I'd like to > encrypt/convert it into a binary file in such a way that possession of > a password allo

Re: lightweight encryption of text file

2010-01-11 Thread Paul Rubin
geremy condra writes: > And having no dependencies frees you from the burden of testing > where your software will be deployed? I don't think so. If you just use the stdlib and are a bit careful about OS dependent features, your code can run pretty much everywhere. More to the point, if (say) yo

Re: lightweight encryption of text file

2010-01-10 Thread Steve Holden
Carl Banks wrote: > On Jan 8, 11:14 am, Daniel Fetchinson > wrote: >> I have a plain text file which I would like to protect in a very >> simple minded, yet for my purposes sufficient, way. I'd like to >> encrypt/convert it into a binary file in such a way that possession of >> a password allows a

Re: lightweight encryption of text file

2010-01-10 Thread geremy condra
On Sun, Jan 10, 2010 at 3:26 PM, Paul Rubin wrote: > geremy condra writes: >> Not sure why in the world you would homebrew something like this- a >> small dependency isn't that bad, and aes can be pretty simple to use. >> Might as well go for the industrial strength approach. > > In my experience

Re: lightweight encryption of text file

2010-01-10 Thread Carl Banks
On Jan 8, 11:14 am, Daniel Fetchinson wrote: > I have a plain text file which I would like to protect in a very > simple minded, yet for my purposes sufficient, way. I'd like to > encrypt/convert it into a binary file in such a way that possession of > a password allows anyone to convert it back i

Re: lightweight encryption of text file

2010-01-10 Thread Steve Holden
Paul Rubin wrote: > Steve Holden writes: >>> Right now, even asking for HTTPS support is too much to ask. Heck, >>> even asking for the fake HTTPS support to be identified as such is too >>> much, apparently. >>> >> No, Paul, nobody will complain if you *ask* ... > > Er, that wasn't me... > Oh s

Re: lightweight encryption of text file

2010-01-10 Thread Paul Rubin
Nobody writes: > But, yeah, the OP needs to be aware of the difference (and probably isn't, > yet). So to take that a step further ... > The key passed to arcfour.schedule() shouldn't be re-used > If you need to verify the data, append a hash of the ciphertext ... > If you want to encrypt mul

Re: lightweight encryption of text file

2010-01-10 Thread Paul Rubin
Steve Holden writes: >> Right now, even asking for HTTPS support is too much to ask. Heck, >> even asking for the fake HTTPS support to be identified as such is too >> much, apparently. >> > No, Paul, nobody will complain if you *ask* ... Er, that wasn't me... > A question I've been asking myse

Re: lightweight encryption of text file

2010-01-10 Thread Steve Holden
Nobody wrote: > On Sun, 10 Jan 2010 12:26:05 -0800, Paul Rubin wrote: > >> I'd like it a lot if the Python stdlib could include a serious >> cryptography module. > > And I'd like a truckload of gold ;) > > Right now, even asking for HTTPS support is too much to ask. Heck, > even asking for the f

Re: lightweight encryption of text file

2010-01-10 Thread Nobody
On Sun, 10 Jan 2010 12:26:05 -0800, Paul Rubin wrote: > I'd like it a lot if the Python stdlib could include a serious > cryptography module. And I'd like a truckload of gold ;) Right now, even asking for HTTPS support is too much to ask. Heck, even asking for the fake HTTPS support to be identi

Re: lightweight encryption of text file

2010-01-10 Thread Nobody
On Sun, 10 Jan 2010 08:54:51 -0800, Paul Rubin wrote: > Nobody writes: >> RC4 (aka ArcFour) is quite trivial to implement, and better than inventing >> your own cipher or using a Vignere: ... > > That's a cute implementation, but it has no authentication and doesn't > include any randomness, whi

Re: lightweight encryption of text file

2010-01-10 Thread Paul Rubin
geremy condra writes: > Not sure why in the world you would homebrew something like this- a > small dependency isn't that bad, and aes can be pretty simple to use. > Might as well go for the industrial strength approach. In my experience, 1) small dependencies ARE that bad, since they mean you ha

Re: lightweight encryption of text file

2010-01-10 Thread geremy condra
Not sure why in the world you would homebrew something like this- a small dependency isn't that bad, and aes can be pretty simple to use. Might as well go for the industrial strength approach. Geremy Condra -- http://mail.python.org/mailman/listinfo/python-list

Re: lightweight encryption of text file

2010-01-10 Thread Paul Rubin
Nobody writes: > RC4 (aka ArcFour) is quite trivial to implement, and better than inventing > your own cipher or using a Vignere: ... That's a cute implementation, but it has no authentication and doesn't include any randomness, which means if you use the same key for two inputs, there is a secur

Re: lightweight encryption of text file

2010-01-10 Thread Daniel Fetchinson
>> Thanks, this looks very simple too, but where is the decryption code? >> Wikipedia seems to suggest that encryption and decryption are both the >> same but running crypt on the output of crypt doesn't give back the >> original string. So probably I'm misunderstanding something. > > Yes, the natu

Re: lightweight encryption of text file

2010-01-10 Thread Nobody
On Sun, 10 Jan 2010 15:30:12 +, Steven D'Aprano wrote: >> Thanks, this looks very simple too, but where is the decryption code? >> Wikipedia seems to suggest that encryption and decryption are both the >> same but running crypt on the output of crypt doesn't give back the >> original string. S

Re: lightweight encryption of text file

2010-01-10 Thread Nobody
On Sun, 10 Jan 2010 09:59:31 +0100, Daniel Fetchinson wrote: > Thanks, this looks very simple too, but where is the decryption code? > Wikipedia seems to suggest that encryption and decryption are both the > same but running crypt on the output of crypt doesn't give back the > original string. So

Re: lightweight encryption of text file

2010-01-10 Thread Steven D'Aprano
On Sun, 10 Jan 2010 09:59:31 +0100, Daniel Fetchinson wrote: > Thanks, this looks very simple too, but where is the decryption code? > Wikipedia seems to suggest that encryption and decryption are both the > same but running crypt on the output of crypt doesn't give back the > original string. So

Re: lightweight encryption of text file

2010-01-10 Thread Daniel Fetchinson
>> I have a plain text file which I would like to protect in a very >> simple minded, yet for my purposes sufficient, way. I'd like to >> encrypt/convert it into a binary file in such a way that possession of >> a password allows anyone to convert it back into the original text >> file while not po

Re: lightweight encryption of text file

2010-01-10 Thread Nobody
On Fri, 08 Jan 2010 20:14:51 +0100, Daniel Fetchinson wrote: > I have a plain text file which I would like to protect in a very > simple minded, yet for my purposes sufficient, way. I'd like to > encrypt/convert it into a binary file in such a way that possession of > a password allows anyone to c

Re: lightweight encryption of text file

2010-01-09 Thread Paul Rubin
Robert Kern writes: > Are you on a 64-bit platform? Unfortunately, array's integer typecodes > are platform-specific, but p3.py requires a 32-bit integer ... Oh yes, thanks, I never did get around to dealing with 64 bit platforms. I also notice that some of the unit test functions use print state

Re: lightweight encryption of text file

2010-01-09 Thread Paul Rubin
Daniel Fetchinson writes: > I have a plain text file which I would like to protect in a very > simple minded, yet for my purposes sufficient, way. For encrypting strings, use this module: http://nightsong.com/phr/crypto/p3.py Obviously this is limited to strings that fit in memory, which mi

Re: lightweight encryption of text file

2010-01-09 Thread Paul Rubin
Daniel Fetchinson writes: >>http://www.nightsong.com/phr/crypto/p3.py > > Thanks a lot, currently I'm having trouble using this code on python > 2.6 but probably some small tweaking will fix it. Yikes, this is the first I've heard of such a problem. I will look into it. Thanks. (Also than

Re: lightweight encryption of text file

2010-01-09 Thread Daniel Fetchinson
>> I have a plain text file which I would like to protect in a very >> simple minded, yet for my purposes sufficient, way. I'd like to >> encrypt/convert it into a binary file in such a way that possession of >> a password allows anyone to convert it back into the original text >> file while not po

Re: lightweight encryption of text file

2010-01-09 Thread Arnaud Delobelle
Daniel Fetchinson writes: > I have a plain text file which I would like to protect in a very > simple minded, yet for my purposes sufficient, way. I'd like to > encrypt/convert it into a binary file in such a way that possession of > a password allows anyone to convert it back into the original t

Re: lightweight encryption of text file

2010-01-09 Thread Dave Angel
Anthra Norell wrote: Daniel Fetchinson wrote: > I have a plain text file which I would like to protect in a very > simple minded, yet for my purposes sufficient, way. I'd like to > encrypt/convert it into a binary file in such a way that possession of > a password allows anyone to convert it b

Re: lightweight encryption of text file

2010-01-09 Thread Daniel Fetchinson
> > I have a plain text file which I would like to protect in a very > > simple minded, yet for my purposes sufficient, way. I'd like to > > encrypt/convert it into a binary file in such a way that possession of > > a password allows anyone to convert it back into the original text > > file wh

Re: lightweight encryption of text file

2010-01-09 Thread Daniel Fetchinson
On 1/9/10, Steven D'Aprano wrote: > On Fri, 08 Jan 2010 20:14:51 +0100, Daniel Fetchinson wrote: > >> I have a plain text file which I would like to protect in a very simple >> minded, yet for my purposes sufficient, way. I'd like to encrypt/convert >> it into a binary file in such a way that poss

Re: lightweight encryption of text file

2010-01-09 Thread Daniel Fetchinson
> I have a plain text file which I would like to protect in a very > simple minded, yet for my purposes sufficient, way. I'd like to > encrypt/convert it into a binary file in such a way that possession of > a password allows anyone to convert it back into the original text > fi

Re: lightweight encryption of text file

2010-01-09 Thread Anthra Norell
Daniel Fetchinson wrote: > I have a plain text file which I would like to protect in a very > simple minded, yet for my purposes sufficient, way. I'd like to > encrypt/convert it into a binary file in such a way that possession of > a password allows anyone to convert it back into the original tex

Re: lightweight encryption of text file

2010-01-08 Thread Steven D'Aprano
On Fri, 08 Jan 2010 20:14:51 +0100, Daniel Fetchinson wrote: > I have a plain text file which I would like to protect in a very simple > minded, yet for my purposes sufficient, way. I'd like to encrypt/convert > it into a binary file in such a way that possession of a password allows > anyone to c

Re: lightweight encryption of text file

2010-01-08 Thread Chris Colbert
PyCrypto is already pretty easy to use by itself. I dont know why you want a wrapper on top of it. On Fri, Jan 8, 2010 at 11:02 PM, Irmen de Jong wrote: > On 8-1-2010 22:39, Daniel Fetchinson wrote: > >> >>>http://www.nightsong.com/phr/crypto/p3.py >>> >> >> Thanks a lot, currently I'm having

Re: lightweight encryption of text file

2010-01-08 Thread Robert Kern
On 2010-01-08 15:47 PM, Daniel Fetchinson wrote: I have a plain text file which I would like to protect in a very simple minded, yet for my purposes sufficient, way. I'd like to encrypt/convert it into a binary file in such a way that possession of a password allows anyone to convert it back into

Re: lightweight encryption of text file

2010-01-08 Thread Irmen de Jong
On 8-1-2010 22:39, Daniel Fetchinson wrote: http://www.nightsong.com/phr/crypto/p3.py Thanks a lot, currently I'm having trouble using this code on python 2.6 but probably some small tweaking will fix it. If you keep having issues with this module, maybe you can try this: http://www.fre

Re: lightweight encryption of text file

2010-01-08 Thread Daniel Fetchinson
>>> I have a plain text file which I would like to protect in a very >>> simple minded, yet for my purposes sufficient, way. I'd like to >>> encrypt/convert it into a binary file in such a way that possession of >>> a password allows anyone to convert it back into the original text >>> file while n

Re: lightweight encryption of text file

2010-01-08 Thread Daniel Fetchinson
>> I have a plain text file which I would like to protect in a very >> simple minded, yet for my purposes sufficient, way. I'd like to >> encrypt/convert it into a binary file in such a way that possession of >> a password allows anyone to convert it back into the original text >> file while not po

Re: lightweight encryption of text file

2010-01-08 Thread Robert Kern
On 2010-01-08 13:14 PM, Daniel Fetchinson wrote: I have a plain text file which I would like to protect in a very simple minded, yet for my purposes sufficient, way. I'd like to encrypt/convert it into a binary file in such a way that possession of a password allows anyone to convert it back into

lightweight encryption of text file

2010-01-08 Thread Daniel Fetchinson
I have a plain text file which I would like to protect in a very simple minded, yet for my purposes sufficient, way. I'd like to encrypt/convert it into a binary file in such a way that possession of a password allows anyone to convert it back into the original text file while not possessing the pa