Latest Update
This commit is contained in:
@@ -253,7 +253,6 @@ c448_error_t c448_ed448_verify(
|
||||
curve448_point_decode_like_eddsa_and_mul_by_ratio(pk_point, pubkey);
|
||||
curve448_scalar_t challenge_scalar;
|
||||
curve448_scalar_t response_scalar;
|
||||
unsigned int c;
|
||||
|
||||
if (C448_SUCCESS != error)
|
||||
return error;
|
||||
@@ -291,9 +290,6 @@ c448_error_t c448_ed448_verify(
|
||||
&signature[EDDSA_448_PUBLIC_BYTES],
|
||||
EDDSA_448_PRIVATE_BYTES);
|
||||
|
||||
for (c = 1; c < C448_EDDSA_DECODE_RATIO; c <<= 1)
|
||||
curve448_scalar_add(response_scalar, response_scalar, response_scalar);
|
||||
|
||||
/* pk_point = -c(x(P)) + (cx + k)G = kG */
|
||||
curve448_base_double_scalarmul_non_secret(pk_point,
|
||||
response_scalar,
|
||||
|
||||
@@ -219,10 +219,8 @@ static int pkey_ecies_encrypt(EVP_PKEY_CTX *ctx,
|
||||
|
||||
if (dctx->md)
|
||||
md_type = EVP_MD_type(dctx->md);
|
||||
else if (ec_nid == NID_sm2)
|
||||
md_type = NID_sm3;
|
||||
else
|
||||
md_type = NID_sha256;
|
||||
md_type = NID_sm3;
|
||||
|
||||
if (out == NULL) {
|
||||
*outlen = SM2_ciphertext_size(ec, EVP_get_digestbynid(md_type),
|
||||
@@ -259,13 +257,12 @@ static int pkey_ecies_decrypt(EVP_PKEY_CTX *ctx,
|
||||
|
||||
if (dctx->md)
|
||||
md_type = EVP_MD_type(dctx->md);
|
||||
else if (ec_nid == NID_sm2)
|
||||
md_type = NID_sm3;
|
||||
else
|
||||
md_type = NID_sha256;
|
||||
md_type = NID_sm3;
|
||||
|
||||
if (out == NULL) {
|
||||
*outlen = SM2_plaintext_size(ec, EVP_get_digestbynid(md_type), inlen);
|
||||
*outlen = SM2_plaintext_size(ec, EVP_get_digestbynid(md_type),
|
||||
inlen);
|
||||
ret = 1;
|
||||
}
|
||||
else {
|
||||
|
||||
Reference in New Issue
Block a user