Skip to content

Commit

Permalink
remove hash of user id for sm2 sign
Browse files Browse the repository at this point in the history
In the cross-validation with bouncycastle, the hash for userid in sm2
sign/verify is redundant.

Signed-off-by: lisiteng <[email protected]>
  • Loading branch information
lisiteng authored and syan10 committed Jan 11, 2024
1 parent 4d0b654 commit cc6d017
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions core/Enclave/openssl_operation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1029,12 +1029,6 @@ sgx_status_t sm2_sign(EVP_PKEY *evpkey,
goto out;
}

if (EVP_DigestSignUpdate(mdctx, id, id_len) != 1)
{
log_e("ecall sm2_sign EVP_DigestSignUpdate id failed.\n");
goto out;
}

if (EVP_DigestSignUpdate(mdctx, message, message_len) != 1)
{
log_e("ecall sm2_sign EVP_DigestSignUpdate data failed.\n");
Expand Down Expand Up @@ -1150,12 +1144,6 @@ sgx_status_t sm2_verify(EVP_PKEY *evpkey,
goto out;
}

if (EVP_DigestVerifyUpdate(mdctx, id, id_len) != 1)
{
log_e("ecall sm2_verify EVP_DigestVerifyUpdate id failed.\n");
goto out;
}

if (EVP_DigestVerifyUpdate(mdctx, message, message_len) != 1)
{
log_e("ecall sm2_verify EVP_DigestVerifyUpdate failed.\n");
Expand Down

0 comments on commit cc6d017

Please sign in to comment.