We currently implement some BN functions (e.g. BN_div) as thin wrappers over their OSSL_FN equivalents. Because OSSL_FN has no top and computes over the full allocated width, this could cause BIGNUM use to be slower than previously - even if we don't care about constant time usage in a particular context.
A wrapper could preserve that, but only by becoming more complicated (i.e. less thin) at which point it's probably better to keep the two implementations separate.
We currently implement some BN functions (e.g.
BN_div) as thin wrappers over theirOSSL_FNequivalents. BecauseOSSL_FNhas notopand computes over the full allocated width, this could cause BIGNUM use to be slower than previously - even if we don't care about constant time usage in a particular context.A wrapper could preserve that, but only by becoming more complicated (i.e. less thin) at which point it's probably better to keep the two implementations separate.
BN_xxx→OSSL_FN_xxxfunction wrappers; keep BN's own (top-aware) implementations. #2020bntest's data files and exercises both BN andOSSL_FN(single combined test if practical), replacing the incidentalOSSL_FNcoverage the wrappers gave us. #2021