Skip to content

Add domain parameter match check for DH and ECDH key exchange.#14823

Closed
slontis wants to merge 4 commits intoopenssl:masterfrom
slontis:dh_kex_test
Closed

Add domain parameter match check for DH and ECDH key exchange.#14823
slontis wants to merge 4 commits intoopenssl:masterfrom
slontis:dh_kex_test

Conversation

@slontis
Copy link
Copy Markdown
Member

@slontis slontis commented Apr 11, 2021

Fixes #14808

Validation checks were moved into EVP_PKEY_derive_set_peer() which broke
an external negative test. Originally the old code was semi working by checking the peers public key was in the range of other parties p. It was not actually ever
checking that the domain parameters were consistent between the 2
parties. It now checks the parameters match as well as validating the
peers public key.

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

@slontis
Copy link
Copy Markdown
Member Author

slontis commented Apr 13, 2021

rebased

@slontis
Copy link
Copy Markdown
Member Author

slontis commented Apr 13, 2021

The appveyor issue is unrelated to this PR (See #14851)

@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 Apr 13, 2021
Copy link
Copy Markdown
Member

@t8m t8m left a comment

Choose a reason for hiding this comment

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

Please rename the error to PROV_R_MISMATCHING_DOMAIN_PARAMETERS or PROV_R_DOMAIN_PARAMETERS_MISMATCH. Otherwise OK.

slontis added 4 commits April 14, 2021 13:33
Fixes openssl#14808

Validation checks were moved into EVP_PKEY_derive_set_peer() which broke
an external negative test. Originally the old code was semi working by checking the peers public key was in the range of other parties p. It was not actually ever
checking that the domain parameters were consistent between the 2
parties. It now checks the parameters match as well as validating the
peers public key.
@slontis
Copy link
Copy Markdown
Member Author

slontis commented Apr 14, 2021

Apart from renaming the error there are no changes. Rebased also.

@slontis
Copy link
Copy Markdown
Member Author

slontis commented Apr 14, 2021

I am assuming the approval still holds and that this is ready for merge if the CI loop passes..

@openssl-machine
Copy link
Copy Markdown
Collaborator

24 hours has passed since 'approval: done' was set, but as this PR has been updated in that time the label 'approval: ready to merge' is not being automatically set. Please review the updates and set the label manually.

@paulidale paulidale 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 Apr 14, 2021
@slontis
Copy link
Copy Markdown
Member Author

slontis commented Apr 14, 2021

pauli - can I merge this now?

openssl-machine pushed a commit that referenced this pull request Apr 14, 2021
Fixes #14808

Validation checks were moved into EVP_PKEY_derive_set_peer() which broke
an external negative test. Originally the old code was semi working by checking the peers public key was in the range of other parties p. It was not actually ever
checking that the domain parameters were consistent between the 2
parties. It now checks the parameters match as well as validating the
peers public key.

Reviewed-by: Paul Dale <[email protected]>
(Merged from #14823)
@slontis
Copy link
Copy Markdown
Member Author

slontis commented Apr 14, 2021

Thanks for reviewing. Merged to master.

@slontis slontis closed this Apr 14, 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 Applies to master branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DH key derivation checks are incomplete (alpha14)

4 participants