Lines Matching refs:grp

44 int mbedtls_ecdh_gen_public( mbedtls_ecp_group *grp, mbedtls_mpi *d, mbedtls_ecp_point *Q,  in mbedtls_ecdh_gen_public()  argument
48 return mbedtls_ecp_gen_keypair( grp, d, Q, f_rng, p_rng ); in mbedtls_ecdh_gen_public()
54 int mbedtls_ecdh_compute_shared( mbedtls_ecp_group *grp, mbedtls_mpi *z, in mbedtls_ecdh_compute_shared() argument
67 MBEDTLS_MPI_CHK( mbedtls_ecp_check_pubkey( grp, Q ) ); in mbedtls_ecdh_compute_shared()
69 MBEDTLS_MPI_CHK( mbedtls_ecp_mul( grp, &P, d, Q, f_rng, p_rng ) ); in mbedtls_ecdh_compute_shared()
101 mbedtls_ecp_group_free( &ctx->grp ); in mbedtls_ecdh_free()
126 if( ctx == NULL || ctx->grp.pbits == 0 ) in mbedtls_ecdh_make_params()
129 if( ( ret = mbedtls_ecdh_gen_public( &ctx->grp, &ctx->d, &ctx->Q, f_rng, p_rng ) ) in mbedtls_ecdh_make_params()
133 if( ( ret = mbedtls_ecp_tls_write_group( &ctx->grp, &grp_len, buf, blen ) ) in mbedtls_ecdh_make_params()
140 if( ( ret = mbedtls_ecp_tls_write_point( &ctx->grp, &ctx->Q, ctx->point_format, in mbedtls_ecdh_make_params()
160 if( ( ret = mbedtls_ecp_tls_read_group( &ctx->grp, buf, end - *buf ) ) != 0 ) in mbedtls_ecdh_read_params()
163 if( ( ret = mbedtls_ecp_tls_read_point( &ctx->grp, &ctx->Qp, buf, end - *buf ) ) in mbedtls_ecdh_read_params()
178 if( ( ret = mbedtls_ecp_group_copy( &ctx->grp, &key->grp ) ) != 0 ) in mbedtls_ecdh_get_params()
206 if( ctx == NULL || ctx->grp.pbits == 0 ) in mbedtls_ecdh_make_public()
209 if( ( ret = mbedtls_ecdh_gen_public( &ctx->grp, &ctx->d, &ctx->Q, f_rng, p_rng ) ) in mbedtls_ecdh_make_public()
213 return mbedtls_ecp_tls_write_point( &ctx->grp, &ctx->Q, ctx->point_format, in mbedtls_ecdh_make_public()
229 if( ( ret = mbedtls_ecp_tls_read_point( &ctx->grp, &ctx->Qp, &p, blen ) ) != 0 ) in mbedtls_ecdh_read_public()
251 if( ( ret = mbedtls_ecdh_compute_shared( &ctx->grp, &ctx->z, &ctx->Qp, &ctx->d, in mbedtls_ecdh_calc_secret()
260 *olen = ctx->grp.pbits / 8 + ( ( ctx->grp.pbits % 8 ) != 0 ); in mbedtls_ecdh_calc_secret()