aboutsummaryrefslogtreecommitdiffstats
path: root/src/tests/test_stream.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Use 64-bit integer for seek value in stream cipher testsJack Lloyd2018-11-041-1/+1
|
* Increase minimum Blowfish key length to 64 bitsJack Lloyd2018-09-071-0/+11
| | | | | | See #1673 Also, skip tests if the provider doesn't support the given key length.
* Test that a stream cipher not supporting IV still accepts 0 len inputJack Lloyd2018-08-081-0/+3
|
* Add StreamCipher::default_iv_lengthJack Lloyd2018-08-081-0/+7
|
* Fix a bug in XSalsa20Jack Lloyd2018-08-071-5/+18
| | | | | | | | If you called set_key, then set_iv, then set_iv again without having previously reset the key, you would end up with a garbled state buffer that depended on the value of the first IV. This only affected 192-bit Salsa nonces, not other sizes.
* Avoid crash in ChaCha20+Salsa if set_iv called without a key setJack Lloyd2018-08-071-18/+20
|
* Make the tests VarMap an actual type instead of a hashmap typedef.Jack Lloyd2018-05-291-5/+5
|
* Fix copy paste errorJack Lloyd2018-01-301-1/+1
|
* Fix RC4 name in case of skipped bytesJack Lloyd2017-12-281-0/+9
| | | | | | | | | | Add a test to detect that. Add test that stream ciphers throw if they are asked to use a nonce of a size they don't support. Remove "In = 00...00" blocks since that's implicit in the stream cipher tests.
* Support seeking in Salsa20Jack Lloyd2017-11-141-0/+14
| | | | Add a test that StreamCipher::seek throws if not keyed.
* Fix shadow warningJack Lloyd2017-11-051-2/+3
| | | | [ci skip]
* Add checks that keyed algorithms are actually keyed before useJack Lloyd2017-10-261-0/+23
| | | | | Previously calling update or encrypt without calling set_key first would result in invalid outputs or else crashing.
* Add final annotations as appropriate in the test codeJack Lloyd2017-09-221-1/+1
|
* Reformat code with astyle + fix code styleTomasz Frydrych2017-05-011-3/+11
|
* Filter provider in test loops, skip text based without provider.Alexander Bluhm2017-04-211-1/+2
| | | | | | | | The tests for block, hash, stream, pubkey, and mac loop over all possible crypto providers. If a specific provider is given on the botan-test command line, use only this one. If the provider to be tested is restricted, skip text based tests that do not have a possible provider.
* Minor refactoring of Text_Based_TestJack Lloyd2016-12-191-2/+1
| | | | | | Turns out astyle has some bugs wrt C++11 initialize lists. Rather than having astyle mangle all of the tests, convert to using a string which is split once at the start instead of a vector of keys.
* Add test for various functions previously missed (T::clone, PBKDF::name, ↵Jack Lloyd2016-11-261-1/+11
| | | | | | | AEAD::output_length) Fix a bug in CCM, GCM, and OCB decryption which caused `output_length(tag_size())` to fail even though empty plaintexts are certainly defined for all three modes.
* Small pushes on test coverageJack Lloyd2016-10-271-1/+14
| | | | | No real way to test what/if `clear` does, but at least we know it runs and doesn't crash which is an improvement over the status quo.
* Add T::provider() to allow user to inquire about implementation usedJack Lloyd2016-09-151-3/+5
| | | | | For block ciphers, stream ciphers, hashes, MACs, and cipher modes. Cipher_Mode already had it, with a slightly different usage.
* Let the input arg to stream cipher test be optional.Jack Lloyd2016-09-011-2/+5
| | | | | | If ommitted, assume an all zero input. Remove some In = 0000... from test files.
* Adding StreamCipher::seek interface, supporting seek in ChaCha, and also ↵SimCog2016-06-181-1/+5
| | | | adding ChaCha8 support
* Add --data-dir option to test commandJack Lloyd2015-12-201-1/+1
| | | | | | | Understand using '-' on the command line to mean stdin Fix last few unit tests that wanted to write to the filesystem; removes outdata directory.
* CLI rewriteJack Lloyd2015-12-191-1/+2
| | | | | | | | | | | | | | | | | | 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.
* Convert const char* arguments on Test:: to std::stringsJack Lloyd2015-11-281-1/+1
| | | | unless they are actually optional
* Update and consolidate the test framework.Jack Lloyd2015-11-111-63/+40
| | | | | | | | | | | The tests previously had used 4 to 6 different schemes internally (the vec file reader framework, Catch, the old InSiTo Boost.Test tests, the PK/BigInt tests which escaped the rewrite in 1.11.7, plus a number of one-offs). Converge on a design that works everywhere, and update all the things. Fix also a few bugs found by the test changes: SHA-512-256 name incorrect, OpenSSL RC4 name incorrect, signature of FFI function botan_pubkey_destroy was wrong.
* Don't treat missing ciphers, hashes, etc as test failuresJack Lloyd2015-10-111-1/+1
| | | | | Just print an error message and return. Reduces false fails with smaller builds
* Remove use of lookup.h in favor of new T::create API.Jack Lloyd2015-09-211-3/+2
|
* Make Botan compile when only some modules are enabledSimon Warta2015-07-031-0/+8
| | | | Fixes #146.
* tests: Convert &vec[0] to vec.data()Simon Warta2015-06-301-1/+1
|
* Replace \n by std::endl in tests to ensure proper flushingSimon Warta2015-06-191-3/+3
| | | | | | | - Remove additional newlines in CHECK_MESSAGE call - Remove redundant output of algo in aead_test() Closes #115
* Remove algo factory, engines, global RNG, global state, etc.lloyd2015-02-041-9/+6
| | | | | | | | | | | | | | | 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).
* Ensure all files have copyright and license info.lloyd2015-01-101-0/+6
| | | | | Update license header line to specify the terms and refer to the file, neither of which it included before.
* Add ChaChalloyd2014-01-311-1/+7
|
* Split up docs into the reference manual, the website, and everything else.lloyd2014-01-101-0/+76
| | | | | | | | | | | Add `website` target to makefile. Some progress towards fixing minimized builds. TLS now hard requires ECDSA and GCM since otherwise a minimized build has only insecure options. Remove boost_thread dependency in command line tool
* Rename test sourceslloyd2014-01-071-71/+0
|
* Split up public key tests and data, use new test frameworklloyd2014-01-051-8/+8
|
* Shuffle things around. Add NIST X.509 test to build.lloyd2014-01-011-0/+71