summaryrefslogtreecommitdiff
path: root/lib/Crypto/Random/random.py
Commit message (Collapse)AuthorAgeFilesLines
* Fix LP#1061217: random.shuffle takes O(n^2) timeDwayne Litzenberger2013-02-161-7/+7
| | | | | | | | | | | The previous implementation took O(n**2) time and O(n) auxiliary space. We now use the Fisher-Yates algorithm, which takes O(n) time and O(1) space. Thanks to Sujay Jayakar and Andrew Cooke for pointing this out and suggesting a solution. Bug report: https://bugs.launchpad.net/pycrypto/+bug/1061217
* Fix AllOrNothing and random.sample()Thorsten Behrens2011-01-061-1/+1
| | | | | | o AllOrNothing no longer fails occasionally. Patch by Lorenz Quack o random.sample() works on Python 2.1. Patch by Paul Koning and Lorenz Quack
* Improve random selftestThorsten Behrens2011-01-051-3/+1
| | | | | o Random selftest is improved, less likely to collide o random.shuffle() is more pythonic
* Add unit tests for Crypto.Random.randomThorsten Behrens2010-12-311-3/+3
| | | | | | o Add unit tests o Fix random.shuffle() o random.sample() does not work on 2.1. This has not been fixed.
* PY3K _fastmath supportThorsten Behrens2010-12-291-1/+1
| | | | | | | | | | | | | | o _fastmath now builds and runs on PY3K o Changes to setup.py to allow /usr/include for gmp.h o Changes to setup.py to allow linking fastmath w/ static mpir on Windows without warning messages o Changes to test_DSA/test_RSA to throw an exception if _fastmath is present but cannot be imported (due to an issue building _fastmath or the shared gmp/mpir libraries not being reachable) o number.py has the code to flag a failing _fastmath, but that code is commented out for a better runtime experience o Clean up the if for py21compat import - should have been == not is o Clean up some '== None' occurences, now 'is None' instead
* Changes to allow pycrpyto to work on Python 3.x as well as 2.1 through 2.7Thorsten Behrens2010-12-281-2/+3
|
* Legal: Dedicate my files to the public domain.Dwayne C. Litzenberger2009-03-011-20/+17
| | | | | | | | | | | | | In an attempt to simplify the copyright status of PyCrypto, I'm placing my code into the public domain, and encouraging other contributors to do the same. I have used a public domain dedication that was recommended in a book on FOSS legal issues[1], followed by the warranty disclaimer boilerplate from the MIT license. [1] _Intellectual Property and Open Source: A Practical Guide to Protecting Code_, a book written by Van Lindberg and published by O'Reilly Media. (ISBN 978-0-596-51796-0)
* cleanup: Move modules to "lib/Crypto" subdirectory.Dwayne C. Litzenberger2009-02-281-0/+146
This will avoid the previous situation where scripts like the old "test.py" get included accidentally in a release. It also frees us to put additional build scripts in the top-level directory of the source tree.