botan
botan copied to clipboard
Hard-coded usage of the system RNG in ffi_pk_op
There are functions in ffi_pk_op.cpp that directly use Botan::system_rng() without giving the caller the option to override that, e.g. here:
https://github.com/randombit/botan/blob/3.5.0/src/lib/ffi/ffi_pk_op.cpp#L40
Should the RNG not be a parameter?
It should have been a paramater. I don’t recall anymore why this ended up hard coded in this way. We cannot change the current implementations, since many existing users depend on the current ABI, but we could certainly add new functions which allow specifying an RNG to use.
Implementation happening here: https://github.com/randombit/botan/pull/4411