aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/kdf
Commit message (Collapse)AuthorAgeFilesLines
* NIST SP800-108 & 56cKai Michaelis2016-04-207-0/+351
|
* cppcheck fixes: Class 'X' has a constructor with 1 argument that is not ↵Daniel Neus2016-03-056-6/+6
| | | | explicit.
* Add final attribute to many classesJack Lloyd2016-01-105-6/+6
| | | | | | | In some cases this can offer better optimization, via devirtualization. And it lets the user know the class is not intended for derivation. Some discussion in GH #402
* Update and consolidate the test framework.Jack Lloyd2015-11-111-0/+1
| | | | | | | | | | | The tests previously had used 4 to 6 different schemes internally (the vec file reader framework, Catch, the old InSiTo Boost.Test tests, the PK/BigInt tests which escaped the rewrite in 1.11.7, plus a number of one-offs). Converge on a design that works everywhere, and update all the things. Fix also a few bugs found by the test changes: SHA-512-256 name incorrect, OpenSSL RC4 name incorrect, signature of FFI function botan_pubkey_destroy was wrong.
* Remove use of lookup.h in favor of new T::create API.Jack Lloyd2015-09-213-14/+15
|
* Address some review comments by Simon. GH #279Jack Lloyd2015-09-211-1/+1
|
* Internal header cleanupsJack Lloyd2015-09-191-1/+0
| | | | Only user-visible change is the removal of get_byte.h
* Handle dependencies re static linking. GH #279Jack Lloyd2015-09-179-41/+41
| | | | | | | | | | | | | | Previously we were hanging on the type destructors to pull in the relevant objects. However that fails in many simple cases where the object is never deleted. For every type involved in the algo registry add static create and providers functions to access the algo registry. Modify lookup.h to be inline and call those functions, and move a few to sub-headers (eg, get_pbkdf going to pbkdf.h). So accessing the registry involves going through the same file that handles the initialization, so there is no way to end up with missing objs.
* Fix pbkdf, pk padding and ECDH registration for static linking.Jack Lloyd2015-09-112-1/+3
| | | | | | | | With this change the tests pass when linked against a static library built in the normal (non-amalgamation) fashion. Remove the restriction in configure.py, and have circleci build the clang static build as a non-amalg.
* Fix static lib registration for block, hash, mac, stream, kdfJack Lloyd2015-09-106-13/+49
| | | | | | | | | | | The support problems from having static libraries not work in the obvious way will be endless trouble. Instead have each set of registrations tag along in a source file for the basic type, at the cost of some extra ifdefs. On shared libs this is harmless - everything is going into the shared object anyway. With static libs, this means pulling in a single block cipher pulls in the text of all the them. But that's still strictly better than the amalgamation (which is really pulling in everything), and it works (unlike status quo).
* kdf: Add missing overridesDaniel Seither2015-07-303-8/+8
|
* lib/kdf: Convert &vec[0] to vec.data()Simon Warta2015-06-256-10/+10
|
* Hide Algorithm_Factory and use the functions in lookup.h internally.lloyd2015-03-043-8/+8
| | | | | | Fix two memory leaks (in TLS and modes) caused by calling get_foo and then cloning the result before saving it (leaking the original object), a holdover from the conversion between construction techniques in 1.11.14
* Convert HKDF to the normal KDF interfacelloyd2015-02-182-59/+34
|
* Modify interfaces of KDF and PBKDF to write output to an array, withlloyd2015-02-189-148/+138
| | | | higher level functions on interface handling returning a vector.
* Add new module `ffi` which provides a plain C interface, plus a newlloyd2015-02-163-0/+119
| | | | | | | | | | | | ctypes Python wrapper that uses it. The API is intentionally designed to have a very simple ABI (extern "C", all structs are opaque, no memory ownership passing the FFI boundary, limited set of simple types as args) so the ctypes wrapper is quite simple. Currently ffi provides ciphers, hashes, MACs, RNGs, PBKDF, KDF, bcrypt, and most public key operations. Remove the old boost.python wrapper and all the build code for it.
* Clean up root dir, remove some unneeded dependencieslloyd2015-02-052-8/+0
|
* Remove algo factory, engines, global RNG, global state, etc.lloyd2015-02-043-6/+5
| | | | | | | | | | | | | | | Convert all uses of Algorithm_Factory and the engines to using Algo_Registry The shared pool of entropy sources remains but is moved to EntropySource. With that and few remaining initializations (default OIDs and aliases) moved elsewhere, the global state is empty and init and shutdown are no-ops. Remove almost all of the headers and code for handling the global state, except LibraryInitializer which remains as a compatability stub. Update seeding for blinding so only one hacky almost-global RNG instance needs to be setup instead of across all pubkey uses (it uses either the system RNG or an AutoSeeded_RNG if the system RNG is not available).
* Add missing files. Remove cipher lookup from engine code.lloyd2015-02-011-0/+28
|
* Use registry also for KDF, EMSA, and EMElloyd2015-01-318-56/+47
|
* Use registry for streams and MACs. Start updating callers.lloyd2015-01-311-5/+0
|
* Remove SSLv3 and handling of SSLv2 client hellos.lloyd2015-01-114-121/+0
|
* Ensure all files have copyright and license info.lloyd2015-01-1012-12/+12
| | | | | Update license header line to specify the terms and refer to the file, neither of which it included before.
* Various small fixes and cleanups, new is_prime utillloyd2014-11-031-0/+1
|
* Add missing std includeslloyd2014-02-161-0/+1
|
* Fix algo factory compilelloyd2014-01-181-1/+1
|
* Guess I won't be needing theselloyd2014-01-186-6/+0
|
* More unique_ptr, also cleanup MGF1 usagelloyd2014-01-189-146/+22
|
* Split off the keyed interfaces of transform to Keyed_Transformlloyd2014-01-181-4/+5
| | | | | Remove the unhelpful 'Algorithm' base class which had previously acted more or less as a global base.
* Move lib into srclloyd2014-01-1021-0/+898