aboutsummaryrefslogtreecommitdiffstats
path: root/src/libstate
Commit message (Collapse)AuthorAgeFilesLines
* Add *s before comment lines in file headerslloyd2009-09-082-4/+4
|
* Add a new option --no-autoload to configure.py. This will produce a minimallloyd2009-09-042-1/+2
| | | | | | | | | | | build (only libstate, utils, plus dependencies), which can be extended with use of --enable-modules. To add new modules to the set of always-loaded, use 'load_on always' in info.txt Also fix a few small build problems that popped up when doing a minimal build. Requested by a user.
* Move some files around to break up dependencies between directorieslloyd2009-07-163-0/+153
|
* Add a script that reads the output of print_deps.py and rewriteslloyd2009-07-152-14/+26
| | | | | | the info.txt files with the right module dependencies. Apply it across the codebase.
* Thomas Moschny passed along a request from the Fedora packagers which camelloyd2009-03-3015-217/+247
| | | | | | | | | | | | | | | up during the Fedora submission review, that each source file include some text about the license. One handy Perl script later and each file now has the line Distributed under the terms of the Botan license after the copyright notices. While I was in there modifying every file anyway, I also stripped out the remainder of the block comments (lots of astericks before and after the text); this is stylistic thing I picked up when I was first learning C++ but in retrospect it is not a good style as the structure makes it harder to modify comments (with the result that comments become fewer, shorter and are less likely to be updated, which are not good things).
* GOST was using a completely non-standard set of sboxes. Change it to uselloyd2009-03-271-0/+1
| | | | | | | | | | | | | | | GostR3411_94_TestParamSet, this is compatible with the implementations in Crypto++ and OpenSSL. This is not backwards compatible, though once the implementation supports multiple param sets (which is required, unfortunately, for compatability with various standards by CryptoCom, who have defined not one but at least 4 (!!!) different sboxes to use with GOST), I may offer Botan's previous sbox set as an option. Since adding the GOST hash function (34.11) and signing algorithm (34.10) are on the long term agenda (request by Rickard Bondesson, as the Russian authorities want to use their local standards for their DNSSEC use), I renamed the block cipher class (which had been just 'GOST') to GOST_28147_89 to minimize future name clashes.
* Update some doxygen comments. Contributed by Charles Brockman in bug #39lloyd2009-03-021-24/+24
|
* Allow asking for EMSA3(Raw) in get_emsa (returning a new EMSA3_Raw object)lloyd2008-11-281-0/+4
|
* Add an Algorithm_Factory& argument to Engine::get_cipher to avoid alloyd2008-11-231-2/+4
| | | | dependency on libstate.h
* Remove Library_State::add_engine and Algorithm_Factory::add_engine,lloyd2008-11-122-21/+12
| | | | | | | | replacing with an updated constructor to Algorithm_Factory taking a vector of Engine*. The semantics of adding engines at runtime were not defined nor very clear, it seems best to prohibit this unless and until it is explicitly thought through (and until a need for it presents itself).
* Library_State had two functions that did the same thing,lloyd2008-11-125-59/+62
| | | | | | | | | | | | | | | algo_factory and algorithm_factory. This is confusing so for consistency/simplicity, remove algo_factory, making algorithm_factory the function to call. In 1.7.14, several functions in lookup.h, including retrieve_block_cipher, retrieve_hash, etc were changed to accept a Library_State& reference. However it turns out with the modified design I've settled upon for 1.8 that it is not necessary to change those interfaces; instead they always refer to the global_state algorithm factory which is exactly the semantics one would expect/desire 99% of the time (and is source compatible with code written for 1.6, also a plus)
* Remove support for provider identifiers from SCAN_Name - it turns out thislloyd2008-11-121-3/+3
| | | | | | | | | | | | was not the right place to keep track of this information. Also modify all Algorithm_Factory constructor functions to take instead of a SCAN_Name a pair of std::strings - the SCAN name and an optional provider name. If a provider is specified, either that provider will be used or the request will fail. Otherwise, the library will attempt best effort, based on user-set algorithm implementation settings (combine with benchmark.h for choosing the fastest implementation at runtime) or if not set, a static ordering (preset in static_provider_weight in prov_weight.cpp, though it would be nice to make this easier to toggle).
* Remove pk_lookup - half of it (look_pk.{cpp,h}) depended on libstate directly,lloyd2008-11-113-3/+155
| | | | | the other half was relied upon by pubkey. Move the contents into those two modules. Update deps.
* Include libstate.h in botan.h, since it is pretty vital at this point tolloyd2008-11-111-0/+1
| | | | | be able to get the global_state so as to get a reference to the Algorithm_Factory
* Move most of the remaining libstate code to pk_engine.cpp, move engineslloyd2008-11-1148-3613/+96
| | | | | back to the toplevel since most othe dependencies have been removed now (except get_cipher which still needs changes)
* Make Engine::find_XYZ publiclloyd2008-11-111-15/+17
|
* Remove needless include of libstate.h from init.hlloyd2008-11-111-1/+2
|
* Split asm_engine into three engines (ia32, amd64, sse2). This allowslloyd2008-11-1112-70/+199
| | | | them to be individually requested as providers on lookup.
* Make SCAN_Name::arg return a new SCAN_Name that has the same providers list,lloyd2008-11-112-20/+25
| | | | this allows provider preferences to be passed down to sub-algorithms.
* Update Library_State for new Algorithm_Factory constructorlloyd2008-11-111-1/+1
|
* Remove pk testing policies (now static)lloyd2008-11-111-4/+0
|
* Remove a global_state() dependency on Engine without breaking Monotonelloyd2008-11-112-15/+15
| | | | via two-stage initialization.
* Fix destructorlloyd2008-11-111-1/+1
|
* After finding myself typing global_state().algorithm_factory() insteadlloyd2008-11-112-10/+11
| | | | | of algo_factory() several times, I decided to rename the functions. algorithm_factory() just forwards to algo_factory as an inline.
* Add back default empty arguments to LibraryInitializerlloyd2008-11-112-3/+3
| | | | Set default thread safety to false
* Move Algorithm_Factory from libstate (which it did not depend on) to ↵lloyd2008-11-113-320/+1
| | | | algo_factory/
* Drop look_add.h and the freestanding add_algorithm functionslloyd2008-11-113-66/+0
|
* Change LibraryInitializer back to accepting a std::string for backwardslloyd2008-11-113-5/+35
| | | | compatability.
* Fix leak in Luby-Rackoff lookup (got new object instead of prototype as ↵lloyd2008-11-111-2/+1
| | | | intented)
* New function name in SCAN_Namelloyd2008-11-111-1/+1
|
* Remove lookup.h use from DLIES, PK key agreement, DSA param gen, get_enc.cpplloyd2008-11-112-1/+3
|
* Remove lookup dep from basic pubkey classeslloyd2008-11-101-0/+3
|
* Add back Library_State::add_engine for Monotonelloyd2008-11-102-0/+10
|
* Shorten SCAN_Name's argument arg in function nameslloyd2008-11-105-32/+32
|
* Move get_bc_pad to def_engine/def_mode.cpplloyd2008-11-105-85/+66
| | | | Compilation fix in arc4_openssl.cpp
* Drop all options except thread safety. Also remove InitializerOptions, etclloyd2008-11-106-229/+30
| | | | | | | | | | | | | | | and reduce all the arguments to just a bool specifying threads. selftests: off (if desired, run passes_self_test in selftest.h) fips140: Just ran the self tests, totally bogus option. use_engine: On by default (that is, if OpenSSL or asm code is compiled in, it's used by default). One can get better control over this using the provider feature of SCAN_Name (though this doesn't handle cases like nested algorithms yet). secure_memory: On by default.
* Remove Modules class from the initializer code - it just wasn't that usefullloyd2008-11-107-229/+77
| | | | as an abstraction. Check #ifdef's for engines and such directly in libstate.cpp
* Move x86 Serpent to the asm engine module.lloyd2008-11-108-73/+55
| | | | Move OpenSSL's RC4 back into a single file again.
* Use Algorithm_Factory instead of lookup in Default_Engine block cipherlloyd2008-11-103-13/+10
| | | | and mac tables
* Move block and stream ciphers also into Algorithm_Factorylloyd2008-11-1012-210/+293
|
* Move MACs also to Algorithm_Factorylloyd2008-11-107-75/+139
|
* Split PK stuff from engine.cpp to pk_engine.cpplloyd2008-11-103-173/+189
|
* Move add_algorithm for hashes also to Algorithm_Factorylloyd2008-11-103-22/+27
|
* Remove printfslloyd2008-11-101-5/+0
|
* Split the assembly implementations of the hash functions into asm_engine.lloyd2008-11-106-39/+125
| | | | | | This still is not an ideal split, since for SHA-1 we have both SSE2 and x86/x86-64 asm. Currently we continue to punt to SSE2 if enabled, otherwise asm, since the SSE2 seems to be the fastest thing going in my tests so far.
* Have Algorithm_Factory::make_hash_function throw an exception if it can'tlloyd2008-11-102-8/+4
| | | | | | find an object to clone. Add a new constructor to Hash_Filter taking a HashFunction*
* Use Algorithm_Factory and SCAN_Name for all hash lookups. Modify engineslloyd2008-11-1011-76/+129
| | | | accordingly.
* Add a class Algorithm_Factory which encapsulates the Engine classes (andlloyd2008-11-107-85/+160
| | | | which will eventually encapsulate the lookup logic as well)
* Split pk_pad.h into eme.h and emsa.hlloyd2008-11-101-1/+2
|
* Modify OpenSSL to use SCAN_Namelloyd2008-11-103-47/+34
|