Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Remove a couple of temporary hacks | tb | 2023-04-25 | 2 | -17/+2 |
| | |||||
* | bn_mod_exp: temporarily add a prototype for BN_mod_exp_recp() | tb | 2023-04-25 | 1 | -1/+4 |
| | |||||
* | bn_test: temporarily add prototypes for reciprocal functions | tb | 2023-04-25 | 1 | -1/+13 |
| | | | | This is a hack needed until bn_local.h is updated | ||||
* | bn_test: BN_one() will become void, so stop checking it | tb | 2023-04-25 | 1 | -8/+8 |
| | |||||
* | bn_primes: the NIST primes will go away, so remove their tests | tb | 2023-04-25 | 1 | -41/+1 |
| | |||||
* | Provide initial regress for BN_{asc,dec,hex}2bn()/BN_bn2{dec,hex}() | jsing | 2023-04-22 | 2 | -1/+592 |
| | |||||
* | Drop GF2m tests | tb | 2023-04-17 | 1 | -647/+1 |
| | | | | The code they test will go away soon. | ||||
* | Allow overriding the bc implementation used in run-bc | tb | 2023-04-17 | 1 | -2/+7 |
| | | | | | | | | | | | | While base bc is great, it uses libcrypto's BIGNUM implementation. This implies that the independent verification of the bn_test isn't as independent as it should be. With this commit, run-bc picks up bn-gh if it is installed. This appears to work on amd64, arm64 and sparc64 (where gbc is busted). I will send PRs to the regress maintainers once I will have tested this a bit more thoroughly. Committing this early since I juggle way too many diffs already. | ||||
* | Fix typo | tb | 2023-04-17 | 1 | -2/+2 |
| | |||||
* | bn_mod_sqrt: remove no longer necessary complications due to the | tb | 2023-04-11 | 1 | -15/+5 |
| | | | | non-deterministic nature of the old implementation. | ||||
* | Correct benchmark result computation on 32 bit platforms. | jsing | 2023-04-11 | 2 | -4/+4 |
| | |||||
* | Some more cleanup in bn_to_string | tb | 2023-04-10 | 1 | -12/+8 |
| | |||||
* | Drop BN_NO_DEPRECATED dance from bn_test | tb | 2023-04-10 | 1 | -7/+1 |
| | |||||
* | Provide benchmarks for BN_copy() | jsing | 2023-04-10 | 2 | -1/+184 |
| | |||||
* | bn_to_string no longer needs to be linked statically | tb | 2023-04-10 | 1 | -2/+1 |
| | |||||
* | Rework the bn_to_string() to use public API | tb | 2023-04-10 | 1 | -73/+213 |
| | | | | | | We can use the undocumented functions {i2s,s2i}_ASN1_INTEGER(3) to exercise bn_to_string(). This way we use public API and remove the need of linking statically. | ||||
* | bn_test: two minor style tweaks | tb | 2023-04-08 | 1 | -6/+3 |
| | |||||
* | bn_test: rename rc into ret as per usual | tb | 2023-04-07 | 1 | -91/+91 |
| | |||||
* | bn_test: pass BN_CTX into all functions | tb | 2023-04-07 | 1 | -364/+297 |
| | | | | | There is a BN_CTX at program scope. Pass it into all test functions. This simplifies memory management at the end of the functions quite a bit. | ||||
* | bn_test: drop a few braces that are now unnecessary | tb | 2023-04-07 | 1 | -33/+17 |
| | |||||
* | bn_test: move rc initialization to its own line | tb | 2023-04-07 | 1 | -9/+17 |
| | |||||
* | bn_test: keep the error stack clean | tb | 2023-04-07 | 1 | -1/+13 |
| | | | | | | Make message() print and clear the error stack. This way we can know what test errored. To make this work also clear the error stack after a handful of xfail tests. | ||||
* | bn_test: use bn_copy() instead of BN_free/BN_dup | tb | 2023-04-07 | 1 | -3/+2 |
| | | | | This is not only simpler but also required by an upcoming change. | ||||
* | bn_test: a few early return would leak. goto err instead | tb | 2023-04-07 | 1 | -5/+5 |
| | |||||
* | bn_test: rand_neg() is not only one of the most stupidly named functions | tb | 2023-04-07 | 1 | -2/+2 |
| | | | | in the entire code base it also has a few parentheses too many | ||||
* | bn_test: handle rc consistently | tb | 2023-04-07 | 1 | -111/+134 |
| | | | | | | | Various test functions had bugs due to the fact that the return code would be set to 1 at the top so that each error would have to set rc = 0. This is silly. Fail closed instead by setting rc = 0 at the top and only flipping to 1 before the err label | ||||
* | bn_test: inline the only use of lst[] | tb | 2023-04-07 | 1 | -14/+12 |
| | | | | | | lst[] can be converted from a bit string to a hex string. Use BN_hex2bn() isntead of BN_bin2bn(). Handle this inside test_lshift() rather than doing artistic ownership dances. | ||||
* | Improve some test failure reporting | tb | 2023-04-07 | 1 | -5/+12 |
| | |||||
* | Move a comment to the proper place | tb | 2023-04-06 | 1 | -6/+5 |
| | |||||
* | Check and assign on one line | tb | 2023-04-06 | 1 | -3/+2 |
| | |||||
* | Zap extra empty line | tb | 2023-04-06 | 1 | -2/+1 |
| | |||||
* | bn_mod_sqrt: Improve a handful of comments and a printf | tb | 2023-04-05 | 1 | -5/+9 |
| | |||||
* | Improve regress coverage for BN_mod_sqrt() | tb | 2023-04-05 | 1 | -3/+2783 |
| | | | | | This now covers all the main branches of both the old and new BN_mod_sqrt() implementation except for negative p. | ||||
* | Simplify mod_sqrt_test() a bit | tb | 2023-04-05 | 1 | -35/+16 |
| | |||||
* | bn_mod_sqrt test: Use a #define rather than hard coded 100 | tb | 2023-04-05 | 1 | -3/+5 |
| | |||||
* | Add coverage for the truly non-deterministic path of Tonelli-Shanks | tb | 2023-04-05 | 1 | -4/+1625 |
| | | | | | Regress coverage of all of BN_mod_sqrt() is still lacking after this. This will improve in forthcoming commits. | ||||
* | Clean bn_mod_sqrt up a little | tb | 2023-04-04 | 1 | -28/+53 |
| | | | | | This makes it look a bit more like other tests and also prepares the addition of further test cases and different tests. | ||||
* | Link bn_gcd test to regress | tb | 2023-04-03 | 1 | -1/+3 |
| | |||||
* | Add regress coverage for BN_gcd() and BN_gcd_ct() | tb | 2023-04-03 | 1 | -0/+3664 |
| | |||||
* | Add regress coverage for the new behavior of BN_copy() with respect to | tb | 2023-03-31 | 1 | -1/+161 |
| | | | | flags. | ||||
* | Rework test failure printing | tb | 2023-03-29 | 1 | -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 failure | tb | 2023-03-29 | 1 | -29/+14 |
| | |||||
* | Fix printfs that escaped defensive grepping | tb | 2023-03-29 | 1 | -5/+5 |
| | |||||
* | Dedup generate_test_triple() and generate_test_quintuple() | tb | 2023-03-29 | 1 | -50/+20 |
| | |||||
* | Use more consistent names for the main test functions | tb | 2023-03-29 | 1 | -7/+7 |
| | |||||
* | Remove one of those ugly function tables | tb | 2023-03-29 | 1 | -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 readability | tb | 2023-03-29 | 1 | -45/+43 |
| | |||||
* | bn_mod_exp: make this test a bit less noisy on failure | tb | 2023-03-27 | 1 | -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() | tb | 2023-03-27 | 2 | -13/+13 |
| | |||||
* | Remove the now almost empty and unused bn_mod_exp2_mont.c | tb | 2023-03-26 | 1 | -22/+0 |
| |