Commit graph

46 commits

Author SHA1 Message Date
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
Dwayne C. Litzenberger
1660c69298 RIPEMD160: Add new C implementation (RIPEMD160.c)
Also, disable the Python implementation (it's really slow)
2008-09-15 23:01:34 -04:00
Dwayne C. Litzenberger
ca15453497 RIPEMD: Remove the old RIPEMD.c module due to copyright concerns
The copyright notice and disclaimer at the top of RIPEMD.c says:

    Copyright (c) Katholieke Universiteit Leuven 1996, All Rights Reserved
    The Katholieke Universiteit Leuven makes no representations concerning
    either the merchantability of this software or the suitability of this
    software for any particular purpose. It is provided "as is" without
    express or implied warranty of any kind. These notices must be retained
    in any copies of any part of this documentation and/or software.

To me, it seems as though the software was intended to be freely distributed,
as long as the notice and disclaimer are included.  However, no such
permission is explicitly granted, so I am removing the module (without looking
at its contents).
2008-09-15 23:01:28 -04:00
Dwayne C. Litzenberger
a515b7a4a4 setup.py: Resurrect the winrandom module (Win32)
There are three things that, when combined, produce exploitably-weak random
number generation reminiscent of the infamous Debian libssl fiasco
(CVE-2008-0166):

    1. Microsoft Windows

    2. A long-standing bug in PyCrypto's setup.py that omits the "winrandom"
       module from the build procedure, causing RandomPool to be seeded weakly
       when it is instantiated.

    3. A tendency among PyCrypto's users to (incorrectly) treat RandomPool as
       a portable substitute for reading from /dev/urandom.  RandomPool was
       never intended as a complete RNG, but I have seen several cases where
       it has been treated as one. (See footnote.)

This commit provides a quick fix for #2.  Future work will attempt to fix #3 by
providing users with a "works out-of-the-box" random number generation API.
Fixing #1 probably won't happen any time soon, though reports of the initial
success of Windows Vista suggest that Microsoft may be working hard on the
problem.

Footnote:

For more information about the misuse of RandomPool, see:

    http://lists.dlitz.net/pipermail/pycrypto/2008q3/000000.html
    http://www.lag.net/pipermail/paramiko/2008-January/000599.html
    http://www.lag.net/pipermail/paramiko/2008-April/000678.html
    https://bugs.launchpad.net/pycrypto/+bug/249765
2008-09-15 20:29:16 -04:00
Dwayne C. Litzenberger
447a619428 SelfTest: Add basic winrandom test 2008-09-15 20:29:13 -04:00
Dwayne C. Litzenberger
4b3a7da8f7 setup.py: Fix exclusion bug that sometimes breaks the build process.
The module exclusion code introduced in commit
eba017d3b0 would fail if the last element of the
list returned by find_package_modules() matched an entry in the EXCLUDE_PY
list.
2008-09-15 20:28:55 -04:00
Dwayne C. Litzenberger
e121f9cb52 Add Crypto.Util.strxor module, and speed up HMAC using it. (For real this time.)
Robey Pointer made an earlier commit that purported to do this
(20092c5511), but he forgot to include the C
code, and it never ended up being published.
2008-09-14 18:13:35 -04:00
Dwayne C. Litzenberger
d147ab526d SelfTest: Add Crypto.SelfTest.Cipher and some tests
The RC5 implementation looks pretty buggy.  It crashes if we give it one-byte
keys, and the last few test vectors from RFC 2040 fail.

Maybe I implemented something wrong, but I don't see where.

Three cheers for patented algorithms!  Hip hip, hooray!  ;-P
2008-09-13 00:30:29 -04:00
Dwayne C. Litzenberger
5a9d819233 SelfTest: Add Crypto.SelfTest framework and hash tests
Rewritten from scratch to be clean, flexible, and compatible with Python 2.1.
2008-09-12 17:44:49 -04:00
Dwayne C. Litzenberger
eba017d3b0 setup.py: Exclude top-level test.py file 2008-09-12 12:39:04 -04:00
Dwayne C. Litzenberger
a8742eac65 Clean up RCS keywords ($Id ... $ -> $Id$).
RCS-style keywords don't well in distributed revision control systems.  If you
want to use them, do it as part of your build process.
2008-08-08 18:32:29 -04:00
A.M. Kuchling
a0088caa00 [project @ amk@amk.ca-20080103022910-2b8kxl1tj1kabdip]
Revert r299: the _strxor.c module wasn't committed, so restore the Python-only code
2008-01-02 21:29:10 -05:00
Robey Pointer
20092c5511 [project @ robey@lag.net-20060815025047-0cd74948f152fdc5]
significant speedup to HMAC by moving strxor into C
2006-08-14 19:50:47 -07:00
akuchling
d071215050 [project @ akuchling-20051130003022-fe21c4b07f18af32]
[project @ 2005-11-29 16:30:22 by akuchling]
Bump version
2005-11-29 17:30:22 -07:00
akuchling
9800bc2251 [project @ akuchling-20050614082022-004c9256310dcdf6]
[project @ 2005-06-14 01:20:22 by akuchling]
Bump version to 2.0.1
2005-06-14 01:20:22 -07:00
akuchling
6541402f3e [project @ akuchling-20040814184818-fb4cde70d089d5b9]
[project @ 2004-08-14 11:48:18 by akuchling]
Update home page
2004-08-14 11:48:18 -07:00
akuchling
20d7f343da [project @ akuchling-20040814064547-83a6d4811505b355]
[project @ 2004-08-13 23:44:46 by akuchling]
Bump version to 2.0
2004-08-13 23:45:47 -07:00
akuchling
c44bccd561 [project @ akuchling-20031219222425-b2ffbae528141f6e]
[project @ 2003-12-19 14:24:25 by akuchling]
Add Crypto.Hash.SHA256 module
2003-12-19 15:24:25 -07:00
akuchling
988ac80e04 [project @ akuchling-20030407230941-138e87ef84684a07]
[project @ 2003-04-07 16:09:41 by akuchling]
Update path for download URL
2003-04-07 16:09:41 -07:00
akuchling
a95c6a73b9 [project @ akuchling-20030404052352-fa22b12cdd2169d7]
[project @ 2003-04-03 21:23:52 by akuchling]
Bump version number
2003-04-03 22:23:52 -07:00
akuchling
960d827e5d [project @ akuchling-20030404021741-667bca4317210b45]
[project @ 2003-04-03 18:17:40 by akuchling]
Merge _rsa.c and _dsa.c into a single module
2003-04-03 19:17:41 -07:00
akuchling
4d9b54697d [project @ akuchling-20030308043247-476ec0bb15791c86]
[project @ 2003-03-07 20:32:47 by akuchling]
Update e-mail address
2003-03-07 21:32:47 -07:00
akuchling
9949a1ef6a [project @ akuchling-20030301005521-85e3b96669a593f0]
[project @ 2003-02-28 16:55:21 by akuchling]
Add download_url and classifiers
2003-02-28 17:55:21 -07:00
akuchling
7ebdcbb449 [project @ akuchling-20030301004046-c1a8f9c2442f1d05]
[project @ 2003-02-28 16:40:46 by akuchling]
-pedantic produces an irritating warning about 'long long' not being ANSI; remove the switch to silence it
2003-02-28 17:40:46 -07:00
akuchling
3bcadbfddd [project @ akuchling-20030301003829-d3905a8734a9519d]
[project @ 2003-02-28 16:38:29 by akuchling]
Old patch that's been in my tree for a while: autodetect the GMP library and build _rsa and _dsa if found
2003-02-28 17:38:29 -07:00
z3p
934a38b75e [project @ z3p-20021121092315-0b81814d9d761cda]
[project @ 2002-11-21 01:23:15 by z3p]
adding C versions of RSA and DSA
2002-11-21 02:23:15 -07:00
moraes
a317dcc290 [project @ moraes-20021023115220-7b961936f27ecd5b]
[project @ 2002-10-23 04:52:20 by moraes]
Added Crypto.Util.winrandom.winrandom C extension code
to get randomness from Windows CryptGenRandom.
2002-10-23 04:52:20 -07:00
akuchling
efa811b7c5 [project @ akuchling-20020905182711-cd002f3e3a9818cf]
[project @ 2002-09-05 11:27:11 by akuchling]
Bump version number
2002-09-05 11:27:11 -07:00
akuchling
dcf186b7b5 [project @ akuchling-20020718200537-565fa6db56ed3041]
[project @ 2002-07-18 13:05:37 by akuchling]
Don't try to build if using Python 1.x
2002-07-18 13:05:37 -07:00
akuchling
5a9dcccc0c [project @ akuchling-20020711213119-1944f9493ae8d3c1]
[project @ 2002-07-11 14:31:19 by akuchling]
Add CVS id
2002-07-11 14:31:19 -07:00
akuchling
9474a50449 [project @ akuchling-20020619200712-cad045141fcd3c17]
[project @ 2002-06-19 13:07:10 by akuchling]
Compilation fix for Windows
2002-06-19 13:07:12 -07:00
akuchling
2cfdb96c37 [project @ akuchling-20020611191258-9319d013132b6c9f]
[project @ 2002-06-11 12:12:37 by akuchling]
Bump version number
2002-06-11 12:12:58 -07:00
akuchling
122fd378b2 [project @ akuchling-20020523202204-3dd83d33bb610d65]
[project @ 2002-05-23 13:22:04 by akuchling]
Install Protocol package
2002-05-23 13:22:04 -07:00
akuchling
24ecd3bf65 [project @ akuchling-20020517032045-acbc95558d7782ab]
[project @ 2002-05-16 20:20:45 by akuchling]
Move C implementation files into src/
2002-05-16 20:20:45 -07:00
akuchling
2fcc7796c2 [project @ akuchling-20020513063708-12a1c73df2d22985]
[project @ 2002-05-12 23:37:08 by akuchling]
Restore the PublicKey package
2002-05-12 23:37:08 -07:00
akuchling
8250e0d315 [project @ akuchling-20020501020905-8a1b16d5fca6bdcc]
[project @ 2002-04-30 19:09:05 by akuchling]
Bump version number to alpha2
2002-04-30 19:09:05 -07:00
akuchling
228eeab76f [project @ akuchling-20020423061733-e5b40477ab743ed4]
[project @ 2002-04-22 23:17:33 by akuchling]
Change package name
2002-04-22 23:17:33 -07:00
akuchling
d61512fc0e [project @ akuchling-20020423044017-ad066eaea9b4516d]
[project @ 2002-04-22 21:40:17 by akuchling]
Uncomment RC5
2002-04-22 21:40:17 -07:00
akuchling
8090f7d828 [project @ akuchling-20020409042351-554ff301e62e349b]
[project @ 2002-04-08 21:23:51 by akuchling]
Don't install Crypto.PublicKey
2002-04-08 21:23:51 -07:00
akuchling
45fbe6cd86 [project @ akuchling-20020404234043-6d02bea262161e77]
[project @ 2002-04-04 15:40:12 by akuchling]
Restore stream ciphers
2002-04-04 16:40:43 -07:00
akuchling
29040fe073 [project @ akuchling-20020404054005-db1a74c631d69593]
[project @ 2002-04-03 21:39:54 by akuchling]
Add AES implementation
2002-04-03 22:40:05 -07:00
akuchling
d56d4575a9 [project @ akuchling-20020404044609-486b9bfe28187fb5]
[project @ 2002-04-03 20:46:09 by akuchling]
Add most of the block encryption modules
2002-04-03 21:46:09 -07:00
akuchling
2d649fecaf [project @ akuchling-20020404041037-37c21540e3eb6003]
[project @ 2002-04-03 20:10:37 by akuchling]
Get DES module compiling again.  The test suite succeeds for all modes
   except the PGP mode.
2002-04-03 21:10:37 -07:00
akuchling
84d6759119 [project @ akuchling-20020404014509-3215ed39d4587db5]
[project @ 2002-04-03 17:45:09 by akuchling]
Add setup.py builder
2002-04-03 18:45:09 -07:00