summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authortb <>2022-12-03 09:37:02 +0000
committertb <>2022-12-03 09:37:02 +0000
commit8706f55a252aac6369dbb89a79b358ffb5d42ea2 (patch)
tree70fbe8df8cabed49adc7fa5a648f755b2318b4c6 /src/lib
parentc6d7a34e7fd867cf5c30482829d102f5f6af617c (diff)
downloadopenbsd-8706f55a252aac6369dbb89a79b358ffb5d42ea2.tar.gz
openbsd-8706f55a252aac6369dbb89a79b358ffb5d42ea2.tar.bz2
openbsd-8706f55a252aac6369dbb89a79b358ffb5d42ea2.zip
Refactor and fix bn_mod_exp test
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.
Diffstat (limited to 'src/lib')
0 files changed, 0 insertions, 0 deletions