Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

https://docs.rs/rsa/latest/rsa/struct.RsaPrivateKey.html#method.precompute is public #338

Open
wez opened this issue Jun 15, 2023 · 2 comments

Comments

@wez
Copy link

wez commented Jun 15, 2023

While looking at perf, I noticed this precompute method: https://docs.rs/rsa/latest/rsa/struct.RsaPrivateKey.html#method.precompute

In #23 (comment) 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

@tarcieri
Copy link
Member

Yeah, it should be removed from the public API. We can at least deprecate it.

@complexspaces
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants