Hi folks, We recently rewrote bntest to take a test vector file rather than generating random numbers and checking by piping to bc. I figured I'd send a pointer your way in case you were interested in this. It takes a lot less effort to add a new test case and is easier to run on, say, a phone where perl and bc may not be readily available.
The BN calling code is probably not very useful to you as it's all C++ and uses our FileTest framework. But the test vectors are below, as well as a Go tool to validate them. https://boringssl.googlesource.com/boringssl/+/master/crypto/bn/bn_test.cc https://boringssl.googlesource.com/boringssl/+/master/crypto/bn/bn_tests.txt https://boringssl.googlesource.com/boringssl/+/master/crypto/bn/check_bn_tests.go The vectors themselves are more-or-less just taken from a run of bntest, though I did add carry tests for BN_add, etc. I'm sure there's room for other interesting cases. Hope this is useful, David
-- openssl-dev mailing list To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-dev