Skip to content

Fix import parameters based on 'OSSL_KEYMGMT_SELECT_KEYPAIR'#754

Merged
RodriM11 merged 4 commits intoopen-quantum-safe:mainfrom
RodriM11:import_domain_selection
Feb 24, 2026
Merged

Fix import parameters based on 'OSSL_KEYMGMT_SELECT_KEYPAIR'#754
RodriM11 merged 4 commits intoopen-quantum-safe:mainfrom
RodriM11:import_domain_selection

Conversation

@RodriM11
Copy link
Copy Markdown
Member

Fix the parameter selection for import key material from OSSL_KEYMGMT_SELECT_ALL_PARAMETERS to OSSL_KEYMGMT_SELECT_KEYPAIR. Fixes #745.

The bug was making invalid an import with parameter selection OSSL_KEYMGMT_SELECT_KEYPAIR, even when elements pertaining to the key pair were imported.

This means a behavior change for users employing a selection for key material import with value & OSSL_KEYMGMT_SELECT_KEYPAIR = 0. Furthermore, the procedure oqsx_key_fromdata is enforcing the parameter include_private.

Signed-off-by: RodriM11 <62776780+RodriM11@users.noreply.github.com>
@RodriM11 RodriM11 requested a review from baentsch as a code owner February 22, 2026 19:43
Signed-off-by: RodriM11 <62776780+RodriM11@users.noreply.github.com>
Signed-off-by: RodriM11 <62776780+RodriM11@users.noreply.github.com>
baentsch
baentsch previously approved these changes Feb 23, 2026
Copy link
Copy Markdown
Member

@baentsch baentsch left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks for the fix @RodriM11 ! Worthwhile adding a test, too?

@RodriM11
Copy link
Copy Markdown
Member Author

Yes @baentsch sorry! I (wrongly) assumed that oqs_test_evp_pkey_params.c was testing this. Will add it later! Thanks for the review

ashman-p
ashman-p previously approved these changes Feb 23, 2026
Signed-off-by: RodriM11 <62776780+RodriM11@users.noreply.github.com>
@RodriM11 RodriM11 dismissed stale reviews from ashman-p and baentsch via f21d38e February 24, 2026 08:10
@RodriM11
Copy link
Copy Markdown
Member Author

@baentsch a test has now been added!

Copy link
Copy Markdown
Member

@baentsch baentsch left a comment

Choose a reason for hiding this comment

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

Thanks for the added export/import test, @RodriM11 ! LGTM.

@RodriM11 RodriM11 merged commit e2aed51 into open-quantum-safe:main Feb 24, 2026
30 checks passed
@RodriM11
Copy link
Copy Markdown
Member Author

Merged into main.

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.

proper parameter selection for PQ key desearialisation

3 participants