summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Fetch pythons via https (win32)winbuild2-wipDwayne Litzenberger2016-04-021-18/+18
|
* AutoIt3 script for installing python <= 2.3 on WindowsDwayne Litzenberger2016-04-023-4/+91
|
* [snapshot]Dwayne Litzenberger2013-05-263-1/+147
|
* Skip RSA/DSA/ElGamal tests when --skip-slow-tests is specified.Dwayne Litzenberger2013-05-267-53/+64
|
* Win32: Remove obsolete -mno-cygwin option from mingw32 buildDwayne Litzenberger2013-05-261-0/+4
|
* Re-generate configure scriptDwayne Litzenberger2013-05-051-14/+21
|
* Use AX_CHECK_COMPILE_FLAG to detect -maesSebastian Ramacher2013-04-271-12/+4
| | | | Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
* pct-speedtest.py: Test the random moduleDwayne Litzenberger2013-04-211-0/+19
|
* FortunaAccumulator: Use time.monotonic if available (i.e. Python 3.3 and later)Dwayne Litzenberger2013-04-212-2/+33
|
* AES-NI support: Python 2.1 Backward compatibilityDwayne Litzenberger2013-04-213-3/+12
| | | | | - METH_NOARGS was introduced in Python 2.2. - Python 2.1 doesn't have True and False builtins.
* Remove unnecessary includesSebastian Ramacher2013-04-211-2/+0
|
* Initial AES-NI supportSebastian Ramacher2013-04-219-5/+462
|
* Add pycrypto_common.h and clean up a bunch of miscellaneous includes & typedefsDwayne Litzenberger2013-04-2127-118/+95
|
* Include inttypes.h or sys/inttypes.h based on what autoconf tells usDwayne Litzenberger2013-04-217-28/+34
| | | | | This should fix compilation on HP-UX 11.31. Thanks Adam Woodbeck for reporting this.
* Merge branch 'hash-speedup-wip'Dwayne Litzenberger2013-04-2135-949/+602
|\
| * Hash: Speed up initialization by removing pure-Python wrappershash-speedup-wipDwayne Litzenberger2013-02-1721-845/+274
| | | | | | | | | | | | | | | | | | | | | | | | The pure Python wrappers around Crypto.Hash.* were convenient, but they slowed down hash initialization by 4-7x. There is a speed trade-off here: The MD5 and SHA1 objects are just wrapped hashlib objects (or old-style md5/sha objects). To maintain API compatibility with the rest of PyCrypto, we still have to wrap them, so they're slower to initialize than the rest of the hash functions. If hashlib ever adds a .new() method, we will automatically use hashlib directly and gain the initialization speed-up.
| * Hash: Generic Crypto.Hash.new(algo, [data]) functionDwayne Litzenberger2013-02-172-0/+154
| | | | | | | | | | This allows us to instantiate a new hash given only an existing hash object.
| * Hash: Remove "oid" attributes; add "name" attributeDwayne Litzenberger2013-02-1720-103/+92
| | | | | | | | | | | | | | | | | | | | | | | | In PyCrypto v2.5, the "oid" attribute was added to hash objects. In retrospect, this was not a good idea, since the OID is not really a property of the hash algorithm, it's a protocol-specific identifer for the hash functions. PKCS#1 v1.5 uses it, but other protocols (e.g. OpenPGP, DNSSEC, SSH, etc.) use different identifiers, and it doesn't make sense to add these to Crypto.Hash.* every time a new algorithm is added. This also has the benefit of being compatible with the Python standard library's "hashlib" objects, which also have a name attribute.
| * Fix dumb typo: "is 2" should be "== 2"Dwayne Litzenberger2013-02-171-1/+1
| |
| * Counter: Fix compiler warning about signed-unsigned comparisonDwayne Litzenberger2013-02-172-1/+2
| |
| * Fix compiler warning about "_POSIX_C_SOURCE" being redefined in string.hDwayne Litzenberger2013-02-1713-12/+16
| | | | | | | | The solution is to include Python.h before string.h is included.
| * pct-speedtest.py: Add PKCS#1 signing and verificationDwayne Litzenberger2013-02-171-0/+71
| |
| * Hash: Rename SHA->SHA1 and RIPEMD->RIPEMD160 (pct-speedtest.py)Dwayne Litzenberger2013-02-171-2/+7
| | | | | | | | Oops, I missed this one.
* | Add blinding to ElGamal decryption.Legrandin2013-04-211-2/+11
| |
* | Pass corret stream to TestTextRunnerSebastian Ramacher2013-04-051-0/+2
| | | | | | | | | | | | If stream is not None, add it to kwargs and pass it to TestTextRunner. Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
* | Use correct streamSebastian Ramacher2013-04-051-1/+1
|/ | | | | | If stream is None, write the value of StringIO to sys.stderr. Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
* Hash: Rename SHA->SHA1 and RIPEMD->RIPEMD160 (2/2)Dwayne Litzenberger2013-02-162-0/+48
| | | | | | | | | These algorithm names were confusing, because there are actually algorithms called "SHA" (a.k.a. SHA-0) and "RIPEMD" (the original version). This commit adds backward-compatibility support for the old Crypto.Hash.SHA and Crypto.Hash.RIPEMD modules.
* Hash: Rename SHA->SHA1 and RIPEMD->RIPEMD160 (1/2)Dwayne Litzenberger2013-02-1617-55/+60
| | | | | | | | | These algorithm names were confusing, because there are actually algorithms called "SHA" (a.k.a. SHA-0) and "RIPEMD" (the original version). This commit just renames the modules, with no backward-compatibility support.
* We also support Python 3.3Dwayne Litzenberger2013-02-161-1/+1
|
* Tweak the READMEDwayne Litzenberger2013-02-161-0/+2
|
* OpenBSD: Automatically look for libgmp in /usr/localDwayne Litzenberger2013-02-164-0/+3411
|
* Use autoconf to generate compiler optionsDwayne Litzenberger2013-02-1614-137/+2942
| | | | | | | Hopefully this means we'll break on fewer platforms. Also, remove some of the extra optimization flags (e.g. -O3 -fomit-frame-pointer), which don't really do much.
* Fix RSA object serialization: Python 3 compatibilityDwayne Litzenberger2013-02-161-15/+21
|
* Fix RSA object serializationFrank Sievertsen2013-02-162-0/+62
|
* asn1: Python 2.1 compatibilityDwayne Litzenberger2013-02-161-0/+2
|
* Fix random.shuffle SelfTestDwayne Litzenberger2013-02-161-1/+1
| | | | | | random.shuffle("1") is a no-op, so it doesn't raise TypeError. This is now true of both the stdlib random.shuffle and PyCrypto's random.shuffle implementation.
* 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 leaks in _fastmathSebastian Ramacher2013-02-161-2/+3
| | | | | | | Fix leaks in getRandomInteger and rsaKeyNew. If randfunc throws an exception they both don't clean up properly. Thanks to Andreas Stührk for helping me to debug these two leaks.
* pct-speedtest.py: Test HMAC modulesDwayne Litzenberger2013-02-161-1/+23
|
* pct-speedtest.py: Add some commentsDwayne Litzenberger2013-02-161-0/+5
|
* pct-speedtest.py: Also test the standard hashlib modules, if possibleDwayne Litzenberger2013-02-161-8/+28
| | | | | On my machine, hashlib is about 5x faster than PyCrypto for single-block inputs. :( (It's about the same for long inputs.)
* pct-speedtest.py: Add tests for SHA224/SHA384/SHA512Dwayne Litzenberger2013-02-161-1/+4
|
* pct-speedtest.py: Python 3 compatibilityDwayne Litzenberger2013-02-161-4/+4
|
* pct-speedtest.py: Python 2.1-2.3 compatibilityDwayne Litzenberger2013-02-161-1/+8
| | | | They don't have os.urandom, so use Crypto.Random.get_random_bytes
* asn1: make DerObject into a new-style classDwayne Litzenberger2013-02-161-1/+1
|
* SHA2: Don't export symbol 'add_length'Dwayne Litzenberger2013-02-111-1/+1
| | | | | | Exporting symbols can cause symbol conflicts with external libraries, causing the dynamic linker to silently pick one of the implementations, which can lead to subtle bugs if they're actually different functions.
* Update tools/create-pythons.shDwayne Litzenberger2013-02-031-7/+11
|
* Use os.chmod instead of os.system("chmod ...")Sebastian Ramacher2013-02-021-2/+5
|
* Add build to TestCommand's sub_commandsSebastian Ramacher2013-02-021-0/+6
| | | | | | | | ... and run the sub_commands in TestCommand.run. So if python setup.py test is executed before ever running the build target, the extension modules are built. Bug: https://bugs.launchpad.net/pycrypto/+bug/1055256 Bug: https://bugs.launchpad.net/pycrypto/+bug/976171
* Check in some scripts I use for building and testing against multiple ↵Dwayne Litzenberger2013-02-023-0/+233
| | | | versions of Python