aboutsummaryrefslogtreecommitdiffstats
path: root/doc/examples
Commit message (Collapse)AuthorAgeFilesLines
* Fix some examples for changed APIs in C++0x branchlloyd2009-11-176-11/+7
|
* propagate from branch 'net.randombit.botan' (head ↵lloyd2009-11-172-78/+89
|\ | | | | | | | | | | cfb19182987fc95b2a8885584a38edb10b4709b3) to branch 'net.randombit.botan.c++0x' (head 1570877c463fed4b632bc49a5b5ee27c57de2cb5)
| * Get the old GTK+ example to build, though the pulse UI logic is no longerlloyd2009-11-172-78/+89
| | | | | | | | included. Threads are a smarter approach, in retrospect.
* | propagate from branch 'net.randombit.botan' (head ↵lloyd2009-11-136-15/+161
|\| | | | | | | | | | | ac888e57b614c623590d79ab615353ad7c76ef68) to branch 'net.randombit.botan.c++0x' (head 9bf78ed7e2521a328f6db7acbc1cd81b07718230)
| * Extend FPE example to encrypt credit card numbers with valid Luhn checksumslloyd2009-11-131-8/+120
| | | | | | | | onto other CCNs with valid checksums.
| * propagate from branch 'net.randombit.botan' (head ↵lloyd2009-11-131-0/+22
| |\ | | | | | | | | | | | | | | | 586495311cff277e7a24b4116c987b79036d94e6) to branch 'net.randombit.botan.fpe' (head c6e8324b12e509ac1303078d5e716f08c53acff5)
| | * Add format preserving encryption, design is FE1/FD1 from the paperlloyd2009-11-051-0/+22
| | | | | | | | | | | | | | | | | | Format-Preserving Encryption (http://eprint.iacr.org/2009/251). This doesn't implement the rank functions which are necessary for the actual format-preserving part, though that would be nice to add to the example.
| * | 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.
* | propagate from branch 'net.randombit.botan' (head ↵lloyd2009-11-021-25/+15
|\ \ | |/ |/| | | | | | | 2773c2310e8c0a51975987a2dd6c5824c8d43882) to branch 'net.randombit.botan.c++0x' (head f13cf5d7e89706c882604299b508f356c20aae3a)
| * propagate from branch 'net.randombit.botan' (head ↵lloyd2009-10-131-25/+15
| |\ | | | | | | | | | | | | | | | 139d6957d20f0b1202e0eacc63cb011588faffde) to branch 'net.randombit.botan.c++0x' (head c16676fa6c393bc3f46a044755ce525a013380a6)
| | * propagate from branch 'net.randombit.botan' (head ↵lloyd2009-09-301-25/+15
| | |\ | | | | | | | | | | | | | | | | | | | | 8a5eb02c2e451fc983f234f7ba2f023f5a7d294f) to branch 'net.randombit.botan.c++0x' (head e18cd411269e15638df3298d6a4165446e7ca529)
| | | * propagate from branch 'net.randombit.botan' (head ↵lloyd2009-09-171-1/+2
| | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | b9ca6596a127964cb9795d22bc2a5642fab5de84) to branch 'net.randombit.botan.c++0x' (head 3c769a81bd357a14f8aca4502b67e8465cee0947)
| | | * | Use <chrono> in the runtime benchmarking code instead of the locallloyd2009-09-161-2/+1
| | | | | | | | | | | | | | | | | | | | timers.
* | | | | 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
|