aboutsummaryrefslogtreecommitdiffstats
path: root/src/tests/test_dlies.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Make the tests VarMap an actual type instead of a hashmap typedef.Jack Lloyd2018-05-291-9/+9
|
* Add RAII versions of get_cipher_mode and get_aeadJack Lloyd2018-04-071-2/+2
| | | | See also #1526
* Avoid crash in DLIES tests if AEADs disabledJack Lloyd2017-09-291-0/+6
|
* Add final annotations as appropriate in the test codeJack Lloyd2017-09-221-2/+2
|
* More include header cleanupsJack Lloyd2017-09-211-1/+0
|
* Reformat code with astyle + fix code styleTomasz Frydrych2017-05-011-10/+12
|
* Minor refactoring of Text_Based_TestJack Lloyd2016-12-191-1/+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.
* Convert to using standard uintN_t integer typesJack Lloyd2016-12-181-3/+3
| | | | | | Renames a couple of functions for somewhat better name consistency, eg make_u32bit becomes make_uint32. The old typedefs remain for now since probably lots of application code uses them.
* Reunify registered test names [ci skip]René Korthaus2016-10-231-1/+1
|
* Remove Algo_Registry usage from public key code.Jack Lloyd2016-10-071-4/+4
| | | | | | | | Instead the key types exposes operations like `create_encryption_op` which will return the relevant operation if the algorithm supports it. Changes pubkey.h interface, now RNG is passed at init time. Blinder previous created its own RNG, now it takes it from app.
* DLIES test tweaksJack Lloyd2016-08-281-9/+9
| | | | | Use the group name instead of repeating 2048 bit prime N times. Split up reporting by cipher type.
* DLIES reworkDaniel Neus2016-07-131-19/+132
| | | | | | | | | | | | | | | | | | | | | | | | | With these fixes the implementation is now compatible with bouncycastle and it should operate as it is specified in "DHIES: An encryption scheme based on Diffie-Hellman Problem" or in BSI technical guideline TR-02102-1. In addition to the already present XOR-encrypion/decryption mode it's now possible to use DLIES with a block cipher. Previously the input to the KDF was the concatenation of the (ephemeral) public key and the secret value derived by the key agreement operation: ``` secure_vector<byte> vz(m_my_key.begin(), m_my_key.end()); vz += m_ka.derive_key(0, m_other_key).bits_of(); const size_t K_LENGTH = length + m_mac_keylen; secure_vector<byte> K = m_kdf->derive_key(K_LENGTH, vz); ``` I don't know why this was implemented like this. But now the input to the KDF is only the secret value obtained by the key agreement operation. Furthermore the order of the output was changed from {public key, tag, ciphertext} to {public key, ciphertext, tag}. Multiple test vectors added that were generated with bouncycastle and some with botan itself.
* Add option --module-policyJack Lloyd2016-03-061-6/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | A module policy is a file specifying three types of modules: ones which are required, ones which are prohibited, and ones which should be used if otherwise available (this is mostly for platform specific modules). Finally there are whatever modules which exist in the library of which the policy makes no mention. These will be included if an explicit dependency of some other module pulls them in (so there is no reason to mention base, utils, ... in the file) but skipped otherwise. For example policy 'sane' does not mention 'utils' or 'twofish' either way. Since utils is a dependency of other modules which are included, but Twofish does not. However unlike an explicitly prohibited module, not mentioned can still be requested as part of the build (here with --enable-module=twofish) Also fixes some test bugs noticed by compiling in different build configs. DLIES test didn't check that the KDF and MAC existed. Adds a typedef for MessageAuthenticationCode because typing it twice in a single line in the DLIES test made me think it's way too long. :) Also fix some fuzzer build problems. Due to a copy and paste bug the PKCS certificate (it was not). Inspired by GH #439
* 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.
* Update and consolidate the test framework.Jack Lloyd2015-11-111-69/+49
| | | | | | | | | | | 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.
* Remove use of lookup.h in favor of new T::create API.Jack Lloyd2015-09-211-5/+4
|
* Fix TEST_DATA_DIRSimon Warta2015-07-151-1/+1
|
* Make ./configure.py --no-autoload --enable-modules='adler32,dlies' compileSimon Warta2015-07-031-0/+8
|
* Make Botan compile when only some modules are enabledSimon Warta2015-07-031-12/+13
| | | | Fixes #146.
* 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.
* All tests now share an RNG. Uses system RNG if availablelloyd2014-12-281-2/+2
|
* More fixes for minified buildslloyd2014-02-091-7/+14
|
* Split up docs into the reference manual, the website, and everything else.lloyd2014-01-101-0/+77
| | | | | | | | | | | 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-77/+0
|
* Split up public key tests and data, use new test frameworklloyd2014-01-051-0/+77