mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2024-12-26 18:20:21 +00:00
Update tf-psa-crypto/drivers/builtin/src/ecp.c
Co-authored-by: Gilles Peskine <gilles.peskine@arm.com> Signed-off-by: minosgalanakis <30719586+minosgalanakis@users.noreply.github.com>
This commit is contained in:
parent
28cdd11908
commit
b7a9853afd
@ -3056,7 +3056,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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user