Open wez opened 1 year ago
Yeah, it should be removed from the public API. We can at least deprecate it.
I believe that the method should remain public so that users of the PrivateKeyParts
trait can know when the different pre-computed values have been prepared (see this Zulip conversation as well). Without it, there's no other guarantees that a instance of RsaPrivateKey
has these values available internally since its primarily just an implementation detail. We specifically need it to support "exporting" into a JWK format, which requires all of the additional values.
While looking at perf, I noticed this precompute method: https://docs.rs/rsa/latest/rsa/struct.RsaPrivateKey.html#method.precompute
In https://github.com/RustCrypto/RSA/issues/23#issuecomment-525251114 it mentions that this should be private and that it is implicitly called during construction.
That issue was closed, but it seems like this still needs to be resolved