We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bf42408 commit 52ff8e9Copy full SHA for 52ff8e9
library/ecdh.c
@@ -638,7 +638,7 @@ static int ecdh_calc_secret_internal( mbedtls_ecdh_context_mbed *ctx,
638
639
*olen = ctx->grp.pbits / 8 + ( ( ctx->grp.pbits % 8 ) != 0 );
640
641
- if( ctx->grp.id == MBEDTLS_ECP_DP_CURVE25519 )
+ if( mbedtls_ecp_get_type( &ctx->grp ) == MBEDTLS_ECP_TYPE_MONTGOMERY )
642
return mbedtls_mpi_write_binary_le( &ctx->z, buf, *olen );
643
644
return mbedtls_mpi_write_binary( &ctx->z, buf, *olen );
0 commit comments