Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | recp -> reciprocal renaming in tests | tb | 2025-02-12 | 2 | -7/+7 |
| | |||||
* | bn_test: remove random negative dance for bn_div_reciprocal() | tb | 2025-01-22 | 1 | -3/+1 |
| | |||||
* | Adjust for BN_div_recp() -> BN_div_reciprocal() | tb | 2025-01-22 | 1 | -3/+3 |
| | |||||
* | bn_test: use BN_RECP_CTX_create() rather than _new()/_set() | tb | 2025-01-21 | 1 | -5/+3 |
| | |||||
* | bn_convert: avoid a zero-sized allocation | tb | 2024-11-05 | 1 | -2/+2 |
| | |||||
* | Add regress coverage for BN_bn2binpad() and BN_bn2lebinpad(). | jsing | 2024-11-03 | 1 | -3/+137 |
| | |||||
* | Add some additional BN conversion test cases. | jsing | 2024-11-03 | 1 | -3/+21 |
| | |||||
* | Remove unwanted trailing newlines from err/warn format strings. | anton | 2024-08-23 | 2 | -7/+7 |
| | |||||
* | Add regress coverage for BN_lebin2bn(). | jsing | 2024-04-17 | 1 | -3/+17 |
| | |||||
* | Enable negative zero checks for BN_clear_bit() and BN_mask_bits(). | jsing | 2024-04-15 | 1 | -5/+1 |
| | |||||
* | bn_convert: plug leak spotted by ASAN | tb | 2024-04-09 | 1 | -2/+4 |
| | |||||
* | Add initial regress for BN_set_bit(), BN_clear_bit() and BN_mask_bits(). | jsing | 2024-04-09 | 2 | -1/+229 |
| | |||||
* | Add regress coverage for BN_bn2mpi()/BN_mpi2bn(). | jsing | 2024-04-09 | 1 | -6/+123 |
| | |||||
* | Add a few more test cases for mod_exp aliasing | tb | 2023-10-19 | 1 | -33/+78 |
| | |||||
* | The bn_mod_exp test is no longer an expected failure | tb | 2023-10-19 | 1 | -3/+1 |
| | |||||
* | Add test case checking aliasing of the result with other arguments | tb | 2023-10-19 | 2 | -2/+108 |
| | | | | | These are expected failures for BN_mod_exp_simple() and the internal BN_mod_exp_recp(), which will be fixed shortly. | ||||
* | Make the bn_rand_interval() API a bit more ergonomic | tb | 2023-08-03 | 1 | -5/+5 |
| | | | | | | | | | | | | | | | | | | Provide bn_rand_in_range() which is a slightly tweaked version of what was previously called bn_rand_range(). The way bn_rand_range() is called in libcrypto, the lower bound is always expressible as a word. In fact, most of the time it is 1, the DH code uses a 2, the MR tests in BPSW use 3 and an exceptinally high number appears in the Tonelli-Shanks implementation where we use 32. Converting these lower bounds to BIGNUMs on the call site is annoying so let bn_rand_interval() do that internally and route that through bn_rand_in_range(). This way we can avoid using BN_sub_word(). Adjust the bn_isqrt() test to use bn_rand_in_range() since that's the only caller that uses actual BIGNUMs as lower bounds. ok jsing | ||||
* | Retire the bn_rand_interval() test | tb | 2023-08-03 | 2 | -115/+1 |
| | | | | | | This test was never particularly useful. An upcoming API change for the internal bn_rand_interval() API would require some adjustments. It's not worth it. | ||||
* | Annotate bogus output as incorrect | tb | 2023-07-27 | 1 | -1/+2 |
| | | | | | | Some people already have way too many simple and not too important diffs in their inbox. This isn't worth kicking something more important out of the queue. | ||||
* | Add test case for negative number with highest bit of top octet set | tb | 2023-07-10 | 1 | -1/+13 |
| | | | | | This currently adds an incorrect 00: padding, consistent with OpenSSL's behavior. | ||||
* | Add test coverage for leading zero octet dance | tb | 2023-07-07 | 1 | -1/+15 |
| | |||||
* | bn_print: remove unused bio, plug leak | tb | 2023-07-06 | 1 | -5/+3 |
| | |||||
* | Add regress coverage for bn_printf | tb | 2023-07-06 | 2 | -1/+283 |
| | | | | | This must be one of the ugliest tests I've ever written, but I can't think of a better way of doing it. | ||||
* | Codify BN_asc2bn(NULL, *) behavior in regress. | tb | 2023-06-23 | 1 | -1/+11 |
| | |||||
* | Add tests for BN_sqr() corner cases. | jsing | 2023-06-21 | 1 | -1/+81 |
| | | | | | Test BN_sqr() with a newly allocated BN, a BN explicitly set to zero and small values that fit in a single BN_ULONG. | ||||
* | Add BN_cmp()/BN_ucmp() tests with zero padded inputs. | jsing | 2023-06-21 | 1 | -1/+25 |
| | | | | | Currently BN_hex2bn() removes the leading zeros, however this will not be the case in the future. | ||||
* | Add a BN_num_bits() with zero padded input. | jsing | 2023-06-21 | 1 | -4/+13 |
| | | | | | Currently BN_hex2bn() removes the leading zeros, however this will not be the case in the future. | ||||
* | Fix copy-paste error | tb | 2023-06-20 | 1 | -2/+2 |
| | |||||
* | Add regress coverage for BN_num_bits() | jsing | 2023-06-20 | 1 | -1/+35 |
| | |||||
* | bn_mod_inverse tweaks | tb | 2023-06-04 | 1 | -2/+4 |
| | | | | | Provide prototype that is hidden behind LIBRESSL_INTERNAL for portable and or in result for future extensibility. | ||||
* | Add regress coverage for BN_mod_inverse() | tb | 2023-06-03 | 2 | -1/+387 |
| | | | | | This would detect the aliasing issue reported by Guido Vranken fixed in bn_gcd.c r1.28. Most testcases are from BoringSSL's regress test. | ||||
* | Add coverage for calling BN_{dec,hex}2bn() with NULL inputs. | jsing | 2023-05-27 | 1 | -9/+37 |
| | |||||
* | Add regress coverage for -1 modulus as well. | tb | 2023-05-09 | 1 | -25/+38 |
| | |||||
* | 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 |
| |