Python Cryptography Toolkit Publisher's description
from Andrew M. Kuchling
Python Cryptography Toolkit is a collection of both secure hash functions, and various encryption algorithms.
Python Cryptography Toolkit is a collection of both secure hash functions (such as MD5 and SHA), and various encryption algorithms.
The package is structured to make adding new modules easy. I consider this section to be essentially complete, and the software interface will almost certainly not change in an incompatible way in the future
The toolkit is written and tested using Python 2.2, though it should also work with Python 2.1. Python 1.5.2 is not supported, and the setup.py script will abort if you run it with 1.5.2.
The modules are packaged using the Distutils, so you can simply run "python setup.py build" to build the package, and "python setup.py install" to install it.
If the setup.py script crashes with a DistutilsPlatformError complaining that the file /usr/lib/python2.2/config/Makefile doesn't exist, this means that the files needed for compiling new Python modules aren't installed on your system.
Red Hat users often run into this because they don't have the python2-devel RPM installed. The fix is to simply install the requisite RPM.
To verify that everything is in order, run "python test.py". It will test all the cryptographic modules, skipping ones that aren't available.
If the test script reports an error on your machine, please report the bug using the bug tracker (URL given above). If possible, track down the bug and include a patch that fixes it.
To install the package under the site-packages directory of your Python installation, run "python setup.py install".
What's New in This Release:В· Fix SHA256 and RIPEMD on AMD64 platform.
В· Deleted Demo/ directory.
В· Add PublicKey to Crypto.__all__
What's New in This Release: [ read full changelog ]
В· This version supports Python versions 2.1 through 2.6.
В· Clarified copyright status of much of the existing code by tracking down Andrew M. Kuchling, Barry A. Warsaw, Jeethu Rao, Joris Bontje, Mark Moraes, Paul Swartz, Robey Pointer, and Wim Lewis and getting their permission to clarify the license/public-domain status of their contributions. Many thanks to all involved!
В· Replaced the test suite with a new, comprehensive package (Crypto.SelfTest) that includes documentation about where its test vectors came from, or how they were derived. Use "python setup.py test" to run the tests after building.
В· Added Crypto.version_info, which from now on will contain version information in a format similar to Python's sys.version_info.
В· Added a new random numbers API (Crypto.Random), and deprecated the old one (Crypto.Util.randpool.RandomPool), which was misused more often than not. The new API is used by invoking Crypto.Random.new() and then just reading from the file-like object that is returned. CAVEAT: To maintain the security of the PRNG, you must call Crypto.Random.atfork() in both the parent and the child processes whenever you use os.fork(). Otherwise, the parent and child will share copies of the same entropy pool, causing them to return the same results! This is a limitation of Python, which does not provide readily-accessible hooks to os.fork(). It's also a limitation caused by the failure of operating systems to provide sufficiently fast, trustworthy sources of cryptographically-strong random numbers.
В· Crypto.PublicKey now raises ValueError/TypeError/RuntimeError instead of the various custom "error" exceptions
В· Removed the IDEA and RC5 modules due to software patents. Debian has been doing this for a while
В· Added Crypto.Random.random, a strong version of the standard Python 'random' module.
В· Added Crypto.Util.Counter, providing fast counter implementations for use with CTR-mode ciphers.
В· Fixed padding bug in SHA256; this resulted in bad digests whenever (the number of bytes hashed) mod 64 == 55.
В· Fixed a 32-bit limitation on the length of messages the SHA256 module could hash.
В· AllOrNothing: Fixed padding bug in digest()
В· Fixed a bad behaviour of the XOR cipher module: It would silently truncate all keys to 32 bytes. Now it raises ValueError when the key is too long.
В· DSA: Added code to enforce FIPS 186-2 requirements on the size of the prime p
В· Fixed the winrandom module, which had been omitted from the build process, causing security problems for programs that misuse RandomPool.
В· Fixed infinite loop when attempting to generate RSA keys with an odd number of bits in the modulus. (Not that you should do that.)
В· Clarified the documentation for Crypto.Util.number.getRandomNumber. Confusingly, this function does NOT return N random bits; It returns a random N-bit number, i.e. a random number between 2**(N-1) and (2**N)-1. Note that getRandomNumber is for internal use only and may be renamed or removed in future releases.
В· Replaced RIPEMD.c with a new implementation (RIPEMD160.c) to alleviate copyright concerns.
В· Replaced the DES/DES3 modules with ones based on libtomcrypt-1.16 to alleviate copyright concerns.
В· Replaced Blowfish.c with a new implementation to alleviate copyright concerns.
В· Added a string-XOR implementation written in C (Crypto.Util.strxor) and used it to speed up Crypto.Hash.HMAC
В· Converted documentation to reStructured Text.
В· Added epydoc configuration Doc/epydoc-config
В· setup.py now emits a warning when building without GMP.
В· Added pct-speedtest.py to the source tree for doing performance testing on the new code.
В· Cleaned up the code in several places.
System Requirements:No special requirements.
Program Release Status:
Program Install Support: Install and Uninstall