Open
Description
In RsaPrivateKey::from_components()
, precompute()
errors are ignored because it is claimed that the previous call to validate()
guarantees it succeeds.
First of all, this is not the case - there can be bugs in precompute
itself. I bumped into it while working on #506. In
let q_mod_p = BoxedMontyForm::new(q_mod_p, p_params.clone());
where I accidentally typed q_params
instead of p_params
, so the subsequent inversion failed.
Second, what are we even achieving by ignoring the errors there? Are there valid keys for which the values cannot be precomputed? from_components()
already returns a Result
, we might as well just forward the precompute()
error to it.
Metadata
Metadata
Assignees
Labels
No labels