Improve mbedtls_ecp_point_read_binary tests

Renamed the tests because they are explicitly testing Curve25519 and
nothing else. Improved test coverage, test documentation and extended
in-code documentation with a specific reference to the standard as well.
This commit is contained in:
Janos Follath 2019-02-25 11:35:20 +00:00
parent 7caf8e452f
commit ffbd7e8ff3
2 changed files with 16 additions and 4 deletions

View file

@ -830,7 +830,7 @@ int mbedtls_ecp_point_read_binary( const mbedtls_ecp_group *grp,
mbedtls_mpi_free( &pt->Y );
if( grp->id == MBEDTLS_ECP_DP_CURVE25519 )
/* Set most significant bit to 0 */
/* Set most significant bit to 0 as prescribed in RFC7748 §5 */
MBEDTLS_MPI_CHK( mbedtls_mpi_set_bit( &pt->X, plen * 8 - 1, 0 ) );
}
#endif