aboutsummaryrefslogtreecommitdiffstats
path: root/src/engine
Commit message (Collapse)AuthorAgeFilesLines
* propagate from branch 'net.randombit.botan' (head ↵lloyd2010-11-042-2/+2
|\ | | | | | | | | | | 303b2518a80553214b1e5ab4d9b96ef54629cbc7) to branch 'net.randombit.botan.c++0x' (head d734eefabe4816be4dd3e3e6e7bb13b7ab5be148)
| * propagate from branch 'net.randombit.botan' (head ↵lloyd2010-10-281-2/+0
| |\ | | | | | | | | | | | | | | | 2841fb518e20d2fe0a374e4f6b08bdbb14d5d158) to branch 'net.randombit.botan.c++0x' (head 0b9275139d6346bd3aa28d63bf8b8a03851d853d)
| * \ propagate from branch 'net.randombit.botan' (head ↵lloyd2010-10-138-18/+18
| |\ \ | | | | | | | | | | | | | | | | | | | | cba32f885eb7889a9711cbee120df42839deb9d0) to branch 'net.randombit.botan.c++0x' (head 7cb9cdfda0f3dedab24f1d3bc7e7ea9b22164234)
| * \ \ propagate from branch 'net.randombit.botan' (head ↵lloyd2010-10-132-2/+2
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | 0b2a6834cd19e431afc91bd062b0b455d6d035ac) to branch 'net.randombit.botan.c++0x' (head fbb6dc287edf127cc84fc29f9d8477769d5cfd7f)
| | * | | Post-merge fixupslloyd2010-10-131-1/+1
| | | | |
| | * | | propagate from branch 'net.randombit.botan' (head ↵lloyd2010-10-131-1/+1
| | |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2898d79f992f27a328a3e41d34b46eb1052da0de) to branch 'net.randombit.botan.c++0x' (head 6cba76268fd69a73195760c021b7f881b8a6552c)
| | | * \ \ propagate from branch 'net.randombit.botan' (head ↵lloyd2010-08-131-1/+1
| | | |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 0a3348f52bf558bc2282e1066c2913a72a1aeda5) to branch 'net.randombit.botan.c++0x' (head 552c20ae8874f12da779fc25ea368e36e71cbfe8)
| | | | * \ \ propagate from branch 'net.randombit.botan' (head ↵lloyd2010-08-041-1/+1
| | | | |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 717a9d103aa80e6d66c04e3a23cf173aadf56ceb) to branch 'net.randombit.botan.c++0x' (head c9759e8ebc2f360696a11f2d00fc218d7a8bf744)
| | | | | * \ \ propagate from branch 'net.randombit.botan' (head ↵lloyd2010-07-091-1/+1
| | | | | |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 161b5c0300b72baa746f101fda1e2b4a7c71818c) to branch 'net.randombit.botan.c++0x' (head 1fc3875bb8daf4ad0e90ba66db72642203cb9984)
| | | | | | * \ \ propagate from branch 'net.randombit.botan' (head ↵lloyd2010-06-221-0/+7
| | | | | | |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 647eeb4f4cf8fa4cf487cdc463d48f09fe18658e) to branch 'net.randombit.botan.c++0x' (head 2539675db91883b11895ddc5244721e93c413321)
| | | | | | * \ \ \ propagate from branch 'net.randombit.botan' (head ↵lloyd2010-06-1715-80/+219
| | | | | | |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 294e2082ce9231d6165276e2f2a4153a0116aca3) to branch 'net.randombit.botan.c++0x' (head 0b695fad10f924601e07b009fcd781191fafcb28)
| | | | | | * \ \ \ \ propagate from branch 'net.randombit.botan' (head ↵lloyd2010-04-281-0/+15
| | | | | | |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | a5f25a3b954f24c5d07fa0dab6c4d76f63767165) to branch 'net.randombit.botan.c++0x' (head a365694b70b4b84ca713272d56d496acca351cb5)
| | | | | | * \ \ \ \ \ propagate from branch 'net.randombit.botan' (head ↵lloyd2010-03-211-1/+1
| | | | | | |\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 96d0a1885774b624812fd143d541c8bcda319217) to branch 'net.randombit.botan.c++0x' (head e14368ab9d7976f3e111c6bc0adf24eebeb7c114)
| | | | | | | * \ \ \ \ \ propagate from branch 'net.randombit.botan' (head ↵lloyd2010-03-131-3/+3
| | | | | | | |\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | aabb4c3bc2207ceac1920573293b95d138a185df) to branch 'net.randombit.botan.c++0x' (head 179172dd6952f15f832855f4ec0ac48cb1e08188)
| | | | | | | * \ \ \ \ \ \ propagate from branch 'net.randombit.botan' (head ↵lloyd2010-03-091-1/+1
| | | | | | | |\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 9932d4d63417f7fcc199ada244cbaa6c1c32d9c1) to branch 'net.randombit.botan.c++0x' (head f4a385a376311edc62ef506c72cc56f69e6efd5a)
| | | | | | | | * \ \ \ \ \ \ propagate from branch 'net.randombit.botan' (head ↵lloyd2010-03-023-68/+0
| | | | | | | | |\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fc86fc4842254088bf820ea6ebf05877aa63fb22) to branch 'net.randombit.botan.c++0x' (head 77565ff7252df7f8faad86d65075498b0adb93d8)
| | | | | | | | * \ \ \ \ \ \ \ propagate from branch 'net.randombit.botan' (head ↵lloyd2010-01-222-12/+17
| | | | | | | | |\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | e088ea1566600cf598bcdc6840fcbbc662ab7393) to branch 'net.randombit.botan.c++0x' (head 47ff08dfd9a19fad36bf4aa7fa10854fd9071e0a)
| | | | | | | | * \ \ \ \ \ \ \ \ propagate from branch 'net.randombit.botan' (head ↵lloyd2010-01-211-1/+1
| | | | | | | | |\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 12382647ef0a28fcb11c824c77b670cc88a4f721) to branch 'net.randombit.botan.c++0x' (head b586a3286d2c4d547ad3add5af9df1455bf4b87b)
| | | | | | | | | * \ \ \ \ \ \ \ \ propagate from branch 'net.randombit.botan' (head ↵lloyd2009-12-241-4/+10
| | | | | | | | | |\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 367d157c1221a162f5b4098492944a509ef6d019) to branch 'net.randombit.botan.c++0x' (head 1b9e8c4e92663f30b7d57b0fd8f57eb13cfce155)
| | | | | | | | | * \ \ \ \ \ \ \ \ \ propagate from branch 'net.randombit.botan' (head ↵lloyd2009-12-161-1/+1
| | | | | | | | | |\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 22c82e10d78ad0e2cdaa56cb02f3d846ed0ead5e) to branch 'net.randombit.botan.c++0x' (head 74dbf310b7fcc11f94a16cd63046219acd5d62bc)
| | | | | | | | | | * \ \ \ \ \ \ \ \ \ propagate from branch 'net.randombit.botan' (head ↵lloyd2009-12-167-26/+27
| | | | | | | | | | |\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 744dccf92270cf16b80b50ee2759424c9866b256) to branch 'net.randombit.botan.c++0x' (head 2aa1acac1d05e8ea9991fe39015b1db9abc3b24e)
| | | | | | | | | | * \ \ \ \ \ \ \ \ \ \ propagate from branch 'net.randombit.botan' (head ↵lloyd2009-11-291-0/+4
| | | | | | | | | | |\ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ac4d8fecb28374d06094da3457aa1e23f77dfa52) to branch 'net.randombit.botan.c++0x' (head 00f0eecf3374a14b6ab907bd235488f902608de4)
| | | | | | | | | | * | | | | | | | | | | | Remove to_string, replacing with std::to_stringlloyd2009-11-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Convert to_u32bit to use the new C++0x library func stoul instead of hand-written code.
* | | | | | | | | | | | | | | | | | | | | | Was missing the Engine PBKDF lookup routinelloyd2010-11-041-0/+52
| | | | | | | | | | | | | | | | | | | | | |
* | | | | | | | | | | | | | | | | | | | | | Remove unused includeslloyd2010-11-041-4/+0
| | | | | | | | | | | | | | | | | | | | | |
* | | | | | | | | | | | | | | | | | | | | | Move PBKDF lookups to enginelloyd2010-11-047-1/+28
| |_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | |
* | | | | | | | | | | | | | | | | | | | | In all cases where the block size of the cipher is fixed, the keylloyd2010-10-141-2/+0
| |_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | parameters are as well. So make them template paramters. The sole exception was AES, because you could either initialize AES with a fixed key length, in which case it would only be that specific key length, or not, in which case it would support any valid AES key size. This is removed in this checkin; you have to specifically ask for AES-128, AES-192, or AES-256, depending on which one you want. This is probably actually a good thing, because every implementation other than the base one (SSSE3, AES-NI, OpenSSL) did not support "AES", only the versions with specific fixed key sizes. So forcing the user to ask for the one they want ensures they get the ones that are faster and/or safer.
* | | | | | | | | | | | | | | | | | | | More size_tlloyd2010-10-138-18/+18
|/ / / / / / / / / / / / / / / / / / /
* / / / / / / / / / / / / / / / / / / Compile fixlloyd2010-10-131-5/+13
|/ / / / / / / / / / / / / / / / / /
* | | | | | | | | | | | | | | | | | Fix compilelloyd2010-10-131-1/+6
| | | | | | | | | | | | | | | | | |
* | | | | | | | | | | | | | | | | | s/BLOCK_SIZE/block_size()/lloyd2010-10-131-1/+1
| | | | | | | | | | | | | | | | | |
* | | | | | | | | | | | | | | | | | Use size_t rather than u32bit in SymmetricAlgorithmlloyd2010-10-132-11/+11
| | | | | | | | | | | | | | | | | |
* | | | | | | | | | | | | | | | | | Use size_t for BufferedComputation::add_datalloyd2010-10-121-2/+2
| | | | | | | | | | | | | | | | | |
* | | | | | | | | | | | | | | | | | Use size_t in SCAN_Namelloyd2010-10-125-10/+10
| | | | | | | | | | | | | | | | | |
* | | | | | | | | | | | | | | | | | Use size_t instead of u32bit in all of pubkeylloyd2010-10-122-48/+48
| | | | | | | | | | | | | | | | | |
* | | | | | | | | | | | | | | | | | Use size_t rather than u32bit for the blocks argument of encrypt_nlloyd2010-10-121-5/+6
| | | | | | | | | | | | | | | | | |
* | | | | | | | | | | | | | | | | | Make names more consistentlloyd2010-10-013-2/+2
| | | | | | | | | | | | | | | | | |
* | | | | | | | | | | | | | | | | | Fix macrolloyd2010-09-301-0/+1
| | | | | | | | | | | | | | | | | |
* | | | | | | | | | | | | | | | | | Split SHA-2 into 32 and 64 bit versions; they are totally independentlloyd2010-09-301-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | of each other anyway.
* | | | | | | | | | | | | | | | | | Fix OpenSSL engine WRT memory vector changes, append is no morelloyd2010-09-231-1/+3
| | | | | | | | | | | | | | | | | |
* | | | | | | | | | | | | | | | | | Update the dynamic engine protocol. The initial version had an enginelloyd2010-09-081-30/+15
|/ / / / / / / / / / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | destructor function which would delete the engine; this was to handle the case that the heaps were not shared between the application and the library. However in this case we have bigger problems, because we want to be able to pass std::strings into the engine, and additionally be able to return objects from the library which are later deleted by the algorithm factory. So without a major restructuring we can't support this style of operation anyway; the DLL and application must share the same heap. This can be done on Windows using the /MD linking scheme for both the library and the DLL. The library already uses this model by default on Windows.
* | | | | | | | | | | | | | | | | Add also AES-192 using SSSE3lloyd2010-08-121-0/+2
| | | | | | | | | | | | | | | | |
* | | | | | | | | | | | | | | | | Support AES-256 is the SSSE3 implementationlloyd2010-08-121-0/+2
| | | | | | | | | | | | | | | | |
* | | | | | | | | | | | | | | | | Add an implementation of AES-128 using SSSE3 instructions. It runs inlloyd2010-08-091-0/+9
|/ / / / / / / / / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | constant time and on a Nehalem is significantly faster than the table based version. This implementation technique was invented by Mike Hamburg and described in a paper in CHES 2009 "Accelerating AES with Vector Permute Instructions". This code is basically a translation of his public domain x86-64 assembly code into intrinsics. Todo: Adding support for AES-192 and AES-256; this just requires implementing the key schedules. Currently only tested on an i7 with GCC (32 and 64 bit code); testing/optimization on 32-bit processors with SSSE3 like the Atom, and with Visual C++ and other compilers, are also todos.
* | | | | | | | | | | | | | | | Remove redundant setting for adding libdl link on Linux in dyn_engine;lloyd2010-07-281-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | it relies on dyn_load which should be the sole source for this kind of stuff, since dyn_engine itself does not touch the OS level APIs.
* | | | | | | | | | | | | | | | Add a version info function which returns a u32bit. The currentlylloyd2010-07-281-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | expected value is 20100728 (ie, today). This will allow for checking for and/or working around changes to interfaces.
* | | | | | | | | | | | | | | | Add a new utility class Dynamically_Loaded_Library which wraps aroundlloyd2010-07-273-0/+185
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the system dynamic linker (if any). Currently it only supports dlopen, and is only enabled on Linux. It will almost certainly work on BSDs and Solaris as well, though, and should be easy to extend to support Win32-style dynamic loading. Also add a new engine, Dynamically_Loaded_Engine, which loads up a new Engine object from a shared library/DLL.
* | | | | | | | | | | | | | | | Rename Default_Engine to Core_Engine which describes its purposeslloyd2010-07-279-33/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (slightly) better.
* | | | | | | | | | | | | | | | merge of '17389a973545d2f8e25813894cdd2da1b01aa534'lloyd2010-07-271-1/+1
|\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | and 'ada4c9893d70affd8934ab9664e390087feab3c9'
| * | | | | | | | | | | | | | | | Add support in CPUID for detecting PCMULUDQ and MOVBE instructions.lloyd2010-07-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rename CPUID::has_aes_intel to has_aes_ni.