Re: [Python-Dev] Support for Encrypted Zip as python scripts

2009-08-24 Thread Stephen J. Turnbull
Bugbee, Larry writes: > My original post was intended to increase the awareness in those > thinking encrypted ZIP files will 1) be easy, 2) afford the > protection they desire, and 3) not lead others into a sense of > false security. All good points, but note that (even without the DMCA) at l

Re: [Python-Dev] Support for Encrypted Zip as python scripts

2009-08-24 Thread Bugbee, Larry
I like the idea, but... >>> For what use case? >> I don't have a specific case in mind. In general, however, it >> would be nice to be able to protect intellectual property > This I'm also unclear about. How does it protect intellectual > property? Won't the person running the zipfile have t

Re: [Python-Dev] Support for Encrypted Zip as python scripts

2009-08-24 Thread Dj Gilcrease
On Mon, Aug 24, 2009 at 2:01 PM, Bugbee, Larry wrote: > I don't have a specific case in mind.  In general, however, it would be > nice to be able to protect intellectual property, but without addressing > the problem from a holistic view, there is little protection afforded > and perhaps a lot of u

Re: [Python-Dev] Support for Encrypted Zip as python scripts

2009-08-24 Thread Martin v. Löwis
Bugbee, Larry wrote: >>> I like the idea, but... >> For what use case? > > I don't have a specific case in mind. In general, however, it would be > nice to be able to protect intellectual property This I'm also unclear about. How does it protect intellectual property? Won't the person running th

Re: [Python-Dev] Support for Encrypted Zip as python scripts

2009-08-24 Thread Bugbee, Larry
> > I like the idea, but... > For what use case? I don't have a specific case in mind. In general, however, it would be nice to be able to protect intellectual property, but without addressing the problem from a holistic view, there is little protection afforded and perhaps a lot of unrewarded wo

Re: [Python-Dev] Support for Encrypted Zip as python scripts

