Replies: 1 comment
-
|
I dont know how i managed to post this to the wrong forum. This was obviously meant for the openssl github. Sorry! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
i am trying to verify a dilithium5 signature using the EVP library. I am getting the message, the public key as a hexadecimal string and the signature as a hexadecimal string from an external server. I know that server uses some sort of python wrapper of liboqs to generate its signatures.
I have tried both the approach using EVP_PKEY_verify_message_init() and EVP_PKEY_verify() as well as the approach using EVP_DigestVerifyInit(), EVP_DigestVerifyUpdate() and EVP_DigestVerifyFinal() but i have not gotten either approach to work.
After a lot of trial and error, i noticed that there seems to be a mismatch in length between the signature i am given and openssl-generated ml-dsa signatures. The signature i am getting from the server is 4595 octets in length. However, if i use openssl to generate a signature using a random private key myself, i get a signature that is 4627 octets in length. After some research if found out that upon standardization it seems that a 32byte hash was added to the signature format.
Hence my question: Is there a way for me to verify the dilithium5 signature i was given, perhaps by using the implementation from the oqs provider instead of the native openssl>3.5 ml-dsa implementation? Or am i going to have to ask the developers of the server to update their signature algorithm?
Example code added below:
Thanks and best regards,
Erik :)
Beta Was this translation helpful? Give feedback.
All reactions