Commit graph

293 commits

Author SHA1 Message Date
Dwayne C. Litzenberger
323ce9ef95 Fix libgmp/libmpir autodetection 2011-10-10 19:15:50 -04:00
Dwayne C. Litzenberger
c90c797a58 Don't test SHA224/384/512 where hashlib isn't available (Python < 2.5) 2011-10-10 16:05:23 -04:00
Dwayne C. Litzenberger
7e490d9b3a setup.py: configure be quiet when --quiet is specified 2011-10-10 16:05:23 -04:00
Dwayne C. Litzenberger
c263294fe7 setup.py: Don't run ./configure if ./config.status already exists 2011-10-10 16:05:23 -04:00
Dwayne C. Litzenberger
bf38995ffa Merge branch 'master' into py3k
Conflicts:
	setup.py
	src/_fastmath.c
2011-10-10 14:51:07 -04:00
Dwayne C. Litzenberger
9cfb332b22 autoconf: only use side-channel secured mpz_powm_sec if it's available (libgmp 5 or later) 2011-10-10 14:49:26 -04:00
Legrandin
44ed631b69 Replace explicit search for gmp library with an attempt to compile a dummy C file dependent on it. 2011-09-27 18:55:06 +02:00
Anders Sundman
e226cd7f96 Merge from dlitz/master 2011-05-19 19:55:12 +02:00
Legrandin
1166875eb3 The final, tested PKCS#1 v1.5 signature module 2011-02-03 01:35:59 +01:00
Legrandin
abd276c5fa Improve the test command in setup.py, by allowing tests to be
performed on a single sub-package or module only.
2011-01-10 18:52:40 +01:00
Thorsten Behrens
606b17789c Replace tabs with spaces 2011-01-10 07:50:52 -05:00
Thorsten Behrens
4082de9a48 Add Ron Rivet Test
o Add Ron Rivet DES test to test_DES.py
o Started on API documentation for 3.x
2010-12-30 07:15:35 -05:00
Thorsten Behrens
cb48387f66 PY3K _fastmath support
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
2010-12-29 13:21:05 -05:00
Thorsten Behrens
ca701f92f5 PY3K support for _fastmath.c; removed floordiv(a,b) hack and replaced with divmod(a,b)[0]; move to assertEqual throughout the test suite to prep for assert_ and failIf being removed in 3.3/3.4 2010-12-29 05:29:08 -05:00
Thorsten Behrens
295ce314d9 Changes to allow pycrpyto to work on Python 3.x as well as 2.1 through 2.7 2010-12-28 16:26:52 -05:00
Thorsten Behrens
1873473e13 Removed erroneous print statement from setup.py - it had snuck in from the released 2.3 source 2010-12-23 02:48:45 -05:00
Thorsten Behrens
917bc64f7e Change _fastmath.c to compile with VC++, add support for mpir as alternative to gmp 2010-12-23 02:41:02 -05:00
Dwayne C. Litzenberger
9e9641d0a9 Bump to version 2.3 2010-08-27 00:41:55 -04:00
Dwayne C. Litzenberger
6acbeba215 Bump to version 2.2 2010-08-02 17:15:23 -04:00
Dwayne C. Litzenberger
deeed53e07 Fix build on python compiled with profiling
See https://bugs.launchpad.net/pycrypto/+bug/609175

Apparently, the -pg and -fomit-frame-pointer options to gcc are incompatible,
and -pg is added when python is built using --enable-profiling.