2009-08-24 Thread Guido van Rossum
On Mon, Aug 24, 2009 at 11:52 AM, Bugbee, Larry wrote: > I like the idea, but... For what use case? -- --Guido van Rossum (home page: http://www.python.org/~guido/) ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listin

Re: [Python-Dev] Support for Encrypted Zip as python scripts

2009-08-24 Thread Bugbee, Larry
I like the idea, but... Here is a quick list of things to think about and if some of this has already been mentioned, sorry. Speed: Encryption speed has been mentioned. For short scripts this may not be a problem, although algorithms implemented in C would be faster. Strength: Passwords are [

Re: [Python-Dev] Support for Encrypted Zip as python scripts

2009-08-24 Thread Guido van Rossum
On Mon, Aug 24, 2009 at 1:54 AM, Jeroen Ruigrok van der Werven wrote: > -On [20090823 22:10], Guido van Rossum (gu...@python.org) wrote: >>Also, I suppose there could be (US) export problems with the code, so it >>would have to be optional (and we might not be able to build it into >>binaries we di

Re: [Python-Dev] Support for Encrypted Zip as python scripts

2009-08-24 Thread Jeroen Ruigrok van der Werven
-On [20090823 22:10], Guido van Rossum (gu...@python.org) wrote: >Also, I suppose there could be (US) export problems with the code, so it >would have to be optional (and we might not be able to build it into >binaries we distribute from python.org). For all I know the website and repository are b

Re: [Python-Dev] Support for Encrypted Zip as python scripts

2009-08-23 Thread Guido van Rossum
Because it is easier to write in Python, and (as Greg explained) the encryption is so lousy that you're unlikely to find heavy use of it. Therefore nobody (so far) has cared to write an accelerator in C. On Sun, Aug 23, 2009 at 9:23 PM, Shashank Singh wrote: > A litle off topic but the zipfile doc

Re: [Python-Dev] Support for Encrypted Zip as python scripts

2009-08-23 Thread Shashank Singh
A litle off topic but the zipfile doc says: "Decryption is extremely slow as it is implemented in native python rather than C". Why is this limitation there? I mean, is there any specific reason for not implementing it in C? On Mon, Aug 24, 2009 at 8:45 AM, Nick Coghlan wrote: > Guido van Rossu

Re: [Python-Dev] Support for Encrypted Zip as python scripts

2009-08-23 Thread Nick Coghlan
Guido van Rossum wrote: > OMG, the use case is actually running a script without giving the user > access to the script's source? Agreed that's a big -1. > > I thought it was just for running a zip containing code so secret you > don't want to leave it around on your hard drive without encryption

Re: [Python-Dev] Support for Encrypted Zip as python scripts

2009-08-23 Thread Guido van Rossum
OMG, the use case is actually running a script without giving the user access to the script's source? Agreed that's a big -1. I thought it was just for running a zip containing code so secret you don't want to leave it around on your hard drive without encryption (say, the program you use to compu

Re: [Python-Dev] Support for Encrypted Zip as python scripts

2009-08-23 Thread Shashank Singh
oops..sorry for the empty mail :P On Mon, Aug 24, 2009 at 8:09 AM, Shashank Singh < shashank.sunny.si...@gmail.com> wrote: > > > On Mon, Aug 24, 2009 at 7:39 AM, Nick Coghlan wrote: > >> Guido van Rossum wrote: >> > Anyway it looks like if someone wants to try this, only the code in >> > runpy.p

Re: [Python-Dev] Support for Encrypted Zip as python scripts

2009-08-23 Thread Shashank Singh
On Mon, Aug 24, 2009 at 7:39 AM, Nick Coghlan wrote: > Guido van Rossum wrote: > > Anyway it looks like if someone wants to try this, only the code in > > runpy.py needs to be touched. > > The necessary work would actually be in zipimport. runpy doesn't know > anything about the details of where

Re: [Python-Dev] Support for Encrypted Zip as python scripts

2009-08-23 Thread Nick Coghlan
Guido van Rossum wrote: > Anyway it looks like if someone wants to try this, only the code in > runpy.py needs to be touched. The necessary work would actually be in zipimport. runpy doesn't know anything about the details of where the module code comes from, it just asks the relevant importer for

Re: [Python-Dev] Support for Encrypted Zip as python scripts

2009-08-23 Thread Guido van Rossum
On Sun, Aug 23, 2009 at 5:59 PM, Gregory P. Smith wrote: > I doubt you can even classify the zipfile module's "decryption" support as > encryption.  It is trivially stupid, easily cracked (a 32bit crc based > "cipher").  The zipfile module does not support the various later encryption > schemes tha

Re: [Python-Dev] Support for Encrypted Zip as python scripts

2009-08-23 Thread Gregory P. Smith
On Sun, Aug 23, 2009 at 2:24 PM, "Martin v. Löwis" wrote: > >> No doubt this is a useful functionality to have but it would be great to > >> have some comments on whether > >> this can be(or even should be) feasibly added as an inbuilt support. > > > > MvL already asked for a patch so I suppose th

Re: [Python-Dev] Support for Encrypted Zip as python scripts

2009-08-23 Thread Martin v. Löwis
>> No doubt this is a useful functionality to have but it would be great to >> have some comments on whether >> this can be(or even should be) feasibly added as an inbuilt support. > > MvL already asked for a patch so I suppose that means he thinks it's > useful. I am actual skeptical that it is

Re: [Python-Dev] Support for Encrypted Zip as python scripts

2009-08-23 Thread Guido van Rossum
> On Aug 23, 2009 2:10 PM, "Guido van Rossum" wrote: > MvL already asked for a patch so I suppose that means he thinks it's > useful. Personally I've never encountered an encrypted zipfile, so I > just have questions: is there a standard encryption algorithm? What is > encrypted? The entire file o

Re: [Python-Dev] Support for Encrypted Zip as python scripts

2009-08-23 Thread Brett Cannon
There is a standard for encrypting entire zip files. And I was looking at the zip docs the other day and zipfile can already decrypt but not encrypt (assuming my memory is accurate; doing this from my phone on vacation). On Aug 23, 2009 2:10 PM, "Guido van Rossum" wrote: On Sun, Aug 23, 2009 at

Re: [Python-Dev] Support for Encrypted Zip as python scripts

2009-08-23 Thread Guido van Rossum
On Sun, Aug 23, 2009 at 9:09 AM, Shashank Singh wrote: > There is an interesting suggestion (http://bugs.python.org/issue6749). > to add support to run encrypted zip files as python scripts. > > No doubt this is a useful functionality to have but it would be great to > have some comments on whether

[Python-Dev] Support for Encrypted Zip as python scripts

2009-08-23 Thread Shashank Singh
There is an interesting suggestion (http://bugs.python.org/issue6749). to add support to run encrypted zip files as python scripts. No doubt this is a useful functionality to have but it would be great to have some comments on whether this can be(or even should be) feasibly added as an inbuilt sup