• Home
  • Raw
  • Download

Lines Matching refs:grp

53     return( ctx->grp.id );  in mbedtls_ecdh_grp_id()
74 static int ecdh_gen_public_restartable( mbedtls_ecp_group *grp, in ecdh_gen_public_restartable() argument
86 MBEDTLS_MPI_CHK( mbedtls_ecp_gen_privkey( grp, d, f_rng, p_rng ) ); in ecdh_gen_public_restartable()
88 MBEDTLS_MPI_CHK( mbedtls_ecp_mul_restartable( grp, Q, d, &grp->G, in ecdh_gen_public_restartable()
98 int mbedtls_ecdh_gen_public( mbedtls_ecp_group *grp, mbedtls_mpi *d, mbedtls_ecp_point *Q, in mbedtls_ecdh_gen_public() argument
102 ECDH_VALIDATE_RET( grp != NULL ); in mbedtls_ecdh_gen_public()
106 return( ecdh_gen_public_restartable( grp, d, Q, f_rng, p_rng, NULL ) ); in mbedtls_ecdh_gen_public()
114 static int ecdh_compute_shared_restartable( mbedtls_ecp_group *grp, in ecdh_compute_shared_restartable() argument
126 MBEDTLS_MPI_CHK( mbedtls_ecp_mul_restartable( grp, &P, d, Q, in ecdh_compute_shared_restartable()
146 int mbedtls_ecdh_compute_shared( mbedtls_ecp_group *grp, mbedtls_mpi *z, in mbedtls_ecdh_compute_shared() argument
151 ECDH_VALIDATE_RET( grp != NULL ); in mbedtls_ecdh_compute_shared()
155 return( ecdh_compute_shared_restartable( grp, z, Q, d, in mbedtls_ecdh_compute_shared()
162 mbedtls_ecp_group_init( &ctx->grp ); in ecdh_init_internal()
201 ret = mbedtls_ecp_group_load( &ctx->grp, grp_id ); in ecdh_setup_internal()
241 mbedtls_ecp_group_free( &ctx->grp ); in ecdh_free_internal()
313 if( ctx->grp.pbits == 0 ) in ecdh_make_params_internal()
325 if( ( ret = ecdh_gen_public_restartable( &ctx->grp, &ctx->d, &ctx->Q, in ecdh_make_params_internal()
329 if( ( ret = mbedtls_ecdh_gen_public( &ctx->grp, &ctx->d, &ctx->Q, in ecdh_make_params_internal()
334 if( ( ret = mbedtls_ecp_tls_write_group( &ctx->grp, &grp_len, buf, in ecdh_make_params_internal()
341 if( ( ret = mbedtls_ecp_tls_write_point( &ctx->grp, &ctx->Q, point_format, in ecdh_make_params_internal()
399 return( mbedtls_ecp_tls_read_point( &ctx->grp, &ctx->Qp, buf, in ecdh_read_params_internal()
485 if( ( ret = mbedtls_ecdh_setup( ctx, key->grp.id ) ) != 0 ) in mbedtls_ecdh_get_params()
493 if( mbedtls_ecdh_grp_id( ctx ) != key->grp.id ) in mbedtls_ecdh_get_params()
535 if( ctx->grp.pbits == 0 ) in ecdh_make_public_internal()
546 if( ( ret = ecdh_gen_public_restartable( &ctx->grp, &ctx->d, &ctx->Q, in ecdh_make_public_internal()
550 if( ( ret = mbedtls_ecdh_gen_public( &ctx->grp, &ctx->d, &ctx->Q, in ecdh_make_public_internal()
555 return mbedtls_ecp_tls_write_point( &ctx->grp, &ctx->Q, point_format, olen, in ecdh_make_public_internal()
605 if( ( ret = mbedtls_ecp_tls_read_point( &ctx->grp, &ctx->Qp, &p, in ecdh_read_public_internal()
657 if( ctx == NULL || ctx->grp.pbits == 0 ) in ecdh_calc_secret_internal()
668 if( ( ret = ecdh_compute_shared_restartable( &ctx->grp, &ctx->z, &ctx->Qp, in ecdh_calc_secret_internal()
675 if( ( ret = mbedtls_ecdh_compute_shared( &ctx->grp, &ctx->z, &ctx->Qp, in ecdh_calc_secret_internal()
685 *olen = ctx->grp.pbits / 8 + ( ( ctx->grp.pbits % 8 ) != 0 ); in ecdh_calc_secret_internal()
687 if( mbedtls_ecp_get_type( &ctx->grp ) == MBEDTLS_ECP_TYPE_MONTGOMERY ) in ecdh_calc_secret_internal()
740 if( ctx->grp.pbits == 0 ) in ecdh_tls13_make_params_internal()
743 if( ( ret = mbedtls_ecdh_gen_public( &ctx->grp, &ctx->d, &ctx->Q, in ecdh_tls13_make_params_internal()
747 ret = mbedtls_ecp_point_write_binary( &ctx->grp, &ctx->Q, point_format, in ecdh_tls13_make_params_internal()
827 if( ( ret = mbedtls_ecp_point_read_binary( &ctx->grp, in ecdh_tls13_read_public_internal()