Switch from nbits to pbits
Correct coordinate size is grp.nbits, not grp.pbits.
Signed-off-by: Paul Elliott <paul.elliott@arm.com>
diff --git a/library/psa_crypto.c b/library/psa_crypto.c
index 2328e35..776a9c8 100644
--- a/library/psa_crypto.c
+++ b/library/psa_crypto.c
@@ -3556,7 +3556,7 @@
mbedtls_ecdsa_restart_init(&operation->restart_ctx);
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);
operation->md_alg = mbedtls_hash_info_md_from_psa(hash_alg);
@@ -3758,7 +3758,7 @@
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) {
return PSA_ERROR_INVALID_SIGNATURE;