summaryrefslogtreecommitdiff
path: root/src/regress/lib/libcrypto/bn/bn_mod_exp.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* recp -> reciprocal renaming in teststb2025-02-121-2/+2
|
* Add a few more test cases for mod_exp aliasingtb2023-10-191-33/+78
|
* Add test case checking aliasing of the result with other argumentstb2023-10-191-1/+105
| | | | | These are expected failures for BN_mod_exp_simple() and the internal BN_mod_exp_recp(), which will be fixed shortly.
* Add regress coverage for -1 modulus as well.tb2023-05-091-25/+38
|
* Remove a couple of temporary hackstb2023-04-251-4/+1
|
* bn_mod_exp: temporarily add a prototype for BN_mod_exp_recp()tb2023-04-251-1/+4
|
* Check and assign on one linetb2023-04-061-3/+2
|
* Rework test failure printingtb2023-03-291-25/+33
| | | | | Make sure it's always printed to stderr. Use a wrapper for printing a BIGNUM rather than repeating the same ugly pattern over and over again.
* Dedup print functions on test failuretb2023-03-291-29/+14
|
* Fix printfs that escaped defensive greppingtb2023-03-291-5/+5
|
* Dedup generate_test_triple() and generate_test_quintuple()tb2023-03-291-50/+20
|
* Use more consistent names for the main test functionstb2023-03-291-7/+7
|
* Remove one of those ugly function tablestb2023-03-291-34/+9
| | | | | The only reason there were two of them was to avoid some pointless comparisons. The gain is not worth the price.
* Rename a few variables for readabilitytb2023-03-291-45/+43
|
* bn_mod_exp: make this test a bit less noisy on failuretb2023-03-271-7/+7
| | | | | While it is good to run more tests on failure, it is pointless to try broken things thousands of times.
* Switch regress to using bn_copy()tb2023-03-271-3/+3
|
* Fold the small BN_mod_exp2_mont() crash test into bn_mod_exp.ctb2023-03-261-1/+26
|
* Test negative modulus as well.tb2023-03-261-5/+7
| | | | Lower the number of rounds. These tests are expensive.
* Align bn_mod_exp_zero_test() with bn_mod_exp_test()tb2023-03-261-11/+11
|
* Fix copy-paste errortb2023-03-261-2/+2
|
* Fix a typo in dump_exp_results()tb2023-03-261-2/+2
|
* Add more extensive regress coverage for BN_mod_exp2_mont()tb2023-03-261-1/+191
|
* Rename dump_results() into dump_exp_results()tb2023-03-261-4/+4
| | | | | This prepares for consistency with an upcoming diff. While here fix an argument order bug.
* Move the N_MOD_EXP_TESTS up to where it belongstb2023-03-261-3/+3
|
* Add regress coverage for an issue with BN_mod_exp2_mont() reportedtb2023-03-261-1/+23
| | | | | | | | by Guido Vranken in ossfuzz #55997. This test currently fails and will be fixed momentarily. This also checks sensible behavior with respect to zero exponents for this functions.
* bn_mod_exp_ret() fix stupid logic errortb2023-03-261-4/+5
|
* KNF: some missing spaces after commatb2023-03-181-5/+5
|
* Rename bn_mod_exp_zero to the more appropriate bn_mod_exptb2023-03-181-0/+387
|
* Retire the bn_mod_exp test.tb2023-03-181-219/+0
| | | | Its is fully covered by bn_mod_exp_zero now.
* Include tests with negative values in BN_mod_exp* regress.jsing2023-03-151-2/+15
| | | | This currently fails.
* bn_mod_exp test: drop extra parentheses for readabilitytb2022-12-081-4/+4
|
* bn_mod_exp.c doesn't need <string.h>tb2022-12-051-2/+1
|
* More cleanuptb2022-12-031-11/+8
| | | | | Drop unnecessary loading of error strings, fix error path and consistently print to stdout.
* Refactor and fix bn_mod_exp testtb2022-12-031-80/+86
| | | | | | | | | | | The amount of copy-paste in this test led to a few bugs and it was hard to spot them since things were done in random order. Use a different approach: compute the result of a^b (mod m) according to BN_mod_exp_simple(), then compare the results of all the other *_mod_exp* functions to that. Reuse the test structure from bn_mod_exp_zero.c to loop over the list of functions. This way we test more functions and don't forget to check some crucial bits.
* Add missing checks for BN_mod_exp_{non,}ct()tb2022-12-031-6/+8
| | | | | | Someone added a few more functions to test, but forgot to check their results, so if they would not do the expected thing that would only be noticed if one of the already tested functions would break.
* Fix some ancient silliness with a random bytetb2022-12-031-8/+5
| | | | | | | For nearly 25 years this test has attempted to generate random numbers of bit length between 192 and 319 bits. Unfortunately, it used an unsigned char so instead of generating numbers in the interval [-64..63] and add them to 256, it used numbers in the intervals [0..63] and [192..255]...
* bn_mod_exp.c: printing to stdout needs no BIOtb2022-12-021-17/+9
|
* bn_mod_exp: we have a BN_CTX available...tb2022-12-021-19/+15
| | | | Use BN_CTX_get() instead of BN_new()/BN_free().
* Check BN_rand() and BN_mod() return valuestb2022-12-021-6/+11
| | | | | CID 430848 CID 430849
* Rewrite the tests that various modular exponentiation functionstb2022-12-021-148/+2
| | | | compute a^0 = 0 (mod 1) for all a from scratch.
* regress/libcrypto: merge exp/ into bn/tb2022-12-011-0/+358
Move exp/exptest.c to bn/bn_mod_exp.c. This is a BN test that mostly tests a variety of BN_mod_exp*() API behavior and correctness. Commit stolen from jsing