Skip to content

Commit

Permalink
Update tf-psa-crypto/drivers/builtin/src/ecp.c
Browse files Browse the repository at this point in the history
Signed-off-by: Minos Galanakis <[email protected]>
  • Loading branch information
minosgalanakis committed Jan 23, 2025
1 parent feb09e2 commit f4b1a06
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/builtin/src/ecp.c
Original file line number Diff line number Diff line change
Expand Up @@ -3078,7 +3078,7 @@ int mbedtls_ecp_check_privkey(const mbedtls_ecp_group *grp,
/* see RFC 7748 sec. 5 para. 5 */
if (mbedtls_mpi_get_bit(d, 0) != 0 ||
mbedtls_mpi_get_bit(d, 1) != 0 ||
mbedtls_mpi_bitlen(d) - 1 != grp->nbits) { /* mbedtls_mpi_bitlen is one-based! */
mbedtls_mpi_bitlen(d) != grp->nbits + 1) { /* mbedtls_mpi_bitlen is one-based! */
return MBEDTLS_ERR_ECP_INVALID_KEY;
}

Expand Down

0 comments on commit f4b1a06

Please sign in to comment.