Changelog.pycrypto 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772
  1. 2.7a1
  2. =====
  3. * Experimental release. This introduces a new API for AEAD modes, and
  4. makes a few other minor API changes. These APIs should be considered
  5. experimental, and may be changed before the final release.
  6. * New API for authenticated encryption with associated data (AEAD):
  7. - New block cipher modes:
  8. - MODE_CCM
  9. - MODE_EAX
  10. - MODE_GCM
  11. - MODE_SIV
  12. - New methods:
  13. - .encrypt_and_digest()
  14. - .decrypt_and_verify()
  15. - .digest()
  16. - .verify()
  17. - New MAC algorithm:
  18. - Crypto.Cipher.CMAC
  19. - New .verify() and .hexverify() methods also added to Hash and
  20. HMAC/CMAC objects, providing constant-time hash comparison.
  21. (Thanks: Legrandin, Lucas Garron)
  22. * LP#1132550: Fix MODE_OPENPGP not accepting uppercase 'IV' kwarg.
  23. * LP#1119552: Fix PKCS#1v1.5 not accepting signatures without the
  24. optional NULL parameter
  25. * Add support for import/export of DSA keys. (Thanks: Legrandin)
  26. * Add support for PKCS#8-encrypted private keys. (Thanks: Legrandin)
  27. * LP#996193: Fix MODE_OFB requiring padding (it now behaves as a stream
  28. cipher)
  29. * Improve C extension autodocs
  30. * Remove pointless 'error' attribute from stream ciphers.
  31. * Deprecate the disable_shortcut option to Crypto.Util.Counter;
  32. Remove __PCT_CTR_SHORTCUT__ entirely.
  33. * Fix small MODE_CTR memory leak under Python 3.
  34. * Fix error importing winrandom on Python 3. (Thanks: Jason R. Coombs)
  35. * FortunaAccumulator: Use time.monotonic for rate-limiting if available
  36. (i.e. Python 3.3 and later)
  37. * AES-NI support (Thanks: Sebastian Ramacher)
  38. * setup.py: Fix compilation on HP-UX 11.31. (Thanks: Adam Woodbeck)
  39. * ElGamal: Add blinding to ElGamal decryption. (Thanks: Legrandin)
  40. * Hash: Remove pure-Python wrappers (speeds up hash init 4x-7x)
  41. * Hash: Add generic Crypto.Hash.new(algo, [data]) function
  42. (like hashlib.new)
  43. * Hash: Remove 'oid' attributes; Add 'name' attributes for compatibility
  44. with hashlib.
  45. * Hash: Rename SHA -> SHA1 and RIPEMD -> RIPEMD160, since the original
  46. names are frequently used as the names of other algorithms.
  47. * setup.py: Use autoconf to generate compiler options;
  48. Fix OpenBSD build issues.
  49. * Fix RSA object serialization (i.e. pickle)
  50. * LP#1061217: random.shuffle takes O(n^2) time.
  51. (Thanks: Sujay Jayakar, Andrew Cooke)
  52. * _fastmath: Fix leaks when errors occur.
  53. (Thanks: Sebastian Ramacher, Andreas Stührk)
  54. * SHA256/224/384/512: Don't export symbol 'add_length'
  55. * setup.py: Use os.chmod instead of os.system("chmod ...").
  56. (Thanks: Sebastian Ramacher)
  57. * setup.py: The 'test' command now runs the 'build' command first.
  58. (Thanks: Sebastian Ramacher)
  59. * New tools/create-pythons.sh and tools/test-all.sh scripts for testing
  60. against multiple versions of Python.
  61. * getStrongProne: Fix error handling (Thanks: Sebastian Ramacher)
  62. * ARC4: Add ARC4-drop[n] cipher support. (Thanks: Legrandin)
  63. * RSA.importKey: Properly catch IndexError. (Thanks: Sebastian Ramacher)
  64. * RSA.exportKey: Raise ValueError as documented when key format is
  65. unknown. (Thanks: Sebastian Ramacher)
  66. * RSA.exportKey: Always return bytes (Thanks: Sebastian Ramacher)
  67. * Fix & re-enable some broken tests (Thanks: Sebastian Ramacher)
  68. * Improve Python 3 compatibility
  69. * Various documentation fixes and improvements
  70. (Thanks: Anton Rieder, Legrandin, Sebastian Ramacher, Stefano Rivera)
  71. * Various cleanups, especially for Python 3.
  72. 2.6.1
  73. =====
  74. * [CVE-2013-1445] Fix PRNG not correctly reseeded in some situations.
  75. In previous versions of PyCrypto, the Crypto.Random PRNG exhibits a
  76. race condition that may cause forked processes to generate identical
  77. sequences of 'random' numbers.
  78. This is a fairly obscure bug that will (hopefully) not affect many
  79. applications, but the failure scenario is pretty bad. Here is some
  80. sample code that illustrates the problem:
  81. from binascii import hexlify
  82. import multiprocessing, pprint, time
  83. import Crypto.Random
  84. def task_main(arg):
  85. a = Crypto.Random.get_random_bytes(8)
  86. time.sleep(0.1)
  87. b = Crypto.Random.get_random_bytes(8)
  88. rdy, ack = arg
  89. rdy.set()
  90. ack.wait()
  91. return "%s,%s" % (hexlify(a).decode(),
  92. hexlify(b).decode())
  93. n_procs = 4
  94. manager = multiprocessing.Manager()
  95. rdys = [manager.Event() for i in range(n_procs)]
  96. acks = [manager.Event() for i in range(n_procs)]
  97. Crypto.Random.get_random_bytes(1)
  98. pool = multiprocessing.Pool(processes=n_procs,
  99. initializer=Crypto.Random.atfork)
  100. res_async = pool.map_async(task_main, zip(rdys, acks))
  101. pool.close()
  102. [rdy.wait() for rdy in rdys]
  103. [ack.set() for ack in acks]
  104. res = res_async.get()
  105. pprint.pprint(sorted(res))
  106. pool.join()
  107. The output should be random, but it looked like this:
  108. ['c607803ae01aa8c0,2e4de6457a304b34',
  109. 'c607803ae01aa8c0,af80d08942b4c987',
  110. 'c607803ae01aa8c0,b0e4c0853de927c4',
  111. 'c607803ae01aa8c0,f0362585b3fceba4']
  112. This release fixes the problem by resetting the rate-limiter when
  113. Crypto.Random.atfork() is invoked. It also adds some tests and a
  114. few related comments.
  115. 2.6
  116. ===
  117. * [CVE-2012-2417] Fix LP#985164: insecure ElGamal key generation.
  118. (thanks: Legrandin)
  119. In the ElGamal schemes (for both encryption and signatures), g is
  120. supposed to be the generator of the entire Z^*_p group. However, in
  121. PyCrypto 2.5 and earlier, g is more simply the generator of a random
  122. sub-group of Z^*_p.
  123. The result is that the signature space (when the key is used for
  124. signing) or the public key space (when the key is used for encryption)
  125. may be greatly reduced from its expected size of log(p) bits, possibly
  126. down to 1 bit (the worst case if the order of g is 2).
  127. While it has not been confirmed, it has also been suggested that an
  128. attacker might be able to use this fact to determine the private key.
  129. Anyone using ElGamal keys should generate new keys as soon as practical.
  130. Any additional information about this bug will be tracked at
  131. https://bugs.launchpad.net/pycrypto/+bug/985164
  132. * Huge documentation cleanup (thanks: Legrandin).
  133. * Added more tests, including test vectors from NIST 800-38A
  134. (thanks: Legrandin)
  135. * Remove broken MODE_PGP, which never actually worked properly.
  136. A new mode, MODE_OPENPGP, has been added for people wishing to write
  137. OpenPGP implementations. Note that this does not implement the full
  138. OpenPGP specification, only the "OpenPGP CFB mode" part of that
  139. specification.
  140. https://bugs.launchpad.net/pycrypto/+bug/996814
  141. * Fix: getPrime with invalid input causes Python to abort with fatal error
  142. https://bugs.launchpad.net/pycrypto/+bug/988431
  143. * Fix: Segfaults within error-handling paths
  144. (thanks: Paul Howarth & Dave Malcolm)
  145. https://bugs.launchpad.net/pycrypto/+bug/934294
  146. * Fix: Block ciphers allow empty string as IV
  147. https://bugs.launchpad.net/pycrypto/+bug/997464
  148. * Fix DevURandomRNG to work with Python3's new I/O stack.
  149. (thanks: Sebastian Ramacher)
  150. * Remove automagic dependencies on libgmp and libmpir, let the caller
  151. disable them using args.
  152. * Many other minor bug fixes and improvements (mostly thanks to Legrandin)
  153. 2.5
  154. ===
  155. * Added PKCS#1 encryption schemes (v1.5 and OAEP). We now have
  156. a decent, easy-to-use non-textbook RSA implementation. Yay!
  157. * Added PKCS#1 signature schemes (v1.5 and PSS). v1.5 required some
  158. extensive changes to Hash modules to contain the algorithm specific
  159. ASN.1 OID. To that end, we now always have a (thin) Python module to
  160. hide the one in pure C.
  161. * Added 2 standard Key Derivation Functions (PBKDF1 and PBKDF2).
  162. * Added export/import of RSA keys in OpenSSH and PKCS#8 formats.
  163. * Added password-protected export/import of RSA keys (one old method
  164. for PKCS#8 PEM only).
  165. * Added ability to generate RSA key pairs with configurable public
  166. exponent e.
  167. * Added ability to construct an RSA key pair even if only the private
  168. exponent d is known, and not p and q.
  169. * Added SHA-2 C source code (fully from Lorenz Quack).
  170. * Unit tests for all the above.
  171. * Updates to documentation (both inline and in Doc/pycrypt.rst)
  172. * All of the above changes were put together by Legrandin (Thanks!)
  173. * Minor bug fixes (setup.py and tests).
  174. 2.4.1
  175. =====
  176. * Fix "error: Setup script exited with error: src/config.h: No such file or
  177. directory" when installing via easy_install. (Sebastian Ramacher)
  178. 2.4
  179. ===
  180. * Python 3 support! (Thorsten E. Behrens, Anders Sundman)
  181. PyCrypto now supports every version of Python from 2.1 through 3.2.
  182. * Timing-attack countermeasures in _fastmath: When built against
  183. libgmp version 5 or later, we use mpz_powm_sec instead of mpz_powm.
  184. This should prevent the timing attack described by Geremy Condra at
  185. PyCon 2011:
  186. http://blip.tv/pycon-us-videos-2009-2010-2011/pycon-2011-through-the-side-channel-timing-and-implementation-attacks-in-python-4897955
  187. * New hash modules (for Python >= 2.5 only): SHA224, SHA384, and
  188. SHA512 (Frédéric Bertolus)
  189. * Configuration using GNU autoconf. This should help fix a bunch of
  190. build issues.
  191. * Support using MPIR as an alternative to GMP.
  192. * Improve the test command in setup.py, by allowing tests to be
  193. performed on a single sub-package or module only. (Legrandin)
  194. You can now do something like this:
  195. python setup.py test -m Hash.SHA256 --skip-slow-tests
  196. * Fix double-decref of "counter" when Cipher object initialisation
  197. fails (Ryan Kelly)
  198. * Apply patches from Debian's python-crypto 2.3-3 package (Jan
  199. Dittberner, Sebastian Ramacher):
  200. - fix-RSA-generate-exception.patch
  201. - epydoc-exclude-introspect.patch
  202. - no-usr-local.patch
  203. * Fix launchpad bug #702835: "Import key code is not compatible with
  204. GMP library" (Legrandin)
  205. * More tests, better documentation, various bugfixes.
  206. 2.3
  207. ===
  208. * Fix NameError when attempting to use deprecated getRandomNumber()
  209. function.
  210. * _slowmath: Compute RSA u parameter when it's not given to
  211. RSA.construct. This makes _slowmath behave the same as _fastmath in
  212. this regard.
  213. * Make RSA.generate raise a more user-friendly exception message when
  214. the user tries to generate a bogus-length key.
  215. 2.2
  216. ===
  217. * Deprecated Crypto.Util.number.getRandomNumber(), which had confusing
  218. semantics. It's been replaced by getRandomNBitInteger and
  219. getRandomInteger. (Thanks: Lorenz Quack)
  220. * Better isPrime() and getPrime() implementations that do a real
  221. Rabin-Miller probabilistic primality test (not the phony test we did
  222. before with fixed bases). (Thanks: Lorenz Quack)
  223. * getStrongPrime() implementation for generating RSA primes.
  224. (Thanks: Lorenz Quack)
  225. * Support for importing and exporting RSA keys in DER and PEM format.
  226. (Thanks: Legrandin)
  227. * Fix PyCrypto when floor division (python -Qnew) is enabled.
  228. * When building using gcc, use -std=c99 for compilation. This should
  229. fix building on FreeBSD and NetBSD.
  230. 2.1.0
  231. =====
  232. * Fix building PyCrypto on Win64 using MS Visual Studio 9.
  233. (Thanks: Nevins Bartolomeo.)
  234. 2.1.0beta1
  235. ==========
  236. * Modified RSA.generate() to ensure that e is coprime to p-1 and q-1.
  237. Apparently, RSA.generate was capable of generating unusable keys.
  238. 2.1.0alpha2
  239. ===========
  240. * Modified isPrime() to release the global interpreter lock while
  241. performing computations. (patch from Lorenz Quack)
  242. * Release the GIL while encrypting, decrypting, and hashing (but not
  243. during initialization or finalization).
  244. * API changes:
  245. - Removed RandomPoolCompat and made Crypto.Util.randpool.RandomPool
  246. a wrapper around Crypto.Random that emits a DeprecationWarning.
  247. This is to discourage developers from attempting to provide
  248. backwards compatibility for systems where there are NO strong
  249. entropy sources available.
  250. - Added Crypto.Random.get_random_bytes(). This should allow people
  251. to use something like this if they want backwards-compatibility:
  252. try:
  253. from Crypto.Random import get_random_bytes
  254. except ImportError:
  255. try:
  256. from os import urandom as get_random_bytes
  257. except ImportError:
  258. get_random_bytes = open("/dev/urandom", "rb").read
  259. - Implemented __ne__() on pubkey, which fixes the following broken
  260. behaviour:
  261. >>> pk.publickey() == pk.publickey()
  262. True
  263. >>> pk.publickey() != pk.publickey()
  264. True
  265. (patch from Lorenz Quack)
  266. - Block ciphers created with MODE_CTR can now operate on strings of
  267. any size, rather than just multiples of the underlying cipher's
  268. block size.
  269. - Crypto.Util.Counter objects now raise OverflowError when they wrap
  270. around to zero. You can override this new behaviour by passing
  271. allow_wraparound=True to Counter.new()
  272. 2.1.0alpha1
  273. ===========
  274. * This version supports Python versions 2.1 through 2.6.
  275. * Clarified copyright status of much of the existing code by tracking
  276. down Andrew M. Kuchling, Barry A. Warsaw, Jeethu Rao, Joris Bontje,
  277. Mark Moraes, Paul Swartz, Robey Pointer, and Wim Lewis and getting
  278. their permission to clarify the license/public-domain status of their
  279. contributions. Many thanks to all involved!
  280. * Replaced the test suite with a new, comprehensive package
  281. (Crypto.SelfTest) that includes documentation about where its test
  282. vectors came from, or how they were derived.
  283. Use "python setup.py test" to run the tests after building.
  284. * API changes:
  285. - Added Crypto.version_info, which from now on will contain version
  286. information in a format similar to Python's sys.version_info.
  287. - Added a new random numbers API (Crypto.Random), and deprecated the
  288. old one (Crypto.Util.randpool.RandomPool), which was misused more
  289. often than not.
  290. The new API is used by invoking Crypto.Random.new() and then just
  291. reading from the file-like object that is returned.
  292. CAVEAT: To maintain the security of the PRNG, you must call
  293. Crypto.Random.atfork() in both the parent and the child processes
  294. whenever you use os.fork(). Otherwise, the parent and child will
  295. share copies of the same entropy pool, causing them to return the
  296. same results! This is a limitation of Python, which does not
  297. provide readily-accessible hooks to os.fork(). It's also a
  298. limitation caused by the failure of operating systems to provide
  299. sufficiently fast, trustworthy sources of cryptographically-strong
  300. random numbers.
  301. - Crypto.PublicKey now raises ValueError/TypeError/RuntimeError
  302. instead of the various custom "error" exceptions
  303. - Removed the IDEA and RC5 modules due to software patents. Debian
  304. has been doing this for a while
  305. - Added Crypto.Random.random, a strong version of the standard Python
  306. 'random' module.
  307. - Added Crypto.Util.Counter, providing fast counter implementations
  308. for use with CTR-mode ciphers.
  309. * Bug fixes:
  310. - Fixed padding bug in SHA256; this resulted in bad digests whenever
  311. (the number of bytes hashed) mod 64 == 55.
  312. - Fixed a 32-bit limitation on the length of messages the SHA256 module
  313. could hash.
  314. - AllOrNothing: Fixed padding bug in digest()
  315. - Fixed a bad behaviour of the XOR cipher module: It would silently
  316. truncate all keys to 32 bytes. Now it raises ValueError when the
  317. key is too long.
  318. - DSA: Added code to enforce FIPS 186-2 requirements on the size of
  319. the prime p
  320. - Fixed the winrandom module, which had been omitted from the build
  321. process, causing security problems for programs that misuse RandomPool.
  322. - Fixed infinite loop when attempting to generate RSA keys with an
  323. odd number of bits in the modulus. (Not that you should do that.)
  324. * Clarified the documentation for Crypto.Util.number.getRandomNumber.
  325. Confusingly, this function does NOT return N random bits; It returns
  326. a random N-bit number, i.e. a random number between 2**(N-1) and (2**N)-1.
  327. Note that getRandomNumber is for internal use only and may be
  328. renamed or removed in future releases.
  329. * Replaced RIPEMD.c with a new implementation (RIPEMD160.c) to
  330. alleviate copyright concerns.
  331. * Replaced the DES/DES3 modules with ones based on libtomcrypt-1.16 to
  332. alleviate copyright concerns.
  333. * Replaced Blowfish.c with a new implementation to alleviate copyright
  334. concerns.
  335. * Added a string-XOR implementation written in C (Crypto.Util.strxor)
  336. and used it to speed up Crypto.Hash.HMAC
  337. * Converted documentation to reStructured Text.
  338. * Added epydoc configuration Doc/epydoc-config
  339. * setup.py now emits a warning when building without GMP.
  340. * Added pct-speedtest.py to the source tree for doing performance
  341. testing on the new code.
  342. * Cleaned up the code in several places.
  343. 2.0.1
  344. =====
  345. * Fix SHA256 and RIPEMD on AMD64 platform.
  346. * Deleted Demo/ directory.
  347. * Add PublicKey to Crypto.__all__
  348. 2.0
  349. ===
  350. * Added SHA256 module contributed by Jeethu Rao, with test data
  351. from Taylor Boon.
  352. * Fixed AES.c compilation problems with Borland C.
  353. (Contributed by Jeethu Rao.)
  354. * Fix ZeroDivisionErrors on Windows, caused by the system clock
  355. not having enough resolution.
  356. * Fix 2.1/2.2-incompatible use of (key not in dict),
  357. pointed out by Ian Bicking.
  358. * Fix FutureWarning in Crypto.Util.randpool, noted by James P Rutledge.
  359. 1.9alpha6
  360. =========
  361. * Util.number.getPrime() would inadvertently round off the bit
  362. size; if you asked for a 129-bit prime or 135-bit prime, you
  363. got a 128-bit prime.
  364. * Added Util/test/prime_speed.py to measure the speed of prime
  365. generation, and PublicKey/test/rsa_speed.py to measure
  366. the speed of RSA operations.
  367. * Merged the _rsa.c and _dsa.c files into a single accelerator
  368. module, _fastmath.c.
  369. * Speed improvements: Added fast isPrime() function to _fastmath,
  370. cutting the time to generate a 1024-bit prime by a factor of 10.
  371. Optimized the C version of RSA decryption to use a longer series
  372. of operations that's roughly 3x faster than a single
  373. exponentiation. (Contributed by Joris Bontje.)
  374. * Added support to RSA key objects for blinding and unblinding
  375. data. (Contributed by Joris Bontje.)
  376. * Simplified RSA key generation: hard-wired the encryption
  377. exponent to 65537 instead of generating a random prime;
  378. generate prime factors in a loop until the product
  379. is large enough.
  380. * Renamed cansign(), canencrypt(), hasprivate(), to
  381. can_sign, can_encrypt, has_private. If people shriek about
  382. this change very loudly, I'll add aliases for the old method
  383. names that log a warning and call the new method.
  384. 1.9alpha5
  385. =========
  386. * Many randpool changes. RandomPool now has a
  387. randomize(N:int) method that can be called to get N
  388. bytes of entropy for the pool (N defaults to 0,
  389. which 'fills up' the pool's entropy) KeyboardRandom
  390. overloads this method.
  391. * Added src/winrand.c for Crypto.Util.winrandom and
  392. now use winrandom for _randomize if possible.
  393. (Calls Windows CryptoAPI CryptGenRandom)
  394. * Several additional places for stirring the pool,
  395. capturing inter-event entropy when reading/writing,
  396. stirring before and after saves.
  397. * RandomPool.add_event now returns the number of
  398. estimated bits of added entropy, rather than the
  399. pool entropy itself (since the pool entropy is
  400. capped at the number of bits in the pool)
  401. * Moved termios code from KeyboardRandomPool into a
  402. KeyboardEntry class, provided a version for Windows
  403. using msvcrt.
  404. * Fix randpool.py crash on machines with poor timer resolution.
  405. (Reported by Mark Moraes and others.)
  406. * If the GNU GMP library is available, two C extensions will be
  407. compiled to speed up RSA and DSA operations. (Contributed by
  408. Paul Swartz.)
  409. * DES3 with a 24-byte key was broken; now fixed.
  410. (Patch by Philippe Frycia.)
  411. 1.9alpha4
  412. =========
  413. * Fix compilation problem on Windows.
  414. * HMAC.py fixed to work with pre-2.2 Pythons
  415. * setup.py now dies if built with Python 1.x
  416. 1.9alpha3
  417. =========
  418. * Fix a ref-counting bug that caused core dumps.
  419. (Reported by Piers Lauder and an anonymous SF poster.)
  420. 1.9alpha2
  421. =========
  422. * (Backwards incompatible) The old Crypto.Hash.HMAC module is
  423. gone, replaced by a copy of hmac.py from Python 2.2's standard
  424. library. It will display a warning on interpreter versions
  425. older than 2.2.
  426. * (Backwards incompatible) Restored the Crypto.Protocol package,
  427. and modernized and tidied up the two modules in it,
  428. AllOrNothing.py and Chaffing.py, renaming various methods
  429. and changing the interface.
  430. * (Backwards incompatible) Changed the function names in
  431. Crypto.Util.RFC1751.
  432. * Restored the Crypto.PublicKey package at user request. I
  433. think I'll leave it in the package and warn about it in the
  434. documentation. I hope that eventually I can point to
  435. someone else's better public-key code, and at that point I
  436. may insert warnings and begin the process of deprecating
  437. this code.
  438. * Fix use of a Python 2.2 C function, replacing it with a
  439. 2.1-compatible equivalent. (Bug report and patch by Andrew
  440. Eland.)
  441. * Fix endianness bugs that caused test case failures on Sparc,
  442. PPC, and doubtless other platforms.
  443. * Fixed compilation problem on FreeBSD and MacOS X.
  444. * Expanded the test suite (requires Sancho, from
  445. http://www.mems-exchange.org/software/sancho/)
  446. * Added lots of docstrings, so 'pydoc Crypto' now produces
  447. helpful output. (Open question: maybe *all* of the documentation
  448. should be moved into docstrings?)
  449. * Make test.py automatically add the build/* directory to sys.path.
  450. * Removed 'inline' declaration from C functions. Some compilers
  451. don't support it, and Python's pyconfig.h no longer tells you whether
  452. it's supported or not. After this change, some ciphers got slower,
  453. but others got faster.
  454. * The C-level API has been changed to reduce the amount of
  455. memory-to-memory copying. This makes the code neater, but
  456. had ambiguous performance effects; again, some ciphers got slower
  457. and others became faster. Probably this is due to my compiler
  458. optimizing slightly worse or better as a result.
  459. * Moved C source implementations into src/ from block/, hash/,
  460. and stream/. Having Hash/ and hash/ directories causes problems
  461. on case-insensitive filesystems such as Mac OS.
  462. * Cleaned up the C code for the extensions.
  463. 1.9alpha1
  464. =========
  465. * Added Crypto.Cipher.AES.
  466. * Added the CTR mode and the variable-sized CFB mode from the
  467. NIST standard on feedback modes.
  468. * Removed Diamond, HAVAL, MD5, Sapphire, SHA, and Skipjack. MD5
  469. and SHA are included with Python; the others are all of marginal
  470. usefulness in the real world.
  471. * Renamed the module-level constants ECB, CFB, &c., to MODE_ECB,
  472. MODE_CFB, as part of making the block encryption modules
  473. compliant with PEP 272. (I'm not sure about this change;
  474. if enough users complain about it, I might back it out.)
  475. * Made the hashing modules compliant with PEP 247 (not backward
  476. compatible -- the major changes are that the constructor is now
  477. MD2.new and not MD2.MD2, and the size of the digest is now
  478. given as 'digest_size', not 'digestsize'.
  479. * The Crypto.PublicKey package is no longer installed; the
  480. interfaces are all wrong, and I have no idea what the right
  481. interfaces should be.
  482. 1.1alpha2
  483. =========
  484. * Most importantly, the distribution has been broken into two
  485. parts: exportable, and export-controlled. The exportable part
  486. contains all the hashing algorithms, signature-only public key
  487. algorithms, chaffing & winnowing, random number generation, various
  488. utility modules, and the documentation.
  489. The export-controlled part contains public-key encryption
  490. algorithms such as RSA and ElGamal, and bulk encryption algorithms
  491. like DES, IDEA, or Skipjack. Getting this code still requires that
  492. you go through an access control CGI script, and denies you access if
  493. you're outside the US or Canada.
  494. * Added the RIPEMD hashing algorithm. (Contributed by
  495. Hirendra Hindocha.)
  496. * Implemented the recently declassified Skipjack block
  497. encryption algorithm. My implementation runs at 864 K/sec on a
  498. PII/266, which isn't particularly fast, but you're probably better off
  499. using another algorithm anyway. :)
  500. * A simple XOR cipher has been added, mostly for use by the
  501. chaffing/winnowing code. (Contributed by Barry Warsaw.)
  502. * Added Protocol.Chaffing and Hash.HMAC.py. (Contributed by
  503. Barry Warsaw.)
  504. Protocol.Chaffing implements chaffing and winnowing, recently
  505. proposed by R. Rivest, which hides a message (the wheat) by adding
  506. many noise messages to it (the chaff). The chaff can be discarded by
  507. the receiver through a message authentication code. The neat thing
  508. about this is that it allows secret communication without actually
  509. having an encryption algorithm, and therefore this falls within the
  510. exportable subset.
  511. * Tidied up randpool.py, and removed its use of a block
  512. cipher; this makes it work with only the export-controlled subset
  513. available.
  514. * Various renamings and reorganizations, mostly internal.
  515. 1.0.2
  516. =====
  517. * Changed files to work with Python 1.5; everything has been
  518. re-arranged into a hierarchical package. (Not backward compatible.)
  519. The package organization is:
  520. Crypto.
  521. Hash.
  522. MD2, MD4, MD5, SHA, HAVAL
  523. Cipher.
  524. ARC2, ARC4, Blowfish, CAST, DES, DES3, Diamond,
  525. IDEA, RC5, Sapphire
  526. PublicKey.
  527. DSA, ElGamal, qNEW, RSA
  528. Util.
  529. number, randpool, RFC1751
  530. Since this is backward-incompatible anyway, I also changed
  531. module names from all lower-case to mixed-case: diamond -> Diamond,
  532. rc5 -> RC5, etc. That had been an annoying inconsistency for a while.
  533. * Added CAST5 module contributed by <wiml@hhhh.org>.
  534. * Added qNEW digital signature algorithm (from the digisign.py
  535. I advertised a while back). (If anyone would like to suggest new
  536. algorithms that should be implemented, please do; I think I've got
  537. everything that's really useful at the moment, but...)
  538. * Support for keyword arguments has been added. This allowed
  539. removing the obnoxious key handling for Diamond and RC5, where the
  540. first few bytes of the key indicated the number of rounds to use, and
  541. various other parameters. Now you need only do something like:
  542. from Crypto.Cipher import RC5
  543. obj = RC5.new(key, RC5.ECB, rounds=8)
  544. (Not backward compatible.)
  545. * Various function names have been changed, and parameter
  546. names altered. None of these were part of the public interface, so it
  547. shouldn't really matter much.
  548. * Various bugs fixed, the test suite has been expanded, and
  549. the build process simplified.
  550. * Updated the documentation accordingly.
  551. 1.0.1
  552. =====
  553. * Changed files to work with Python 1.4 .
  554. * The DES and DES3 modules now automatically correct the
  555. parity of their keys.
  556. * Added R. Rivest's DES test (see http://theory.lcs.mit.edu/~rivest/destest.txt)
  557. 1.0.0
  558. =====
  559. * REDOC III succumbed to differential cryptanalysis, and has
  560. been removed.
  561. * The crypt and rotor modules have been dropped; they're still
  562. available in the standard Python distribution.
  563. * The Ultra-Fast crypt() module has been placed in a separate
  564. distribution.
  565. * Various bugs fixed.