A small issue within crypto_sign_open is causing Dilithium to not compile on windows x86. It is a warning treated as an error. The issue is within the function crypto_sign_open in sign.c.
The issue is that *mlen = -1; is attempting to assign -1 to an unsigned integer, giving the warning:
warning C4245: '=': conversion from 'int' to 'std::size_t'
Would setting *mlen = 0; be sufficient?
I'm curious as to why *mlen = -1; is even set upon failure? It is not consistent with other verification functions in this file, i.e., it is not set to -1 in the event that crypto_sign_verify fails verification. Is this to distinguish between failure modes? Either way, the fact that the crypto_sign_open returns -1 should be enough of an indication of failure.
A small issue within
crypto_sign_open
is causing Dilithium to not compile on windows x86. It is a warning treated as an error. The issue is within the functioncrypto_sign_open
in sign.c.The issue is that
*mlen = -1;
is attempting to assign -1 to an unsigned integer, giving the warning:warning C4245: '=': conversion from 'int' to 'std::size_t'
Would setting
*mlen = 0;
be sufficient?I'm curious as to why
*mlen = -1;
is even set upon failure? It is not consistent with other verification functions in this file, i.e., it is not set to-1
in the event thatcrypto_sign_verify
fails verification. Is this to distinguish between failure modes? Either way, the fact that thecrypto_sign_open
returns-1
should be enough of an indication of failure.