Just my tuppence but here goes. Admittedly the documentation is a little poor but there are valuable examples in test.cpp and validat1, 2 and 3 dot cpp. Add to this the reference manual and also the examples in the FAQ and you start to get a pretty good idea. That said, the library is loaded with so much (which I think is great) that a little (OK, it would actually have to be large to do the library justice) more documentation wouldn't hurt. I realise there is a Crypto++ guide somewhere out there in Microsoft Compiled HTML format - but I'm not a Windows user!
On the issue of the library being huge - this is true if linking statically with GNU ld/gcc. However, you can modify the Makefile to make the lib a shared object and when you link against this your binary reduces its size considerably. I've only just starting brushing the surface with Crypto++ (5.2) so I can't really contribute anymore save one - I actually like the templative design. To me, it seems rather logical and structured. In fact I agree (from what I've seen so far) that points 1-5 made have in fact been met! Regards (& thanks to Wei for the time and effort he's put into developing this library). Jim Vanns On Sun, 2005-04-03 at 18:57 -0700, Wei Dai wrote: > Sorry about not responding to your email about the key incompatibility > issue. I've been busy lately and haven't been checking the mailing list as > often as I probably should. But your question was asked earlier and answered > in this thread: > http://www.mail-archive.com/[email protected]/msg01276.html > > Given that you've already upgraded to version 5.2.1, I think it makes little > sense to abandon it and switch to another library. In case you still want > to, I've listed some other ones on this page: > http://www.mobiuslinks.com/links.asp?sid=1. > > > The conversion was, frankly, brutal, requiring reverse engineering on the > > version 5 code, maintaining parallel version 4 and 5 systems to trace the > > logic. When I finished the conversion, I found that the size of my > > product rpm had jumped from 3.5MB to almost 14MB without any change in > > functionality. > > The only reason for this to happen is the linker not throwing out unused > code. With most commercial compilers this happens by default, but with GCC > you need to use certain compiler flags. For reference, the FIPS validated > Windows DLL that includes a subset of Crypto++ algorithms (the FIPS approved > ones), compiled with MSVC, comes in at about 1 MB. See these comments in > GNUMakefile: > > # Uncomment the following two lines to do a release build. > # Note that you must define NDEBUG for your own application if you define it > for Crypto++. > # Make sure you run the validation tests and test your own program > thoroughly > # after turning on -O2. The GCC optimizer may have bugs that cause it to > generate incorrect code. > # Try removing -fdata-sections if you get "undefined external reference" > errors. > # CXXFLAGS = -O2 -DNDEBUG -ffunction-sections -fdata-sections > # LDFLAGS = -Wl,--gc-sections > > > 1. I would define an abstract class for each class of algorithm > > 2. I would encapsulate each algorithm in a single class implementing > > its respective abstract class > > 3. I would define abstract classes for filters and sinks > > 4. I would layer filters and sinks on their abstract classes > > 5. I would layer modes on top of filters. > > It seems to me that I've already done all of the above. There's also a > reference manual available at http://cryptopp.sourceforge.net/docs/ref521/, > in case you missed it. > > -- James Vanns BSc (Hons) MCP Linux Systems Administrator Software Engineer (Linux / C & C++) Canterbury Christ Church University College Public Key: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x24045370
