Use bn_wexpand() rather than bn_expand() with sizeof(BN_ULONG).
authorjsing <jsing@openbsd.org>
Wed, 23 Nov 2022 03:10:10 +0000 (03:10 +0000)
committerjsing <jsing@openbsd.org>
Wed, 23 Nov 2022 03:10:10 +0000 (03:10 +0000)
commitece07459cdd51c2753bb4f4fe3e7ee03cf3c3e2e
treed27477a58cd252bf188ff67b979b77e508c93fdc
parent3f505316c03f3c56fadb189a04a793b81f228fc7
Use bn_wexpand() rather than bn_expand() with sizeof(BN_ULONG).

This also fixes a bug in BN_MONT_CTX_set(), where the sizeof(BN_ULONG) in
the call to bn_expand() was not multiplied by eight (to get bits).

ok tb@
lib/libcrypto/bn/bn_lib.c
lib/libcrypto/bn/bn_mont.c