aboutsummaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Move all modules into src/ directorylloyd2008-09-28367-0/+31011
|
* Create an x509 module containing all of the X509 certificate and CAlloyd2008-09-2812-3050/+0
| | | | code as well as the code for handling PKCS #10 requests.
* Split def_ops into multiple files. Modularize DLIESlloyd2008-09-287-484/+423
|
* Modularize RNG implementationslloyd2008-09-286-575/+223
|
* Modularize CMAC and HMAClloyd2008-09-283-251/+13
|
* Modularize cipher modeslloyd2008-09-289-1092/+61
|
* Modularize KDFs, PBKDFs, and PRFslloyd2008-09-288-501/+54
|
* Modularize EME1 and PKCS #1 v1.5 EMElloyd2008-09-283-164/+12
|
* Modularize EMSAlloyd2008-09-287-538/+65
|
* Modularize CBC-MAClloyd2008-09-281-109/+0
|
* Modularize SSLv3 MAC and X9.19 MACs. Fix some feature macro inconsistencies.lloyd2008-09-283-183/+15
|
* Modularize hashes and checksumslloyd2008-09-2817-2855/+92
|
* Modularize all cipherslloyd2008-09-2842-7863/+186
|
* Modularize the Adler32 checksum in checksums/adler32lloyd2008-09-283-36/+42
| | | | | | | | | Add a new option --disable-modules which allows for disabling any set of modules that normally would be autoloaded. Rename the Botan feature test macros from BOTAN_EXT_BLAH to BOTAN_HAS_BLAH, which will be much more sensible especially when everything is done in this fashion (eg, BOTAN_HAS_BLOWFISH or BOTAN_HAS_RSA, etc)
* Rename header guards in modules from BOTAN_EXT_ to BOTAN_ for consistencylloyd2008-09-281-72/+0
|
* Add back from Ajisai 0.5.0 the implementations of the SSLv3 MAC and PRFlloyd2008-09-275-0/+234
| | | | | | | | | | | and the TLS v1.0 PRF. These were removed from Botan in v1.4.5. Initially I had felt that since these protocols were specific to SSL/TLS they should be placed in Ajisai (an SSL/TLS library based on Botan). However upon further reflection I have realized it is quite possible that other alternate implementations of SSL/TLS based on Botan would be quite desirable, and so to make that (a very slightly bit) easier I am adding back the SSL/TLS functions to Botan, so other SSL/TLS libs can use them directly.
* Expose CMAC::poly_double as a static function since it looks like I maylloyd2008-09-241-11/+10
| | | | | | | | | want to inline the CMAC computation in EAX mode. Also optimize CMAC::final_result slightly. Only write to state directly, instead of also the write buffer (this should help L1 data caching), and avoid what was basically a no-op where we zeroized part of a buffer and then xored it against another buffer.
* Split EAX decryption into its own filelloyd2008-09-242-113/+127
|
* Replace the set of prime products with a new set generated by a Pythonlloyd2008-09-181-64/+65
| | | | script. It includes all primes <= 11351
* Move biging_wordmul inlined into the only place where it is used,lloyd2008-09-171-27/+0
| | | | | | the mp_asm64 module. It is called only on systems like UltraSPARC which have 64 bit registers/ALU but no native 64x64->128 bit multiplication operation.
* Add an optimization suggested by Yves Jerschow to combine the fourlloyd2008-09-172-11/+20
| | | | | | | | Blowfish Sboxes into one 1024 word array and index into them at offsets. On my x86-64 machine there is no real difference between the two, but on register constrained processor like x86 it may make a large difference, since the x86 has a much easier time indexing off a single address held in a register rather than 4 distinct ones.
* Change the constructor for LubyRackoff. Previously it took a string,lloyd2008-09-152-27/+33
| | | | | | | | | | | | | | | | | however now instead it takes a HashFunction pointer, which it deletes in its destructor. Why the change? For one, lookup.h, while seemingly a bunch of standalone functions, actually calls into a large mass of global state (in short, it is icky). I have a plan in mind for removing much of this while still providing a high level interface (actually hopefully better than now), here is just the start. Now, calling clone() on a LubyRackoff object will now return a new object with a clone() of the HashFunction. Previously we called get_hash on the name, which goes through the whole global lookup bit. This is also good since if you construct one with (say) an OpenSSL provided hash, clones of it will now also use that implementation.
* Remove the cache for BigInt::sig_words. I'm baffled how it is it workslloyd2008-09-151-16/+14
| | | | | | | on x86, x86-64, and m68k and not other platforms. Something about the memory model I'm hitting? Valgrind shows nothing. Rather than struggle with it further, for minimal gain, I'm reverting. If someone ever does figure it out, this will be easy to reapply.
* Update BigInt::grow_reg and grow_to to be non-constlloyd2008-09-151-2/+2
|
* Rename blocks to the slightly more descriptive x_size_8lloyd2008-09-141-6/+6
|
* Pass a pointer to a HashFunction to the MGF1 constructor, and have thatlloyd2008-09-142-7/+12
| | | | pointer used over and over again in MGF1::mask.
* The Memory_Exhaustion exception was only thrown from mem_pool.cpp, solloyd2008-09-141-0/+14
| | | | | move in there. Make it a subclass of std::bad_alloc instead of Botan::Exception (this may prove to be a design mistake).
* Enable square optimization for 16x16lloyd2008-09-131-2/+0
|
* Add IETF MODP 8192 DH grouplloyd2008-09-121-0/+47
|
* Fix loop variable naming (i in outermost scope, then j, remove unneeded k)lloyd2008-09-111-20/+20
|
* Add 16x16->32 word Comba multiply and squarelloyd2008-09-092-176/+716
|
* Hoist load, since compiler may not be able to do so due to aliasinglloyd2008-09-091-4/+7
|
* Add comment about bigint_simple_sqr just being an optimization to work ↵lloyd2008-09-091-1/+6
| | | | around lack of restricted pointers
* Use individual variables intead of an array inside the Salsa20 function,lloyd2008-09-091-37/+65
| | | | shows a 35% speedup on my Core2 with G++ vs previous version.
* Add implementation of Salsa20 stream cipherlloyd2008-09-092-0/+182
|
* In get_cipher, do not call cipher->set_iv unless the IV is non-emptylloyd2008-09-091-1/+4
|
* Reindentlloyd2008-09-071-172/+172
|
* Comment fixlloyd2008-09-071-1/+1
|
* Remove bigint_mul_add_words. It was only used now in two callers,lloyd2008-09-072-31/+38
| | | | | | | bigint_simple_mul and bigint_simple_sqr. Examining these functions made it clear inlining would be beneficial, so these two functions have been moved from an anonymous namespace into mp_mulop.cpp (to allow assembly versions).
* Inline BigInt::Rep::operator[], BigInt::sig_words, and BigInt::Rep::sig_wordslloyd2008-09-071-58/+0
|
* Inline BigInt::operator[]lloyd2008-09-071-16/+0
|
* Combine redundant definitions of blocks variablelloyd2008-09-071-7/+6
|
* Inline BigInt::is_zerolloyd2008-09-071-11/+1
|
* Inline similarly in karatsuba_mullloyd2008-09-071-11/+32
|
* In karatsuba_square, inline the sequencelloyd2008-09-071-3/+25
| | | | | | | | word carry = bigint_add3_nc(workspace+N, z0, N, z1, N); carry += bigint_add2_nc(z + N2, N, workspace + N, N); bigint_add2_nc(z + N + N2, N2, &carry, 1); It turns out quite a bit can be shared among these function calls
* Comment cleanuplloyd2008-09-071-4/+2
|
* Rewrite without gotoslloyd2008-09-071-135/+11
|
* Inline bigint_sub2 into bigint_monty_redclloyd2008-09-071-5/+20
|
* Inline bigint_cmp in bigint_monty_redc (using goto, the horror; I'm basicallylloyd2008-09-071-27/+10
| | | | | | | prototyping and testing the x86-64 assembly version in C) According to most profiles, bigint_monty_redc alone is responsible for 30%-50% of RSA, DSA, and DH benchmarks. So it seems worth tinkering with a bit.
* Move bigint_monty_redc to its own file to make asm implementations easierlloyd2008-09-072-29/+205
|