[Python-Dev] Fast Implementation for ZIP decryption (original) (raw)
Collin Winter collinw at gmail.com
Mon Aug 31 06:28:49 CEST 2009
- Previous message: [Python-Dev] Fast Implementation for ZIP decryption
- Next message: [Python-Dev] Fast Implementation for ZIP decryption
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Sun, Aug 30, 2009 at 7:34 AM, Shashank Singh<shashank.sunny.singh at gmail.com> wrote:
just to give you an idea of the speed up:
a 3.3 mb zip file extracted using the current all-python implementation on my machine (win xp 1.67Ghz 1.5GB) takes approximately 38 seconds. the same file when extracted using c implementation takes 0.4 seconds.
Are there any applications/frameworks which have zip files on their critical path, where this kind of (admittedly impressive) speedup would be beneficial? What was the motivation for writing the C version?
Collin Winter
On Sun, Aug 30, 2009 at 6:35 PM, <exarkun at twistedmatrix.com> wrote:
On 12:59 pm, steve at pearwood.info wrote:
On Sun, 30 Aug 2009 06:55:33 pm Martin v. Löwis wrote:
> Does it sound worthy enough to create a patch for and integrate > into python itself? Probably not, given that people think that the algorithm itself is fairly useless. I would think that for most people, the threat model isn't "the CIA is reading my files" but "my little brother or nosey co-worker is reading my files", and for that, zip encryption with a good password is probably perfectly adequate. E.g. OpenOffice uses it for password-protected documents. Given that Python already supports ZIP decryption (as it should), are there any reasons to prefer the current pure-Python implementation over a faster version? Given that the use case is "protect my biology homework from my little brother", how fast does the implementation really need to be? Is speeding it up from 0.1 seconds to 0.001 seconds worth the potential new problems that come with more C code (more code to maintain, less portability to other runtimes, potential for interpreter crashes or even arbitrary code execution vulnerabilities from specially crafted files)? Jean-Paul
Python-Dev mailing list Python-Dev at python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/shashank.sunny.singh%40gmail.com
Python-Dev mailing list Python-Dev at python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/collinw%40gmail.com
- Previous message: [Python-Dev] Fast Implementation for ZIP decryption
- Next message: [Python-Dev] Fast Implementation for ZIP decryption
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]