summaryrefslogtreecommitdiff
path: root/src/regress/lib/libcrypto/bn (follow)
Commit message (Collapse)AuthorAgeFilesLines
* recp -> reciprocal renaming in teststb2025-02-122-7/+7
|
* bn_test: remove random negative dance for bn_div_reciprocal()tb2025-01-221-3/+1
|
* Adjust for BN_div_recp() -> BN_div_reciprocal()tb2025-01-221-3/+3
|
* bn_test: use BN_RECP_CTX_create() rather than _new()/_set()tb2025-01-211-5/+3
|
* bn_convert: avoid a zero-sized allocationtb2024-11-051-2/+2
|
* Add regress coverage for BN_bn2binpad() and BN_bn2lebinpad().jsing2024-11-031-3/+137
|
* Add some additional BN conversion test cases.jsing2024-11-031-3/+21
|
* Remove unwanted trailing newlines from err/warn format strings.anton2024-08-232-7/+7
|
* Add regress coverage for BN_lebin2bn().jsing2024-04-171-3/+17
|
* Enable negative zero checks for BN_clear_bit() and BN_mask_bits().jsing2024-04-151-5/+1
|
* bn_convert: plug leak spotted by ASANtb2024-04-091-2/+4
|
* Add initial regress for BN_set_bit(), BN_clear_bit() and BN_mask_bits().jsing2024-04-092-1/+229
|
* Add regress coverage for BN_bn2mpi()/BN_mpi2bn().jsing2024-04-091-6/+123
|
* Add a few more test cases for mod_exp aliasingtb2023-10-191-33/+78
|
* The bn_mod_exp test is no longer an expected failuretb2023-10-191-3/+1
|
* Add test case checking aliasing of the result with other argumentstb2023-10-192-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 ergonomictb2023-08-031-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() testtb2023-08-032-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 incorrecttb2023-07-271-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 settb2023-07-101-1/+13
| | | | | This currently adds an incorrect 00: padding, consistent with OpenSSL's behavior.
* Add test coverage for leading zero octet dancetb2023-07-071-1/+15
|
* bn_print: remove unused bio, plug leaktb2023-07-061-5/+3
|
* Add regress coverage for bn_printftb2023-07-062-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.tb2023-06-231-1/+11
|
* Add tests for BN_sqr() corner cases.jsing2023-06-211-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.jsing2023-06-211-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.jsing2023-06-211-4/+13
| | | | | Currently BN_hex2bn() removes the leading zeros, however this will not be the case in the future.
* Fix copy-paste errortb2023-06-201-2/+2
|
* Add regress coverage for BN_num_bits()jsing2023-06-201-1/+35
|
* bn_mod_inverse tweakstb2023-06-041-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()tb2023-06-032-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.jsing2023-05-271-9/+37
|
* Add regress coverage for -1 modulus as well.tb2023-05-091-25/+38
|
* Remove a couple of temporary hackstb2023-04-252-17/+2
|
* bn_mod_exp: temporarily add a prototype for BN_mod_exp_recp()tb2023-04-251-1/+4
|
* bn_test: temporarily add prototypes for reciprocal functionstb2023-04-251-1/+13
| | | | This is a hack needed until bn_local.h is updated
* bn_test: BN_one() will become void, so stop checking ittb2023-04-251-8/+8
|
* bn_primes: the NIST primes will go away, so remove their teststb2023-04-251-41/+1
|
* Provide initial regress for BN_{asc,dec,hex}2bn()/BN_bn2{dec,hex}()jsing2023-04-222-1/+592
|
* Drop GF2m teststb2023-04-171-647/+1
| | | | The code they test will go away soon.
* Allow overriding the bc implementation used in run-bctb2023-04-171-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 typotb2023-04-171-2/+2
|
* bn_mod_sqrt: remove no longer necessary complications due to thetb2023-04-111-15/+5
| | | | non-deterministic nature of the old implementation.
* Correct benchmark result computation on 32 bit platforms.jsing2023-04-112-4/+4
|
* Some more cleanup in bn_to_stringtb2023-04-101-12/+8
|
* Drop BN_NO_DEPRECATED dance from bn_testtb2023-04-101-7/+1
|
* Provide benchmarks for BN_copy()jsing2023-04-102-1/+184
|
* bn_to_string no longer needs to be linked staticallytb2023-04-101-2/+1
|
* Rework the bn_to_string() to use public APItb2023-04-101-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 tweakstb2023-04-081-6/+3
|