Thanks to Drew Smathers for pointing this out and proposing this fix.
2010-08-02 17:03:30 -04:00
Dwayne C. Litzenberger
574ffac9f5 Tell GCC to compile using the C99 standard
This should fix building on FreeBSD and NetBSD.
2010-05-29 10:13:56 -04:00
Dwayne C. Litzenberger
033fc93615 Release version 2.1.0 2009-12-13 15:39:29 -05:00
Dwayne C. Litzenberger
7ac1798a27 Bump to version 2.1.0b1 2009-11-01 21:00:45 -05:00
Dwayne C. Litzenberger
afbaf76c8c setup.py: Add USE_GCOV variable for building with gcov 2009-10-12 14:53:59 -04:00
Dwayne C. Litzenberger
bf7a2e7598 setup.py: Enable assert() statements, and reduce optimization when debugging 2009-10-11 01:07:44 -04:00
Dwayne C. Litzenberger
d34e3f4e7b setup.py: Update download_url 2009-08-28 12:10:24 -04:00
Dwayne C. Litzenberger
e2f605648b setup.py: Fix "setup.py sdist" 2009-08-28 12:10:24 -04:00
Dwayne C. Litzenberger
e0739da819 setup.py: Update author/email/URL information 2009-08-28 12:10:23 -04:00
Dwayne C. Litzenberger
b2e5f03eac Bump to version 2.1.0a2 2009-08-28 12:09:15 -04:00
Dwayne C. Litzenberger
812e01736c Bump to version 2.1.0alpha1 2009-08-03 21:21:29 -04:00
Dwayne C. Litzenberger
19a39401be setup.py: Replace the legal notice
I have permission to do this.  See the LEGAL directory.
2009-08-03 19:04:00 -04:00
Dwayne C. Litzenberger
bb201a4f7e Restore Crypto.Cipher.XOR and its self-test
This commit depends on files restored by the previous 2 commits.
2009-08-02 13:43:22 -04:00
Dwayne C. Litzenberger
1fa5277473 setup.py: Remove exclusion for Crypto.test
There is no test.py module anymore, so we can remove this cruft.
2009-03-11 00:45:47 -04:00
Dwayne C. Litzenberger
f7a67d3c1f setup.py: Don't implicitly build when running test
The "build" command may need options (e.g. "-c mingw32"), and these can't be
specified on for the "test" command.
2009-03-11 00:45:47 -04:00
Dwayne C. Litzenberger
64ee7ef57e setup.py: Speedup on unix/cygwin/mingw32 using compiler tweaks.
The new DES module is painfully slow for some reason without this.
2009-03-11 00:45:42 -04:00
Dwayne C. Litzenberger
f683c54320 DES: Add new DES.c and DES3.c modules that use libtomcrypt 2009-03-01 16:10:59 -05:00
Dwayne C. Litzenberger
7f3ee6d8eb Add new Blowfish implementation
I wrote this implementation last year without looking at any other
implementation.
2009-03-01 10:39:29 -05:00
Dwayne C. Litzenberger
5b5b496c0f Remove Blowfish, DES, DES3, IDEA, RC5, and XOR modules
Because:

    - Blowfish: Uses the original (ambiguous) PyCrypto license.  The
      documentation says "the Blowfish algorithm has been placed in the public
      domain and can be used freely", but this seems to be referring to
      patents, not copyright.

    - DES: The file says "Copyright (C) 1993 Eric Young", and appears to have
      been taken from SSLeay.  The license of SSLeay is not GPL-compatible,
      since it has an advertising clause.

    - DES3: Same reason as for the DES module.

    - IDEA: Patent-encumbered.

    - RC5: Patent-encumbered.

    - XOR: Insecure as a stream cipher, and it silently truncates "keys"
      to 32 bytes.  The strxor module is a better replacement if you want to
      do a bitwise exclusive-or between strings.
2009-03-01 10:23:13 -05:00
Dwayne C. Litzenberger
a2ba061ff6 cleanup: Update setup.py (change package_dir from "." to "lib/Crypto") 2009-02-28 13:17:31 -05:00
Dwayne C. Litzenberger
10b694b682 SelfTest: Move test_chaffing to the SelfTest module 2008-11-21 13:11:27 -05:00
Dwayne C. Litzenberger
654c86efe3 SelfTest: Add "setup.py test" command 2008-11-21 13:04:18 -05:00
Dwayne C. Litzenberger
1af3ed1dd8 MSVC-specific fixes and workarounds 2008-11-16 11:39:38 -05:00
Dwayne C. Litzenberger
f4eb9fd906 Util.Counter: Add Crypto.Util.Counter and Crypto.Util._counter modules 2008-09-21 00:53:16 -04:00
Dwayne C. Litzenberger
feda40ce64 Fortuna: Add SHAd256 and its test suite 2008-09-21 00:52:48 -04:00
Dwayne C. Litzenberger
e6f5e8f3d4 setup.py: Warn when not building _fastmath 2008-09-20 17:25:34 -04:00
Dwayne C. Litzenberger
77991865ab SelfTest: Add SelfTest.PublicKey.test_RSA 2008-09-20 13:23:33 -04:00
Dwayne C. Litzenberger
2467f60dca SelfTest: Add SelfTest.Random and SelfTest.Random.OSRNG 2008-09-17 23:34:46 -04:00
Dwayne C. Litzenberger
6951a97eeb RNG: Add Random.OSRNG package
This package provides a platform-independent interface to the underlying
operating system's random number generator.
2008-09-17 23:34:30 -04:00
Dwayne C. Litzenberger
2d4996f1fe setup.py: Fix for 64-bit architectures (tested on x86_64) 2008-09-16 12:48:24 -04:00
Dwayne C. Litzenberger
fec685ff8d RIPEMD160: Detect endianness at build-time rather than at runtime 2008-09-15 23:01:37 -04:00