aboutsummaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Avoid null pointer write in FFIJack Lloyd2018-09-282-1/+7
| | | | | | | | If a function returning variable length output was called with a null output buffer but a non-zero output buffer length, FFI layer would call memset(nullptr, 0, buffer_len) and crash. Caught by Coverity.
* Use correct array length in Serpent AVX2Jack Lloyd2018-09-281-2/+2
| | | | Not an actual problem, but flagged by Coverity
* Spell check the documentationJack Lloyd2018-09-287-14/+14
|
* Skip using mmap allocation if mlock is not available.Jack Lloyd2018-09-271-8/+4
| | | | | Previously this would just mmap but pointlessly as the memory was not locked; might as well use the standard heap in that case.
* Add OS::running_in_privileged_stateJack Lloyd2018-09-274-17/+41
| | | | | | | | Avoid any getenv toggles or reading /proc if we are setuid/setgid. It is possible there is or will someday be some file in /proc that is world-readable, but if read by a privileged user causes some side effect.
* fileno is a macro on OpenBSDJack Lloyd2018-09-271-3/+4
|
* Merge GH #1692 Fix test failure when http_util disabledJack Lloyd2018-09-261-1/+1
|\
| * Fix x509_path_x509test failing when http_util module was not enabledJose Pereira2018-09-251-1/+1
| |
* | No need for an RNG object here [ci skip]Jack Lloyd2018-09-251-2/+1
| |
* | Change Clang fuzzing flags to avoid deprecated options. [ci skip]Jack Lloyd2018-09-241-1/+1
| |
* | Avoid some gcc warnings in mode padding fuzzer [ci skip]Jack Lloyd2018-09-231-1/+5
| |
* | Fix a crash in the mode padding fuzzerJack Lloyd2018-09-232-0/+5
| | | | | | | | | | | | The reference version of 1and0 padding would crash on an all-zero input. OSS-Fuzz 10628
* | Add a fuzzer for OAEP unpaddingJack Lloyd2018-09-223-10/+135
| | | | | | | | This tests the delim scanning section which must be const time.
* | Add fuzzer for mode unpadding, and fix bugs found therebyJack Lloyd2018-09-225-59/+312
| | | | | | | | | | | | | | Both PKCS7 and X9.23 padding modes did not examine the first byte of the purported padding if the padding took an entire block. So for example for a 64-bit cipher, PKCS7 would accept XX08080808080808 as a valid padding for any byte value.
* | Optimization for Poly1305Jack Lloyd2018-09-201-17/+24
| | | | | | | | | | Rearranging this code seems to let both GCC and Clang do a little better on the core loop, 4-7% depending on buffer size on my i7-6700k
* | Add support for using Linux getrandom syscallJack Lloyd2018-09-202-0/+42
| | | | | | | | Disabled by default as it requires a relatively recent kernel and glibc.
* | Remove attempting to use /dev/srandomJack Lloyd2018-09-201-1/+1
| | | | | | | | | | Seems to have been removed from OpenBSD which AFAIK was the only place it occured.
* | Correct some maintiner mode warningsJack Lloyd2018-09-202-4/+4
| |
* | Slight optimization for MGF1Jack Lloyd2018-09-201-2/+3
| | | | | | | | Avoid needless allocations during PSS and OAEP operations.
* | Ignore .doctrees missing when building websiteJack Lloyd2018-09-191-2/+9
| |
* | Add ppc64el alias [ci skip]Jack Lloyd2018-09-191-0/+1
| | | | | | | | This is what Debian calls little endian 64-bit PPC
* | Set default endian for SPARC and RISC-VJack Lloyd2018-09-192-0/+2
| | | | | | | | | | | | | | RISC-V is always little endian by definition. SPARC is technically bi-endian but basically 100% of userspace is big endian, so assume it.
* | Update build flags for Sun StudioJack Lloyd2018-09-181-3/+3
| |
* | Use an Alloc template to reduce duplication in Filter::sendJack Lloyd2018-09-181-14/+6
| |
* | Fix build with i586Fabrice Fontaine2018-09-161-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 513d19781a558fbd1ff03c7152f61b5e7f294297 removed support for i586, put it back otherwise the following build failure is raised: (cd /accts/mlweber1/instance-0/output/build/botan-2.7.0; PATH="/accts/mlweber1/instance-0/output/host/bin:/accts/mlweber1/instance-0/output/host/sbin:/usr/bin:/bin" ./configure.py --cpu="i586" --os=linux --cc=gcc --cc-bin="/accts/mlweber1/instance-0/output/host/bin/i586-linux-g++" --prefix=/usr --disable-static-library --enable-shared-library --without-stack-protector --with-boost --with-bzip2 --with-openssl --with-sqlite --with-lzma --with-zlib --disable-altivec --disable-neon) INFO: ./configure.py invoked with options "--cpu=i586 --os=linux --cc=gcc --cc-bin=/accts/mlweber1/instance-0/output/host/bin/i586-linux-g++ --prefix=/usr --disable-static-library --enable-shared-library --without-stack-protector --with-boost --with-bzip2 --with-openssl --with-sqlite --with-lzma --with-zlib --disable-altivec --disable-neon" INFO: Autodetected platform information: OS="Linux" machine="x86_64" proc="x86_64" ERROR: Unknown or unidentifiable processor "i586" Fixes: - http://autobuild.buildroot.org/results/aaa2ea8c3fb5fe954c0af0061f83ad70e0a862f9 Signed-off-by: Fabrice Fontaine <[email protected]>
* | Simplify BigInt::get_substring a bitJack Lloyd2018-09-152-10/+40
| | | | | | | | And forbid 0 length substrings, which did not work correctly anyway.
* | Use new CAST-128 specific feature macro hereJack Lloyd2018-09-151-1/+1
| |
* | Define botan_scrypt in terms of botan_pwdhashJack Lloyd2018-09-131-12/+5
| |
* | In FFI pwdhash functions, let len == 0 mean "call strlen"Jack Lloyd2018-09-132-2/+18
| |
* | In AutoSeeded_RNG invoke randomize_with_ts_input on the owned RNGJack Lloyd2018-09-131-1/+1
| | | | | | | | | | | | | | | | Invoking on this means we use RandomNumberGenerator::randomize_with_ts_input which just adds timestamps. Whereas Stateful_RNG::randomize_with_ts_input (as implemented by the owned RNG) also adds the reseed counter and the last pid. Probably no real difference, but can't hurt and not any slower.
* | Split 'cast' module into CAST-128 and CAST-256Jack Lloyd2018-09-1310-5/+13
| | | | | | | | | | | | | | They were only in the same place because of the desire to share the sbox tables, but that can be handled by adding a dependency. This makes it possible to disable CAST-256 while leaving CAST-128.
* | Merge GH #1670 New password hashing interfaceJack Lloyd2018-09-1323-599/+1763
|\ \
| * | Test Scrypt private key encryptionJack Lloyd2018-09-101-3/+18
| | |
| * | Remove redundant operationJack Lloyd2018-09-101-4/+0
| | |
| * | Support tuning in PGP-S2K PBKDF interfaceJack Lloyd2018-09-101-3/+8
| | |
| * | Fix Doxygen commentsJack Lloyd2018-09-101-2/+4
| | |
| * | Add testsJack Lloyd2018-09-104-19/+148
| | | | | | | | | | | | This is a contribution of Ribose Inc (@riboseinc)
| * | Add from_iterationsJack Lloyd2018-09-108-13/+57
| | |
| * | Add pbkdf_tune command line utilJack Lloyd2018-09-101-0/+99
| | |
| * | Add FFIJack Lloyd2018-09-102-15/+134
| | | | | | | | | | | | This is a contribution of Ribose Inc (@riboseinc)
| * | Convert ScryptJack Lloyd2018-09-104-128/+281
| | | | | | | | | | | | | | | | | | | | | This also changes some (library only) APIs so PBES2 needed to be modified. This is a contribution of Ribose Inc (@riboseinc)
| * | Convert PGP-S2KJack Lloyd2018-09-102-63/+225
| | | | | | | | | | | | This is a contribution by Ribose Inc (@riboseinc)
| * | Convert PBKDF2Jack Lloyd2018-09-103-71/+226
| | | | | | | | | | | | This is a contribution by Ribose Inc (@riboseinc)
| * | Add PasswordHash and PasswordHashFamilyJack Lloyd2018-09-104-1/+242
| | | | | | | | | | | | This is a contribution by Ribose Inc (@riboseinc)
| * | Promote Timer to an internal util classJack Lloyd2018-09-104-302/+346
| | |
* | | Force Sphinx version to 1.7.9 to work around a problem in 1.8Jack Lloyd2018-09-131-1/+1
| | | | | | | | | | | | See https://github.com/sphinx-doc/sphinx/issues/5417
* | | Some document fixesJack Lloyd2018-09-133-9/+15
| | | | | | | | | | | | | | | Downgrade min Sphinx to 1.2 again - I checked and while Sphinx 1.2 produce many warnings it does generate usable output.
* | | Fix TLS client CLI which was broken by disabling v1.0/v1.1 by defaultJack Lloyd2018-09-122-12/+56
| | |
* | | Create proper KATs for cryptobox functionJack Lloyd2018-09-122-42/+134
| | |
* | | Fix certstore testsJack Lloyd2018-09-112-2/+4
| | | | | | | | | | | | Accidentally disabled in 643a4041bedc