aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/kdf/kdf.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Correct dependencies of kdf and pbkdf [ci skip]Jack Lloyd2018-01-171-0/+1
| | | | They assumed base pulled in hash and mac which is no longer true
* Cryptobox code modernizationJack Lloyd2017-09-221-2/+2
| | | | Only encrypt so it's easy to verify everything still works.
* Header file cleanupsJack Lloyd2017-09-211-5/+1
| | | | Some help from include-what-you-use
* Post-merge changes to SP 800-56A KDF (GH #1040)Jack Lloyd2017-05-061-2/+2
| | | | | | | Instead of using a template split the KDF into two different classes that both call a template utility function to actually run the KDF algo. Simplify the "empty salt" logic and avoid having to instantiate a hash object just to get the hash block size.
* SP800-56A revision 2 implementationKrzysztof Kwiatkowski2017-05-031-3/+3
|
* Adds KDF based on SP 800-56A. Currently it is revision 1 (alternative 1). It ↵Krzysztof Kwiatkowski2017-05-031-0/+14
| | | | should be extended to revision 2.
* Add BOTAN_UNUSED in creator functionsJack Lloyd2017-01-271-0/+3
| | | | | | If all (say) stream ciphers are disabled, avoid unused arg warning. [ci skip]
* Fix missing include in kdf.cppJack Lloyd2016-11-291-0/+1
| | | | | | Showed up when compiling kdf.cpp with no KDFs enabled in build. [ci skip]
* Add test vectors for HKDF-Expand and HKDF-ExtractRené Korthaus2016-11-151-2/+2
|
* Add full HKDF implementationRené Korthaus2016-11-121-0/+16
| | | | | | | | | | Adds the full HKDF as class HKDF, renames the existing HKDF, which only implemented the expansion step, to HKDF_Expand and adds the extraction step as HKDF_Extract. The latter two are usually only used seperately in protocols such as TLS. A normal user would go for the full HKDF.
* Simplify some code by using T::create_or_throwJack Lloyd2016-11-031-1/+1
|
* Remove Algo_RegistryJack Lloyd2016-10-211-42/+141
| | | | | | | I repent my use of global constructors. I repent my use of global locks. Hopefully I will never touch this code again. :)
* add kdf1 implementation according to iso-18033 (preparation for ecies)Philipp Weber2016-04-271-0/+8
|
* NIST SP800-108 & 56cKai Michaelis2016-04-201-0/+17
|
* cppcheck fixes: Class 'X' has a constructor with 1 argument that is not ↵Daniel Neus2016-03-051-1/+1
| | | | explicit.
* 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.
* Handle dependencies re static linking. GH #279Jack Lloyd2015-09-171-4/+24
| | | | | | | | | | | | | | 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-111-0/+2
| | | | | | | | 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-101-2/+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).
* Remove algo factory, engines, global RNG, global state, etc.lloyd2015-02-041-1/+1
| | | | | | | | | | | | | | | 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).
* Use registry also for KDF, EMSA, and EMElloyd2015-01-311-45/+4
|
* Use registry for streams and MACs. Start updating callers.lloyd2015-01-311-5/+0
|
* Remove SSLv3 and handling of SSLv2 client hellos.lloyd2015-01-111-9/+0
|
* Ensure all files have copyright and license info.lloyd2015-01-101-1/+1
| | | | | Update license header line to specify the terms and refer to the file, neither of which it included before.
* Fix algo factory compilelloyd2014-01-181-1/+1
|
* Move lib into srclloyd2014-01-101-0/+81