aboutsummaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Fixes for minimized buildsJack Lloyd2019-02-1614-23/+84
| | | | Various configurations would fail build or test, fix that.
* Renamed m_handle to m_prov as this is the variable name used elsewhere.Ricardo Martins2019-02-151-1/+1
|
* Use /Fd flag when building lib with MSVCJack Lloyd2019-02-143-3/+7
| | | | See #1831
* Support arbitrary key lengths in SHAKE-128 cipherJack Lloyd2019-02-133-22/+70
| | | | | We need this for Kyber, which uses 34 byte inputs to XOF when computing the public matrix.
* Remove redundant call to start_timerJack Lloyd2019-02-131-2/+0
|
* cli: sign and verify emsa default is empty for Ed25519 (fix #1828)Nuno Goncalves2019-02-071-14/+33
| | | | Signed-off-by: Nuno Goncalves <[email protected]>
* Skip setting -momit-leaf-frame-pointerJack Lloyd2019-02-051-5/+0
| | | | | It turns out GCC already uses -fomit-frame-pointer by default since at least GCC 4.7
* Use threads for Asan tests tooJack Lloyd2019-02-051-1/+1
|
* Properly detect embedded PowerPCJack Lloyd2019-02-051-1/+6
| | | | GH #1820
* Clean up test registration a bitJack Lloyd2019-02-052-24/+31
|
* Build fixes for GNU/HurdJack Lloyd2019-02-042-0/+3
| | | | Thanks to @noloader for testing this and the relevant info.
* Merge GH #1819 Add Thread_Pool and use it for running testsJack Lloyd2019-01-3113-84/+454
|\
| * Add a simple Thread_Pool testJack Lloyd2019-01-312-0/+88
| | | | | | | | And allow registering one-off functions as tests
| * Run the tests in multithreaded mode in CIJack Lloyd2019-01-311-2/+5
| |
| * Run the test suite in multiple threadsJack Lloyd2019-01-316-68/+149
| | | | | | | | Refactor areas where data was being shared
| * Add a thread poolJack Lloyd2019-01-315-14/+212
| |
* | Changes to CPUID layout caused ABI breakage, tick sonameJack Lloyd2019-01-311-1/+1
| |
* | Add a couple more ChaCha testsJack Lloyd2019-01-311-0/+9
| |
* | Have set_mem only work for bytesJack Lloyd2019-01-311-4/+3
| | | | | | | | It is (mildly) dangerous with larger types, and we don't need it.
* | Minor HMAC optimizationsJack Lloyd2019-01-312-15/+31
|/ | | | | Most importantly, avoid an allocation when the key is larger than a block size. Also avoid some virtual calls that can be cached.
* Merge GH #1821 Refactor CPUID to be thread safeJack Lloyd2019-01-319-55/+90
|\
| * Refactor CPUID to make it thread safeJack Lloyd2019-01-309-55/+90
| | | | | | | | | | | | | | | | | | | | Needed for #1819 and unfortunately Windows does not allow thread local data to be stored as a member of a DLL exported class. So hide it behind an accessor function instead. This slows down CPUID test somewhat and I would like to address that but it seems hard without breaking the CPUID API, which is for better or worse public.
* | Recognize BLAKE2b also [ci skip]Jack Lloyd2019-01-311-1/+1
|/ | | | See #1822
* Compile fixJack Lloyd2019-01-302-2/+2
|
* Use std::mutex instead of mutex_type hereJack Lloyd2019-01-304-8/+8
| | | | | std::condition_variable only works with std::mutex anyway, and this module is not enabled on systems without threads.
* Merge GH #1818 Prevent PKCS11 tests from allocating before mainJack Lloyd2019-01-284-98/+94
|\
| * Avoid invoking the mlock allocator before main startsJack Lloyd2019-01-284-98/+94
| | | | | | | | Simplify the PKCS11 tests slightly, no real reason for PKCS11_Test here
* | Avoid a harmless data race in RSA decryptionJack Lloyd2019-01-281-0/+7
|/ | | | | | | | | Both threads called Modular_Reducer::reduce on m, which caused the significant words result to be written twice in an unsynchronized way. By calling it once beforehand it is computed and cached and so no additional writes occur. Found with helgrind.
* Fix warningJack Lloyd2019-01-241-3/+6
|
* Doc updatesJack Lloyd2019-01-241-1/+3
|
* Revamp BigInt encoding and decoding.Jack Lloyd2019-01-245-104/+131
| | | | Deprecate some crufty functions. Optimize binary encoding/decoding.
* Fix macro checksJack Lloyd2019-01-241-2/+1
|
* Split out bcrypt cli util to its own fileJack Lloyd2019-01-222-78/+89
|
* Make the Memory_Pool MMU operations a compile time optionJack Lloyd2019-01-222-4/+30
| | | | | | Previously the calls were commented out as this has a substantial performance impact. Allow enabling them via a build.h toggle, and enable it by default when debug asserts are turned on.
* Remove some unnecessary assertsJack Lloyd2019-01-223-34/+0
| | | | Now this is checked at the higher level
* Fix XLC sanitizersJack Lloyd2019-01-221-1/+3
| | | | Broken by 22b1889
* Move hash util to hash.cpp and add --format optionJack Lloyd2019-01-223-65/+127
| | | | | | | For example/documentation purposes, having distinct files makes the code easier to find. New --format option allows encoding as base64 or base58
* Merge GH #1816 Rename Integrity_Failure to Invalid_Authentication_TagJack Lloyd2019-01-2121-33/+50
|\
| * Rename Integrity_Failure to Invalid_Authentication_TagJack Lloyd2019-01-1821-33/+50
| | | | | | | | | | | | | | | | | | This makes the meaning and usage more clear. Add a specific error type so invalid tags can be distinguished without having to catch that specific type. See also #1813
* | Add BMI2 code to policy filesJack Lloyd2019-01-213-0/+9
| |
* | Add BMI2 variants for SHA-512 and SHA-3Jack Lloyd2019-01-1812-10/+417
|/ | | | Both about 33% faster on Skylake
* Fix init ordering warningJack Lloyd2019-01-181-1/+1
|
* Remove use of std::filesystem / boost::filesystemJack Lloyd2019-01-173-70/+8
| | | | | | | | | Boost doesn't buy us anything here since we need to maintain Win32 and POSIX implementations for non-Boost builds, and Boost only supports those two APIs anyway. MSVC's implementation of std::filesystem does not help for similar reasons, as we have to maintain a Win32 version for MinGW.
* Define BOTAN_IF_CONSTEXPRJack Lloyd2019-01-174-8/+25
| | | | This lets us avoid some warnings under VC++ 2017
* Fix some warnings from PVS-StudioJack Lloyd2019-01-1712-22/+37
| | | | No real bugs, but pointed out some odd constructs and duplicated logic
* Merge GH #1808 Add sandbox feature to CLIJack Lloyd2019-01-146-0/+82
|\
| * Sandboxing feature from CLI pov.David Carlier2019-01-145-25/+74
| | | | | | | | | | No resources to free with actual OS features but might be of use for later.
| * Proposal of sandboxing feature.David Carlier2019-01-065-0/+33
| | | | | | | | For now only used by the TLS server.
* | Allocate aligned pages in mem pool fuzzerJack Lloyd2019-01-131-11/+68
| | | | | | | | | | | | | | Otherwise the alignment tests can fail. OSS-Fuzz 12412 And also free the pages on exit otherwise OSS-Fuzz detects it as a leak. OSS-Fuzz 12413
* | Remove unused fieldsJack Lloyd2019-01-131-3/+0
| |