aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/pbkdf
Commit message (Collapse)AuthorAgeFilesLines
* Correct dependencies of kdf and pbkdf [ci skip]Jack Lloyd2018-01-171-1/+2
| | | | They assumed base pulled in hash and mac which is no longer true
* Add wrappers for reinterpret_cast between char* and uint8_t*Jack Lloyd2017-10-032-2/+2
| | | | | | | Generally speaking reinterpret_cast is sketchy stuff. But the special case of char*/uint8_t* is both common and safe. By isolating those, the remaining (likely sketchy) cases are easier to grep for.
* Thinko fixJack Lloyd2017-09-301-1/+1
|
* Compat typedef PBKDF -> S2KJack Lloyd2017-09-291-1/+12
| | | | [ci skip]
* Cryptobox code modernizationJack Lloyd2017-09-222-0/+21
| | | | Only encrypt so it's easy to verify everything still works.
* Header file cleanupsJack Lloyd2017-09-212-2/+0
| | | | Some help from include-what-you-use
* Change header guard format to BOTAN_FOO_H_Jack Lloyd2017-09-204-8/+8
| | | | | | ISO C++ reserves names with double underscores in them Closes #512
* Complete the final annotation changesJack Lloyd2017-09-191-1/+1
|
* Add API stability annotations.Jack Lloyd2017-09-193-4/+4
| | | | | Defined in build.h, all equal to BOTAN_DLL so ties into existing system for exporting symbols.
* More MSVC warnings fixesJack Lloyd2017-08-311-2/+2
|
* Maintainer mode fixes: old style casts, missing override, unused functionsJack Lloyd2017-06-081-1/+1
|
* fix doxygen build: hide method definitions with ifdefs where theZoltan Gyarmati2017-06-081-1/+1
| | | | | | | function declaration is already hidden, fix some param names in doxygen comments, fixes #1067 This work was sponsored by Ribose Inc (@riboseinc).
* Avoid infinite loop in PGP-S2KJack Lloyd2017-05-291-5/+11
| | | | | | | | In simple mode (no salt) with an empty password the input buffer is empty. Add a check that salt is not empty if iterations > 1 since PGP only has simple, salted, and iterated+salted modes.
* Document that timed calibration is not available for PGP-S2KJack Lloyd2017-05-272-11/+51
| | | | | | Made a try at implementing it but its a huge pain due to the combination of the iteration count being the byte count and that we have to end on exactly an encodable iteration count.
* Add (back) OpenPGP-S2KJack Lloyd2017-05-274-0/+176
| | | | | | | | | | | | | It was removed somewhere along the line in 1.11, with the logic that it is a funky PGP-specific scheme and (quoting the commit that removed it) "not really useful outside of a full PGP implementation". This assumed that the PGP implementation would be in Botan itself, but PGP is implemented in https://github.com/evpo/EncryptPad/ (which is a PGP implementation using 1.10), and RNP (https://github.com/riboseinc/rnp) would like to use it also. This work was sponsored by Ribose Inc (@riboseinc).
* Content:Tomasz Frydrych2017-04-032-3/+1
| | | | | | | | | * fixes for deprecated constructions in c++11 and later (explicit rule of 3/5 or implicit rule of 0 and other violations) * `default` specifier instead of `{}` in some places(probably all) * removal of unreachable code (for example `return` after `throw`) * removal of compilation unit only visible, but not used functions * fix for `throw()` specifier - used instead `BOTAN_NOEXCEPT` * removed not needed semicolons
* Remove "Dirty hack" for multiple defines in lex_me_harder()Simon Warta2017-04-023-3/+9
|
* Add BOTAN_UNUSED in creator functionsJack Lloyd2017-01-271-0/+3
| | | | | | If all (say) stream ciphers are disabled, avoid unused arg warning. [ci skip]
* Convert to using standard uintN_t integer typesJack Lloyd2016-12-186-40/+40
| | | | | | Renames a couple of functions for somewhat better name consistency, eg make_u32bit becomes make_uint32. The old typedefs remain for now since probably lots of application code uses them.
* Remove Algo_RegistryJack Lloyd2016-10-214-30/+31
| | | | | | | I repent my use of global constructors. I repent my use of global locks. Hopefully I will never touch this code again. :)
* Fix doxygen warnings [ci skip]René Korthaus2016-10-191-2/+3
|
* Improve pbkdf doxygen [ci skip]René Korthaus2016-10-191-4/+54
|
* cppcheck fixes: Class 'X' has a constructor with 1 argument that is not ↵Daniel Neus2016-03-053-3/+3
| | | | explicit.
* V816 It is more efficient to catch exception by reference rather than by ↵Daniel Neus2016-02-081-1/+1
| | | | value. asn1_time.cpp 159
* Add final attribute to many classesJack Lloyd2016-01-102-2/+2
| | | | | | | 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
* Mass-prefix member vars with m_René Korthaus2016-01-082-5/+5
|
* Missing addsJack Lloyd2015-12-111-1/+0
|
* Reroot the exception hierarchy into a toplevel Exception classJack Lloyd2015-12-112-2/+2
| | | | | | | | As the alternatives are unfortunate for applications trying to catch all library errors, and it seems deriving from std::runtime_error causes problems with MSVC DLLs (GH #340) Effectively reverts 2837e915d82e43
* Remove use of lookup.h in favor of new T::create API.Jack Lloyd2015-09-211-5/+4
|
* Address some review comments by Simon. GH #279Jack Lloyd2015-09-211-1/+1
|
* Internal header cleanupsJack Lloyd2015-09-191-2/+1
| | | | Only user-visible change is the removal of get_byte.h
* Handle dependencies re static linking. GH #279Jack Lloyd2015-09-172-1/+42
| | | | | | | | | | | | | | 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-115-33/+21
| | | | | | | | 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.
* pbkdf: Add missing overridesDaniel Seither2015-07-301-2/+2
|
* Fix typosSimon Warta2015-07-241-1/+1
| | | | Thanks to @vlajos https://github.com/vlajos/misspell_fixer
* Add missing semicolonsDaniel Seither2015-07-151-1/+1
|
* Make Botan compile when only some modules are enabledSimon Warta2015-07-031-0/+2
| | | | Fixes #146.
* lib/pbkdf: Convert &vec[0] to vec.data()Simon Warta2015-06-234-12/+12
|
* Hide Algorithm_Factory and use the functions in lookup.h internally.lloyd2015-03-041-2/+2
| | | | | | 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-181-3/+2
|
* Modify interfaces of KDF and PBKDF to write output to an array, withlloyd2015-02-186-127/+179
| | | | higher level functions on interface handling returning a vector.
* Add new module `ffi` which provides a plain C interface, plus a newlloyd2015-02-161-1/+1
| | | | | | | | | | | | 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.
* Remove algo factory, engines, global RNG, global state, etc.lloyd2015-02-047-2/+57
| | | | | | | | | | | | | | | 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).
* Ensure all files have copyright and license info.lloyd2015-01-106-6/+6
| | | | | Update license header line to specify the terms and refer to the file, neither of which it included before.
* Guess I won't be needing theselloyd2014-01-182-2/+0
|
* More unique_ptr, also cleanup MGF1 usagelloyd2014-01-182-17/+5
|
* Split off the keyed interfaces of transform to Keyed_Transformlloyd2014-01-181-8/+4
| | | | | Remove the unhelpful 'Algorithm' base class which had previously acted more or less as a global base.
* Move lib into srclloyd2014-01-109-0/+466