changes 76 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168
  1. December 31st, 2004
  2. v1.00
  3. -- Added "r,s == 0" check to dsa_verify_hash()
  4. -- Added "multi block" helpers for hash, hmac, pmac and omac routines so you can process multiple non-adjacent
  5. blocks of data with one call (added demos/multi.c to make sure they work)
  6. -- Note these are not documented but they do have doxygen comments inside them
  7. -- Also I don't use them in other functions (like pkcs_5_2()) because I didn't have the time. Job for the new LTC maintainer ;-)
  8. -- Added tweaked Anubis test vectors and made it default (undefined ANUBIS_TWEAK to get original Anubis)
  9. -- Merged in fix for mp_prime_random_ex() to deal with MSB and LSB "bugs"
  10. -- Removed tim_exptmod() completely, updated several RSA functions (notably v15 and the decrypt/verify) so they
  11. don't require a prng now
  12. -- This release brought to you by the fine tunes of Macy Gray. We miss you.
  13. December 23rd, 2004
  14. v1.00rc1
  15. -- Renamed "mycrypt_*" to "tomcrypt_*" to be more specific and professional
  16. Now just include "tomcrypt.h" instead of "mycrypt.h" to get LTC ;-)
  17. -- Cleaned up makefiles to ensure all headers are correctly installed
  18. -- Added "rotate by constant" macros for portable, x86-32 and x86-64
  19. You can disable this new code with LTC_NO_ROLC which is useful for older GCCs
  20. -- Cleaned up detection of x86-64 so it works for ROL/ROR macros
  21. -- Fixed rsa_import() so that it would detect multi-prime RSA keys and error appropriately
  22. -- Sorted the source files by category and updated the makefiles appropriately
  23. -- Added LTC_DER define so you can trim out DER code if not required
  24. -- Fixed up RSA's decrypt functions changing "res" to "stat" to be more in sync
  25. with the signature variables nomenclature. (no code change just renamed the arguments)
  26. -- Removed all labels starting with __ and replaced with LBL_ to avoid namespace conflicts (Randy Howard)
  27. -- Merged in LTM fix to mp_prime_random_ex() which zap'ed the most significant byte if the bit size
  28. requested was a multiple of eight.
  29. -- Made RSA_TIMING off by default as it's not terribly useful [and likely to be deprecated]
  30. -- Renamed SMALL_CODE, CLEAN_STACK and NO_FILE to have a LTC_ prefix to avoid namespace collisions
  31. with other programs. e.g. SMALL_CODE => LTC_SMALL_CODE
  32. -- Zed Shaw pointed out that on certain systems installing libs as "root" isn't possible as the super-user
  33. is not root. Now the makefiles allow this to be changed easily.
  34. -- Renamed "struct _*_descriptor" to "struct ltc_*_descriptor" to avoid using a leading _
  35. Also renamed _ARGCHK to LTC_ARGCHK
  36. -- Zed Shaw pointed out that I still defined the prng structs in tomcrypt_prng.h even if they
  37. weren't defined. This made undef'ing FORTUNA break the build.
  38. -- Added LTC_NO_ASM to disable inline asm macros [ROL/ROR/etc]
  39. -- Changed RSA decrypt functions to change the output length variable name from "keylen" to "outlen" to make
  40. it more consistent.
  41. -- Added the 64-bit Khazad block cipher [NESSIE]
  42. -- Added the 128-bit Anubis block cipher [with key support for 128...320 bit keys] [NESSIE]
  43. -- Changes to several MAC functions to rename input arguments to more sensible names
  44. -- Removed FAST_PK support from dh_sys.c
  45. -- Declared deskey() from des.c as static instead of a global
  46. -- Added pretty much all practical GCC warning tests to the GCC [related] makefiles. These additional
  47. warnings can easily be disabled for those with older copies of GCC [or even non GNU cc's]
  48. -- Added doxygen @ tags to the code... phew that was a hell of a lot of [repetitive] work
  49. -- Also added pre-configured Doxygen script.
  50. -- Cleaned up quite a few functions [ciphers, pk, etc] to make the parameters naming style consistent
  51. E.g. ciphers keys are called "skey" consistently now. The input to PK encryption is called "in", etc.
  52. These changes require no code changes on the behalf of developers fortunately
  53. -- Started a SAFER+ optimizer [does encrypt only] which shaves a good 30 or so cycles/byte on my AMD64
  54. at an expense of huge code. It's in notes/etc/saferp_optimizer.c
  55. -- DSA sign/verify now uses DER encoded output/inputs and no LTC style headers.
  56. -- Matt Johnston found a missing semi-colon in mp_exptmod(). Fix has been merged in.
  57. October 29th, 2004
  58. v0.99 -- Merged in the latest version of LTM which includes all of the recent bug fixes
  59. -- Deprecated LTMSSE and removed it (to be replaced with TFM later on)
  60. -- Stefan Arentz pointed out that mp_s_rmap should be extern
  61. -- Kristian Gjøsteen pointed out that there are typos in the
  62. "test" makefile and minor issues in Yarrow and Sober [just cosmetics really]
  63. -- Matthew P. Cashdollar pointed out that "export" is a C++ keyword
  64. so changed the PRNG api to use "pexport" and "pimport"
  65. -- Updated "hashsum" demo so it builds ;-)
  66. -- Added automatic support for x86-64 (will configure for 64-bit little endian automagically)
  67. -- Zhi Chen pointed out a bug in rsa_exptmod which would leak memory on error.
  68. -- Made hash functions "init" return an int. slight change to API ;-(
  69. -- Added "CHC" mode which turns any cipher into a hash the other LTC functions can use
  70. -- Added CHC mode stuff to demos such as tv_gen and hashsum
  71. -- Added "makefile.shared" which builds and installs shared/static object copies
  72. of the library.
  73. -- Added DER for bignum support
  74. -- RSA is now fully joy. rsa_export/rsa_import use PKCS #1 encodings and should be
  75. compatible with other crypto libs that use the format.
  76. -- Added support for x86-64 for the ROL/ROR macros
  77. -- Changed the DLL and SO makefiles to optimize for speed, commented SMALL_CODE in
  78. mycrypt_custom.h and added -DSMALL_CODE to the default makefile
  79. -- Updated primality testing code so it does a minimum of 5 tests [of Miller-Rabin]
  80. (AFAIK not a security fix, just warm fuzzies)
  81. -- Minor updates to the OMAC code (additional __ARGCHK and removed printf from omac_test... oops!)
  82. -- Update build and configuration info which was really really really out of date. (Chapter 14)
  83. ++ Minor update, switch RSA to use the PKCS style CRT
  84. August 6th, 2004
  85. v0.98 -- Update to hmac_init to free all allocated memory on error
  86. -- Update to PRNG API to fix import/export functions of Fortuna and Yarrow
  87. -- Added test functions to PRNG api, RC4 now conforms ;-) [was a minor issue]
  88. -- Added the SOBER-128 PRNG based off of code donated by Greg Rose.
  89. -- Added Tech Note #4 [notes/tech0004.txt]
  90. -- Changed RC4 back [due to request]. It will now XOR the output so you can use it like
  91. a stream cipher easily.
  92. -- Update Fortuna's export() to emit a hash of each pool. This means that the accumulated
  93. entropy that was spread over all the pools isn't entirely lost when you export/import.
  94. -- Zhi Chen suggested a comment for rsa_encrypt_key() to let users know [easily] that it was
  95. PKCS #1 v2.0 padding. (updated other rsa_* functions)
  96. -- Cleaned up Noekeon to remove unrolling [wasn't required, was messy and actually slower with GCC/ICC]
  97. -- Updated RC4 so that when you feed it >256 bytes of entropy it quietly ignores additional
  98. bytes. Also removed the % from the key setup to speed it up a bit.
  99. -- Added cipher/hash/prng tests to x86_prof to help catch bugs while testing
  100. -- Made the PRNG "done" return int, fixed sprng_done to not require prng* to be non-null
  101. -- Spruced up mycrypt_custom.h to trap more errors and also help prevent LTMSSE from being defined
  102. on non-i386 platforms by accident.
  103. -- Added RSA/ECC/DH speed tests to x86_prof and cleaned it up to build with zero warnings
  104. -- Changed Fortuna to count only entropy [not the 2 byte header] added to pool[0] into the
  105. reseed mechanism.
  106. -- Added "export_size" member to prng_descriptor tables so you can know in advance the size of
  107. the exported state for any given PRNG.
  108. -- Ported over patch on LTM 0.30 [not ready to release LTM 0.31] that fixes bug in mp_mul()/mp_div()
  109. that used to result in negative zeroes when you multiplied zero by a negative integer.
  110. (patch due to "Wolfgang Ehrhardt" <[email protected]>)
  111. -- Fixed rsa_*decrypt_key() and rsa_*verify_hash() to default to invalid "stat" or "res". This way
  112. if any of the higher level functions fail [before you get to the padding] the result will be in
  113. a known state]. Applied to both v2 and v1.5 padding helpers.
  114. -- Added MACs to x86_prof
  115. -- Fixed up "warnings" in x86_prof and tv_gen
  116. -- Added a "profiled" target back [for GCC 3.4 and ICC v8]. Doesn't seem to help but might be worth
  117. tinkering with.
  118. -- Beefed up load/store test in demos/test
  119. ++ New note, in order to use the optimized LOAD/STORE macros your platform
  120. must support unaligned 32/64 bit load/stores. The x86s support this
  121. but some [ARM for instance] do not. If your platform cannot perform
  122. unaligned operations you must use the endian neutral code which is safe for
  123. any sort of platform.
  124. July 23rd, 2004
  125. v0.97b -- Added PKCS #1 v1.5 RSA encrypt/sign helpers (like rsa_sign_hash, etc...)
  126. -- Added missing prng check to rsa_decrypt_key() [not critical as I don't use
  127. descriptors directly in that function]
  128. -- Merged in LTM-SSE, define LTMSSE before you build and you will get SSE2 optimized math ;-)
  129. (roughly 3x faster on a P4 Northwood). By default it will compile as ISO C portable
  130. code (when LTMSSE is undefined).
  131. -- Fixed bug in ltc_tommath.h where I had the kara/toom cutoffs not marked as ``extern''
  132. Thanks to "Stefan Arentz" <stefan at organicnetwork.net>
  133. -- Steven Dake <[email protected]> and Richard Amacker <[email protected]> submitted patches to
  134. fix pkcs_5_2(). It now matches the output of another crypto library. Whoops... hehehe
  135. -- Updated PRNG api. Added Fortuna PRNG to the list of supported PRNGs
  136. -- Fixed up the descriptor tables since globals are automatically zero'ed on startup.
  137. -- Changed RC4 to store it's output. If you want to encrypt with RC4
  138. you'll have to do the XOR yourself.
  139. -- Fixed buffer overflows/overruns in the HMAC code.
  140. ++ API change for the PRNGs there now is a done() function per PRNG. You
  141. should call it when you are done with a prng state. So far it's
  142. not absolutely required (won't cause problems) but is a good idea to
  143. start.
  144. June 23rd, 2004
  145. v0.97a ++ Fixed several potentially crippling bugs... [read on]
  146. -- Fixed bug in OAEP decoder that would incorrectly report
  147. buffer overflows. [Zhi Chen]
  148. -- Fixed headers which had various C++ missing [extern "C"]'s
  149. -- Added "extern" to sha384_desc descriptor which I removed by mistake
  150. -- Fixed bugs in ENDIAN_BIG macros using the wrong byte order [Matt Johnston]
  151. -- Updated tiger.c and des.c to not shadow "round" which is intrinsic on
  152. some C compilers.
  153. -- Updated demos/test/rsa_test.c to test the RSA functionality better
  154. ++ This update has been tested with GCC [v3.3.3], ICC [v8] and MSVC [v6+SP6]
  155. all on a x86 P4 [GCC/ICC tested in Gentoo Linux, MSVC in WinXP]
  156. ++ Outcome: The bug Zhi Chen pointed out has been fixed. So have the bugs
  157. that Matt Johnston found.
  158. June 19th, 2004
  159. v0.97 -- Removed spurious unused files [arrg!]
  160. -- Patched buffer overflow in tim_exptmod()
  161. -- Fixed buffer overrun bug in pkcs_1_v15_es_decode()
  162. -- Reduced stack usage in PKCS #1 v2.0 padding functions (by several KBs)
  163. -- Removed useless extern's that were an artifact from the project start... ;-)
  164. -- Replaced memcpy/memset with XMEMCPY and XMEMSET for greater flexibility
  165. -- fixed bugs in hmac_done()/hmac_init()/[various others()] where I didn't trap errors
  166. -- Reduced stack usage in OMAC/PMAC/HMAC/EAX/OCB/PKCS#5 by mallocing any significant sized
  167. arrays (e.g. > 100 bytes or so). Only in non-critical functions (e.g. eax_init())
  168. -- "Zhi Chen" <[email protected]> pointed out that rsa_decrypt_key() requires
  169. an incorrect output size (too large). Fixed.
  170. -- Added a "pretty" target to the GCC makefile. Requires PERL. It is NEAT!
  171. -- Minor updates to ch1 of the manual.
  172. -- Cleaned up the indentation and added comments to rsa_make_key(), rsa_exptmod() and
  173. rsa_verify_hash()
  174. -- Updated makefile.icc so the "install" target would work ;-)
  175. -- Removed demos/test.c [deprecated from demos/test/test.c]
  176. -- Changed MAXBLOCKSIZE from 128 to 64 to reflect the true size...
  177. May 30th, 2004
  178. v0.96 -- Removed GF and Keyring code
  179. -- Extended OAEP decoder to distinguish better [and use a more uniform API]
  180. -- Changed PSS/OAEP API slightly to be more consistent with other PK functions (order of arguments)
  181. -- rsa_exptmod() now pads with leading zeroes as per I2OSP.
  182. -- added error checking to yarrow code
  183. -- pointed out that tommath.h from this distro will overwrite tommath.h
  184. from libtommath. I changed this to ltc_tommath.h to avoid any such problems.
  185. -- Fixed bug in PSS encoder/decoder that didn't handle the MSB properly
  186. -- refactored AES, now sports an "encrypt only" descriptor which uses half as much code space.
  187. -- modded Yarrow to try and use refactored AES code and added WHIRLPOOL support (d'oh) ;-)
  188. -- updated ECB, OCB and CBC decrypt functions to detect when "encrypt only" descriptor is used.
  189. -- replaced old RSA code with new code that uses PKCS #1 v2.0 padding
  190. -- replaced old test harness with new over-engineer'ed one in /demos/test/
  191. -- updated cbc/cfb/ofb/ctr code with setiv/getiv functions to change/read the IV without re-keying.
  192. -- Added PKCS #1 v1.5 RSA encryption and signature padding routines
  193. -- Added DER OID's to most hash descriptors (as many as I could find)
  194. -- modded rsa_exptmod() to use timing-resilient tim_exptmod() when doing private key operations
  195. added #define RSA_TIMING which can turn on/off this feature.
  196. -- No more config.pl so please just read mycrypt_custom.h for build-time tweaks
  197. -- Small update to rand_prime()
  198. -- Updated sha1, md5 and sha256 so they are smaller when SMALL_CODE is defined. If you want speed though,
  199. you're going to have to undefine SMALL_CODE ;-)
  200. -- Worked over AES so that it's even smaller now [in both modes].
  201. May 12th, 2004
  202. v0.95 -- Optimized AES and WHIRLPOOL for SMALL_CODE by taking advantage of the fact
  203. the transforms are circulant. AES dropped 5KB and WHIRLPOOL dropped 13KB
  204. using the default build options on the x86.
  205. -- Updated eax so the eax_done() would clear the state [like hmac,pmac,ocb] when
  206. CLEAN_STACK has been defined.
  207. -- added LTC_TEST support to rmd160
  208. -- updates to mycrypt_pk.h
  209. -- updated rand_prime() to faciliate making RSA composites
  210. -- DSA/RSA now makes composites of the exact size desired.
  211. -- Refactored quite a bit of the code, fewer functions per C file
  212. -- cleaned up the makefiles to organize the objects logically
  213. -- added ICC makefile along with "profiled" targets for both GNU and ICC compilers
  214. -- Marked functions for removal before v1.00 see PLAN for more information
  215. -- GCC 3.4.0 tested and seems to work
  216. -- Added PKCS #5 support
  217. -- Fixed typo in comment header of .C files ;-)
  218. -- Added PKCS #1 OAEP and PSS support.
  219. Feb 20th, 2004
  220. v0.94 -- removed unused variables from ocb.c and fixed it to match known test vectors.
  221. -- Added PMAC support, minor changes to OMAC/EAX code [I think....]
  222. -- Teamed up with Brian Gladman. His code verifies against my vectors and my code
  223. verifies against his test vectors. Hazaa for co-operation!
  224. -- Various small changes (added missing ARGCHKs and cleaned up indentation)
  225. -- Optimization to base64, removed unused variable "c"
  226. -- Added base64 gen to demos/tv_gen.c
  227. -- Fix to demos/x86_prof.c to correctly identify the i386 architecture... weird...
  228. -- Fixed up all of the PK code by adding missing error checking, removed "res" variables,
  229. shrunk some stack variables, removed non-required stack variables and added proper
  230. error conversion from MPI to LTC codes. I also spotted a few "off by one" error
  231. checking which could have been used to force the code to read past the end of
  232. the buffer (in theory, haven't checked if it would work) by a few bytes.
  233. -- Added checks to OUTPUT_BIGNUM so the *_export() functions cannot overflow the output and I
  234. also modded it so it stores in the output provided to the function (that is not on
  235. the local stack) which saves memory and time.
  236. -- Made SAFER default to disabled for now (plans are to cleanhouse write an implementation later)
  237. -- Added the 512-bit one-way hash WHIRLPOOL which clocks in at 138 cycles per byte on my
  238. Athlon XP [for comparison, SHA-512 clocks in at 77 cycles per byte]. This code uses the
  239. teams new sbox design (not the original NESSIE one).
  240. Jan 25th, 2004
  241. v0.93 -- [note: deleted v0.93 changes by accident... recreating from memory...]
  242. -- Fix to RC2 to not deference pointer before ARGCHK
  243. -- Fix to NOEKEON to match published test vectors as well as cleaned up the code a bit
  244. -- Optimized Twofish [down to 28 cycles/byte on my box] and Blowfish
  245. -- Fix to OMAC to test cipher block size first [prevents wasting any time]
  246. -- Added more OMAC test vectors
  247. -- Added EAX Encrypt+Authenticate support
  248. -- Fix to DSA to check return of a few LTM functions I forgot [mp_to_unsigned_bin]
  249. -- Added common headers to all C files
  250. -- CTR mode supports big and little [default] endian counters now.
  251. -- fix to find_cipher_any() so that it can handle a fragmented cipher_descriptor table.
  252. -- added find_hash_any() akin to find_cipher_any().
  253. -- Added EAX code to demos/tv_gen.c Hazaa!
  254. -- Removed SONY defines and files from codebase.
  255. -- Added OCB support [patents be damned] and to demos/tv_gen.c
  256. -- Merge all of the INPUT/OUTPUT BIGNUM macros (less toc) into mycrypt_pk.h
  257. -- Made appropriate changes to the debug string in crypt.c
  258. Dec 24th, 2003
  259. v0.92 -- Updated the config.pl script so the options have more details.
  260. -- Updated demos/tv_gen to include RIPEMD hashes
  261. -- Updated Twofish so when TWOFISH_ALL_TABLES is defined a pre-computed RS table
  262. is included [speedup: slight, about 4k cycles on my Athlon].
  263. -- Re-wrote the twofish large key generation [the four 8x32 key dependent tables]. Now about twice as fast.
  264. With both optimizations [e.g. TWOFISH_ALL_TABLES defined] a 128-bit Twofish key can now be scheduled
  265. in 26,000 cycles on my Athlon XP [as opposed to 49,000 before] when optimized for size.
  266. -- config.pl has been updated so rmd128.o and rmd160.o are objects included in the build [oops]
  267. -- Andrew Mann found a bug in rsa_exptmod() which wouldn't indicate if the wrong type of key was specified
  268. (e.g. not PK_PRIVATE or PK_PUBLIC)
  269. -- Fixed up demos/x86_prof so it sorts the output now :-)
  270. -- The project is now powered by radioactive rubber pants.
  271. -- Fixed dh_encrypt_key() so if you pass it a hash with a smaller output than the input key it
  272. will return CRYPT_INVALID_HASH [to match what ecc_encrypt_key() will do]
  273. -- Merge the store/encrypt key part of ecc_encrypt_key() as per dh_encrypt_key() [can you guess what I'm upto?]
  274. -- Massive updates to the prime generation code. I use the LTM random prime functions [and provide a nice
  275. interface between the LTC PRNG's and the LTM generic prng prototype]. I also use a variable number of tests
  276. depending on the input size. This nicely speeds up most prime generation/testing within the library.
  277. -- Added SHA-224 to the list of hashes.
  278. -- Made HMAC test vectors constant and static [takes ROM space instead of RAM]
  279. -- This release was brought to you by the letter P which stands for Patent Infringement.
  280. -- Added generic HASH_PROCESS macro to mycrypt_hash.h which simplifies the hash "process" functions
  281. I also optimized the compression functions of all but MD2 to not perform input copies when avoidable.
  282. -- Removed the division from the Blowfish setup function [dropped 3k cycles on my Athlon]
  283. -- Added stack cleaning to rijndael, cast5 so now all ciphers have CLEAN_STACK code.
  284. -- Added Skipjack to the list of ciphers [made appropriate changes to demos/test.c, demos/tv_gen.c and
  285. demos/x86_prof.c]
  286. -- Added mechanical testing to cipher test vector routines. Now it encrypts 1000 times, then decrypts and
  287. compares. Any fault (e.g. bug in code, compiler) in the routines is likely to show through. Doesn't
  288. stress test the key gen though...
  289. -- Matt Johnson found a bug in the blowfish.c apparently I was out of my mind and put twofish defines in there
  290. The code now builds with any config. Thanks.
  291. -- Added OMAC1 Message Authentication Code support to the library.
  292. -- Re-prototyped the hash "process" and "done" to prevent buffer overflows [which don't seem easy to exploit].
  293. Updated HMAC code to use them too. Hazaa!
  294. -- Fixed bug in ECC code which wouldn't do an _ARGCHK on stat in ecc_verify_hash().
  295. -- Fixed [temp fix] bug in all PK where the OUTPUT_BIGNUM macros would not trap errors on the to_unsigned_bin
  296. conversion [now returns CRYPT_MEM, will fix it up better later]
  297. -- Added DSA to the list of supported PK algorithms.
  298. -- Fixed up various ciphers to &255 the input key bytes where required [e.g. where used to index a table] to prevent
  299. problems on platforms where CHAR_BIT != 8
  300. -- Merged in LibTomMath v0.28
  301. -- Updated demos/x86_prof.c to use Yarrow during the key sched testing [was horribly slow on platforms with blockable
  302. /dev/random].
  303. -- Added OMAC/HMAC tests to demos/tv_gen and I now store the output of this in notes/
  304. -- Fixed a bug in config.pl that wouldn't have TWOFISH_TABLES defined by default (too many commas on the line)
  305. -- Fixed bug in hmac_done(). Apparently FIPS-198 [HMAC] specifies that the output can be truncated. My code
  306. would not support that (does now just like the new OMAC code).
  307. -- Removed "hashsize" from hmac_state as it wasn't being used.
  308. -- Made demos/test.c stop if OMAC or HMAC tests fail (instead of just printing a failed message and keep going).
  309. -- Updated notes/tech0003.txt to take into account the existence of Skipjack [also I fixed a few typos].
  310. -- Slight changes to Noekeon, with SMALL_CODE undefined it uses a fully unrolled version. Dropped +10 cycles/byte
  311. on my Athlon (35 cycles per byte or 410.4Mbit/sec at 1795Mhz)
  312. -- Added _ARGCHK() calls to is_prime() for the two input pointers.
  313. Sept 25th, 2003
  314. v0.91 -- HMAC fix of 0.90 was incorrect for keys larger than the block size of the hash.
  315. -- Added error CRYPT_FILE_NOTFOUND for the file [hmac/hash] routines.
  316. -- Added RIPEMD hashes to the hashsum demo.
  317. -- Added hashsum demo to MSVC makefile.
  318. -- Added RMD160 to the x86_prof demo [oops]
  319. -- Merged in LibTomMath-0.27 with a patch to mp_shrink() that will be in LibTomMath-0.28
  320. Fixes another potential memory leak.
  321. Sept 7th, 2003
  322. v0.90 -- new ROL/ROR for x86 GCC
  323. -- Jochen Katz submitted a patch to the makefile to prevent "make" from making the .a library
  324. when not required.
  325. == By default the KR code is not enabled [it's only a demo anyways!]
  326. -- changed the "buf" in ecc_make_key from 4KB to 128 bytes [since the largest key is 65 bytes]
  327. -- hmac_done() now requires you pass it the size of the destination buffer to prevent
  328. buffer overflows. (API CHANGE)
  329. -- hmac/hash filebased routines now return CRYPT_NOP if NO_FILE is defined.
  330. -- I've removed the primes from dh.c and replaced them with DR safe primes suitable for the default
  331. configuration of LibTomMath. Check out these comparisons on a 1.3Ghz Athlon XP, optimized for size,
  332. 768-bit, 4 vs. 10
  333. 1024-bit, 8 vs. 18
  334. 1280-bit, 12 vs. 34
  335. 1536-bit, 20 vs. 56
  336. 1792-bit 28 vs. 88
  337. 2048-bit, 40 vs. 124
  338. 2560-bit, 71 vs. 234
  339. 3072-bit, 113 vs. 386
  340. 4096-bit, 283 vs. 916
  341. Times are all in milliseconds for key generation. New primes times on the left. This makes the code binary
  342. incompatible with previous releases. However, this addition is long overdue as LibTomMath has supported DR
  343. reductions for quite some time.
  344. -- Added RIPE-MD 128 and 160 to the list of supported hashes [10 in total].
  345. -- The project has been released as public domain. TDCAL no longer applies.
  346. July 15th, 2003
  347. v0.89 -- Fix a bug in bits.c which would prevent it from building with msvc
  348. -- Merged in LibTomMath v0.24 [and I used the alloc/free macros this time!]
  349. -- Removed the LTC version of next_prime() and replaced it with a call to the
  350. mp_prime_next_prime() from LibTomMath
  351. -- reverted bits.c to the 0.86 copy since the new one doesn't build in MSVC
  352. or cygwin.
  353. Jul 10th, 2003
  354. v0.88 -- Sped up CAST5 key schedule for MSVC
  355. -- added "ulong32" which allows people on 64-bit platforms to force the 32-bit tables in
  356. ciphers like blowfish and AES to be 32-bits. E.g. when unsigned long is 64-bits.
  357. -- Optimized the SAFER-SK64, SAFER-SK128, SAFER+, RC5 and RC6 key schedule [big time!]
  358. -- Optimized SHA-1 and SHA-256 quite a bit too.
  359. -- Fixed up the makefile to use -fomit-frame-pointer more liberally
  360. -- Added tv_gen program which makes test vectors for ciphers/hashes
  361. -- Merged in LibTomMath v0.22
  362. Jun 19th, 2003
  363. v0.87 -- Many MSVC optimizations to the code base
  364. -- Improved the AES and Twofish key schedule [faster, more constant time]
  365. -- Tons of optimizations here and there.
  366. Jun 15th, 2003
  367. v0.86 -- Fixed up AES to workaround MSVC optimizer bug
  368. -- Merged in fresh LTM base [based on v0.20] so there are no warnings with MSVC
  369. -- Wrote x86_prof which will time the hashes and ciphers downto cycles per byte.
  370. -- Fixed up demos/encrypt to remove serpent_desc from the list
  371. -- Re-enabled MSVC optimizations w00t w00t
  372. -- Replaced "errno" with "err" in all functions that had it so it wouldn't clash
  373. with the global "errno"
  374. -- Removed a set of unused variables from certain functions
  375. -- Removed {#line 0 "..."} stuff from mpi.c to comply with ISO C :-)
  376. Jun 11th, 2003
  377. v0.85 -- Swapped in a new AES routine
  378. -- Removed Serpent
  379. -- Added TDCAL policy document
  380. Jun 1st, 2003
  381. v0.84 -- Removed a 4KB buffer from rsa_decrypt_key that wasn't being used no more
  382. -- Fixed another potential buffer problem. Not an overflow but could cause the
  383. PK import routines to read past the end of the buffer.
  384. -- Optimized the ECC mulmod more by removing a if condition that will always be false
  385. -- Optimized prime.c to not include a 2nd prime table, removed code from is_prime calls prime
  386. test from LibTomMath now
  387. -- Added LTC_TEST define which when defined will enable the test vector routines [see mycrypt_custom.h]
  388. -- Removed ampi.o from the depends cuz it ain't no not working in *nix with it [routines are in mpi.c now].
  389. Mar 29th, 2003
  390. v0.83 -- Optimized the ecc_mulmod, it's faster and takes less heap/stack space
  391. -- Fixed a free memory error in ecc_mulmod and del_point which would try to free NULL
  392. -- Fixed two serious bugs in rsa_decrypt_key and rsa_verify_hash that would allow a trivialy
  393. buffer overflow.
  394. -- Fixed a bug in the hmac testing code if you don't register all the hashes it won't return
  395. errors now.
  396. Mar 15th, 2003
  397. v0.82 -- Manual updated
  398. -- Added MSVC makefile [back, actually its written from scratch to work with NMAKE]
  399. -- Change to HMAC helper functions API to avoid buffer overflow [source changes]
  400. -- the rsa_encrypt_key was supposed to reject key sizes out of bounds ...
  401. same fix to the rsa_sign_hash
  402. -- Added code to ensure that that chaining mode code (cfb/ofb/ctr/cbc) have valid
  403. structures when being called. E.g. the indexes to the pad/ivs are not out of bounds
  404. -- Cleaned up the DES code and simplified the core desfunc routine.
  405. -- Simplified one of the boolean functions in MD4
  406. Jan 16th, 2003
  407. v0.81 -- Merged in new makefile from Clay Culver and Mike Frysinger
  408. -- Sped up the ECC mulmod() routine by making the word size adapt to the input. Saves a whopping 9 point
  409. operations on 521-bit keys now (translates to about 8ms on my Athlon XP). I also now use barrett reduction
  410. as much as possible. This sped the routine up quite a bit.
  411. -- Fixed a huge flaw in ecc_verify_hash() where it would return CRYPT_OK on error... Now fixed.
  412. -- Fixed up config.pl by fixing an invalid query and the file is saved in non-windows [e.g. not CR/LF] format
  413. (fix due to Mika Boström)
  414. -- Merged in LibTomMath for kicks
  415. -- Changed the build process so that by default "mycrypt_custom.h" is included and provided
  416. The makefile doesn't include any build options anymore
  417. -- Removed the PS2 and VC makefiles.
  418. Dec 16th, 2002
  419. v0.80 -- Found a change I made to the MPI that is questionable. Not quite a bug but definately not desired. Had todo
  420. with the digit shifting. In v0.79 I simply truncated without zeroing. It didn't cause problems during my
  421. testing but I fixed it up none the less.
  422. -- Optimized s_mp_mul_dig() from MPI to do a minimal number of passes.
  423. -- Fixed in rsa_exptmod() where I was getting the size of the result. Basically it accomplishes the same thing
  424. but the fixed code is more readable.
  425. -- Fixed slight bug in dh_sign_hash() where the random "k" value was 1 byte shorter than it should have been. I've
  426. also made the #define FAST_PK speed up signatures as well. Essentially FAST_PK tells the DH sub-system to
  427. limit any private exponent to 256-bits. Note that when FAST_PK is defined does not make the library
  428. binary or source incompatible with a copy of the library with it undefined.
  429. -- Removed the DSA code. If you want fast diffie-hellman just define FAST_PK :-)
  430. -- Updated dh_sign_hash()/dh_verify_hash() to export "unsigned" bignums. Saves two bytes but is not binary
  431. compatible with the previous release... sorry! I've performed the same fix to the ecc code as well.
  432. -- Fixed up the PK code to remove all use of mp_toraw() and mp_read_raw() [get all the changes out of the way now]
  433. -- Fixed a bug in the DH code where it missed trapping a few errors if they occurred.
  434. -- Fixed a slight "its-not-a-bug-but-could-be-done-better" bug in the next_prime() function. Essentially it was
  435. testing to ensure that in the loop that searches for the next candidate that the step never grows beyond
  436. 65000. Should have been testing for MP_DIGIT_MAX
  437. -- Spruced up the config.pl script. It now makes a header file "mycrypt_custom.h" which can be included *before*
  438. you include mycrypt.h. This allows you to add libtomcrypt to a project without completely changing your make
  439. system around. Note that you should use the makefile it writes to at least build the library initially.
  440. -- Used splint to check alot of the code out. Tons of minor fixes and explicit casts added.
  441. -- Also made all the internal functions of MPI are now static to avoid poluting the namespace
  442. -- **Notice**: There are no planned future releases for at least a month from the this release date.
  443. Dec 14th, 2002
  444. v0.79 -- Change to PK code [binary and source]. I made it so you have to pass the buffer size to the *_decrypt_key and
  445. *_verify_hash functions. This prevents malformed packets from performing buffer overflows. I've also trimmed
  446. the packet header size [by 4 bytes].
  447. -- Made the test program halt on the first error it occurs. Also made it trap more errors than before.
  448. -- Wrote the first chapter of my new book [DRAFT!], not in this package but check my website!
  449. -- Included a perl script "config.pl" that will make "makefile.out" according to the users needs.
  450. -- Added shell script to look for latest release
  451. -- Merge DH and ECC key defines from mycrypt_cfg.h into the makefiles
  452. -- updated the makefile to use BSD friendly archiving invokations
  453. -- Changed the DH and ECC code to use base64 static key settings [e.g. the primes]. Dropped the code size by 3KB
  454. and is ever-so-slightly faster than before.
  455. -- added "mp_shrink" function to shrink the size of bignums. Specially useful for PK code :-)
  456. -- Added new exptmod function that calculates a^b mod c with fewer multiplies then before [~20% for crypto
  457. sized numbers]. Also added a "low mem" variant that doesn't use more than 20KB [upto 4096 bit nums] of
  458. heap todo the calculation. Both are #define'able controlled
  459. -- Added XREALLOC macro to provide realloc() functionality.
  460. -- Added fix where in rsa_import() if you imported a public key or a non-optimized key it would free the mp_int's
  461. not being used.
  462. -- Fixed potential bug in the ECC code. Only would occur on platforms where char is not eight bits [which isn't
  463. often!]
  464. -- Fixed up the ECC point multiplication, its about 15% faster now
  465. -- While I was at it [since the lib isn't binary backwards compatible anyways] I've fixed the PK export routines
  466. so they export as "unsigned" types saving 1 byte per bignum outputted. Not a lot but heck why not.
  467. Nov 28th, 2002
  468. v0.78 -- Made the default ARGCHK macro a function call instead which reduced the code size from 264KB to 239KB.
  469. -- Fixed a bug in the XTEA keysize function which called ARGCHK incorrectly.
  470. -- Added Noekeon block cipher at 2,800 bytes of object code and 345Mbit/sec it is a welcome addition.
  471. -- Made the KR code check if the other PK systems are included [provides error when building otherwise].
  472. -- Made "aes" an alias for Rijndael via a pre-processor macro. Now you can use "aes_ecb_encrypt", etc... :-)
  473. Thanks to Jean-Luc Cooke for the "buzzword conformance" suggestion.
  474. -- Removed the old PK code entirely (e.g. rsa_sign, dh_encrypt). The *_sign_hash and *_encrypt_key functions
  475. are all that is to remain.
  476. -- **NOTE** Changed the PK *_import (including the keyring) routine to accept a "inlen" parameter. This fixes a
  477. bug where improperly made key packets could result in reading passed the end of the buffer. This means
  478. the code is no longer source compatible but still binary compatible.
  479. -- Fixed a few other minor bugs in the PK import code while I was at it.
  480. Nov 26th, 2002
  481. v0.77 -- Updated the XTEA code to use pre-computed keys. With optimizations for speed it achieves 222Mbit/sec
  482. compared to the 121Mbit/sec before. It is 288 bytes bigger than before.
  483. -- Cleaned up some of the ciphers and hashes (coding style, cosmetic changes)
  484. -- Optimized AES slightly for 256-bit keys [only one if statement now, still two for 192-bit keys]
  485. -- Removed most test cases from Blowfish, left three of them there. Makes it smaller and faster to test.
  486. -- Changed the primality routines around. I now use 8 rounds of Rabin-Miller, I use 256 primes in the sieve
  487. step and the "rand_prime" function uses a modified sieve that avoids alot of un-needed bignum work.
  488. -- Fixed a bug in the ECC/DH signatures where the keys "setting" value was not checked for validity. This means
  489. that a invalid value could have caused segfaults, etc...
  490. -- **NOTE** Changed the way the ECC/DH export/import functions work. They are source but not binary compatible
  491. with v0.76. Essentially insteading of exporting the setting index like before I export the key size. Now
  492. if you ever re-configure which key settings are supported the lib will still be able to make use of your
  493. keys.
  494. -- Optimized Blowfish by inlining the round function, unrolling it for four rounds then using a for loop for the
  495. rest. It achieves a rate of 425Mbit/sec with the new code compared to 314Mbit/sec before. The new blowfish
  496. object file is 7,813 bytes compared to 8,663 before and is 850 bytes smaller. So the code is both smaller and
  497. faster!
  498. -- Optimized Twofish as well by inlining the round function. Gets ~400Mbit/sec compared to 280Mbit/sec before
  499. and the code is only 78 bytes larger than the previous copy.
  500. -- Removed SMALL_PRIME_TAB build option. I use the smaller table always.
  501. -- Fixed some mistakes concerning prime generation in the manual.
  502. -- [Note: sizes/speeds are for GCC 3.2 on an x86 Athlon XP @ 1.53Ghz]
  503. Nov 25th, 2002
  504. v0.76 -- Updated makefiles a bit more, use "-Os" instead of "-O2" to optimize for size. Got the lib
  505. downto 265KB using GCC 3.2 on my x86 box.
  506. -- Updated the SAFER+, Twofish and Rijndael test vector routine to use the table driven design.
  507. -- Updated all other test vector routines to return as soon as an error is found
  508. -- fixed a bug in the test program where errors in the hash test routines would not be reported
  509. correctly. I found this by temporarily changing one of the bytes of the test vectors. All the
  510. hashes check out [the demos/test.c would still have reported an error, just the wrong one].
  511. Nov 24th, 2002
  512. v0.75 -- Fixed a flaw in hash_filehandle, it should ARGCHK that the filehandle is not NULL
  513. -- Fixed a bug where in hash_file if the call to hash_filehandle failed the open file would
  514. not be closed.
  515. -- Added more strict rules to build process, starting to weed out "oh this works in GCC" style code
  516. In the next release "-Wconversion" will be enabled which will deal with all implicit casts.
  517. Nov 22nd, 2002 [later in the day]
  518. v0.74 -- Wrote a small variant of SAFER+ which shaved 50KB off the size of the library on x86 platforms
  519. -- Wrote a build option to remove the PK packet functions [keeps the encrypt_key/sign_hash functions]
  520. -- Wrote a small variant of Rijndael (trimmed 13KB)
  521. -- Trimmed the TIGER/192 hash function a bit
  522. -- Overall the entire lib compiled is 295KB [down from 400KB before]
  523. -- Fixed a few minor oversights in the MSVC makefile
  524. Nov 22nd, 2002
  525. v0.73 -- Fixed bug in RC4 code where it could only use 255 byte keys.
  526. -- Fixed bug in yarrow code where it would allow cast5 or md2 to be used with it...
  527. -- Removed the ecc compress/expand points from the global scope. Reduces namespace polution
  528. -- Fixed bug where if you used the SPRNG you couldn't pass NULL as your prng_state which you should be
  529. able todo since the SPRNG has no state...
  530. -- Corrected some oversights in the manual and the examples...
  531. -- By default the GF(2^W) math library is excluded from the build. The source is maintained because I wrote it
  532. and like it :-). This way the built library is a tad smaller
  533. -- the MSVC makefile will now build for a SPACE optimized library rather than TIME optimized.
  534. Nov 21th, 2002
  535. v0.72 -- Fixed bug in the prime testing. In the Miller-Rabin test I was raising the base to "N-1" not "r".
  536. The math still worked out fine because in effect it was performing a Fermat test. Tested the new code and it
  537. works properly
  538. -- Fixed some of the code where it was still using the old error syntax
  539. -- Sped up the RSA decrypt/sign routines
  540. -- Optimized the ecc_shared_secret routine to not use so much stack
  541. -- Fixed up the makefile to make releases where the version # is in the file name and directory it will unzip
  542. to
  543. Nov 19th, 2002
  544. v0.71 -- HELP TOM. I need tuition for the January semester. Now I don't want to force donations [nor will I ever]
  545. but I really need the help! See my website http://tom.iahu.ca/help_tom.html for more details. Please help
  546. if you can!
  547. --------------------------------------------------------------------------------------------------------------
  548. -- Officially the library is no longer supported in GCC 3.2 in windows [cygwin].
  549. In windows you can either use GCC 2.95.3 or try your luck with 3.2 It seems that
  550. "-fomit-frame-pointer" is broken in the windows build [but not the linux x86 build???]
  551. If you simply must use 3.2 then I suggest you limit the optimizations to simply "-O2"
  552. -- Started new error handling API. Similar to the previous except there are more error codes than just
  553. CRYPT_ERROR
  554. -- Added my implementation of the MD2 hash function [despite the errors in the RFC I managed to get it right!]
  555. -- Merged in more changes from Sky Schulz. I have to make mention here that he has been a tremendous help in
  556. getting me motivated to make some much needed updates to the library!
  557. -- Fixed one of the many mistakes in the manual as pointed out by Daniel Richards
  558. -- Fixed a bug in the RC4 code [wasn't setting up the key correctly]
  559. -- Added my implementation of the CAST5 [aka CAST-128] block cipher (conforms...)
  560. -- Fixed numerous bugs in the PK code. Essentially I was "freeing" keys when the import failed. This is neither
  561. required nor a good a idea [double free].
  562. -- Tom needs a job.
  563. -- Fixed up the test harness as requested by Sky Schulz. Also modifed the timing routines to run for X seconds
  564. and count # of ops performed. This is more suitable than say encrypting 10 million blocks on a slow processor
  565. where it could take minutes!
  566. -- Modified test programs hashsum/encrypt to use the new algorithms and error handling syntax
  567. -- Removed the PKCS code since it was incomplete. In the future I plan on writing a "add-on" library that
  568. provides PKCS support...
  569. -- updated the config system so the #defines are in the makefiles instead of mycrypt_cfg.h
  570. -- Willing to work on an hourly basis for 15$ CDN per hour.
  571. -- updated the test program to not test ciphers not included
  572. -- updated the makefile to make "rsa_sys.c" a dependency of rsa.o [helps develop the code...]
  573. -- fixed numerous failures to detect buffer overflows [minor] in the PK code.
  574. -- fixed the safer [64-bit block version] test routines which didn't check the returns of the setup
  575. function
  576. -- check out my CV at http://tom.iahu.ca/cv.html
  577. -- removed the GBA makefile and code from demos/test.c [not a particularly useful demo...]
  578. -- merged in rudimentary [for testing] PS2 RNG from Sky Schulz
  579. -- merged in PS2 timer code [only shell included due to NDA reasons...]
  580. -- updated HMAC code to return errors where possible
  581. -- Thanks go to Sky Schulz who bought me a RegCode for TextPad [the official editor of libtomcrypt]
  582. Nov 12th, 2002
  583. v0.70 -- Updated so you can swap out the default malloc/calloc/free routines at build time with others. (Sky Schulz)
  584. -- Sky Schulz contributed some code towards autodetecting the PS2 in mycrypt_cfg.h
  585. -- Added PS2 makefile contributed by Sky Schulz [see a pattern forming?]
  586. -- Added ability to have no FILE I/O functions at all (see makefile), Sky Schulz....
  587. -- Added support for substituting out the clock() function (Sky Schulz)
  588. -- Fixed up makefile to include new headers in the HEADERS variable
  589. -- Removed "coin.c" as its not really useful anyways
  590. -- Removed many "debug" printfs that would show up on failures. Basically I wanted to ensure the only output
  591. would be from the developer themselves.
  592. -- Added "rc4.c" a RC4 implementation with a PRNG interface. Since RC4 isn't a block cipher it wouldn't work
  593. too well as a block cipher.
  594. -- Fixed ARGCHK macro usage when ARGTYPE=1 throughout the code
  595. -- updated makefile to make subdirectory properly (Sku Schulz)
  596. -- Started towards new API setup. Instead of checking for "== CRYPT_ERROR" you should check "!= CRYPT_OK"
  597. In future releases functions will return things other than CRYPT_ERROR on error to give more useful
  598. thread safe error reporting. The manual will be updated to reflect this. For this release all
  599. errors are returned as CRYPT_ERROR (except as noted) but in future releases this will change.
  600. -- Removed the zlib branch since its not really required anyways. Makes the package smaller
  601. Nov 11th, 2002
  602. v0.69 -- Added ARGCHK (see mycrypt_argchk.h) "arguement checking" to all functions that accept pointers
  603. -- Note I forgot to change the CRYPT version tag in v0.68... fixed now.
  604. Nov 8th, 2002
  605. v0.68 -- Fixed flaw in kr_import/kr_export that wasted 4 bytes. Source but not binary compatible with v0.67
  606. -- Fixed bug in kr_find_name that used memcmp to match strings. Uses strncmp now.
  607. -- kr_clear now sets the pointer to NULL to facilate debugging [e.g. using the keyring after clearing]
  608. -- static functions in _write/_read in keyring.c now check the return of ctr_encrypt/ctr_decrypt.
  609. -- Updated blowfish/rc2/rc5/rc6 keysize() function to not reject keys larger than the biggest key the
  610. respective ciphers can use.
  611. -- Fixed a bug in hashsum demo that would report the hash for files that don't exist!
  612. Oct 16th, 2002
  613. v0.67 -- Moved the function prototypes into files mycrypt_*.h. To "install" the lib just copy all the
  614. header files "*.h" from the base of this project into your global include path.
  615. -- Made the OFB/CFB/CTR functions use "unsigned long" for the length instead of "int"
  616. -- Added keyring support for the PK functions
  617. -- ***API CHANGE*** changed the ecc_make_key and dh_make_key to act more like rsa_make_key. Basically
  618. move the first argument to the next to last.
  619. -- Fixed bug in dh_test() that wouldn't test the primality of the order of the sub-group
  620. -- replaced the primes in the DH code with new ones that are larger than the size they are
  621. associated with. That is a 1024-bit DH key will have a 1025-bit prime as the modulus
  622. -- cleaned up all the PK code, changed a bit of the API around [not source compatible with v0.66]
  623. -- major editing of the manual, started Docer program
  624. -- added 160 and 224 bit key settings for ECC. This makes the DH and ECC binary wise incompatible with v0.66
  625. -- Added an additional check for memory errors in is_prime() and cleaned up prime.c a bit
  626. -- Removed ID_TAG from all files [meh, not a big fan...]
  627. -- Removed unused variable from yarrow state and made AES/SHA256 the default cipher/hash combo
  628. -- Fixed a bug in the Yarrow code that called prng_is_valid instead of cipher_is_valid from yarrow_start()
  629. -- The ECB/CBC/OFB/CFB/CTR wrappers now check that the cipher is valid in the encrypt/decrypt calls
  630. Returns int now instead of void.
  631. Sept 24th, 2002
  632. v0.66 -- Updated the /demos/test.c program to time the hashes correctly. Also it uses the yarrow PRNG for all of the
  633. tests meaning its possible to run on RNG less platforms
  634. -- Updated the /demos/hashsum.c program to hash from the standard input
  635. -- Updated the RSA code to make keys a bit quicker [update by Wayne Scott] by not making both primes at the same
  636. time.
  637. -- Dan Kaminsky suggested some cleanups for the code and the MPI config
  638. Code ships in unix LF format by default now too... will still build in MSVC and all... but if you want
  639. to read the stuff you'll have to convert it
  640. -- Changes to the manual to reflect new API [e.g. hash_memory/file have v0.65 prototypes]and some typos fixed
  641. Sept 20th, 2002
  642. v0.65 -- Wayne Scott ([email protected]) made a few of suggestions to improve the library. Most
  643. importantly he pointed out the math lib is not really required. He's also tested the lib on 18
  644. different platforms. According to him with only a few troubles [lack of /dev/random, etc] the
  645. library worked as it was supposed to. You can find the list at
  646. http://www.bitkeeper.com/Products.BitKeeper.Platforms.html
  647. -- Updated the hash_file and hash_memory functions to keep track of the size of the output
  648. -- Wayne Scott updated the demos/test.c file to use the SPRNG less and Yarrow more
  649. -- Modified the mycrypt_cfg.h to autodetect x86-32 machines
  650. Sept 19th, 2002
  651. v0.64 -- wrote makefile for the GBA device [and hacked the demos/test.c file to support it conditionally]
  652. -- Fixed error in PK (e.g. ECC, RSA, DH) import functions where I was clobbering the packet error messages
  653. -- fixed more typos in the manual
  654. -- removed all unused variables from the core library (ignore the ID_TAG stuff)
  655. -- added "const char *crypt_build_settings" string which is a build time constant that gives a listing
  656. of all the build time options. Useful for debugging since you can send that to me and I will know what
  657. exactly you had set for the mycrypt_cfg.h file.
  658. -- Added control over endianess. Out of the box it defaults to endianess neutral but you can trivially
  659. configure the library for your platform. Using this I boosted RC5 from 660Mbit/sec to 785Mbit/sec on my
  660. Athlon box. See "mycrypt_cfg.h" for more information.
  661. Sept 11th, 2002
  662. v0.63 -- Made hashsum demo output like the original md5sum program
  663. -- Made additions to the examples in the manual (fixed them up a bunch)
  664. -- Merged in the base64 code from Wayne Scott ([email protected])
  665. Aug 29th, 2002
  666. v0.62 -- Added the CLEAN_STACK functionality to several of the hashes I forgot to update.
  667. Aug 9th, 2002
  668. v0.61 -- Fixed a bug in the DES code [oops I read something wrong].
  669. Aug 8th, 2002
  670. v0.60 -- Merged in DES code [and wrote 3DES-EDE code based on it] from Dobes V.
  671. Aug 7th, 2002
  672. v0.59 -- Fixed a "unsigned long long" bug that caused v0.58 not to build in MSVC.
  673. -- Cleaned up a little in the makefile
  674. -- added code that times the hash functions too in the test program
  675. Aug 3rd, 2002
  676. v0.58 -- Added more stack cleaning conditionals throughout the code.
  677. -- corrected some CLEAR_STACK conditionals... should have been CLEAN_STACK
  678. -- Simplified the RSA, DH and ECC encrypt() routines where they use CTR to encode the message
  679. now they only make one call to ctr_encrypt()/ctr_decrypt().
  680. Aug 2nd, 2002
  681. v0.57 -- Fixed a few errors messages in the SAFER code to actually report the correct cipher name.
  682. -- rsa_encrypt() uses the "keysize()" method of the cipher being used to more accurately pick a
  683. key size. By default rsa_encrypt() will choose to use a 256-bit key but the cipher can turn that
  684. down if required.
  685. -- The rsa_exptmod() function will now more reliably detect invalid inputs (e.g. greater than the modulus).
  686. -- The padding method for RSA is more clearly documented. Namely if you want to encrypt/sign something of length
  687. N then your modulus must be of length 1+3N. So to sign a message with say SHA-384 [48 bytes] you need a
  688. 145 byte (1160 bits) modulus. This is all in the manual now.
  689. -- Added build option CLEAN_STACK which will allow you to choose whether you want to clean the stack or not after every
  690. cipher/hash call
  691. -- Sped up the hash "process()" functions by not copying one byte at a time.
  692. ++ (added just after I uploaded...)
  693. MD4 process() now handles input buffers > 64 bytes
  694. Aug 1st, 2002
  695. v0.56 -- Cleaned up the comments in the Blowfish code.
  696. -- Oh yeah, in v0.55 I made all of the descriptor elements constant. I just forgot to mention it.
  697. -- fixed a couple of places where descriptor indexes were tested wrong. Not a huge bug but now its harder
  698. to mess up.
  699. -- Added the SAFER [64-bit block] ciphers K64, SK64, K128 and SK128 to the library.
  700. -- Added the RC2 block cipher to the library.
  701. -- Changed the SAFER define for the SAFER+ cipher to SAFERP so that the new SAFER [64-bit] ciphers
  702. can use them with less confusion.
  703. July 29th, 2002
  704. v0.55 -- My god stupid Blowfish has yet again been fixed. I swear I hate that cipher. Next bug in it and boom its out of the
  705. library. Use AES or something else cuz I really hate Blowfish at this stage....
  706. -- Partial PKCS support [hint DONT USE IT YET CUZ ITS UNTESTED!]
  707. July 19th, 2002
  708. v0.54 -- Blowfish now conforms to known test vectors. Silly bad coding tom!
  709. -- RC5/RC6/Serpent all have more test vectors now [and they seemed to have been working before]
  710. July 18th, 2002
  711. v0.53 -- Added more test vectors to the blowfish code just for kicks [and they are const now too :-)]
  712. -- added prng/hash/cipher is_valid functions and used them in all of the PK code so you can't enter the code
  713. with an invalid index ever now.
  714. -- Simplified the Yarrow code once again :-)
  715. July 12th, 2002
  716. v0.52 -- Fixed a bug in MD4 where the hash descriptor ID was the same as SHA-512. Now MD4 will work with
  717. all the routines...
  718. -- Fixed the comments in SHA-512 to be a bit more meaningful
  719. -- In md4 I made the PADDING array const [again to store it in ROM]
  720. -- in hash_file I switched the constant "512" to "sizeof(buf)" to be a bit safer
  721. -- in SHA-1's test routine I fixed the string literal to say SHA-1 not sha1
  722. -- Fixed a logical error in the CTR code which would make it skip the first IV value. This means
  723. the CTR code from v0.52 will be incompatible [binary wise] with previous releases but it makes more
  724. sense this way.
  725. -- Added {} braces for as many if/for/blocks of code I could find. My rule is that every for/if/while/do block
  726. must have {} braces around it.
  727. -- made the rounds table in saferp_setup const [again for the ROM think about the ROM!]
  728. -- fixed RC5 since it no longer requires rc5 to be registered in the lib. It used to since the descriptors used to
  729. be part of the table...
  730. -- the packet.c code now makes crypt_error literal string errors when an error occurs
  731. -- cleaned up the SAFER+ key schedule to be a bit easier to read.
  732. -- fixed a huge bug in Twofish with the TWOFISH_SMALL define. Because I clean the stack now I had
  733. changed the "g_func()" to be called indirectly. I forgot to actually return the return of the Twofish
  734. g_func() function which caused it not to work... [does now :-)]
  735. July 11th, 2002
  736. v0.51 -- Fixed a bug in SHA512/384 code for multi-block messages.
  737. -- Added more test vectors to the SHA384/512 and TIGER hash functions
  738. -- cleaned up the hash done routines to make more sense
  739. July 10th, 2002
  740. v0.50 -- Fixed yarrow.c so that the cipher/hash used would be registered. Also fixed
  741. a bug where the SAFER+ name was "safer" but should have been "safer+".
  742. -- Added an element to the hash descriptors that gives the size of a block [sent into the compressor]
  743. -- Cleaned up the support for HMAC's
  744. -- Cleaned up the test vector routines to make the test vector data const. This means on some platforms it will be
  745. placed in ROM not RAM now.
  746. -- Added MD4 code submited by Dobes Vandermeer ([email protected])
  747. -- Added "burn_stack" function [idea taken from another source of crypto code]. The idea is if a function has
  748. alot of variables it will clean up better. Functions like the ecb serpent and twofish code will now have their
  749. stacks cleaned and the rest of the code is getting much more straightforward.
  750. -- Added a hashing demo by Daniel Richards ([email protected])
  751. -- I (Tom) modified some of the test vector routines to use more vectors ala Dobes style.
  752. For example, the MD5/SHA1 code now uses all of the test vectors from the RFC/FIPS spec.
  753. -- Fixed the register/unregister functions to properly report errors in crypt_error
  754. -- Correctly updated yarrow code to remove a few unused variables.
  755. -- Updated manual to fix a few erroneous examples.
  756. -- Added section on Hash based Message Authentication Codes (HMAC) to the manual
  757. June 19th, 2002
  758. v0.46 -- Added in HMAC code from Dobes Vandermeer ([email protected])
  759. June 8th, 2002
  760. v0.45 -- Fixed bug in rc5.c where if you called rc5_setup() before registering RC5 it would cause
  761. undefined behaviour.
  762. -- Fixed mycrypt_cfg.h to eliminate the 224 bit ECC key.
  763. -- made the "default" makefile target have depends on mycrypt.h and mycrypt_cfg.h
  764. Apr 4th, 2002
  765. v0.44 -- Fixed bug in ecc.c::new_point() where if the initial malloc fails it would not catch it.
  766. Mar 22nd, 2002
  767. v0.43 -- Changed the ZLIB code over to the 1.1.4 code base to avoid the "double free" bug.
  768. -- Updated the GCC makefile not to use -O3 or -funroll-loops
  769. -- Version tag in mycrypt.h has been updated :-)
  770. Mar 10th, 2002
  771. v0.42 -- The RNG code can now use /dev/urandom before trying /dev/random (J. Klapste)
  772. Mar 3rd, 2002
  773. v0.41 -- Added support to link and use ciphers at compile time. This can greatly reduce the code size!
  774. -- Added a demo to show off how small an application can get... 46kb!
  775. -- Disastry pointed out that Blowfish is supposed to be high endian.
  776. -- Made registry code for the PRNGs as well [now the smallest useable link is 43kb]
  777. Feb 11th, 2002
  778. v0.40 -- RSA signatures use [and check for] fixed padding scheme.
  779. -- I'm developing in Linux now :-)
  780. -- No more warnings from GCC 2.96
  781. Feb 5th, 2002
  782. v0.39 -- Updated the XTEA code to work in accordance with the XTEA design
  783. January 24th, 2002
  784. v0.38 -- CFB and OFB modes can now handle blocks of variable size like the CTR code
  785. -- Wrote a wrapper around the memory compress functions in Zlib that act like the functions
  786. in the rest of my crypto lib
  787. January 23rd, 2002
  788. v0.37 -- Added support code so that if a hash size and key size for a cipher don't match up they will
  789. use the next lower key supported. (mainly for the PK code). So you can now use SHA-1 with
  790. Twofish, etc...
  791. -- Added more options for Twofish. You can now tell it to use precomputed sboxes and MDS multiplications
  792. This will speed up the TWOFISH_SMALL implementation by increasing the code size by 1024 bytes.
  793. -- Fixed a bug in prime.c that would not use the correct table if you undefined SMALL_PRIME_TAB
  794. -- Fixed all of the PK packet code to use the same header format [see packet.c]. This makes the PK code
  795. binary wise incompatible with previous releases while the API has not changed at all.
  796. January 22nd, 2002
  797. v0.36 -- Corrections to the manual
  798. -- Made a modification to Twofish which lets you build a "small ram" variant. It requires
  799. about 190 bytes of ram for the key storage compared to the 4,200 bytes the normal
  800. variant requires.
  801. -- Reduced the stack space used in all of the PK routines.
  802. January 19th, 2002
  803. v0.35 -- If you removed the first hash or cipher from the library it wouldn't return an error if
  804. you used an ID=0 [i.e blowfish or sha256] in any routine. Now it checks for that and will
  805. return an error like it should
  806. -- Merged in new routines from Clay Culver. These routines are for the PK code so you can easily
  807. encode a symmetric key for multiple recipients.
  808. -- Made the ecc and DH make_key() routines make secret keys of the same size as the keysize listed.
  809. Originally I wanted to ensure that the keys were smaller than the order of the field used
  810. However, the bias is so insignifcant using full sizes. For example, with a ECC-192 key the order
  811. is about 2^191.99, so instead I rounded down and used a 184-bit secret key. Now I simply use a full 192-bit
  812. key the code will work just the same except that some 192-bit keys will be duplicates which is not a big
  813. deal since 1/2^192 is a very small bias!
  814. -- Made the configuration a bit simpler and more exacting. You can for example now select which DH or ECC
  815. key settings you wish to support without including the data for all other key settings. I put the #defines
  816. in a new file called "mycrypt_cfg.h"
  817. -- Configured "mpi-config.h" so its a bit more conservative with the memory required and code space used
  818. -- Jason Klapste submitted bug fixes to the yarrow, hash and various other issues. The yarrow code will now
  819. use what ever remaining hash/cipher combo is left [after you #undef them] at build time. He also suggested
  820. a fix to remove unused structures from the symmetric_key and hash_state unions.
  821. -- Made the CTR code handle variable length blocks better. It will buffer the encryption pad so you can
  822. encrypt messages any size block at a time.
  823. -- Simplified the yarrow code to take advantage of the new CTR code.
  824. -- Added a 4096-bit DH key setting. That took me about 36 hours to find!
  825. -- Changed the base64 routines to use a real base64 encoding scheme.
  826. -- Added in DH and ECC "encrypt_key()" functions. They are still rather "beta"ish.
  827. -- Added **Twofish** to the list of ciphers!
  828. January 18th, 2002
  829. v0.34 -- Added "sha512" to the list of hashes. Produces a 512-bit message digest. Note that with the current
  830. padding with the rsa_sign() function you cannot use sha512 with a key less than 1536 bits for signatures.
  831. -- Cleaned up the other hash functions to use the LOAD and STORE macros...
  832. January 17th, 2002
  833. v0.33 -- Made the lower limit on keysizes for RSA 1024 bits again because I realized that 768 bit keys wouldn't
  834. work with the padding scheme and large symmetric keys.
  835. -- Added information concerning the Zlib license to the manual
  836. -- Added a 3072-bit key setting for the DH code.
  837. -- Made the "find_xyz()" routines take "const char *" as per Clay Culver's suggestion.
  838. -- Fixed an embarassing typo in the manual concerning the hashes. Thank's Clay for finding it!
  839. -- Fixed rand_prime() so that it makes primes bigger than the setting you give. For example,
  840. if you want a 1024-bit prime it would make a 1023-bit one. Now it ensures that the prime
  841. it makes is always greater than 2^(8n) (n == bytes in prime). This doesn't have a huge
  842. impact on security but I corrected it just the same.
  843. -- Fixed the CTR routine to work on platforms where char != 8-bits
  844. -- Fixed sha1/sha256/md5/blowfish to not assume "unsigned long == 32-bits", Basically any operation with carries
  845. I "AND" with 0xFFFFFFFF. That forces only the lower 32-bits to have information in it. On x86 platforms
  846. most compilers optimize out the AND operation since its a nop.
  847. January 16th, 2002
  848. v0.32 -- Made Rijndael's setup function fully static so it is thread safe
  849. -- Svante Seleborg suggested a cosmetic style fixup for aes.c,
  850. basically to remove some of the #defines to clean it up
  851. -- Made the PK routines not export the ASCII version of the names of ciphers/hashes which makes
  852. the PK message formats *incompatible* with previous releases.
  853. -- Merge in Zlib :-)
  854. January 15th, 2002
  855. v0.31 -- The RSA routines can now use CRT to speed up decryption/signatures. The routines are backwards
  856. compatible with previous releases.
  857. -- Fixed another bug that Svante Seleborg found. Basically you could buffer-overrun the
  858. rsa_exptmod() function itself if you're not careful. That's fixed now. Fixed another bug in
  859. rsa_exptmod() where if it knows the buffer you passed is too small it wouldn't free all used
  860. memory.
  861. -- improved the readability of the PK import/export functions
  862. -- Added a fix to RSA.C by Clay Culver
  863. -- Changed the CONST64 macro for MSVC to use the "unsigned __int64" type, e.g. "ui64" instead of "i64".
  864. January 14th, 2002
  865. v0.30 -- Major change to the Yarrow PRNG code, fixed a bug that Eugene Starokoltsev found.
  866. Basically if you added entropy to the pool in small increments it could in fact
  867. cancel out. Now I hash the pool with the new data which is way smarter.
  868. January 12th, 2002
  869. v0.29 -- Added MPI code written by Svante Seleborg to the library. This will make the PK code much
  870. easier to follow and debug. Actually I've already fixed a memory leak in dh_shared_secret().
  871. -- Memory leaks found and correct in all three PK routines. The leaks would occur when a bignum
  872. operation fails so it wouldn't normally turn up in the course of a program
  873. -- Fixed bugs in dh_key_size and ecc_key_size which would return garbage for invalid key idx'es
  874. January 11th, 2002
  875. v0.28 -- Cleaned up some code so that it doesn't assume "char == 8bits". Mainly SAFER+ has been
  876. changed.
  877. -- ***HUGE*** changes in the PK code. I check all return values in the bignum code so if there
  878. are errors [insufficient memory, etc..] it will be reported. This makes the code fairly more
  879. robust and likely to catch any errors.
  880. -- Updated the is_prime() function to use a new prototype [it can return errors now] and it also
  881. does trial divisions against more primes before the Rabin Miller steps
  882. -- Added OFB, CFB and ECB generic wrappers for the symmetric ciphers to round out the implementations.
  883. -- Added Xtea to the list of ciphers, to the best of my ability I have verified this implementation.
  884. I should note that there is not alot of concrete information about the cipher. "Ansi C" versions
  885. I found did not address endianess and were not even portable!. This code is portable and to the
  886. best of my knowledge implements the Xtea algorithm as per the [short] X-Tea paper.
  887. -- Reformated the manual to include the **FULL** source code optimized to be pritable.
  888. January 9th, 2002
  889. v0.27 -- Changed the char constants to numerical values. It is backwards compatible and should work on
  890. platforms where 'd' != 100 [for example].
  891. -- Made a change to rand_prime() which takes the input length as a signed type so you can pass
  892. a negative len to get a "3 mod 4" style prime... oops
  893. -- changed the MSVC makefile to build with a warning level of three, no warnings!
  894. January 8th, 2002
  895. v0.26 -- updated SHA-256 to use ROR() for a rotate so 64-bit machines won't corrupt
  896. the output
  897. -- Changed #include <> to #include "" for local .h files as per Richard Heathfields' suggestions.
  898. -- Fixed bug in MPI [well bug in MSVC] that compiled code incorrectly in mp_set_int()
  899. I added a work around that catches the error and continues normally.
  900. January 8th, 2002
  901. v0.25 -- Added a stupid define so MSVC 6.00 can build the library.
  902. -- Big thanks to sci.crypt and "Ajay K. Agrawal" for helping me port this to MSVC
  903. January 7th, 2002
  904. v0.24 -- Sped up Blowfish by unrolling and removing the swaps.
  905. -- Made the code comply with more traditional ANSI C standards
  906. Should compile with MSVC with less errors
  907. -- moved the demos and documentation into their own directories
  908. so you can easily build the library with other tool chains
  909. by compiling the files in the root
  910. -- converted functions with length of outputs to use
  911. "unsigned long" so 16-bit platforms will like this library more.
  912. January 5th, 2002
  913. v0.23 -- Fixed a small error in the MPI config it should build fine anywhere.
  914. January 4th, 2002
  915. v0.22 -- faster gf_mul() code
  916. -- gf_shl() and gf_shr() are safe on 64-bit platforms now
  917. -- Fixed an error in the hashes that Brian Gladman found.
  918. Basically if the message has exactly 56 bytes left to be
  919. compressed I handled them incorrectly.
  920. January 4th, 2002
  921. v0.21 -- sped up the ECC code by removing redundant divisions in the
  922. point add and double routines. I also extract the bits more
  923. efficiently in "ecc_mulmod()" now.
  924. -- sped up [and documented] the rand_prime() function. Now it just
  925. makes a random integer and increments by two until a prime is found
  926. This is faster since it doesn't require alot of calls to the PRNG and
  927. it doesn't require loading huge integers over and over. rand_prime()
  928. can also make primes congruent to 3 mod 4 [i.e for a blum integer]
  929. -- added a gf_sqrt() function that finds square roots in a GF(2^w) field
  930. -- fixed a bug in gf_div() that would return the wrong results if the divisor had a greator
  931. divisor than the dividend.
  932. January 4th, 2002
  933. v0.20 -- Added the fixed MPI back in so RSA and DH are much faster again
  934. v0.19 -- Updated the manual to reflect the fact that Brian Gladman wrote the AES and Serpent code.
  935. -- DH, ECC and RSA signature/decryption functions check if the key is private
  936. -- new DH signature/verification code works just like the RSA/ECC versions
  937. January 3rd, 2002
  938. v0.18 -- Added way more comments to each .C file
  939. -- fixed a bug in cbc_decrypt(pt, ct, key) where pt == ct [i.e same buffer]
  940. -- fixed RC5 so it reads the default rounds out of the cipher_descriptor table
  941. -- cleaned up ecc_export()
  942. -- Cleaned up dh_import() and ecc_import() which also perform more
  943. error checking now
  944. -- Fixed a serious flaw in rsa_import() with private keys.
  945. January 2nd, 2002
  946. v0.17 -- Fixed a bug in the random prime generator that fixes the wrong bits to one
  947. -- ECC and DH code verify that the moduli and orders are in fact prime. That
  948. slows down the test routines alot but what are you gonna do?
  949. -- Fixed a huge bug in the mp_exptmod() function which incorrectly calculates g^x mod p for some
  950. values of p. I replaced it with a slow function. Once the author of MPI fixes his faster routine
  951. I will switch back.
  952. January 1st, 2002 [whoa new year!]
  953. v0.16 -- Improved GF division code that is faster.
  954. -- documented the GF code
  955. December 31st, 2001
  956. v0.15 -- A 1792-bit and 2048-bit DH setting was added. Took me all night to
  957. find a 1792 and 2048-bit strong prime but what the heck
  958. -- Library now has polynomial-basis GF(2^w) routines I wrote myself. Can be used to perform
  959. ECC over GF(2^w) later on....
  960. -- Fixed a bug with the defines that allows it to build in windows
  961. December 30th, 2001
  962. v0.14 -- Fixed the xxx_encrypt() packet routines to make an IV of appropriate size
  963. for the cipher used. It was defaulting to making a 256-bit IV...
  964. -- base64_encode() now appends a NULL byte, um "duh" stupid mistake now fixed...
  965. -- spell checked the manual again... :-)
  966. December 30th, 2001
  967. v0.13 -- Switching back to older copy of MPI since it works! arrg..
  968. -- Added sign/verify functions for ECC
  969. -- all signature verification routines default to invalid signatures.
  970. -- Changed all calls to memset to zeromem. Fixed up some buffer problems
  971. in other routines. All calls to zeromem let the compiler determine the size
  972. of the data to wipe.
  973. December 29th, 2001
  974. v0.12 -- Imported a new version of MPI [the bignum library] that should
  975. be a bit more stable [if you want to write your own bignum
  976. routines with the library that is...]
  977. -- Manual has way more info
  978. -- hash_file() clears stack now [like it should]
  979. -- The artificial cap on the hash input size of 2^32 bits has been
  980. removed. Basically I was too lazy todo 64-bit math before
  981. [don't ask why... I can't remember]. Anyways the hashes
  982. support the size of 2^64 bits [if you ever use that many bits in a message
  983. that's just wierd...]
  984. -- The hashes now wipe the "hash_state" after the digest is computed. This helps
  985. prevent the internal state of the hash being leaked accidently [i.e stack problems]
  986. December 29th, 2001
  987. v0.11 -- Made #define's so you can trim the library down by removing
  988. ciphers, hashs, modes of operation, prngs, and even PK algorithms
  989. For example, the library with rijndael+ctr+sha1+ECC is 91KB compared
  990. to the 246kb the full library takes.
  991. -- Added ECC packet routines for encrypt/decrypt/sign/verify much akin to
  992. the RSA packet routines.
  993. -- ECC now compresses the public key, a ECC-192 public key takes 33 bytes
  994. for example....
  995. December 28th, 2001
  996. v0.10 -- going to restart the manual from scratch to make it more
  997. clear and professional
  998. -- Added ECC over Z/pZ. Basically provides as much as DH
  999. except its faster since the numbers are smaller. For example,
  1000. A comparable 256-bit ECC key provides as much security as expected
  1001. from a DH key over 1024-bits.
  1002. -- Cleaned up the DH code to not export the symbol "sets[]"
  1003. -- Fixed a bug in the DH code that would not make the correct size
  1004. random string if you made the key short. For instance if you wanted
  1005. a 512-bit DH key it would make a 768-bit one but only make up 512-bits
  1006. for the exponent... now it makes the full 768 bits [or whatever the case
  1007. is]
  1008. -- Fixed another ***SERIOUS*** bug in the DH code that would default to 768-bit
  1009. keys by mistake.
  1010. December 25th, 2001
  1011. v0.09 -- Includes a demo program called file_crypt which shows off
  1012. how to use the library to make a command line tool which
  1013. allows the user to encode/decode a file with any
  1014. hash (on the passphrase) and cipher in CTR mode.
  1015. -- Switched everything to use typedef's now to clear up the code.
  1016. -- Added AES (128/192 and 256 bit key modes)
  1017. December 24th, 2001
  1018. v0.08 -- fixed a typo in the manual. MPI stores its bignums in
  1019. BIG endian not little.
  1020. -- Started adding a RNG to the library. Right now it tries
  1021. to open /dev/random and if that fails it uses either the
  1022. MS CSP or the clock drift RNG. It also allows callbacks
  1023. since the drift RNG is slow (about 3.5 bytes/sec)
  1024. -- the RNG can also automatically setup a PRNG as well now
  1025. v0.07 -- Added basic DH routines sufficient to
  1026. negotiate shared secrets
  1027. [see the manual for a complete example!]
  1028. -- Fixed rsa_import to detect when the input
  1029. could be corrupt.
  1030. -- added more to the manual.
  1031. December 22nd, 2001
  1032. v0.06 -- Fixed some formatting errors in
  1033. the hash functions [just source code cleaning]
  1034. -- Fixed a typo in the error message for sha256 :-)
  1035. -- Fixed an error in base64_encode() that
  1036. would fail to catch all buffer overruns
  1037. -- Test program times the RSA and symmetric cipher
  1038. routines for kicks...
  1039. -- Added the "const" modifier to alot of routines to
  1040. clear up the purpose of each function.
  1041. -- Changed the name of the library to "TomCrypt"
  1042. following a suggestion from a sci.crypt reader....
  1043. v0.05 -- Fixed the ROL/ROR macro to be safe on platforms
  1044. where unsigned long is not 32-bits
  1045. -- I have added a bit more to the documentation
  1046. manual "crypt.pdf" provided.
  1047. -- I have added a makefile for LCC-Win32. It should be
  1048. easy to port to other LCC platforms by changing a few lines.
  1049. -- Ran a spell checker over the manual.
  1050. -- Changed the header and library from "crypt" to "mycrypt" to not
  1051. clash with the *nix package "crypt".
  1052. v0.04 -- Fixed a bug in the RC5,RC6,Blowfish key schedules
  1053. where if the key was not a multiple of 4 bytes it would
  1054. not get loaded correctly.
  1055. December 21st, 2001
  1056. v0.03 -- Added Serpent to the list of ciphers.
  1057. v0.02 -- Changed RC5 to only allow 12 to 24 rounds
  1058. -- Added more to the manual.
  1059. v0.01 -- We will call this the first version.