Commit message (Collapse) | Author | Age | Files | Lines | ||
---|---|---|---|---|---|---|
... | ||||||
* | Add explicit LL suffixes to large constants to appease some compilers on | miod | 2023-01-01 | 1 | -6/+6 | |
| | | | | 32-bit systems. | |||||
* | Add regress coverage for shifts of zero bits. | jsing | 2022-12-23 | 1 | -1/+38 | |
| | ||||||
* | Do similar setup for lshift and rshift benchmarks. | jsing | 2022-12-23 | 1 | -1/+13 | |
| | | | | This prevents realloc from unnecessarily impacting the lshift benchmarks. | |||||
* | Use volatile sig_atomic_t for flag set in signal handler | tb | 2022-12-18 | 1 | -2/+2 | |
| | ||||||
* | Switch to using BN_zero() instead of BN_zero_ex() | tb | 2022-12-17 | 1 | -2/+2 | |
| | ||||||
* | Move benchmark target up a bit and mark it phony | tb | 2022-12-17 | 1 | -4/+5 | |
| | ||||||
* | Zap some whitespace | tb | 2022-12-17 | 1 | -2/+2 | |
| | ||||||
* | Provide regress coverage for BN shift functions. | jsing | 2022-12-17 | 2 | -1/+543 | |
| | | | | | | Provide regress coverage for BN_lshift1(), BN_rshift1(), BN_lshift() and BN_rshift(), along with basic benchmarking functionality (run via 'make benchmark'). | |||||
* | bio chain test: compress some error printing | tb | 2022-12-10 | 1 | -5/+4 | |
| | ||||||
* | bio chain test: deduplicate chain walking code | tb | 2022-12-10 | 1 | -52/+40 | |
| | ||||||
* | bio chain test: handle walking of empty chains | tb | 2022-12-10 | 1 | -27/+15 | |
| | | | | | | Rework the loops walking the chains to be correct for empty chains as well. This simplifies the checking at the cost of slightly more initialization and will allow further refactoring in a subsequent check. | |||||
* | bio chain test: add a consistency check for chain lengths | tb | 2022-12-09 | 1 | -1/+9 | |
| | ||||||
* | bn/Makefile: tidy up and simplify | tb | 2022-12-09 | 1 | -16/+10 | |
| | ||||||
* | bio chain test: make two errors noisy | tb | 2022-12-09 | 1 | -3/+11 | |
| | ||||||
* | bio chain test: ensure the length of empty chains is 0 | tb | 2022-12-09 | 1 | -3/+9 | |
| | ||||||
* | bio chain test: various minor readability tweaks | tb | 2022-12-09 | 1 | -6/+8 | |
| | | | | | | Align initialization in walk_backward() with walk_forward(), fix grammar in a comment and move initialization of oldhead_len in a place consistent with the other length initializations in that function | |||||
* | bio chain test: fix inconsequential off-by-one | tb | 2022-12-08 | 1 | -2/+2 | |
| | ||||||
* | bio chain test: minor readability tweaks | tb | 2022-12-08 | 1 | -5/+6 | |
| | ||||||
* | bio chain test: rename a few variables for consistency | tb | 2022-12-08 | 1 | -29/+29 | |
| | ||||||
* | bio chain test: decouple lengths of test chains | tb | 2022-12-08 | 1 | -59/+89 | |
| | | | | | | Add helpers to create and destroy a linear chain of BIOs. Provide two defines for the two lengths of the test chains and make them distinct to rule out coincidences. As a bonus, the code becomes simpler. | |||||
* | bio chain test: refactor link_chains_at() | tb | 2022-12-08 | 1 | -198/+109 | |
| | | | | | Add helper that validate the chains. This deduplicates a lot of code and makes the heart of the test much easier to read. | |||||
* | bio chain test: lose some do_{,bio_} prefixes | tb | 2022-12-08 | 1 | -12/+12 | |
| | ||||||
* | Split biotest into its three logical parts | tb | 2022-12-08 | 4 | -458/+512 | |
| | | | | | | Some parts of this test rely on unportable behavior, so cannot run in portable. This way we can run more tests for portable which is helpful for analysis tools, better coverage, etc. | |||||
* | biotest: Tweak long comment a bit | tb | 2022-12-08 | 1 | -11/+13 | |
| | ||||||
* | Add BIO_push() and BIO_set_next() regress coverage | tb | 2022-12-08 | 1 | -1/+367 | |
| | | | | | | This tests for the behavior changes in bio_lib.c r1.40 and r1.41 and makes sure that BIO_push() and BIO_set_next() act on two chains in the expected and now documented way. | |||||
* | bn_mod_exp test: drop extra parentheses for readability | tb | 2022-12-08 | 1 | -4/+4 | |
| | ||||||
* | Add a few missing headers and drop a few unused ones | tb | 2022-12-06 | 7 | -20/+20 | |
| | | | | In bn_test.c include bn_local.h instead of using copy-pasted prototypes. | |||||
* | bn_mod_exp.c doesn't need <string.h> | tb | 2022-12-05 | 1 | -2/+1 | |
| | ||||||
* | Clean up makefile | tb | 2022-12-03 | 1 | -8/+6 | |
| | ||||||
* | biotest needs bio_local.h now | tb | 2022-12-03 | 1 | -6/+7 | |
| | | | | Should have been part of the previous commit | |||||
* | Test BIO_{push,pop}() along a linear chain | tb | 2022-12-03 | 1 | -1/+135 | |
| | ||||||
* | More cleanup | tb | 2022-12-03 | 1 | -11/+8 | |
| | | | | | Drop unnecessary loading of error strings, fix error path and consistently print to stdout. | |||||
* | Refactor and fix bn_mod_exp test | tb | 2022-12-03 | 1 | -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() | tb | 2022-12-03 | 1 | -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 byte | tb | 2022-12-03 | 1 | -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 BIO | tb | 2022-12-02 | 1 | -17/+9 | |
| | ||||||
* | bn_mod_exp: we have a BN_CTX available... | tb | 2022-12-02 | 1 | -19/+15 | |
| | | | | Use BN_CTX_get() instead of BN_new()/BN_free(). | |||||
* | Check BN_rand() and BN_mod() return values | tb | 2022-12-02 | 1 | -6/+11 | |
| | | | | | CID 430848 CID 430849 | |||||
* | Link new bn_mod_exp_zero test to build | tb | 2022-12-02 | 1 | -1/+3 | |
| | ||||||
* | Rewrite the tests that various modular exponentiation functions | tb | 2022-12-02 | 2 | -148/+189 | |
| | | | | compute a^0 = 0 (mod 1) for all a from scratch. | |||||
* | libcrypto/bn: switch back to manual regress targets | tb | 2022-12-02 | 1 | -3/+8 | |
| | | | | | The previous change had the undesired side effect of running the super verbose run-regress-bn_test. | |||||
* | Use the default targets from bsd.regress.mk as far as possible | tb | 2022-12-02 | 1 | -9/+4 | |
| | ||||||
* | Let bsd.regress.mk take care of running tests | tb | 2022-12-02 | 1 | -8/+1 | |
| | ||||||
* | bn_add_sub: no need for a BIO to print to stderr | tb | 2022-12-02 | 1 | -21/+13 | |
| | ||||||
* | Unhook exp | tb | 2022-12-01 | 1 | -2/+1 | |
| | ||||||
* | Fix typo, move one .PHONY target nearer to the target itself | tb | 2022-12-01 | 1 | -4/+3 | |
| | ||||||
* | zap extra blank line | tb | 2022-12-01 | 1 | -2/+1 | |
| | ||||||
* | Check that the bn_isqrt -C output isn't changed | tb | 2022-12-01 | 2 | -1/+43 | |
| | | | | | | bn_isqrt -C generates code included in lib/libcrypto/lib/bn_isqrt.c. The regress tests already ensure that the content of the tables don't change. Ensure further that the code generation doesn't get out of sync. | |||||
* | regress/libcrypto: merge exp/ into bn/ | tb | 2022-12-01 | 3 | -11/+4 | |
| | | | | | | | 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 | |||||
* | Silence this test and sprinkle some KNF | tb | 2022-12-01 | 1 | -11/+6 | |
| | | | | | This test is fast enough even on very slow machines that printing dots doesn't seem necessary. |