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

RSA in case CRT optimization parameters are not populated #53

Closed
wants to merge 2 commits into from
Closed

RSA in case CRT optimization parameters are not populated #53

wants to merge 2 commits into from

Conversation

pascal-brand38
Copy link

rsa_exptmod(), ran on the private key, makes use of CRT optimization
parameters. In some use-cases, the given key does not include the
optimization parameters.

This patch allows rsa_exptmod() to run without the CRT parameters,
using directly mp_exptmod().

Signed-off-by: Pascal Brand pascal.brand@st.com

rsa_exptmod(), ran on the private key, makes use of CRT optimization
parameters. In some use-cases, the given key does not include the
optimization parameters.

This patch allows rsa_exptmod() to run without the CRT parameters,
using directly mp_exptmod().

Signed-off-by: Pascal Brand <pascal.brand@st.com>
@sjaeckel
Copy link
Member

Looks good

Nonetheless one comment/question: assuming that rsa_import() is extended to the case where no CRT parameters are imported, the MPI's are still initialised, so I think the test should not only be
(key->dP == NULL)
but
((key->dP == NULL) || (mp_get_digit_count(key->dP) == 0))
what do you think?

@pascal-brand38
Copy link
Author

I've made the changes accordingly.

sjaeckel added a commit that referenced this pull request Sep 29, 2014
@sjaeckel sjaeckel closed this Sep 29, 2014
@sjaeckel sjaeckel modified the milestone: v2.0.0 Feb 21, 2017
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

Successfully merging this pull request may close these issues.

None yet

2 participants