Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/sign-verify/clu_sign.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
6 changes: 4 additions & 2 deletions src/sign-verify/clu_verify.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Loading