mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-04-02 07:20:26 +00:00
Switch from nbits to pbits
Correct coordinate size is grp.nbits, not grp.pbits. Signed-off-by: Paul Elliott <paul.elliott@arm.com>
This commit is contained in:
parent
6d99f0c265
commit
c569fc268f
@ -3556,7 +3556,7 @@ psa_status_t mbedtls_psa_sign_hash_start(
|
|||||||
mbedtls_ecdsa_restart_init(&operation->restart_ctx);
|
mbedtls_ecdsa_restart_init(&operation->restart_ctx);
|
||||||
|
|
||||||
operation->coordinate_bytes = PSA_BITS_TO_BYTES(
|
operation->coordinate_bytes = PSA_BITS_TO_BYTES(
|
||||||
operation->ctx->grp.pbits);
|
operation->ctx->grp.nbits);
|
||||||
|
|
||||||
psa_algorithm_t hash_alg = PSA_ALG_SIGN_GET_HASH(alg);
|
psa_algorithm_t hash_alg = PSA_ALG_SIGN_GET_HASH(alg);
|
||||||
operation->md_alg = mbedtls_hash_info_md_from_psa(hash_alg);
|
operation->md_alg = mbedtls_hash_info_md_from_psa(hash_alg);
|
||||||
@ -3758,7 +3758,7 @@ psa_status_t mbedtls_psa_verify_hash_start(
|
|||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
coordinate_bytes = PSA_BITS_TO_BYTES(operation->ctx->grp.pbits);
|
coordinate_bytes = PSA_BITS_TO_BYTES(operation->ctx->grp.nbits);
|
||||||
|
|
||||||
if (signature_length != 2 * coordinate_bytes) {
|
if (signature_length != 2 * coordinate_bytes) {
|
||||||
return PSA_ERROR_INVALID_SIGNATURE;
|
return PSA_ERROR_INVALID_SIGNATURE;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user