[issue10030] Patch for zip decryption speedup

2017-03-30 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue10030] Patch for zip decryption speedup

2017-03-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 06e522521c06671b4559eecf9e2a185c2d62c141 by Serhiy Storchaka in branch 'master': bpo-10030: Sped up reading encrypted ZIP files by 2 times. (#550) https://github.com/python/cpython/commit/06e522521c06671b4559eecf9e2a185c2d62c141 --

[issue10030] Patch for zip decryption speedup

2017-03-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Brian, you requested tests, but PR 550 doesn't add new API and doesn't change the behavior of public API. No new tests are needed. -- nosy: +brian.curtin versions: +Python 3.7 -Python 3.4 ___ Python tracker

[issue10030] Patch for zip decryption speedup

2017-03-07 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- pull_requests: +452 ___ Python tracker ___ ___

[issue10030] Patch for zip decryption speedup

2012-11-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I quote from Gregory P. Smith (msg91897): The decryption provided by the zipfile module is for the worthless 32-bit crc based encryption of zipfiles. I think promoting the use of that is a bad idea. zipfile can be used by people to get their data out of

[issue10030] Patch for zip decryption speedup

2012-11-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: See also criticism in the original discussion: http://mail.python.org/pipermail/python-dev/2009-August/091450.html . -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10030

[issue10030] Patch for zip decryption speedup

2012-11-04 Thread Robert de Vries
Robert de Vries added the comment: My use case is decrypting files of 100's of megabytes. This is so slow that it is quite useless. About an hour or so. I do agree that the encryption is worthless, but that is not important for my use case where I want to discourage people from reverse

[issue10030] Patch for zip decryption speedup

2012-11-04 Thread R. David Murray
R. David Murray added the comment: We aren't particularly interested in helping people make their files slightly harder to reverse engineer, either, so I don't think that is a good enough reason for accepting this. There might be other reasons that are good enough, but I don't think that is

[issue10030] Patch for zip decryption speedup

2012-11-04 Thread Christian Heimes
Christian Heimes added the comment: From the zlib FAQ: 38. How can I encrypt/decrypt zip files with zlib? zlib doesn't support encryption. The original PKZIP encryption is very weak and can be broken with freely available programs. To get strong encryption, use GnuPG,

[issue10030] Patch for zip decryption speedup

2012-11-04 Thread Robert de Vries
Robert de Vries added the comment: If the encryption is so horrible why is there any support (with bad performance) at all in Python? It would be better to remove it altogether. This prevents users from building software using this feature only to find out later how bad the performance is.

[issue10030] Patch for zip decryption speedup

2012-11-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: If the encryption is so horrible why is there any support (with bad performance) at all in Python? It would be better to remove it altogether. We don't remove it as it would break existing programs which rely on this feature. However adding a bunch of C code

[issue10030] Patch for zip decryption speedup

2012-11-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is a patch which optimize (speed up 2x) Python implementation of ZIP decryptor. It is almost the maximum of what can be achieved without significant degradation of maintainability. Of course, 2x is less then 100x, but it more portable and costs almost

[issue10030] Patch for zip decryption speedup

2012-11-04 Thread R. David Murray
R. David Murray added the comment: If the encryption is so horrible why is there any support (with bad performance) at all in Python? I would say it there so that people can use python to decrypt an encrypted zip archive they have been sent that was generated by some other tool. I would

[issue10030] Patch for zip decryption speedup

2012-11-04 Thread Robert de Vries
Robert de Vries added the comment: The current situation is now that the decryption is part of Python. It is well known to be computationally intensive and should therefore be implemented in C. This patch provides that support. The discussion if Python should support the decryption is behind

[issue10030] Patch for zip decryption speedup

2012-11-03 Thread Robert de Vries
Robert de Vries added the comment: Attached you will find the updated patch for the python 3 tree as of now. I have measured a speed-up of more than a factor 100. -- nosy: +rhdv Added file: http://bugs.python.org/file27867/zipdecrypt-3.patch ___

[issue10030] Patch for zip decryption speedup

2012-11-03 Thread Robert de Vries
Robert de Vries added the comment: Patch for python 2.7 Same patch as for python 3, backported to python 2.7 Tested on Linux only. -- Added file: http://bugs.python.org/file27868/zipdecrypt-2.7.patch ___ Python tracker rep...@bugs.python.org

[issue10030] Patch for zip decryption speedup

2012-11-03 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +serhiy.storchaka versions: +Python 3.4 -Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10030 ___

[issue10030] Patch for zip decryption speedup

2010-11-04 Thread Shashank
Shashank shashank.sunny.si...@gmail.com added the comment: I had uploaded an incorrect patch. New corrected patch against trunk (on Mac OS uploaded). -- Added file: http://bugs.python.org/file19494/zipdecrypt.patch ___ Python tracker

[issue10030] Patch for zip decryption speedup

2010-11-04 Thread Shashank
Changes by Shashank shashank.sunny.si...@gmail.com: Removed file: http://bugs.python.org/file19494/zipdecrypt.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10030 ___

[issue10030] Patch for zip decryption speedup

2010-11-04 Thread Shashank
Changes by Shashank shashank.sunny.si...@gmail.com: Added file: http://bugs.python.org/file19495/zipdecrypt.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10030 ___

[issue10030] Patch for zip decryption speedup

2010-10-23 Thread Shashank
Shashank shashank.sunny.si...@gmail.com added the comment: the C module should be private and therefore called _zipdecrypt done if you want to avoid API mismatch, you could give a tp_call to your C decrypter object, rather than a decrypt method done - you can put all initialization code in

[issue10030] Patch for zip decryption speedup

2010-10-12 Thread Shashank
Shashank shashank.sunny.si...@gmail.com added the comment: Attached is a patch with changes in Lib/test/test_zipfile.py to test both C and pure-py impls (on systems where the C impl is present). Admittedly, this approach to emulating the absence of C impl is a bit hacky. This is primarily

[issue10030] Patch for zip decryption speedup

2010-10-12 Thread Shashank
Changes by Shashank shashank.sunny.si...@gmail.com: Added file: http://bugs.python.org/file19197/zipdecrypt.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10030 ___

[issue10030] Patch for zip decryption speedup

2010-10-12 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Hello, Some quick comments: - the C module should be private and therefore called _zipdecrypt - if you want to avoid API mismatch, you could give a tp_call to your C decrypter object, rather than a decrypt method - you can put all initialization

[issue10030] Patch for zip decryption speedup

2010-10-07 Thread Shashank
Shashank shashank.sunny.si...@gmail.com added the comment: I have updated the patch with a check for the availability of C impl and to use pure-py impl as a fallback. How do you suggest would the tests change? As I had mentioned before, in my understanding since there is no change in the API

[issue10030] Patch for zip decryption speedup

2010-10-07 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: It is what is normally done *now* when there is both a C and a python implementation (see, for example, test_datetime.py and test_io.py for two different approaches to that). Not all tests have been updated to this practice. Thanks

[issue10030] Patch for zip decryption speedup

2010-10-05 Thread Shashank
New submission from Shashank shashank.sunny.si...@gmail.com: As promised in this thread http://mail.python.org/pipermail/python-dev/2009-August/091450.html (a year ago!), attached is a patch that replaces simple zip decryption logic written in pure python with that in C. As reported in the

[issue10030] Patch for zip decryption speedup

2010-10-05 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: It would be nice to retain the pure python version as a fallback for non CPython implementations, that will require tweaking the tests to make sure both are tested. -- nosy: +r.david.murray