Question about Dilithium randomized signature #1379
-
Dear OQS team. Would you please share a sample code for Dilithium randomized signature? I saw that deterministic sample code in https://openquantumsafe.org/liboqs/examples/sig.html but I want to know a lttle bit more to generate randomized signature and to verify it. Thanks in adavance! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 5 replies
-
The version of Dilithium in liboqs is the randomized signing version. From the caller's perspective, you do not need to provide randomness, it is generated during the signing procedure. So the code in the example file you linked to already does the randomized signing. |
Beta Was this translation helpful? Give feedback.
-
Not really: The example code shows how to use the The actual operation of the algorithm(s) is defined by the behaviour built into
Please read the source code for Dilithium, e.g., here for the Dilithium2 reference code: liboqs/src/sig/dilithium/pqcrystals-dilithium_dilithium2_ref/sign.c Lines 109 to 113 in 04ff6fd So, you need to set the define "DILITHIUM_RANDOMIZED_SIGNING" when building This is (already by default) done in the CMakeList file: liboqs/src/sig/dilithium/CMakeLists.txt Line 10 in 04ff6fd |
Beta Was this translation helpful? Give feedback.
Not really: The example code shows how to use the
liboqs
API; it is the same code regardless of whether you use randomized signing or deterministic signing.The actual operation of the algorithm(s) is defined by the behaviour built into
liboqs
at build time, so the method of operation (also of Dilithium) depends how one builds the library:Please read the source code for Dilithium, e.g., here for the Dilithium2 reference code:
liboqs/src/sig/dilithium/pqcrystals-dilithium_dil…