| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
|
|
|
|
| |
Drop unnecessary loading of error strings, fix error path and consistently
print to stdout.
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
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]...
|
| |
|
|
|
|
| |
Use BN_CTX_get() instead of BN_new()/BN_free().
|
|
|
|
|
| |
CID 430848
CID 430849
|
|
|
|
| |
compute a^0 = 0 (mod 1) for all a from scratch.
|
|
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
|