• Home
  • Raw
  • Download

Lines Matching refs:grp

85     mbedtls_ecp_group_init( &ctx->grp );  in mbedtls_ecjpake_init()
108 mbedtls_ecp_group_free( &ctx->grp ); in mbedtls_ecjpake_free()
148 MBEDTLS_MPI_CHK( mbedtls_ecp_group_load( &ctx->grp, curve ) ); in mbedtls_ecjpake_setup()
179 ctx->grp.id == MBEDTLS_ECP_DP_NONE || in mbedtls_ecjpake_check()
193 const mbedtls_ecp_group *grp, in ecjpake_write_len_point() argument
204 ret = mbedtls_ecp_point_write_binary( grp, P, pf, in ecjpake_write_len_point()
226 const mbedtls_ecp_group *grp, in ecjpake_hash() argument
242 MBEDTLS_MPI_CHK( ecjpake_write_len_point( &p, end, grp, pf, G ) ); in ecjpake_hash()
243 MBEDTLS_MPI_CHK( ecjpake_write_len_point( &p, end, grp, pf, V ) ); in ecjpake_hash()
244 MBEDTLS_MPI_CHK( ecjpake_write_len_point( &p, end, grp, pf, X ) ); in ecjpake_hash()
265 MBEDTLS_MPI_CHK( mbedtls_mpi_mod_mpi( h, h, &grp->N ) ); in ecjpake_hash()
275 const mbedtls_ecp_group *grp, in ecjpake_zkp_read() argument
302 MBEDTLS_MPI_CHK( mbedtls_ecp_tls_read_point( grp, &V, p, end - *p ) ); in ecjpake_zkp_read()
324 MBEDTLS_MPI_CHK( ecjpake_hash( md_type, grp, pf, G, &V, X, id, &h ) ); in ecjpake_zkp_read()
325 MBEDTLS_MPI_CHK( mbedtls_ecp_muladd( (mbedtls_ecp_group *) grp, in ecjpake_zkp_read()
347 const mbedtls_ecp_group *grp, in ecjpake_zkp_write() argument
372 MBEDTLS_MPI_CHK( mbedtls_ecp_gen_keypair_base( (mbedtls_ecp_group *) grp, in ecjpake_zkp_write()
374 MBEDTLS_MPI_CHK( ecjpake_hash( md_type, grp, pf, G, &V, X, id, &h ) ); in ecjpake_zkp_write()
377 MBEDTLS_MPI_CHK( mbedtls_mpi_mod_mpi( &h, &h, &grp->N ) ); /* r */ in ecjpake_zkp_write()
380 MBEDTLS_MPI_CHK( mbedtls_ecp_tls_write_point( grp, &V, in ecjpake_zkp_write()
408 const mbedtls_ecp_group *grp, in ecjpake_kkp_read() argument
427 MBEDTLS_MPI_CHK( mbedtls_ecp_tls_read_point( grp, X, p, end - *p ) ); in ecjpake_kkp_read()
434 MBEDTLS_MPI_CHK( ecjpake_zkp_read( md_type, grp, pf, G, X, id, p, end ) ); in ecjpake_kkp_read()
445 const mbedtls_ecp_group *grp, in ecjpake_kkp_write() argument
463 MBEDTLS_MPI_CHK( mbedtls_ecp_gen_keypair_base( (mbedtls_ecp_group *) grp, G, x, X, in ecjpake_kkp_write()
465 MBEDTLS_MPI_CHK( mbedtls_ecp_tls_write_point( grp, X, in ecjpake_kkp_write()
470 MBEDTLS_MPI_CHK( ecjpake_zkp_write( md_type, grp, pf, G, x, X, id, in ecjpake_kkp_write()
482 const mbedtls_ecp_group *grp, in ecjpake_kkpp_read() argument
500 MBEDTLS_MPI_CHK( ecjpake_kkp_read( md_type, grp, pf, G, Xa, id, &p, end ) ); in ecjpake_kkpp_read()
501 MBEDTLS_MPI_CHK( ecjpake_kkp_read( md_type, grp, pf, G, Xb, id, &p, end ) ); in ecjpake_kkpp_read()
515 const mbedtls_ecp_group *grp, in ecjpake_kkpp_write() argument
533 MBEDTLS_MPI_CHK( ecjpake_kkp_write( md_type, grp, pf, G, xm1, Xa, id, in ecjpake_kkpp_write()
535 MBEDTLS_MPI_CHK( ecjpake_kkp_write( md_type, grp, pf, G, xm2, Xb, id, in ecjpake_kkpp_write()
551 return( ecjpake_kkpp_read( ctx->md_type, &ctx->grp, ctx->point_format, in mbedtls_ecjpake_read_round_one()
552 &ctx->grp.G, in mbedtls_ecjpake_read_round_one()
565 return( ecjpake_kkpp_write( ctx->md_type, &ctx->grp, ctx->point_format, in mbedtls_ecjpake_write_round_one()
566 &ctx->grp.G, in mbedtls_ecjpake_write_round_one()
574 static int ecjpake_ecp_add3( mbedtls_ecp_group *grp, mbedtls_ecp_point *R, in ecjpake_ecp_add3() argument
585 MBEDTLS_MPI_CHK( mbedtls_ecp_muladd( grp, R, &one, A, &one, B ) ); in ecjpake_ecp_add3()
586 MBEDTLS_MPI_CHK( mbedtls_ecp_muladd( grp, R, &one, R, &one, C ) ); in ecjpake_ecp_add3()
604 mbedtls_ecp_group grp; in mbedtls_ecjpake_read_round_two() local
607 mbedtls_ecp_group_init( &grp ); in mbedtls_ecjpake_read_round_two()
616 MBEDTLS_MPI_CHK( ecjpake_ecp_add3( &ctx->grp, &G, in mbedtls_ecjpake_read_round_two()
627 MBEDTLS_MPI_CHK( mbedtls_ecp_tls_read_group( &grp, &p, len ) ); in mbedtls_ecjpake_read_round_two()
628 if( grp.id != ctx->grp.id ) in mbedtls_ecjpake_read_round_two()
635 MBEDTLS_MPI_CHK( ecjpake_kkp_read( ctx->md_type, &ctx->grp, in mbedtls_ecjpake_read_round_two()
646 mbedtls_ecp_group_free( &grp ); in mbedtls_ecjpake_read_round_two()
710 MBEDTLS_MPI_CHK( ecjpake_ecp_add3( &ctx->grp, &G, in mbedtls_ecjpake_write_round_two()
713 &ctx->grp.N, f_rng, p_rng ) ); in mbedtls_ecjpake_write_round_two()
714 MBEDTLS_MPI_CHK( mbedtls_ecp_mul( &ctx->grp, &Xm, &xm, &G, f_rng, p_rng ) ); in mbedtls_ecjpake_write_round_two()
731 MBEDTLS_MPI_CHK( mbedtls_ecp_tls_write_group( &ctx->grp, &ec_len, in mbedtls_ecjpake_write_round_two()
741 MBEDTLS_MPI_CHK( mbedtls_ecp_tls_write_point( &ctx->grp, &Xm, in mbedtls_ecjpake_write_round_two()
745 MBEDTLS_MPI_CHK( ecjpake_zkp_write( ctx->md_type, &ctx->grp, in mbedtls_ecjpake_write_round_two()
782 &ctx->grp.N, f_rng, p_rng ) ); in mbedtls_ecjpake_derive_k()
783 MBEDTLS_MPI_CHK( mbedtls_ecp_muladd( &ctx->grp, K, in mbedtls_ecjpake_derive_k()
786 MBEDTLS_MPI_CHK( mbedtls_ecp_mul( &ctx->grp, K, &ctx->xm2, K, in mbedtls_ecjpake_derive_k()
817 x_bytes = ( ctx->grp.pbits + 7 ) / 8; in mbedtls_ecjpake_derive_secret()
842 ret = mbedtls_ecp_point_write_binary( &ctx->grp, &K, ctx->point_format, in mbedtls_ecjpake_write_shared_key()
1044 MBEDTLS_MPI_CHK( mbedtls_ecp_mul( &ctx->grp, &ctx->Xm1, &ctx->xm1, in ecjpake_test_load()
1045 &ctx->grp.G, self_test_rng, NULL ) ); in ecjpake_test_load()
1046 MBEDTLS_MPI_CHK( mbedtls_ecp_mul( &ctx->grp, &ctx->Xm2, &ctx->xm2, in ecjpake_test_load()
1047 &ctx->grp.G, self_test_rng, NULL ) ); in ecjpake_test_load()