Lines Matching refs:grp

62     mbedtls_ecp_group_init( &ctx->grp );  in mbedtls_ecjpake_init()
85 mbedtls_ecp_group_free( &ctx->grp ); in mbedtls_ecjpake_free()
120 MBEDTLS_MPI_CHK( mbedtls_ecp_group_load( &ctx->grp, curve ) ); in mbedtls_ecjpake_setup()
139 ctx->grp.id == MBEDTLS_ECP_DP_NONE || in mbedtls_ecjpake_check()
153 const mbedtls_ecp_group *grp, in ecjpake_write_len_point() argument
164 ret = mbedtls_ecp_point_write_binary( grp, P, pf, in ecjpake_write_len_point()
186 const mbedtls_ecp_group *grp, in ecjpake_hash() argument
202 MBEDTLS_MPI_CHK( ecjpake_write_len_point( &p, end, grp, pf, G ) ); in ecjpake_hash()
203 MBEDTLS_MPI_CHK( ecjpake_write_len_point( &p, end, grp, pf, V ) ); in ecjpake_hash()
204 MBEDTLS_MPI_CHK( ecjpake_write_len_point( &p, end, grp, pf, X ) ); in ecjpake_hash()
224 MBEDTLS_MPI_CHK( mbedtls_mpi_mod_mpi( h, h, &grp->N ) ); in ecjpake_hash()
234 const mbedtls_ecp_group *grp, in ecjpake_zkp_read() argument
261 MBEDTLS_MPI_CHK( mbedtls_ecp_tls_read_point( grp, &V, p, end - *p ) ); in ecjpake_zkp_read()
283 MBEDTLS_MPI_CHK( ecjpake_hash( md_info, grp, pf, G, &V, X, id, &h ) ); in ecjpake_zkp_read()
284 MBEDTLS_MPI_CHK( mbedtls_ecp_muladd( (mbedtls_ecp_group *) grp, in ecjpake_zkp_read()
306 const mbedtls_ecp_group *grp, in ecjpake_zkp_write() argument
331 MBEDTLS_MPI_CHK( mbedtls_ecp_gen_keypair_base( (mbedtls_ecp_group *) grp, in ecjpake_zkp_write()
333 MBEDTLS_MPI_CHK( ecjpake_hash( md_info, grp, pf, G, &V, X, id, &h ) ); in ecjpake_zkp_write()
336 MBEDTLS_MPI_CHK( mbedtls_mpi_mod_mpi( &h, &h, &grp->N ) ); /* r */ in ecjpake_zkp_write()
339 MBEDTLS_MPI_CHK( mbedtls_ecp_tls_write_point( grp, &V, in ecjpake_zkp_write()
367 const mbedtls_ecp_group *grp, in ecjpake_kkp_read() argument
386 MBEDTLS_MPI_CHK( mbedtls_ecp_tls_read_point( grp, X, p, end - *p ) ); in ecjpake_kkp_read()
393 MBEDTLS_MPI_CHK( ecjpake_zkp_read( md_info, grp, pf, G, X, id, p, end ) ); in ecjpake_kkp_read()
404 const mbedtls_ecp_group *grp, in ecjpake_kkp_write() argument
422 MBEDTLS_MPI_CHK( mbedtls_ecp_gen_keypair_base( (mbedtls_ecp_group *) grp, G, x, X, in ecjpake_kkp_write()
424 MBEDTLS_MPI_CHK( mbedtls_ecp_tls_write_point( grp, X, in ecjpake_kkp_write()
429 MBEDTLS_MPI_CHK( ecjpake_zkp_write( md_info, grp, pf, G, x, X, id, in ecjpake_kkp_write()
441 const mbedtls_ecp_group *grp, in ecjpake_kkpp_read() argument
459 MBEDTLS_MPI_CHK( ecjpake_kkp_read( md_info, grp, pf, G, Xa, id, &p, end ) ); in ecjpake_kkpp_read()
460 MBEDTLS_MPI_CHK( ecjpake_kkp_read( md_info, grp, pf, G, Xb, id, &p, end ) ); in ecjpake_kkpp_read()
474 const mbedtls_ecp_group *grp, in ecjpake_kkpp_write() argument
492 MBEDTLS_MPI_CHK( ecjpake_kkp_write( md_info, grp, pf, G, xm1, Xa, id, in ecjpake_kkpp_write()
494 MBEDTLS_MPI_CHK( ecjpake_kkp_write( md_info, grp, pf, G, xm2, Xb, id, in ecjpake_kkpp_write()
513 return( ecjpake_kkpp_read( ctx->md_info, &ctx->grp, ctx->point_format, in mbedtls_ecjpake_read_round_one()
514 &ctx->grp.G, in mbedtls_ecjpake_read_round_one()
532 return( ecjpake_kkpp_write( ctx->md_info, &ctx->grp, ctx->point_format, in mbedtls_ecjpake_write_round_one()
533 &ctx->grp.G, in mbedtls_ecjpake_write_round_one()
541 static int ecjpake_ecp_add3( mbedtls_ecp_group *grp, mbedtls_ecp_point *R, in ecjpake_ecp_add3() argument
552 MBEDTLS_MPI_CHK( mbedtls_ecp_muladd( grp, R, &one, A, &one, B ) ); in ecjpake_ecp_add3()
553 MBEDTLS_MPI_CHK( mbedtls_ecp_muladd( grp, R, &one, R, &one, C ) ); in ecjpake_ecp_add3()
571 mbedtls_ecp_group grp; in mbedtls_ecjpake_read_round_two() local
577 mbedtls_ecp_group_init( &grp ); in mbedtls_ecjpake_read_round_two()
586 MBEDTLS_MPI_CHK( ecjpake_ecp_add3( &ctx->grp, &G, in mbedtls_ecjpake_read_round_two()
597 MBEDTLS_MPI_CHK( mbedtls_ecp_tls_read_group( &grp, &p, len ) ); in mbedtls_ecjpake_read_round_two()
598 if( grp.id != ctx->grp.id ) in mbedtls_ecjpake_read_round_two()
605 MBEDTLS_MPI_CHK( ecjpake_kkp_read( ctx->md_info, &ctx->grp, in mbedtls_ecjpake_read_round_two()
616 mbedtls_ecp_group_free( &grp ); in mbedtls_ecjpake_read_round_two()
685 MBEDTLS_MPI_CHK( ecjpake_ecp_add3( &ctx->grp, &G, in mbedtls_ecjpake_write_round_two()
688 &ctx->grp.N, f_rng, p_rng ) ); in mbedtls_ecjpake_write_round_two()
689 MBEDTLS_MPI_CHK( mbedtls_ecp_mul( &ctx->grp, &Xm, &xm, &G, f_rng, p_rng ) ); in mbedtls_ecjpake_write_round_two()
706 MBEDTLS_MPI_CHK( mbedtls_ecp_tls_write_group( &ctx->grp, &ec_len, in mbedtls_ecjpake_write_round_two()
716 MBEDTLS_MPI_CHK( mbedtls_ecp_tls_write_point( &ctx->grp, &Xm, in mbedtls_ecjpake_write_round_two()
720 MBEDTLS_MPI_CHK( ecjpake_zkp_write( ctx->md_info, &ctx->grp, in mbedtls_ecjpake_write_round_two()
770 &ctx->grp.N, f_rng, p_rng ) ); in mbedtls_ecjpake_derive_secret()
771 MBEDTLS_MPI_CHK( mbedtls_ecp_muladd( &ctx->grp, &K, in mbedtls_ecjpake_derive_secret()
774 MBEDTLS_MPI_CHK( mbedtls_ecp_mul( &ctx->grp, &K, &ctx->xm2, &K, in mbedtls_ecjpake_derive_secret()
778 x_bytes = ( ctx->grp.pbits + 7 ) / 8; in mbedtls_ecjpake_derive_secret()
955 MBEDTLS_MPI_CHK( mbedtls_ecp_mul( &ctx->grp, &ctx->Xm1, &ctx->xm1, in ecjpake_test_load()
956 &ctx->grp.G, NULL, NULL ) ); in ecjpake_test_load()
957 MBEDTLS_MPI_CHK( mbedtls_ecp_mul( &ctx->grp, &ctx->Xm2, &ctx->xm2, in ecjpake_test_load()
958 &ctx->grp.G, NULL, NULL ) ); in ecjpake_test_load()