aboutsummaryrefslogtreecommitdiffstats
path: root/src/block
Commit message (Collapse)AuthorAgeFilesLines
* Avoid null pointer deref if key was not set in AESlloyd2013-04-121-0/+4
|
* Change the default PKCS #8 PBKDF runtime from 200 to 300 milliseconds.lloyd2013-04-041-1/+2
| | | | | | | Round PBKDF1 and PBKDF2 time-based iterations to multiples of 10000 instead of 8192. Update the password hashing docs a bit.
* Move the CAST sboxes to an internal header instead of a source filelloyd2013-02-117-430/+428
| | | | | with external linkage, or for ones specific to the 128 and 256 bit key schedules, put them into those function as statics.
* Add new helper zap which zeros a vector, clears it, and then callslloyd2012-11-2948-66/+194
| | | | shrink_to_fit to actually deallocate memory.
* Doxygenlloyd2012-10-301-1/+1
|
* Use unaligned loads in AES-NI 192 key schedulelloyd2012-10-131-18/+26
|
* Compile fix for std::vectorlloyd2012-10-091-1/+1
|
* Add deleted copy constructors/assignment operators where appropriate.lloyd2012-07-102-0/+6
| | | | | Replace C++98 style private copy constructors/assignment ops with ones annotated with delete.
* Truncate passwords to 55 characters instead of throwing an exception.lloyd2012-06-131-2/+2
| | | | This matches the behavior of other bcrypt implementations.
* Fixes for the change to using std::vector in x86-32 specific codelloyd2012-06-122-5/+9
| | | | | | | (relying on implicit pointer conversions). Also, change Serpent::set_round_keys (used by the x86-32 asm version) to assign() the values instead of copying, as we rely on the key schedule to allocate the key values now to minimize memory waste.
* For block and stream ciphers, don't set the size of the key vectorslloyd2012-05-2548-159/+159
| | | | | | | | | | | until we are actually setting a key. This avoids the problem of prototype objects consuming not just memory but the precious few bytes of mlock'able memory that we're given by Linux. Use clear_mem instead of a loop in BigInt::mask_bits If OS2ECP encounters an invalid format type, include what type it was in the exception message.
* Replace 0 and NULL pointer constants with nullptr. Also fix an oldlloyd2012-05-181-1/+1
| | | | style cast in secmem.h
* Fairly huge update that replaces the old secmem types with std::vectorlloyd2012-05-1850-91/+135
| | | | | | using a custom allocator. Currently our allocator just does new/delete with a memset before deletion, and the mmap and mlock allocators have been removed.
* propagate from branch 'net.randombit.botan' (head ↵lloyd2012-05-183-92/+669
|\ | | | | | | | | | | 6332543aa5a8a4cc13662008ff9ac0f0016d9a4d) to branch 'net.randombit.botan.cxx11' (head 5517c9f8f6d1990f269afb94f569a97a80c5a5f4)
| * For all but the first and last rounds, use a set of 64 bit tables tolloyd2012-04-273-92/+669
| | | | | | | | implement Camellia's F function. Roughtly 60 - 80% speedup on Nehalem.
* | Remove all uses of MemoryRegion::copy outside of internal uses inlloyd2012-05-185-8/+12
| | | | | | | | secmem.h. Mostly replaced by assign or copy_mem.
* | propagate from branch 'net.randombit.botan.tls-state-machine' (head ↵lloyd2012-04-252-95/+175
|\| | | | | | | | | | | a4741cd07f50a9e1b29b0dd97c6fb8697c038ade) to branch 'net.randombit.botan.cxx11' (head 116e5ff139c07000be431e07d3472cc8f3919b91)
| * Patrick Pelletier noted on the mailing list that the implementation oflloyd2012-04-242-97/+173
| | | | | | | | | | | | | | | | | | Camellia exposed by the OpenSSL module is parameterized by the key length, much as AES is, while the version in the main source uses a single name/type for all variants. For consistency, convert to using a key length parameterized name in our version as well. In the future this might allow for better loop unrolling, etc but currently we don't make use of that.
| * Avoid a few maintainer mode flag warnings. Remove -Weffc++ from thelloyd2012-04-201-0/+4
| | | | | | | | | | list of maintainer mode flags. It produces some very useful warnings, but also a lot of noisy junk that I really don't care about.
* | propagate from branch 'net.randombit.botan' (head ↵lloyd2012-02-202-158/+113
|\| | | | | | | | | | | c247a55e7c0bcd239fcfc672139b59ef63d7ee84) to branch 'net.randombit.botan.cxx11' (head 16d7756c6b8933d0d543ebdda9c7e8f4908a4a33)
| * Pointer writing seems cleanerlloyd2012-01-302-102/+102
| |
| * Partially de-unroll the loop to make changes easierlloyd2012-01-301-86/+41
| |
* | propagate from branch 'net.randombit.botan.tls-state-machine' (head ↵lloyd2012-02-204-5/+5
|\ \ | |/ |/| | | | | | | 0ceb9cde62a2b3614901ae85a53546d9fc641326) to branch 'net.randombit.botan.cxx11' (head 777e65950ef3706a82e5df20dcca7fcc999ca533)
| * propagate from branch 'net.randombit.botan' (head ↵lloyd2011-07-124-5/+5
| |\ | | | | | | | | | | | | | | | 23a326fa36a31dd39347a8864e1f5740669a905e) to branch 'net.randombit.botan.cxx11' (head 9d3ac8dd45f7673c85dca41968e7750acc90bdff)
| | * propagate from branch 'net.randombit.botan' (head ↵lloyd2011-06-134-5/+5
| | |\ | | | | | | | | | | | | | | | | | | | | 150bd11dd8090559ee1e83394b8283bf93a018de) to branch 'net.randombit.botan.c++0x' (head 7480693bb3f1e8a4e039a3e7ba3d9a7007f9730e)
| | | * propagate from branch 'net.randombit.botan' (head ↵lloyd2011-03-084-14/+76
| | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | dd068808e5bf87c982765a8bcc314996053a5bdd) to branch 'net.randombit.botan.c++0x' (head 34696d52a8148d64f7021b3e193fc56f051b9dd2)
| | | * \ propagate from branch 'net.randombit.botan' (head ↵lloyd2011-02-114-5/+5
| | | |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 13a0d36dac3709f3cb88e830ed7f8cab9e7433ab) to branch 'net.randombit.botan.c++0x' (head 2221ad8796466e7e096645de77ba856a9c902d14)
| | | | * \ propagate from branch 'net.randombit.botan' (head ↵lloyd2010-11-294-127/+114
| | | | |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fc8daa606ab7954eab48778d7236986747b719e4) to branch 'net.randombit.botan.c++0x' (head 2bf71b0a2e0e468d7eb3631e4ca284234f554729)
| | | | * \ \ propagate from branch 'net.randombit.botan' (head ↵lloyd2010-11-044-5/+5
| | | | |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 303b2518a80553214b1e5ab4d9b96ef54629cbc7) to branch 'net.randombit.botan.c++0x' (head d734eefabe4816be4dd3e3e6e7bb13b7ab5be148)
| | | | | * \ \ propagate from branch 'net.randombit.botan' (head ↵lloyd2010-10-2831-153/+193
| | | | | |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2841fb518e20d2fe0a374e4f6b08bdbb14d5d158) to branch 'net.randombit.botan.c++0x' (head 0b9275139d6346bd3aa28d63bf8b8a03851d853d)
| | | | | * \ \ \ propagate from branch 'net.randombit.botan' (head ↵lloyd2010-10-1310-108/+112
| | | | | |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | cba32f885eb7889a9711cbee120df42839deb9d0) to branch 'net.randombit.botan.c++0x' (head 7cb9cdfda0f3dedab24f1d3bc7e7ea9b22164234)
| | | | | * \ \ \ \ propagate from branch 'net.randombit.botan' (head ↵lloyd2010-10-1357-203/+232
| | | | | |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 6581b789d58717bc6acee5c6a248e2d44c636e40) to branch 'net.randombit.botan.c++0x' (head 227a989ae94da8f4379ea4b9b0fc0ee8dbdde0c7)
| | | | | * \ \ \ \ \ propagate from branch 'net.randombit.botan' (head ↵lloyd2010-10-134-4/+4
| | | | | |\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2898d79f992f27a328a3e41d34b46eb1052da0de) to branch 'net.randombit.botan.c++0x' (head 6cba76268fd69a73195760c021b7f881b8a6552c)
| | | | | | * \ \ \ \ \ propagate from branch 'net.randombit.botan' (head ↵lloyd2010-09-034-4/+4
| | | | | | |\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | a29c41b4a949207b1544096c3afab668f8b5179e) to branch 'net.randombit.botan.c++0x' (head a9d0c2f805b3c20a4c648575d7256959db8329fe)
| | | | | | | * \ \ \ \ \ propagate from branch 'net.randombit.botan' (head ↵lloyd2010-08-134-4/+4
| | | | | | | |\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 0a3348f52bf558bc2282e1066c2913a72a1aeda5) to branch 'net.randombit.botan.c++0x' (head 552c20ae8874f12da779fc25ea368e36e71cbfe8)
| | | | | | | | * \ \ \ \ \ propagate from branch 'net.randombit.botan' (head ↵lloyd2010-07-094-4/+4
| | | | | | | | |\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 161b5c0300b72baa746f101fda1e2b4a7c71818c) to branch 'net.randombit.botan.c++0x' (head 1fc3875bb8daf4ad0e90ba66db72642203cb9984)
| | | | | | | | | * \ \ \ \ \ propagate from branch 'net.randombit.botan' (head ↵lloyd2010-06-229-19/+84
| | | | | | | | | |\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 647eeb4f4cf8fa4cf487cdc463d48f09fe18658e) to branch 'net.randombit.botan.c++0x' (head 2539675db91883b11895ddc5244721e93c413321)
| | | | | | | | | * \ \ \ \ \ \ propagate from branch 'net.randombit.botan' (head ↵lloyd2010-06-1736-95/+175
| | | | | | | | | |\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 294e2082ce9231d6165276e2f2a4153a0116aca3) to branch 'net.randombit.botan.c++0x' (head 0b695fad10f924601e07b009fcd781191fafcb28)
| | | | | | | | | * \ \ \ \ \ \ \ propagate from branch 'net.randombit.botan' (head ↵lloyd2010-05-194-4/+4
| | | | | | | | | |\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 66b216669d7ac91303378281d760236153955ae4) to branch 'net.randombit.botan.c++0x' (head b911a76971563afcde85935a44a43248a3f5b4a6)
| | | | | | | | | | * \ \ \ \ \ \ \ propagate from branch 'net.randombit.botan' (head ↵lloyd2010-04-0938-51/+51
| | | | | | | | | | |\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 75d272c759511a9a99a371ddc74bd17b2c1453b6) to branch 'net.randombit.botan.c++0x' (head 2ce9ba37cb9287a3d875921240d6682100625b9f)
| | | | | | | | | | * \ \ \ \ \ \ \ \ propagate from branch 'net.randombit.botan' (head ↵lloyd2010-02-254-4/+4
| | | | | | | | | | |\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | c1db52e38b60afbc6549af5222d6e10b1b9730dd) to branch 'net.randombit.botan.c++0x' (head e56dfbfe6bffbd5b4e52b115549d885c5fd04586)
| | | | | | | | | | | * \ \ \ \ \ \ \ \ propagate from branch 'net.randombit.botan' (head ↵lloyd2010-01-214-4/+4
| | | | | | | | | | | |\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 12382647ef0a28fcb11c824c77b670cc88a4f721) to branch 'net.randombit.botan.c++0x' (head b586a3286d2c4d547ad3add5af9df1455bf4b87b)
| | | | | | | | | | | | * \ \ \ \ \ \ \ \ propagate from branch 'net.randombit.botan' (head ↵lloyd2009-12-245-53/+290
| | | | | | | | | | | | |\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 367d157c1221a162f5b4098492944a509ef6d019) to branch 'net.randombit.botan.c++0x' (head 1b9e8c4e92663f30b7d57b0fd8f57eb13cfce155)
| | | | | | | | | | | | * \ \ \ \ \ \ \ \ \ propagate from branch 'net.randombit.botan' (head ↵lloyd2009-12-214-4/+4
| | | | | | | | | | | | |\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 14c1d4dc8696d2705a70ec3d2403e01d2ca95265) to branch 'net.randombit.botan.c++0x' (head c567fa7310ba082a837562092728c4b4b882bf82)
| | | | | | | | | | | | | * \ \ \ \ \ \ \ \ \ propagate from branch 'net.randombit.botan' (head ↵lloyd2009-12-164-4/+4
| | | | | | | | | | | | | |\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 22c82e10d78ad0e2cdaa56cb02f3d846ed0ead5e) to branch 'net.randombit.botan.c++0x' (head 74dbf310b7fcc11f94a16cd63046219acd5d62bc)
| | | | | | | | | | | | | | * \ \ \ \ \ \ \ \ \ propagate from branch 'net.randombit.botan' (head ↵lloyd2009-12-1632-52/+65
| | | | | | | | | | | | | | |\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 744dccf92270cf16b80b50ee2759424c9866b256) to branch 'net.randombit.botan.c++0x' (head 2aa1acac1d05e8ea9991fe39015b1db9abc3b24e)
| | | | | | | | | | | | | | * \ \ \ \ \ \ \ \ \ \ propagate from branch 'net.randombit.botan' (head ↵lloyd2009-12-084-4/+4
| | | | | | | | | | | | | | |\ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 142a9359ba02d5dfcf3f2c9f99902f82ab41724e) to branch 'net.randombit.botan.c++0x' (head 390a9abce0eb6ee24eeb3cd243b6dcaaa8944ad0)
| | | | | | | | | | | | | | | * | | | | | | | | | | Remove to_string, replacing with std::to_stringlloyd2009-11-184-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Convert to_u32bit to use the new C++0x library func stoul instead of hand-written code.
* | | | | | | | | | | | | | | | | | | | | | | | | | Add a slow but functional implementation of Camellialloyd2012-01-283-0/+392
|/ / / / / / / / / / / / / / / / / / / / / / / / /
* / / / / / / / / / / / / / / / / / / / / / / / / The Algorithm_Factory has this logic on looking for an object:lloyd2011-07-052-4/+23
|/ / / / / / / / / / / / / / / / / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Check the cache; if found, return value - Populate cache, if the value is already there, delete the old object and save the new one. - Recheck the cache value Raja <[email protected]> pointed out on the list that this could race if multiple threads called a lookup function in close succession while the cache was cold. All of them would fail the lookup, then each of them would add it, but the values returned would be deleted by other threads. Instead, declare that first write wins. Then, the cache stays consistent even if there is a race, the only issue is an extra search and delete. Modify GOST and Skein, as their name() function did not roundtrip properly which caused failures otherwise.