aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/kdf
Commit message (Collapse)AuthorAgeFilesLines
* DER improvementsJack Lloyd2018-05-221-1/+4
| | | | | | | | | | | Let DER_Encoder write to a user specified vector instead of only to an internal vector. This allows encoding to a std::vector without having to first write to a locked vector and then copying out the result. Add ASN1_Object::BER_encode convenience method. Replaces X509_Object::BER_encode which had the same logic but was restricted to a subtype. This replaces many cases where DER_Encoder was just used to encode a single object (X509_DN, AlgorithmIdentifier, etc).
* Add message to BOTAN_ARG_CHECK and use it more widelyJack Lloyd2018-05-133-10/+6
|
* Catch exceptions by reference not valueJack Lloyd2018-03-161-1/+1
| | | | Fixes a new warning in GCC 8
* Correct dependencies of kdf and pbkdf [ci skip]Jack Lloyd2018-01-172-1/+3
| | | | They assumed base pulled in hash and mac which is no longer true
* Make stream, block, hash and cipher mode base classes optionalJack Lloyd2018-01-123-0/+12
|
* Add wrappers for reinterpret_cast between char* and uint8_t*Jack Lloyd2017-10-032-6/+6
| | | | | | | 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.
* Use explicit on more single-argument constructorsJack Lloyd2017-09-302-4/+4
|
* Address some MSVC warningsJack Lloyd2017-09-302-107/+109
|
* Require HMAC for HKDFJack Lloyd2017-09-281-0/+4
| | | | Not actually strictly required but in practice doesn't make much sense.
* Doxygen commentJack Lloyd2017-09-281-0/+6
| | | | [ci skip]
* Add HKDF-Expand-LabelJack Lloyd2017-09-273-2/+62
| | | | Step 1/n of TLS 1.3
* Cryptobox code modernizationJack Lloyd2017-09-221-2/+2
| | | | Only encrypt so it's easy to verify everything still works.
* Apply final annotations to the library alsoJack Lloyd2017-09-223-5/+5
| | | | | Done by a perl script which converted all classes to final, followed by selective reversion where it caused compilation failures.
* Header file cleanupsJack Lloyd2017-09-216-11/+1
| | | | Some help from include-what-you-use
* Change header guard format to BOTAN_FOO_H_Jack Lloyd2017-09-2010-20/+20
| | | | | | ISO C++ reserves names with double underscores in them Closes #512
* Complete the final annotation changesJack Lloyd2017-09-191-2/+2
|
* Add API stability annotations.Jack Lloyd2017-09-199-15/+15
| | | | | Defined in build.h, all equal to BOTAN_DLL so ties into existing system for exporting symbols.
* Post-merge changes to SP 800-56A KDF (GH #1040)Jack Lloyd2017-05-063-77/+120
| | | | | | | 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.
* Align with comments from code reviewKrzysztof Kwiatkowski2017-05-042-6/+5
|
* Use uint64_t to represent 32-bit number (fixes unittests)Krzysztof Kwiatkowski2017-05-031-1/+1
|
* Update copyright headersKrzysztof Kwiatkowski2017-05-032-2/+6
|
* SP800-56A revision 2 implementationKrzysztof Kwiatkowski2017-05-033-29/+74
|
* Adds KDF based on SP 800-56A. Currently it is revision 1 (alternative 1). It ↵Krzysztof Kwiatkowski2017-05-034-0/+130
| | | | should be extended to revision 2.
* Content:Tomasz Frydrych2017-04-031-1/+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-029-10/+28
|
* 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-1817-171/+171
| | | | | | 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.
* 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]
* Fix memory leak in HKDFJack Lloyd2016-11-221-1/+1
|
* Add a test for KDF::name()René Korthaus2016-11-151-1/+1
| | | | | | This required fixing some test vectors that previously omitted the MAC, defaulting to HMAC, that used the SHA-1 alias to SHA-160, and fixing X942_PRF::name().
* Add test vectors for HKDF-Expand and HKDF-ExtractRené Korthaus2016-11-151-2/+2
|
* Add full HKDF implementationRené Korthaus2016-11-123-8/+108
| | | | | | | | | | 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-032-5/+3
|
* Remove ability to add OIDS at runtime. Remove global OID lock.Jack Lloyd2016-11-031-1/+0
| | | | | | | | | | | OID map is now generated from an input file on an as needed basis. Just uses a sequence of ifs - simple, fast, and small code size. Merges oid_lookup sub-module which was already required by asn1 anyway, so completely non-optional. Removes @neusdan's nice OID tests since without any runtime adds the tests are moot.
* Cleanup from rebaseJack Lloyd2016-10-211-5/+0
|
* Remove Algo_RegistryJack Lloyd2016-10-2110-126/+157
| | | | | | | I repent my use of global constructors. I repent my use of global locks. Hopefully I will never touch this code again. :)
* Minor doxygen fixes [ci skip]René Korthaus2016-10-196-6/+6
|
* Improve kdf doxygen [ci skip]René Korthaus2016-10-198-8/+54
|
* Add test vectors for KDF1/ISO18033René Korthaus2016-07-152-3/+3
|
* Update KDF1-ISO 18033 with KDF label argumentJack Lloyd2016-06-202-2/+5
|
* Merge GH #483 Add ECIES and KDF1 from ISO 18033Jack Lloyd2016-06-204-0/+81
|\
| * add kdf1 implementation according to iso-18033 (preparation for ecies)Philipp Weber2016-04-274-0/+81
| |
* | make sure kdf labels are always usedKai Michaelis2016-06-015-10/+29
| |
* | add label parameter to KDF::derive_keyKai Michaelis2016-05-1915-36/+175
|/
* 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
|