aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/misc
Commit message (Collapse)AuthorAgeFilesLines
* Remove Transform base classJack Lloyd2016-04-211-2/+1
| | | | | | | | | | | | | | | | | | | | | | With sufficient squinting, Transform provided an abstract base interface that covered both cipher modes and compression algorithms. However it mapped on neither of them particularly well. In addition this API had the same problem that has made me dislike the Pipe/Filter API: given a Transform&, what does it do when you put bits in? Maybe it encrypts. Maybe it compresses. It's a floor wax and a dessert topping! Currently the Cipher_Mode interface is left mostly unchanged, with the APIs previously on Transform just moved down the type hierarchy. I think there are some definite improvements possible here, wrt handling of in-place encryption, but left for a later commit. The compression API is split into two types, Compression_Algorithm and Decompression_Algorithm. Compression_Algorithm's start() call takes the compression level, allowing varying compressions with a single object. And flushing the compression state is moved to a bool param on `Compression_Algorithm::update`. All the nonsense WRT compression algorithms having zero length nonces, input granularity rules, etc as a result of using the Transform interface goes away.
* cppcheck fixes: Class 'X' has a constructor with 1 argument that is not ↵Daniel Neus2016-03-052-2/+2
| | | | explicit.
* Fix remaining Wshadow warnings and enable on gcc and clangRené Korthaus2016-02-181-4/+4
|
* Mass-prefix member vars with m_René Korthaus2016-01-085-38/+43
|
* String comparision fixesDaniel Neus2016-01-041-1/+1
| | | | fix PVS-Studio perfomance warnings
* Remove all remaining uses of throwing a std:: exception directlyJack Lloyd2015-12-191-1/+1
| | | | See GH #340 and 6b9a3a5 for background
* CLI rewriteJack Lloyd2015-12-193-201/+0
| | | | | | | | | | | | | | | | | | 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.
* Missing addsJack Lloyd2015-12-111-1/+0
|
* Reroot the exception hierarchy into a toplevel Exception classJack Lloyd2015-12-114-10/+10
| | | | | | | | 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
* Build fixJack Lloyd2015-10-142-2/+3
|
* Add null pointer check to pbes2_decrypt, fix message in pbes2_encryptJack Lloyd2015-10-141-1/+3
|
* Move DataSource to utils and rewrite PEM encoding to avoid filtersJack Lloyd2015-10-142-12/+31
| | | | | Removes filters as as an internal dependency pretty much entirely (outside of some dusty corners in misc).
* Add missing null pointer check to PBES2Jack Lloyd2015-10-111-0/+3
|
* Avoid concatination of charsSimon Warta2015-09-221-4/+4
| | | | | | | Ever tried? auto str = "some long string"; auto str2 = str + '\n'; It's not with the brainfuck finding the bug.
* Remove use of lookup.h in favor of new T::create API.Jack Lloyd2015-09-215-25/+24
|
* Internal header cleanupsJack Lloyd2015-09-193-4/+2
| | | | Only user-visible change is the removal of get_byte.h
* Refactor ./botan speedSimon Warta2015-08-211-9/+9
| | | | | | | * Add random_prime benchmark * Add is_prime benchmark * Respect runtime in benchmark_transform(). This sets default runtime from 2s to 0.5s per configuration
* Fix module combi: adler32,tssSimon Warta2015-07-081-0/+2
|
* Fix module combi: adler32,openpgpSimon Warta2015-07-081-0/+1
|
* Add missing module dependency numbertheory to fpe_fe1Simon Warta2015-06-261-1/+2
|
* lib/misc: Convert &vec[0] to vec.data()Simon Warta2015-06-259-37/+37
|
* ifstream/ostream take std::stringSimon Warta2015-06-231-1/+1
|
* Update broken module dependenciesSimon Warta2015-06-191-2/+1
| | | | | | | - 'pem' needs 'codec_filt', because this is where Base64_Encoder lives - 'codec_filt' needs 'base64', bacause Base64_Encoder uses base64_encode Fixes #71
* Fix various bugs found by Coverity scanner.lloyd2015-05-151-1/+1
| | | | | | | Uninitialized variables, missing divide by zero checks, missing virtual destructor, etc. Only thing serious is bug in TLS maximum fragment decoder; missing breaks in switch statement meant receiver would treat any negotiated max frament as 4k limit.
* Hide Algorithm_Factory and use the functions in lookup.h internally.lloyd2015-03-043-37/+26
| | | | | | 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
* Movelloyd2015-02-193-0/+210
|
* Add new module `ffi` which provides a plain C interface, plus a newlloyd2015-02-164-115/+2
| | | | | | | | | | | | ctypes Python wrapper that uses it. The API is intentionally designed to have a very simple ABI (extern "C", all structs are opaque, no memory ownership passing the FFI boundary, limited set of simple types as args) so the ctypes wrapper is quite simple. Currently ffi provides ciphers, hashes, MACs, RNGs, PBKDF, KDF, bcrypt, and most public key operations. Remove the old boost.python wrapper and all the build code for it.
* Clean up root dir, remove some unneeded dependencieslloyd2015-02-0532-0/+2384