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

Fix: invoking BN_check_prime improperly #16975

Closed
wants to merge 3 commits into from

Conversation

PeiweiHu
Copy link
Contributor

@PeiweiHu PeiweiHu commented Nov 5, 2021

BN_is_prime_fasttest() and BN_check_prime return 0 if the number is composite,
1 if it is prime with an error probability of less than 0.25^B, and
-1 on error.

Binary check of BN_check_prime will mix -1 and 1.

In fact, I am not that confident this is wrong, just suspicious. Say sorry for bothering beforehand if it's not a bug.

Checklist
  • documentation is added or updated
  • tests are added or updated

@github-actions github-actions bot added the severity: fips change The pull request changes FIPS provider sources label Nov 5, 2021
@t8m t8m added approval: review pending This pull request needs review by a committer branch: 3.0 Merge to openssl-3.0 branch branch: master Merge to master branch triaged: bug The issue/pr is/fixes a bug labels Nov 5, 2021
@paulidale paulidale added approval: done This pull request has the required number of approvals and removed approval: review pending This pull request needs review by a committer labels Nov 5, 2021
@openssl-machine openssl-machine added approval: ready to merge The 24 hour grace period has passed, ready to merge and removed approval: done This pull request has the required number of approvals labels Nov 6, 2021
@openssl-machine
Copy link
Collaborator

This pull request is ready to merge

@kroeckx kroeckx removed the approval: ready to merge The 24 hour grace period has passed, ready to merge label Nov 10, 2021
@t8m t8m added the approval: done This pull request has the required number of approvals label Nov 11, 2021
@t8m t8m requested a review from kroeckx November 11, 2021 09:36
@openssl-machine openssl-machine removed the approval: done This pull request has the required number of approvals label Nov 12, 2021
@openssl-machine
Copy link
Collaborator

This pull request is ready to merge

@openssl-machine openssl-machine added the approval: ready to merge The 24 hour grace period has passed, ready to merge label Nov 12, 2021
openssl-machine pushed a commit that referenced this pull request Nov 12, 2021
Negative return value indicates an error so we bail out.

Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Kurt Roeckx <kurt@roeckx.be>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from #16975)
openssl-machine pushed a commit that referenced this pull request Nov 12, 2021
Negative return value indicates an error so we bail out.

Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Kurt Roeckx <kurt@roeckx.be>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from #16975)

(cherry picked from commit 680827a)
@t8m
Copy link
Member

t8m commented Nov 12, 2021

Squashed and merged to master and 3.0 branches. Thank you for your contribution.

@t8m t8m closed this Nov 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approval: ready to merge The 24 hour grace period has passed, ready to merge branch: master Merge to master branch branch: 3.0 Merge to openssl-3.0 branch severity: fips change The pull request changes FIPS provider sources triaged: bug The issue/pr is/fixes a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants