aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/mac
Commit message (Collapse)AuthorAgeFilesLines
* Add MAC::start_msg, update GMACJack Lloyd2016-10-283-14/+53
| | | | | | | | GMAC needs a per-message nonce specified with `start`, and other MACs are capable of using nonces (Skein-MAC, for instance) so move this API up to MAC class. Change GMAC::clone to clone the owned cipher.
* Implements GMAC with GHASH.Matthias Gierlings2016-10-283-44/+109
| | | | | Adds support for Galois Message Authentication Code calculation based on GHASH, rather than GCM_Mode.
* Added implementation for GMACMatthias Gierlings2016-10-275-1/+184
| | | | | | - Added GMAC class - Integrated GMAC into MAC-Class test bench. Run GMAC tests using ./botan-test mac
* Remove alias logic from SCAN_NameJack Lloyd2016-10-211-3/+3
| | | | | | This required taking a global lock and doing a map lookup each time an algorithm was requested (and so many times during a TLS handshake).
* Remove Algo_RegistryJack Lloyd2016-10-218-73/+101
| | | | | | | 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-1/+0
|
* Minor doxygen fixes [ci skip]René Korthaus2016-10-192-2/+2
|
* Improve stream doxygen [ci skip]René Korthaus2016-10-191-1/+1
|
* Improve mac doxygen [ci skip]René Korthaus2016-10-191-4/+6
|
* Change T::provider to return std::stringJack Lloyd2016-09-151-2/+1
|
* Add T::provider() to allow user to inquire about implementation usedJack Lloyd2016-09-151-0/+8
| | | | | For block ciphers, stream ciphers, hashes, MACs, and cipher modes. Cipher_Mode already had it, with a slightly different usage.
* fix SipHash::clear() and MAC test improvementsDaniel Neus2016-07-201-3/+4
| | | | | | | | Fix for SipHash::clear() which does not clear the complete state. Test additions: - add a test for MessageAuthenticationCode::verify_mac() - test MessageAuthenticationCode::clear()
* Merge GH #446 add --module-policy optionJack Lloyd2016-03-061-0/+2
|\
| * Add option --module-policyJack Lloyd2016-03-061-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A module policy is a file specifying three types of modules: ones which are required, ones which are prohibited, and ones which should be used if otherwise available (this is mostly for platform specific modules). Finally there are whatever modules which exist in the library of which the policy makes no mention. These will be included if an explicit dependency of some other module pulls them in (so there is no reason to mention base, utils, ... in the file) but skipped otherwise. For example policy 'sane' does not mention 'utils' or 'twofish' either way. Since utils is a dependency of other modules which are included, but Twofish does not. However unlike an explicitly prohibited module, not mentioned can still be requested as part of the build (here with --enable-module=twofish) Also fixes some test bugs noticed by compiling in different build configs. DLIES test didn't check that the KDF and MAC existed. Adds a typedef for MessageAuthenticationCode because typing it twice in a single line in the DLIES test made me think it's way too long. :) Also fix some fuzzer build problems. Due to a copy and paste bug the PKCS certificate (it was not). Inspired by GH #439
* | Remaining cppcheck fixes that are not covered by GH #444Daniel Neus2016-03-051-1/+1
|/
* cppcheck fixes: Class 'X' has a constructor with 1 argument that is not ↵Daniel Neus2016-03-054-4/+4
| | | | explicit.
* Add final attribute to many classesJack Lloyd2016-01-106-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
* Reroot the exception hierarchy into a toplevel Exception classJack Lloyd2015-12-111-1/+1
| | | | | | | | 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-214-12/+9
|
* Address some review comments by Simon. GH #279Jack Lloyd2015-09-211-1/+1
|
* Internal header cleanupsJack Lloyd2015-09-199-49/+3
| | | | Only user-visible change is the removal of get_byte.h
* Handle dependencies re static linking. GH #279Jack Lloyd2015-09-176-0/+28
| | | | | | | | | | | | | | 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 static lib registration for block, hash, mac, stream, kdfJack Lloyd2015-09-108-14/+56
| | | | | | | | | | | 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).
* mac: Add missing overridesDaniel Seither2015-07-306-47/+47
|
* Remove duplicate definition of MessageAuthenticationCode::name()Daniel Seither2015-07-301-6/+0
| | | | The original definition is in the base class SymmetricAlgorithm.
* Make Botan compile when only some modules are enabledSimon Warta2015-07-031-0/+2
| | | | Fixes #146.
* s/auto/size_t/Simon Warta2015-07-031-1/+1
|
* More changes for use with debug STLSimon Warta2015-06-301-1/+5
|
* lib/mac: Convert &vec[0] to vec.data()Simon Warta2015-06-255-8/+8
|
* Fix code that triggers a strange MSVC 'performance warning'git2015-04-081-1/+1
| | | | Github pull 74 from Chris Desjardins
* Add BOTAN_DLL back to LibraryInitializer and move some of the implementation tolloyd2015-03-111-1/+1
| | | | | | | a source file. Without BOTAN_DLL the LibraryInitializer was removed entirely from the list of symbols which is not desired. Add some casts to avoid scary sounding but (upon review) harmless warnings from MSVC
* In Algo_Registry if a maker func fails, try the next most preferred onelloyd2015-03-051-1/+1
| | | | | | | | instead of bailing out immediately. Rename the 'builtin' provider to 'base' since really they are all built in. Fix MARK-4 when OpenSSL was enabled - it did not respect the skip param.
* Hide Algorithm_Factory and use the functions in lookup.h internally.lloyd2015-03-044-5/+13
| | | | | | 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
* Wrong functionlloyd2015-02-281-1/+1
|
* Amalgamation fixes; inline the poly1305 header and :: namespace OpenSSL funcslloyd2015-02-223-150/+129
|
* Clean up root dir, remove some unneeded dependencieslloyd2015-02-053-12/+0
|
* Remove algo factory, engines, global RNG, global state, etc.lloyd2015-02-043-8/+4
| | | | | | | | | | | | | | | 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/+35
|
* Use registry for streams and MACs. Start updating callers.lloyd2015-01-3112-20/+62
|
* Amalgamation fixeslloyd2015-01-231-9/+1
|
* Add SipHashlloyd2015-01-113-0/+169
|
* Remove SSLv3 and handling of SSLv2 client hellos.lloyd2015-01-113-143/+0
|
* Ensure all files have copyright and license info.lloyd2015-01-1015-15/+15
| | | | | Update license header line to specify the terms and refer to the file, neither of which it included before.
* Fix one past the end write in Poly1305 finishlloyd2014-12-311-1/+1
|
* Add Poly1305, based on poly1305-donna by Andrew Moon.lloyd2014-12-294-0/+282
|
* Replace Transformatio::nstart with start_raw so we can do a full setlloyd2014-11-051-0/+2
| | | | of overloads in the base class with the same name.
* Add the CMAC constants for 256 and 512 bit block cipherslloyd2014-02-021-6/+28
| | | | | Also add test vectors for Threefish-512 CMAC and EAX, both generated by the library.
* Guess I won't be needing theselloyd2014-01-185-5/+0
|
* More unique_ptr, also cleanup MGF1 usagelloyd2014-01-181-2/+3
|
* Use unique_ptr instead of bare pointers and explicit delete in block, mac, hash.lloyd2014-01-1811-207/+178
| | | | m_ namespaced everything while I'm in there. Changed CMAC poly_double signature.