Help needed regarding public/private portion of EVP_PKEY structure used for encoding #349
Unanswered
umairsafdar768
asked this question in
Q&A
Replies: 1 comment 4 replies
-
I'm not sure what you're asking of us: This feels a bit like you're asking us to debug your code:
To reduce the amount of code we need to understand, can I ask you to formulate the issue by way of a bug report with the minimal amount of code needed to show dubious behaviour (of course also referencing the relevant documentation)? Alternatively, highlight the modifications to our code and explain the rationale for those modifications. |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
I have been playing around with the different tests that are included with oqsprovider in tests directory, specifically the
oqs_test_endecode.c
file. Consider the following (modified) version of this file:If I understand correctly, the function EVP_PKEY_private_check() is used to verify the private portion of an EVP_PKEY structure. Now in above code, the
OSSL_KEYMGMT_SELECT_PUBLIC_KEY
selection is being used, which according to this link states that only public portion from the EVP_PKEY structure is considered. This means that after thedecode_EVP_PKEY_prov()
function, the 'decoded_pkey
' should contain only the public key.If I run the above code, I am getting success for private key verification of the '
decoded_pkey
' using the functionEVP_PKEY_private_check
(which should not be the case, because I only encoded the public portion of the keypair)I would be very thankful to be pointed in the right direction here. My goal is to encode only the public key portion of the keypair so that it can be sent to the other party for KEM encapsulation, but currently it seems like both public and private information is being encoded.
Beta Was this translation helpful? Give feedback.
All reactions