diff --git a/src/sign-verify/clu_sign.c b/src/sign-verify/clu_sign.c index 349d9db..5a1fb93 100644 --- a/src/sign-verify/clu_sign.c +++ b/src/sign-verify/clu_sign.c @@ -712,8 +712,10 @@ int wolfCLU_sign_data_dilithium (byte* data, char* out, word32 dataSz, char* pri return MEMORY_E; } - /* sign the message usign Dilithium private key */ - ret = wc_dilithium_sign_msg(data, dataSz, outBuf, &outBufSz, key, &rng); + /* sign the message usign Dilithium private key. Note that the context is + * empty. This is for interoperability. */ + ret = wc_dilithium_sign_ctx_msg(NULL, 0, data, dataSz, outBuf, &outBufSz, + key, &rng); if (ret != 0) { wolfCLU_LogError("Failed to sign data with Dilithium private key.\nRET: %d", ret); XFREE(outBuf, HEAP_HINT, DYNAMIC_TYPE_TMP_BUFFER); diff --git a/src/sign-verify/clu_verify.c b/src/sign-verify/clu_verify.c index f51e2f7..80eba3f 100644 --- a/src/sign-verify/clu_verify.c +++ b/src/sign-verify/clu_verify.c @@ -834,8 +834,10 @@ int wolfCLU_verify_signature_dilithium(byte* sig, int sigSz, byte* msg, return ret; } - /* verify the massage using the dilithium public key */ - ret = wc_dilithium_verify_msg(sig, sigSz, msg, msgLen, &res, key); + /* verify the message using the dilithium public key. Note that the + * context is empty. This is for interoperability. */ + ret = wc_dilithium_verify_ctx_msg(sig, sigSz, NULL, 0, msg, msgLen, &res, + key); if (ret != 0) { wolfCLU_LogError("Failed to verify data with Dilithium public key.\n" "RET: %d", ret);