Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Use individual variables intead of an array inside the Salsa20 function, | lloyd | 2008-09-09 | 1 | -37/+65 |
| | | | | shows a 35% speedup on my Core2 with G++ vs previous version. | ||||
* | Add implementation of Salsa20 stream cipher | lloyd | 2008-09-09 | 2 | -0/+182 |
| | |||||
* | In get_cipher, do not call cipher->set_iv unless the IV is non-empty | lloyd | 2008-09-09 | 1 | -1/+4 |
| | |||||
* | Reindent | lloyd | 2008-09-07 | 1 | -172/+172 |
| | |||||
* | Comment fix | lloyd | 2008-09-07 | 1 | -1/+1 |
| | |||||
* | Remove bigint_mul_add_words. It was only used now in two callers, | lloyd | 2008-09-07 | 2 | -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_words | lloyd | 2008-09-07 | 1 | -58/+0 |
| | |||||
* | Inline BigInt::operator[] | lloyd | 2008-09-07 | 1 | -16/+0 |
| | |||||
* | Combine redundant definitions of blocks variable | lloyd | 2008-09-07 | 1 | -7/+6 |
| | |||||
* | Inline BigInt::is_zero | lloyd | 2008-09-07 | 1 | -11/+1 |
| | |||||
* | Inline similarly in karatsuba_mul | lloyd | 2008-09-07 | 1 | -11/+32 |
| | |||||
* | In karatsuba_square, inline the sequence | lloyd | 2008-09-07 | 1 | -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 cleanup | lloyd | 2008-09-07 | 1 | -4/+2 |
| | |||||
* | Rewrite without gotos | lloyd | 2008-09-07 | 1 | -135/+11 |
| | |||||
* | Inline bigint_sub2 into bigint_monty_redc | lloyd | 2008-09-07 | 1 | -5/+20 |
| | |||||
* | Inline bigint_cmp in bigint_monty_redc (using goto, the horror; I'm basically | lloyd | 2008-09-07 | 1 | -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 easier | lloyd | 2008-09-07 | 2 | -29/+205 |
| | |||||
* | Use i instead of j for iterator var | lloyd | 2008-09-07 | 1 | -4/+4 |
| | |||||
* | Remove iostream include | lloyd | 2008-09-05 | 1 | -2/+0 |
| | |||||
* | Optimize right shift a little | lloyd | 2008-09-05 | 1 | -14/+38 |
| | |||||
* | Replace __builtin_ctzl with a new ctz function in bit_ops.h | lloyd | 2008-09-05 | 1 | -1/+1 |
| | |||||
* | Wrap the BigInt register in a small class that caches the significant | lloyd | 2008-09-05 | 2 | -38/+81 |
| | | | | | words. BigInt::sig_words() was showing up very hot on valgrind runs, this seems to reduce the usage substantially. | ||||
* | Revert change to dl_work_factor for now - breaks ElGamal tests | lloyd | 2008-09-05 | 1 | -0/+14 |
| | |||||
* | Rewrite dl_work_factor using a lookup table with data from RFC 3526, | lloyd | 2008-09-05 | 1 | -16/+18 |
| | | | | | | | | | | | | "More Modular Exponential (MODP) Diffie-Hellman groups for Internet Key Exchange (IKE)", which removes Botan's dependency on standard math library (which can be a big deal on embedded systems, and it seemed silly to have just a single function cause us to pull in potentially all of libm) Also this makes the values Botan will pick for exponent sizes more obvious; previously one would have to run through the computation or call the function and observe the output. | ||||
* | Add the IKE 6144-bit MODP group, from RFC 3526 | lloyd | 2008-09-05 | 1 | -0/+37 |
| | |||||
* | Define the functions from bit_ops.h as inline template functions, instead | lloyd | 2008-09-05 | 1 | -68/+0 |
| | | | | of always converting to u64bit and passing to a non-inlined function. | ||||
* | A possible optimization to low_zero_bits (which was showing up hot in | lloyd | 2008-09-02 | 1 | -6/+22 |
| | | | | | some DSA/NR benchmarks). Requires GCC/ICC for __builtin_ctzl, though that will change shortly. | ||||
* | Where bit_ops.h was used to get xor_buf, include xor_buf.h instead | lloyd | 2008-09-02 | 26 | -25/+25 |
| | |||||
* | Reduce RW creation min also to 512 for benchmarks | lloyd | 2008-09-02 | 1 | -1/+1 |
| | |||||
* | The counter is not specified, so do not mention it | lloyd | 2008-08-31 | 1 | -1/+1 |
| | |||||
* | Add DSS groups with 2048 and 3072 bit p values (and 256 bit q subgroups). | lloyd | 2008-08-31 | 1 | -105/+141 |
| | | | | | | These were generated using the FIPS 186-3 PRNG, with seed values generating by applying SHA-256 to the UTF-8 encodings of the strings "Botan 2048 DSS seed #51" and "Botan 3072 DSS seed #24" | ||||
* | Allow generating 512 and 768 bit DSA keys. | lloyd | 2008-08-31 | 1 | -6/+9 |
| | |||||
* | Allow creating 512 bit RSA keys again (for benchmark, mostly) | lloyd | 2008-08-31 | 1 | -1/+1 |
| | |||||
* | Merge mp_sqr.cpp and mp_mul.cpp into mp_karat.cpp, since there is a lot | lloyd | 2008-08-27 | 2 | -147/+132 |
| | | | | | | of similar-but-not-identical code between them. (Can't merge for performance reasons, squaring is a special case of multiplication allowing extra optimizations) | ||||
* | Use -BigInt(1) instead of BigInt("-1") to avoid the parsing overhead. | lloyd | 2008-08-27 | 1 | -2/+2 |
| | | | | | Instead just call the u64bit constructor and invert using the BigInt operator. | ||||
* | Add a specialized version of theta() for NullVector, since it cleans up | lloyd | 2008-07-15 | 1 | -4/+25 |
| | | | | the key schedule, and perhaps offers slightly better code generation. | ||||
* | merge of '17a621a99c0fb8685efd5f3f3411a44e4d5ff835' | lloyd | 2008-07-13 | 1 | -0/+1 |
|\ | | | | | | | and 'df7d36d4e4fe81092c682b0ef92ac3a9ef12cbd3' | ||||
| * | Missing include of timers.h, error if no timer modules used | lloyd | 2008-07-08 | 1 | -0/+1 |
| | | |||||
* | | Add the block cipher Noekeon (http://gro.noekeon.org/). Only "indirect mode" | lloyd | 2008-07-11 | 2 | -0/+177 |
|/ | | | | keying is supported (see section 2.3 of the specification for details) | ||||
* | Fix return values for ressol(), saying BigInt x = -1 does something | lloyd | 2008-07-07 | 1 | -2/+2 |
| | | | | unexpected (see ticket #23, http://bugs.randombit.net/show_bug.cgi?id=23) | ||||
* | Remove unneeded parens | lloyd | 2008-07-07 | 1 | -1/+1 |
| | |||||
* | Add an implementation of the Shanks-Tonelli algorithm, which is used to | lloyd | 2008-07-07 | 1 | -0/+82 |
| | | | | find square roots modulo a prime. Contributed by FlexSecure GmbH | ||||
* | Remove printf in catch block | lloyd | 2008-07-07 | 1 | -1/+0 |
| | |||||
* | Extend random_prime() to be able to generate primes of any bit size. | lloyd | 2008-07-05 | 1 | -1/+10 |
| | | | | | | | | | | | bits <= 1 -> error bits == 2 -> choose 2 or 3 at random bits == 3 -> choose 5 or 7 at random bits == 4 -> choose 11 or 13 at random bits >= 5 -> procedure used previously. Tested by running random_prime() with random bit sizes <= 16 until it had generated all <= 16 bit primes. | ||||
* | Remove the free-standing function deref_alias. It only served as a forwarder | lloyd | 2008-06-30 | 7 | -33/+32 |
| | | | | | | for the implementation in Library_State. Instead explicitly call deref_alias on global_state() wherever the old freestanding version was used. This serves to make (more) uses of the global state explicit rather than implicit. | ||||
* | Remove the default_pbe option. Instead hardcode the default into | lloyd | 2008-06-30 | 2 | -5/+2 |
| | | | | | | | PKCS8::encrypt_key - this is slightly less flexible, but removes the dependency on the Library_State object. And if someone wants to use a different algorithm, they just have to pass in an actual value for the pbe string instead of letting it default to the empty string. | ||||
* | Remove option v1_assume_ca, no longer used | lloyd | 2008-06-30 | 1 | -2/+0 |
| | |||||
* | Previously X509_Store took two configuration values from the library | lloyd | 2008-06-30 | 2 | -9/+3 |
| | | | | | | | | | config state: how long successful validations should be cached, and the amount of slack to allow on time boundary checks. Now these are passed as arguments to the constructor, as a pair of 32-bit integers representing the number of seconds to allow as slack and the number of seconds to cache validations for. They default to the same compiled in defaults as before, 24 hours (86400 seconds) and 30 minutes (1800 seconds), respectively. | ||||
* | Remove the Config class. | lloyd | 2008-06-30 | 11 | -166/+104 |
| | | | | | | | | In reality, Config was a singleton, with the only owner being the Library_State object. Theoretically one could create and use another Config instance, but in practice it was never done. Reflect the reality and inline the members and public functions of Config in Library_State, removing Config entirely. | ||||
* | Remove global_config() - replace by direct calls to global_state() | lloyd | 2008-06-30 | 12 | -41/+47 |
| |