aboutsummaryrefslogtreecommitdiffstats
path: root/src/tests/data
Commit message (Collapse)AuthorAgeFilesLines
* Add Wycheproof EAX test casesJack Lloyd2016-12-211-18/+170
|
* Add RSA PKCS1v1.5 signature verification tests from Wycheproof suite.Jack Lloyd2016-12-202-1/+158
| | | | | A set of carefully generated invalid signatures which are sometimes accepted by implementations due to bugs in padding verification.
* Remove obsolete test dataJack Lloyd2016-12-1934-152/+0
| | | | | Remove test files for CVC as well as various tests which have subsequently been rewritten.
* Remove duplicate test dataJack Lloyd2016-12-19152-0/+0
| | | | | | All 76 of the NIST certificate tests use the same root certificate and that issuer has an identical CRL for each test. So, just have the one copy.
* Add additional primality testsJack Lloyd2016-12-191-57/+214
| | | | | | | Add a long list of 'false' primes from Google's Wycheproof tests: https://github.com/google/wycheproof/blob/master/java/com/google/security/wycheproof/testcases/BigIntegerTest.java Split vector file format into Prime and NonPrime sections for easier reading.
* Add some additional ressol testsJack Lloyd2016-12-141-0/+20
|
* Fix exponentiation bug, related fixesJack Lloyd2016-12-142-0/+27
| | | | | | | | | | | | | | | GH #754 exposed a bug in the non-Montgomery exponentiation case. It turned out then when the fixed window was picked to any value > 1, the result would be incorrect due to an off by one. This is the one line fix in powm_fw.cpp Also fix a bug in bigint_mul which caused incorrect results, because the output BigInt was not being zeroed out before use. This is only exposed in rare cases, found (somewhat indirectly) in OSS-Fuzz #287. Add more modular exponentiation tests, which would have caught these issues earlier.
* Update test data to reflect change in e8009766ca2Jack Lloyd2016-12-111-24/+0
|
* Merge GH #759 Add ISO 9796-2 signature schemesJack Lloyd2016-12-082-0/+56
|\
| * Add ISO9796-2 Signature Schemes giving message recovery 2 and 3.Never2016-12-052-0/+56
| |
* | Merge GH #763 Document test vector originsJack Lloyd2016-12-085-0/+12
|\ \
| * | Add sources for some test vectors [ci skip]René Korthaus2016-12-085-0/+12
| | |
* | | Fix off by one in PKCS #1 v1.5 decryption decodingJack Lloyd2016-12-081-0/+46
|/ / | | | | | | | | | | | | | | | | | | | | | | When the code was changed in b8966d0f89e, the offset was not changed, so it would reject ciphertexts with exactly 8 bytes of random padding (the required minimum). Found by pkcs1 fuzzer which also had problems due to not having been updated at the same time. Add a test suite for decoding of PK decryption padding to cover the problem cases.
* | Remove ECB test vector fileJack Lloyd2016-12-041-418/+0
| | | | | | | | | | | | Two part commit with d44c00a as otherwise git assumes that ecb.vec was renamed xtea.vec, because the imported vectors swamped the ones that were previously being used in the bare block cipher tests.
* | Remove ECB modeJack Lloyd2016-12-043-0/+131
| | | | | | | | | | | | | | Not a good thing to offer at this level. If you know what you are doing for the strange special case where it is necessary, the raw BlockCipher interface is available and probably more convenient.
* | Add tests for TLS policy valuesJack Lloyd2016-11-264-0/+92
| |
* | Add test for various functions previously missed (T::clone, PBKDF::name, ↵Jack Lloyd2016-11-262-5/+5
| | | | | | | | | | | | | | 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.
* | Merge GH #653 OCSP and X.509 path validation refactorJack Lloyd2016-11-2511-2/+153
|\ \ | | | | | | | | | | | | | | | Splits up path validation into several sub-functions for easier testing and creating customized validation code. Much improved OCSP handling and OCSP tests.
| * | Account for new string in test dataJack Lloyd2016-11-251-2/+2
| | |
| * | Better OCSP tests including online testsJack Lloyd2016-11-235-0/+100
| | | | | | | | | | | | Tests touching network are gated by --run-online-tests flag.
| * | Add some simple OCSP testsJack Lloyd2016-11-235-0/+51
| |/ | | | | | | | | | | Nothing much but better than nothing. Also add a useful arg check to OCSP::Request constructor.
* | Add a couple more workfactor testsJack Lloyd2016-11-251-0/+6
| | | | | | | | [ci skip]
* | Adds SHAKE support for XMSSMatthias Gierlings2016-11-252-0/+120
| | | | | | | | | | | | | | - Enables code for shake support - Creating SHAKE hash function by name now allows to select output size of 256 Bit for SHAKE128 and 512 Bit for SHAKE256. - Adds *self-generated*, unverified test vectors for XMSS/SHAKE.
* | Add tests for PK work factor functionsJack Lloyd2016-11-221-0/+37
|/ | | | Expected results are just what it generated on my machine.
* Merge GH #727 Tests for KDF::nameJack Lloyd2016-11-1610-34/+34
|\
| * KDF1 uses a hash function onlyRené Korthaus2016-11-161-1/+1
| |
| * Add a test for KDF::name()René Korthaus2016-11-1510-34/+34
| | | | | | | | | | | | This required fixing some test vectors that previously omitted the MAC, defaulting to HMAC, that used the SHA-1 alias to SHA-160, and fixing X942_PRF::name().
* | Add negative tests for cipher mode paddingJack Lloyd2016-11-151-26/+69
|/
* Merge GH #724 Add ESP (IPsec) CBC padding modeJack Lloyd2016-11-151-0/+21
|\
| * Add ESP block cipher padding from RFC 4303René Korthaus2016-11-141-0/+21
| | | | | | | | | | ESP padding is one of the recommended padding methods from BSI-TR-02102-1.
* | Add test vectors for HKDF-Expand and HKDF-ExtractRené Korthaus2016-11-151-22/+140
| |
* | Add full HKDF implementationRené Korthaus2016-11-121-38/+26
|/ | | | | | | | | | Adds the full HKDF as class HKDF, renames the existing HKDF, which only implemented the expansion step, to HKDF_Expand and adds the extraction step as HKDF_Extract. The latter two are usually only used seperately in protocols such as TLS. A normal user would go for the full HKDF.
* Add params to XMSS test inputsJack Lloyd2016-11-122-43/+43
| | | | | | | This prevents the test suite from globbing all the XMSS tests together under "XMSS/Raw"; since XMSS ignores the padding anyway, pretend the param string is the padding which causes the normal logic in the signature test code to do the right thing.
* Added Extended Hash-Based Signatures (XMSS)Matthias Gierlings2016-11-112-0/+215
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [1] XMSS: Extended Hash-Based Signatures, draft-itrf-cfrg-xmss-hash-based-signatures-06 Release: July 2016. https://datatracker.ietf.org/doc/ draft-irtf-cfrg-xmss-hash-based-signatures/?include_text=1 Provides XMSS_PublicKey and XMSS_PrivateKey classes as well as implementations for the Botan interfaces PK_Ops::Signature and PK_Ops::Verification. XMSS has been integrated into the Botan test bench, signature generation and verification can be tested independently by invoking "botan-test xmss_sign" and "botan-test xmss_verify" - Some headers that are not required to be exposed to users of the library have to be declared as public in `info.txt`. Declaring those headers private will cause the amalgamation build to fail. The following headers have been declared public inside `info.txt`, even though they are only intended for internal use: * atomic.h * xmss_hash.h * xmss_index_registry.h * xmss_address.h * xmss_common_ops.h * xmss_tools.h * xmss_wots_parameters.h * xmss_wots_privatekey.h * xmss_wots_publickey.h - XMSS_Verification_Operation Requires the "randomness" parameter out of the XMSS signature. "Randomness" is part of the prefix that is hashed *before* the message. Since the signature is unknown till sign() is called, all message content has to be buffered. For large messages this can be inconvenient or impossible. **Possible solution**: Change PK_Ops::Verification interface to take the signature as constructor argument, and provide a setter method to be able to update reuse the instance on multiple signatures. Make sign a parameterless member call. This solution requires interface changes in botan. **Suggested workaround** for signing large messages is to not sign the message itself, but to precompute the message hash manually using Botan::HashFunctio and sign the message hash instead of the message itself. - Some of the available test vectors for the XMSS signature verification have been commented out in order to reduce testbench runtime.
* Add SHAKE-128 and SHAKE-256 as hash functionsJack Lloyd2016-11-101-0/+29
|
* Add signature KAT test for GOST 34.10-2001Jack Lloyd2016-11-062-0/+17
| | | | | | Vectors here just whatever we spit out, but I can't find any GOST vectors using the 'A' param set. Anyway at least with this, we are testing to have consistent behavior across platforms.
* Add test for DSA parameter generationJack Lloyd2016-11-031-0/+86
| | | | | Limited to 1024 bit params by default to keep runtimes reasonable, but test vectors for all sizes from FIPS 186-3 do pass.
* Add short output KDF1 testJack Lloyd2016-11-031-0/+5
|
* Add P-521 ECDSA testJack Lloyd2016-10-301-0/+9
| | | | GH #681
* Remove HMAC_RNG, X9.31-RNG, BeOS stats, EGD reader, Unix process runnerJack Lloyd2016-10-281-1541/+0
| | | | | Change AutoSeeded_RNG to use SHA-384, SHA-256, SHA-3(256), or SHA-1, whichever is available (in that order).
* Added implementation for GMACMatthias Gierlings2016-10-271-0/+80
| | | | | | - Added GMAC class - Integrated GMAC into MAC-Class test bench. Run GMAC tests using ./botan-test mac
* Add missing variable to AES test vectorJack Lloyd2016-10-251-0/+1
|
* Add long (4+ block) AES KATsJack Lloyd2016-10-251-0/+10
| | | | We were not previously hitting the 4 way unrolled loop in AES-NI in tests
* Add SHAKE-128 as stream cipherJack Lloyd2016-10-191-0/+3379
| | | | | Updates NewHope to use that instead of the hard-coded SHAKE-128, and adds toggle for BoringSSL compat mode using AES-128/CTR + SHA-256.
* Add proper SHA-3Jack Lloyd2016-10-191-0/+1216
| | | | | | | | | | Kind of a copy and paste of Keccak, but only a single copy of the permutation at least. Keccak depends on SHA-3 instead of the reverse, so that SHA-3 can be enabled without also bringing in an unapproved hash function. Updates newhope code and removes API function newhope_hash which was an unofficial SHA-3-256.
* Merge GH #645 TLS compressed pointsJack Lloyd2016-10-072-4/+4
|\
| * Fix tls_messages testsRené Korthaus2016-10-032-4/+4
| |
* | certstore testsKai Michaelis2016-10-0211-0/+242
|/
* New TLS positive and negative tests.Juraj Somorovsky2016-09-307-0/+234
| | | | | | | | | | | | | | | | | | | TLS message parsing: - CertificateVerify - HelloVerify - ClientHello (with extensions) - ServerHello (with extensions) - NewSessionTicket - Alert TLS message processing: - HelloVerify TLS Policy tests Unit tests with TLS client authentication Added test_throws method that checks the correct exception message.
* Fix TLS 1.2 PRF test vectorsRené Korthaus2016-09-231-2/+2
| | | | When adding these to the .vec file, some unnecessary spaces were included.