Commit message (Collapse) | Author | Age | Files | Lines | ||
---|---|---|---|---|---|---|
... | ||||||
* | Correct setup for BN_mul/BN_sqr benchmarks. | jsing | 2023-01-29 | 1 | -4/+4 | |
| | | | | BN_rand() takes a bit length, not the top bit. | |||||
* | Rename bn_mul.c regress to bn_mul_div.c. | jsing | 2023-01-29 | 2 | -5/+5 | |
| | ||||||
* | Provide basic benchmarks for BN_mul() and BN_sqr(). | jsing | 2023-01-21 | 2 | -2/+275 | |
| | ||||||
* | Fix previous. | jsing | 2023-01-07 | 1 | -3/+9 | |
| | ||||||
* | Add additional shift benchmarks that are useful on BN_BITS2 == 32 platforms | jsing | 2023-01-05 | 1 | -2/+56 | |
| | ||||||
* | 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'). | |||||
* | bn/Makefile: tidy up and simplify | tb | 2022-12-09 | 1 | -16/+10 | |
| | ||||||
* | 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 | |
| | ||||||
* | 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 | |
| | ||||||
* | bn_add_sub: no need for a BIO to print to stderr | tb | 2022-12-02 | 1 | -21/+13 | |
| | ||||||
* | 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 | 2 | -1/+361 | |
| | | | | | | | 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 | |||||
* | Flatten structure of libcrypto/bn tests | tb | 2022-12-01 | 15 | -116/+62 | |
| | | | | | | | | | The bn tests were distributed into three subdirectories rather randomly. It's cleaner and easier to maintain if all this is in a single directory. Use consistent names for the .c files, unify handling of the tests with the exception of bn_test, which is special. Discussed with jsing | |||||
* | Test prime constants exposed in public BN API | tb | 2022-12-01 | 1 | -1/+97 | |
| | | | | | Run the prime constants exposed in BN_get0_nist_prime_*() and BN_get_rfc3526_prime_*() through Ballie-PSW. | |||||
* | Refrain from printing SUCCESS in some of my tests | tb | 2022-12-01 | 7 | -26/+7 | |
| | | | | Silence is good. On failure, the regress framework will make it clear. | |||||
* | Add regress coverage for BN_cmp()/BN_ucmp(). | jsing | 2022-11-30 | 2 | -3/+347 | |
| | | | | | Some tests current fail due to a bug in BN_ucmp(), which will be fixed soon. | |||||
* | Make internal header file names consistent | tb | 2022-11-26 | 1 | -2/+2 | |
| | | | | | | | | | | | | | | | | Libcrypto currently has a mess of *_lcl.h, *_locl.h, and *_local.h names used for internal headers. Move all these headers we inherited from OpenSSL to *_local.h, reserving the name *_internal.h for our own code. Similarly, move dtls_locl.h and ssl_locl.h to dtls_local and ssl_local.h. constant_time_locl.h is moved to constant_time.h since it's special. Adjust all .c files in libcrypto, libssl and regress. The diff is mechanical with the exception of tls13_quic.c, where #include <ssl_locl.h> was fixed manually. discussed with jsing, no objection bcook | |||||
* | Units generally help... | tb | 2022-11-25 | 1 | -2/+2 | |
| | ||||||
* | bn_unit: appease coverity | tb | 2022-11-23 | 1 | -2/+6 | |
| | | | | | | | Apparently, the '0' in memset(a, '0', size - 1); could be a typo for '\0'. Randomize the decimal digit to make the intent clear. CID 377009 | |||||
* | Neuter getrlimit dance, it's not portable enough. Stupid Windows. | tb | 2022-11-23 | 1 | -14/+4 | |
| | ||||||
* | Tweak a printf. | tb | 2022-11-22 | 1 | -3/+3 | |
| | ||||||
* | Add a unit test that crashes without bn_print.c r1.34. | tb | 2022-11-22 | 2 | -1/+95 | |
| | ||||||
* | Remove prime_t remnant and link bn_primes test statically | tb | 2022-11-09 | 2 | -3/+4 | |
| | ||||||
* | Handle corner case in which the test case can actually be a square | tb | 2022-10-11 | 1 | -4/+3 | |
| | ||||||
* | Convert from %i to %d | tb | 2022-09-05 | 1 | -2/+2 | |
| | ||||||
* | Fix upper bound in a for loop (no functional change). | tb | 2022-08-12 | 1 | -2/+2 | |
| | ||||||
* | Tweak a comment to be more accurate. | tb | 2022-08-12 | 1 | -3/+3 | |
| | ||||||
* | Add a second test to validate the tables in the library. | tb | 2022-07-28 | 1 | -1/+42 | |
| | ||||||
* | Adjust a comment to reflect reality, minor code tweaks. | tb | 2022-07-27 | 1 | -7/+7 | |
| | ||||||
* | minor tweaks: unwrap a line, tweak a comment and zap an empty line | tb | 2022-07-26 | 1 | -5/+3 | |
| |