liboqs-python icon indicating copy to clipboard operation
liboqs-python copied to clipboard

Allow toggling for randomized seed/nonce for ML-DSA signatures

Open chadsec1 opened this issue 4 months ago • 3 comments

Hi, is it possible to use the non-deterministic mode of ML-DSA ? I have read a part of Liboqs source code, and it appears to be supported, but there no option to enable / disable it through this python binding. Thanks.

chadsec1 avatar Sep 15 '25 08:09 chadsec1

Indeed we don't have that available as an option through the Python binding. And within liboqs itself the code exists but it's gated under a preprocessor macro that we don't expose in liboqs' build configuration. So currently, if you wanted this in the Python binding, you'd have to compile liboqs in that configuration, and doing so would require either manually patching that compilation flag on or proposing a change in liboqs to make that option available in liboqs' build configuration.

dstebila avatar Sep 15 '25 13:09 dstebila

Indeed we don't have that available as an option through the Python binding. And within liboqs itself the code exists but it's gated under a preprocessor macro that we don't expose in liboqs' build configuration. So currently, if you wanted this in the Python binding, you'd have to compile liboqs in that configuration, and doing so would require either manually patching that compilation flag on or proposing a change in liboqs to make that option available in liboqs' build configuration.

I see. Thanks for clarification. But I do not plan to manually patch anything, and would much rather to see this feature officially supported upstream.

or proposing a change in liboqs to make that option available in liboqs' build configuration

When I have free time, I will be sure to do a pull request. If you want to help me accelerate the process, pointers to what files / things that need to be changed would be appreciated. Thanks.

chadsec1 avatar Sep 16 '25 10:09 chadsec1

or proposing a change in liboqs to make that option available in liboqs' build configuration

When I have free time, I will be sure to do a pull request. If you want to help me accelerate the process, pointers to what files / things that need to be changed would be appreciated. Thanks.

I think it would be a matter of adding a CMake build option in https://github.com/open-quantum-safe/liboqs/blob/main/.CMake/alg_support.cmake and then using that to set the right compilation flag for the ML-DSA code in https://github.com/open-quantum-safe/liboqs/blob/main/src/sig/ml_dsa/CMakeLists.txt.

dstebila avatar Sep 16 '25 12:09 dstebila