aboutsummaryrefslogtreecommitdiffstats
path: root/src/tests/test_bigint.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Fix test, catching wrong exception typeJack Lloyd2016-11-051-1/+1
|
* Handle missing SHA-x in DSA param gen testJack Lloyd2016-11-041-8/+13
|
* Add test for DSA parameter generationJack Lloyd2016-11-031-2/+44
| | | | | Limited to 1024 bit params by default to keep runtimes reasonable, but test vectors for all sizes from FIPS 186-3 do pass.
* Fix leading zero bytes in DSA, ECDSA, ECGDSA and ECKCDSA signaturesRené Korthaus2016-08-171-0/+27
|
* test BigInt::operator%=(word y)Daniel Neus2016-07-261-0/+9
|
* Fix for GCC 6Jack Lloyd2016-05-231-0/+1
|
* Add more tests for modular inverseJack Lloyd2016-02-211-4/+7
| | | | | The result of fuzzing with AFL for a while, then running cmin on the result.
* For odd moduli use a input-independent modular inverse algorithm.Jack Lloyd2016-02-201-2/+12
| | | | Also adds a (not const time) implementation of almost Montgomery reduction.
* Add tests and timings for inverse_modJack Lloyd2016-02-201-2/+31
|
* Split up BigInt testsJack Lloyd2016-02-171-127/+248
| | | | | | Removes a fair number of the power mod test cases for size and test time. Would be better to add a randomized or fuzzer-based test. Otherwise no change.
* Fix (nearly) infinite loop in RESSOL (modular square root).Jack Lloyd2016-02-011-0/+18
| | | | | | | It first computed the first i for q**(2**i) == 1, then checked that i was smaller than s. Given a composite modulus (for which the algorithm does not work), the loop might do a very large amount of work before returning the failure.
* add missing overridesDaniel Neus2016-01-081-1/+1
| | | | found by gcc with -Wsuggest-override
* some trivial compiler/PVS-Studio warning fixesDaniel Neus2015-12-221-1/+1
|
* 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.
* Fix occasional test failsJack Lloyd2015-11-111-5/+31
| | | | | | | | Increase the iterations of the BigInt::random_integer test. Since things get slow quickly, leave the larger range tests to higher soak levels. In TLS, if the corrupted data causes an exception immediately that's ok because it's corrupted data.
* Update and consolidate the test framework.Jack Lloyd2015-11-111-494/+237
| | | | | | | | | | | 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.
* Add power analysis countermeasures for ECC point multiplications.Jack Lloyd2015-08-211-49/+0
| | | | | | | | The plain PointGFp operator* now uses Montgomery ladder exclusively. Adds a blinded point multiply algorithm which uses exponent and point randomization, as well as a Montgomery ladder technique that takes a random walk of the possible addition chains for k.
* Restrict input values to NIST reductions to defined rangeJack Lloyd2015-08-081-3/+13
|
* Expose the NIST prime values and reduction operations as plain functions.Jack Lloyd2015-08-081-16/+138
| | | | | | Previously they were hidden away as private functions on the CurveGFp types. This allows directly testing the reduction functions against other computational methods.
* Better living through macrosJack Lloyd2015-07-241-30/+32
|
* BigInt::to_u32bit failed on 32-bit integers. GH #220Jack Lloyd2015-07-231-1/+47
|
* Make Botan compile when only some modules are enabledSimon Warta2015-07-031-0/+15
| | | | Fixes #146.
* Avoid DEBUG define; Use NDEBUG if necessarySimon Warta2015-07-031-3/+1
|
* ifstream/ostream take std::stringSimon Warta2015-06-231-1/+1
|
* Ensure all files have copyright and license info.lloyd2015-01-101-1/+1
| | | | | 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
|
* Remove unused test. Bugzilla 272lloyd2014-05-171-65/+0
|
* Any fixed MR iterations is probably wrong for somebody. Allow the userlloyd2014-04-251-4/+4
| | | | | | to specify a probability as well as if n was randomly chosen or not. If the input is random use a better bounds to reduce the number of needed tests.
* Cleanupslloyd2014-02-131-6/+0
|
* Split up docs into the reference manual, the website, and everything else.lloyd2014-01-101-0/+455
| | | | | | | | | | | 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-428/+0
|
* Move previously common function to only remaining caller's sourcelloyd2014-01-061-0/+18
|
* Split up public key tests and data, use new test frameworklloyd2014-01-051-1/+1
|
* Cull remaining mostly dubious examples. Also remove readme.txtlloyd2014-01-011-92/+145
|
* Shuffle things around. Add NIST X.509 test to build.lloyd2014-01-011-0/+357