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

Clarify BN_mod_exp docs #6137

Closed
wants to merge 2 commits into from

Conversation

mattcaswell
Copy link
Member

Specifically this is not supported with an even modulus and
BN_FLG_CONSTTIME.

Fixes #5082

Specifically this is not supported with an even modulus and
BN_FLG_CONSTTIME.

Fixes openssl#5082
@mattcaswell mattcaswell added branch: master Merge to master branch branch: 1.1.1 Merge to OpenSSL_1_1_1-stable branch labels Apr 30, 2018
@mattcaswell mattcaswell added this to the 1.1.1 milestone Apr 30, 2018
@@ -92,7 +92,9 @@ BN_exp() raises I<a> to the I<p>-th power and places the result in I<r>
BN_mul().

BN_mod_exp() computes I<a> to the I<p>-th power modulo I<m> (C<r=a^p %
m>). This function uses less time and space than BN_exp().
m>). This function uses less time and space than BN_exp(). Note that calling
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"not supported" doesn't mean much. Does it return an error? Perhaps this:

Do not call this function when B<m> is even and any of the parameters have the B<BN_FLG_CONSTTIME> flag set.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@mattcaswell
Copy link
Member Author

Fixup commit pushed. The same fixup has also been applied to #6138.

levitte pushed a commit that referenced this pull request May 1, 2018
Specifically this is not supported with an even modulus and
BN_FLG_CONSTTIME.

Fixes #5082

Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from #6137)
@mattcaswell
Copy link
Member Author

Pushed. Thanks.

@mattcaswell mattcaswell closed this May 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
branch: master Merge to master branch branch: 1.1.1 Merge to OpenSSL_1_1_1-stable branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants