aboutsummaryrefslogtreecommitdiffstats
path: root/doc/examples
Commit message (Collapse)AuthorAgeFilesLines
* Clean up cpuid test proglloyd2009-11-101-11/+18
|
* Rename CPUID::has_intel_aes to has_aes_intel, and add CPUID::has_aes_via,lloyd2009-11-101-1/+4
| | | | which is currently just a stub returning false.
* Make the AES implementation using Intel's AES instruction extension official;lloyd2009-11-101-0/+1
| | | | testing with Intel's emulator shows all green.
* In creating X.509 certificates and PKCS #10 requests, let (actually: require)lloyd2009-11-094-6/+7
| | | | | | | the user to specify the hash function to use, instead of always using SHA-1. This was a sensible default a few years ago, when there wasn't a ~2^60 attack on SHA-1 and support for SHA-2 was pretty much nil, but using something else makes a lot more sense these days.
* Add CPUID::have_altivec for AltiVec runtime detection.lloyd2009-10-291-0/+2
| | | | | Relies on mfspr emulation/trapping by the kernel, which works on (at least) Linux and NetBSD.
* Fix some minor compilation issues in the exampleslloyd2009-10-143-4/+4
|
* Add a TSS examplelloyd2009-10-061-0/+38
|
* Significantly rework CPUID support. Add cache line detectionlloyd2009-09-291-0/+15
|
* The get_tm function was duplicated. Move single version to timer.{h,cpp}lloyd2009-09-171-17/+27
|
* Remove some debug code from benchmark examplelloyd2009-09-151-6/+0
|
* Add an implementation of Blue Midnight Wish (512 bit version only)lloyd2009-09-151-23/+20
|
* Add example of the package transformlloyd2009-09-101-0/+61
|
* Add a new interface CryptoBox which provides basic password-based encryptionlloyd2009-08-131-0/+50
| | | | | | | | | | in a reasonable way. Low on features, which is rather intentional. There is a version code included in the format so further extensions are possible, if warranted. Inspired by the n-th mailing list request for such a class. Realized it was probably better that I design such code than random people who just want 'something that works'.
* Add a couple of new exampleslloyd2009-08-042-0/+222
|
* Add LibraryInitializers to the examples, instead of relying on lazy init.lloyd2009-03-1739-10/+67
| | | | Patch from David X Callaway.
* Update examples for changed EntropySource and RandomNumberGenerator interfaceslloyd2009-01-312-11/+14
|
* Fix test_es for new Entropy_Accumulator interface. It XORs into a blocklloyd2009-01-271-21/+27
| | | | | of 64 bytes. Not ideal but at least gives a sense of what it is putting out.
* Check in a branch with a major redesign on how entropy polling is performed.lloyd2009-01-271-16/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Combine the fast and slow polls, into a single poll() operation. Instead of being given a buffer to write output into, the EntropySource is passed an Entropy_Accumulator. This handles the RLE encoding that xor_into_buf used to do. It also contains a cached I/O buffer so entropy sources do not individually need to allocate memory for that with each poll. When data is added to the accumulator, the source specifies an estimate of the number of bits of entropy per byte, as a double. This is tracked in the accumulator. Once the estimated entropy hits a target (set by the constructor), the accumulator's member function predicate polling_goal_achieved flips to true. This signals to the PRNG that it can stop performing polling on sources, also polls that take a long time periodically check this flag and return immediately. The Win32 and BeOS entropy sources have been updated, but blindly; testing is needed. The test_es example program has been modified: now it polls twice and outputs the XOR of the two collected results. That helps show if the output is consistent across polls (not a good thing). I have noticed on the Unix entropy source, occasionally there are many 0x00 bytes in the output, which is not optimal. This also needs to be investigated. The RLE is not actually RLE anymore. It works well for non-random inputs (ASCII text, etc), but I noticed that when /dev/random output was fed into it, the output buffer would end up being RR01RR01RR01 where RR is a random byte and 00 is the byte count. The buffer sizing also needs to be examined carefully. It might be useful to choose a prime number for the size to XOR stuff into, to help ensure an even distribution of entropy across the entire buffer space. Or: feed it all into a hash function? This change should (perhaps with further modifications) help WRT the concerns Zack W raised about the RNG on the monotone-dev list.
* Add test_es, a program that polls each enabled entropy source (both fastlloyd2008-11-251-0/+101
| | | | and slow) and prints the data it gets back to the screen for inspection.
* Add an example taken from the tutoriallloyd2008-11-241-0/+55
|
* Switch benchmark example command line arg from ms to secondslloyd2008-11-221-2/+2
|
* Update examples for changed 1.8 APIs, including:lloyd2008-11-216-14/+28
| | | | | | | | | | | | | EAX mode taking a BlockCipher* instead of a name. PK_Signer taking an EMSA* instead of a name. generate_dsa_primes using an Algorithm_Factory Changes to how new algorithms are added (look_add.h is gone entirely, replaced by Algorithm_Factory calls) in xor_ciph. Also update for new stream cipher key schedule function name and new directory for base class decl.
* Fix examples makefilelloyd2008-11-211-7/+1
|
* Add an example of using the benchmark system to choose the fastest SHA-1lloyd2008-11-211-0/+90
| | | | implementation and then setting it as the default.
* Add an example of benchmark.hlloyd2008-11-211-0/+41
|
* Add example line for installed Botan, commented outlloyd2008-11-071-0/+3
|
* Make the examples Makefile a bit smarterlloyd2008-11-071-10/+8
|
* Fix the --with-build-dir option, so that it is actually possible to dolloyd2008-11-061-2/+2
| | | | | | | | | | | | out of tree builds. Also rename the generated botan-config script so that it is, like the pkg-config settings, namespaced by the major and minor version numbers (eg, botan-17-config). This is useful in particular for distros like Debian which ship both stable and unstable versions. Currently Debian is actually the only distro I know of shipping 1.7 as well as 1.6, but I would certainly like to encourage more in the future by making it easy to do.
* Move rng.{cpp,h} from core to rng/ topdirlloyd2008-10-2621-79/+63
| | | | | | | | | | | | | | Add a new class AutoSeeded_RNG that is a RandomNumberGenerator that wraps up the logic formerly in RandomNumberGenerator::make_rng. make_rng in fact now just returns a new AutoSeeded_RNG object. AutoSeeded_RNG is a bit more convenient because - No need to use auto_ptr - No need to dereference (same syntax everywhere - it's an underestimated advantage imo) Also move the code from timer/timer_base to timer/
* Add an example for using checksums (CRC, Adler32) and Pipe/Filter/Forklloyd2008-10-131-0/+31
|
* Move InSiTo's ECDSA tests into the main test suitelloyd2008-10-121-606/+0
|
* Remove unnecessary includeslloyd2008-10-111-10/+2
|
* Remove -Werror from example compile flagslloyd2008-10-111-1/+1
|
* Correct the expected signature name in test_decode_ecdsa_X509 - itlloyd2008-10-111-396/+393
| | | | | | | | | | | wanted ECC_TESTDATA/EMSA1_BSI(SHA-224), while Botan is providing ECDSA/EMSA1_BSI(SHA-224) which seems more useful anyway. Also reindent the code to match more or less the convention in the rest of the codebase. At this point all ECDSA tests are pasing. (That probably just means there aren't enough ECDSA tests)
* Move all ECDSA test data into ecc_testdatalloyd2008-10-111-20/+20
|
* Don't abort if a curve is not found in test_curve_registrylloyd2008-10-111-10/+18
|
* Catch and print exceptions in the CHECK macroslloyd2008-10-111-4/+4
|
* Generate and check ECDSA signature in examplelloyd2008-10-111-2/+29
|
* Print generated public key in ECDSA examplelloyd2008-10-111-0/+2
|
* Correct OID for ECDSA paramlloyd2008-10-111-1/+1
|
* Make GF(p) tests part of normal test suitelloyd2008-10-091-698/+0
|
* Remove BOOST_AUTO_TEST_CASE macrolloyd2008-10-091-23/+22
|
* Split GF(p) tests into passing and failing oneslloyd2008-10-081-7/+11
|
* Add a set of ECDSA tests from InSiTolloyd2008-10-081-0/+609
|
* Correct boost macro replacementlloyd2008-10-081-3/+6
|
* Add GF(p) math test suite from InSiTolloyd2008-10-081-0/+692
|
* Update examples for recent API changeslloyd2008-10-0810-21/+46
|
* Fix includelloyd2008-10-081-1/+1
|
* Line wraplloyd2008-10-013-5/+11
|
* Merge examples makefile with mainline versionlloyd2008-09-301-1/+1
|