aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #378 from neusdan/warning_fixesJack Lloyd2015-12-266-9/+7
|\ | | | | Some trivial compiler and PVS-Studio warning fixes
| * initialize private members in rc4 headerDaniel Neus2015-12-232-5/+4
| |
| * some trivial compiler/PVS-Studio warning fixesDaniel Neus2015-12-225-5/+4
| |
* | Add generalized KEM interfaceJack Lloyd2015-12-2611-102/+367
| | | | | | | | | | | | Convert McEliece KEM to use it Add RSA-KEM
* | Export mgf1_mask GH #380Jack Lloyd2015-12-251-3/+3
| |
* | Guard all std::mem* ops against any call with zero length.Jack Lloyd2015-12-252-21/+36
| | | | | | | | | | | | | | | | | | | | Calling memset, memmove, memcpy with an undefined or null pointer, even with length zero, causes undefined behavior. Prevent that from happening within the functions that call these dangerous things since allowing a caller to pass length == 0 with null or just past the end and not have things explode is nice. Oh C, you so crazy.
* | Remove mp_mulop.cppJack Lloyd2015-12-256-93/+42
| | | | | | | | | | | | It had two functions, both only called from one place (mp_karat.cpp). Both multiple and square ops were O(n**2), so drop square and just call mul in mp_karat.cpp for either case
* | Fix a few clang warnings. Set clang sanitizer flagsJack Lloyd2015-12-241-1/+1
|/
* Remove debug printfJack Lloyd2015-12-211-1/+0
|
* Throw Lookup_Error instead of bare Exception when creating an obj failsJack Lloyd2015-12-201-24/+24
| | | | | | | in the algo factory. Fixes remaining issues of GH #369 - test_pubkey.cpp was expecting Lookup_Error when something isn't found.
* Add TPM v1.2 support (RSA keygen/signing, RNG)Jack Lloyd2015-12-194-0/+754
|
* Deprecate lookup.h functions GH #366Jack Lloyd2015-12-191-1/+19
|
* Move estimate of RDRAND/RDSEED entropy to build.hJack Lloyd2015-12-192-22/+2
| | | | GH #370 for background
* Merge pull request #370 from neusdan/rdseedJack Lloyd2015-12-194-0/+118
|\ | | | | Add support for Intel RdSeed instruction
| * add support for Intel RdSeedDaniel Neus2015-12-184-0/+118
| |
* | Remove unused word8_muladd from MSVC x86-32 asmJack Lloyd2015-12-191-84/+0
| | | | | | | | GH #363
* | Merge the openssl code together.Jack Lloyd2015-12-1910-37/+17
| | | | | | | | | | | | | | Having the code diffused all over the place was ugly and would not scale well to multiple alternative providers. GH #368
* | Remove all remaining uses of throwing a std:: exception directlyJack Lloyd2015-12-197-16/+17
| | | | | | | | See GH #340 and 6b9a3a5 for background
* | CLI rewriteJack Lloyd2015-12-197-205/+50
|/ | | | | | | | | | | | | | | | | | The command line tools' origin as a collection of examples and test programs glued together led to some unfortunate problems; lots of hardcoded values, missing parameters, and obsolete crypto. Adds a small library for writing command line programs of the sort needed here (cli.h), which cuts the length of many of the commands in half and makes commands more pleasant to write and extend. Generalizes a lot of the commands also, eg previously only signing/verification with DSA/SHA-1 was included! Removes the fuzzer entry point since that's fairly useless outside of an instrumented build. Removes the in-library API for benchmarking.
* Enable RdRand on Windows/MSVCDaniel Neus2015-12-161-0/+1
|
* Add missing include in dyn_load.cppSimon Warta2015-12-121-0/+1
|
* Build fix. Add SQL_DB_Error exception typeJack Lloyd2015-12-112-9/+18
|
* Disable asio serial port support to avoid Darwin braindamage. GH #350Jack Lloyd2015-12-111-1/+9
|
* Missing addsJack Lloyd2015-12-1123-29/+27
|
* Reroot the exception hierarchy into a toplevel Exception classJack Lloyd2015-12-1172-167/+178
| | | | | | | | 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
* Minor sanity updates for OctetStringSimon Warta2015-12-092-23/+24
|
* Add OS utility headerJack Lloyd2015-12-056-102/+191
| | | | | | | | Provide abstractions for the locking allocator (allocate and free locked pages) to decouple it from the platform dependent code. Should make it easy to write a Windows version using VirtualAlloc+VirtualLock. Exposes max mlock limit as a build.h toggle
* Make portable GCM multiply operation run in constant time.Jack Lloyd2015-12-041-9/+16
| | | | Checked with ctgrind
* Merge pull request #321 from matejk/fix_algo_registry_locking_windowsJack Lloyd2015-12-041-6/+54
|\ | | | | Algo_Registry: Use CRITICAL_SECTION on Windows to prevent hang during initialization
| * Added myself to credits/copyright.Matej Kenda2015-11-201-0/+1
| |
| * Merged two sections of Botan namespace as suggested by randombit. ↵Matej Kenda2015-11-191-5/+4
| | | | | | | | Preprocessing sections are now split in two.
| * Merge branch 'master' of github.com:randombit/botan into ↵Matej Kenda2015-11-1932-141/+161
| |\ | | | | | | | | | fix_algo_registry_locking_windows
| * | Fixed default ctor for WinCS_MutexMatej Kenda2015-11-041-1/+1
| | |
| * | #321: changed implementation of CriticalSection locking in algo registry.Matej Kenda2015-11-041-34/+38
| | |
| * | Algo_Registry: Use CRITICAL_SECTION instead of std::mutex to prevent hang in ↵Matej Kenda2015-11-031-5/+49
| | | | | | | | | | | | DllMain when initialising global constants.
* | | Remove support for broken 112 and 128 bit SECP ECC groups.Jack Lloyd2015-12-022-50/+2
| | |
* | | Add update overload taking std::string to PK_Verifier and PK_SignerJack Lloyd2015-12-021-1/+19
| | | | | | | | | | | | Because convenient
* | | Avoid ever returning 0 from CPUID::cache_line_sizeJack Lloyd2015-12-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Take the value from build.h if we have no way of getting it dynamically. Fixes an infinite loop in AES on non-x86 introduced in ebf2164a, as otherwise it does for(size_t i = 0; i != ...; i += 0) {} while iterating over the TE tables.
* | | Add more workfactor estimate helpers.Jack Lloyd2015-11-296-32/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Specifically a named one for integer factorization (despite using same formula as DL calc) which incorporates the k value from RFC 3766. Also adds dl_exponent_size which returns the exponent size, this one ignores k thus using a ~10 bit larger exponent than strictly necessary. Adding in k downgrades 1024 bit RSA to exactly 80 bits, which is probably about right.
* | | Improve side channel attack resistance of table based AES implJack Lloyd2015-11-292-416/+164
| | |
* | | Add differential compression test.Jack Lloyd2015-11-281-1/+1
| | | | | | | | | | | | | | | Change getrusage output to static system data since it is sparse and changes rarely, and so actually does trigger the differential test.
* | | Push the hardcoded entropy estimates up to build.hJack Lloyd2015-11-2810-70/+58
| | | | | | | | | | | | Defaults should be fine for everyone but it makes the values more transparent
* | | Merge pull request #320 from matejk/fix_crash_in_comp_filterSimon Warta2015-11-261-0/+7
|\ \ \ | | | | | | | | Fixed crash in compression filter when transform argument is null.
| * | | Compression filter: Reorganised verification order of transform.Matej Kenda2015-11-261-4/+6
| | | |
| * | | Fixed crash in compression filter when transform argument is null.Matej Kenda2015-11-031-1/+6
| |/ /
* | | New reseed_with_sources call on RNGsJack Lloyd2015-11-2430-140/+305
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Provides an easier way for an application to configure a list of entropy sources they'd like to use, or add a custom entropy source to their seeding. Exposes some toggles for the global/default entropy sources to build.h Adds basic entropy tests which runs the polls and does sanity checking on the results, including compression tests if available. These are less useful for the CSPRNG outputs but a good check for the ones producing plain ASCII like the /proc reader.
* | | Remove bogus code from generic mp_madd header, noticed on PPC build.Jack Lloyd2015-11-232-5/+6
| |/ |/| | | | | Also fix a few cast and zero-as-nullptr warnings in the AltiVec header
* | Remove mul128.h header from public viewJack Lloyd2015-11-163-19/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The only reason mul128.h was included in mp_types.h was for the definition of dword. But dword is only needed by the generic version of mp_madd, which is an internal header. So move both the inclusion of the header and the dword definition to there. Previously mul128.h was very public (mp_types.h to bigint.h to rsa.h, for example) and use of __int128 causes problems in pedantic mode. So additionally, prefer using the TI attribute version since GCC does not complain about that. Clang's -Wpedantic does not seem to care about it either way. GH #330
* | Fix bug causing TLS client to sometimes reject DHE server kexJack Lloyd2015-11-132-35/+16
| | | | | | | | | | | | Re-encoding the server key exchange meant that any leading zeros in the values for DHE (or SRP) would be stripped out. This would cause the signature check to fail.
* | Add remove_all to TLS session manager interfaceJack Lloyd2015-11-138-48/+67
| | | | | | | | DB::spin now returns the number of rows affected