Lines Matching refs:MBEDTLS_MPI_CHK

112     MBEDTLS_MPI_CHK( mbedtls_ecp_group_load( &ctx->grp, curve ) );  in mbedtls_ecjpake_setup()
114 MBEDTLS_MPI_CHK( mbedtls_mpi_read_binary( &ctx->s, secret, len ) ); in mbedtls_ecjpake_setup()
195 MBEDTLS_MPI_CHK( ecjpake_write_len_point( &p, end, grp, pf, G ) ); in ecjpake_hash()
196 MBEDTLS_MPI_CHK( ecjpake_write_len_point( &p, end, grp, pf, V ) ); in ecjpake_hash()
197 MBEDTLS_MPI_CHK( ecjpake_write_len_point( &p, end, grp, pf, X ) ); in ecjpake_hash()
217 MBEDTLS_MPI_CHK( mbedtls_mpi_read_binary( h, hash, in ecjpake_hash()
219 MBEDTLS_MPI_CHK( mbedtls_mpi_mod_mpi( h, h, &grp->N ) ); in ecjpake_hash()
256 MBEDTLS_MPI_CHK( mbedtls_ecp_tls_read_point( grp, &V, p, end - *p ) ); in ecjpake_zkp_read()
272 MBEDTLS_MPI_CHK( mbedtls_mpi_read_binary( &r, *p, r_len ) ); in ecjpake_zkp_read()
278 MBEDTLS_MPI_CHK( ecjpake_hash( md_info, grp, pf, G, &V, X, id, &h ) ); in ecjpake_zkp_read()
279 MBEDTLS_MPI_CHK( mbedtls_ecp_muladd( (mbedtls_ecp_group *) grp, in ecjpake_zkp_read()
326 MBEDTLS_MPI_CHK( mbedtls_ecp_gen_keypair_base( (mbedtls_ecp_group *) grp, in ecjpake_zkp_write()
328 MBEDTLS_MPI_CHK( ecjpake_hash( md_info, grp, pf, G, &V, X, id, &h ) ); in ecjpake_zkp_write()
329 MBEDTLS_MPI_CHK( mbedtls_mpi_mul_mpi( &h, &h, x ) ); /* x*h */ in ecjpake_zkp_write()
330 MBEDTLS_MPI_CHK( mbedtls_mpi_sub_mpi( &h, &v, &h ) ); /* v - x*h */ in ecjpake_zkp_write()
331 MBEDTLS_MPI_CHK( mbedtls_mpi_mod_mpi( &h, &h, &grp->N ) ); /* r */ in ecjpake_zkp_write()
334 MBEDTLS_MPI_CHK( mbedtls_ecp_tls_write_point( grp, &V, in ecjpake_zkp_write()
346 MBEDTLS_MPI_CHK( mbedtls_mpi_write_binary( &h, *p, len ) ); /* r */ in ecjpake_zkp_write()
381 MBEDTLS_MPI_CHK( mbedtls_ecp_tls_read_point( grp, X, p, end - *p ) ); in ecjpake_kkp_read()
388 MBEDTLS_MPI_CHK( ecjpake_zkp_read( md_info, grp, pf, G, X, id, p, end ) ); in ecjpake_kkp_read()
417 MBEDTLS_MPI_CHK( mbedtls_ecp_gen_keypair_base( (mbedtls_ecp_group *) grp, G, x, X, in ecjpake_kkp_write()
419 MBEDTLS_MPI_CHK( mbedtls_ecp_tls_write_point( grp, X, in ecjpake_kkp_write()
424 MBEDTLS_MPI_CHK( ecjpake_zkp_write( md_info, grp, pf, G, x, X, id, in ecjpake_kkp_write()
454 MBEDTLS_MPI_CHK( ecjpake_kkp_read( md_info, grp, pf, G, Xa, id, &p, end ) ); in ecjpake_kkpp_read()
455 MBEDTLS_MPI_CHK( ecjpake_kkp_read( md_info, grp, pf, G, Xb, id, &p, end ) ); in ecjpake_kkpp_read()
487 MBEDTLS_MPI_CHK( ecjpake_kkp_write( md_info, grp, pf, G, xm1, Xa, id, in ecjpake_kkpp_write()
489 MBEDTLS_MPI_CHK( ecjpake_kkp_write( md_info, grp, pf, G, xm2, Xb, id, in ecjpake_kkpp_write()
538 MBEDTLS_MPI_CHK( mbedtls_mpi_lset( &one, 1 ) ); in ecjpake_ecp_add3()
539 MBEDTLS_MPI_CHK( mbedtls_ecp_muladd( grp, R, &one, A, &one, B ) ); in ecjpake_ecp_add3()
540 MBEDTLS_MPI_CHK( mbedtls_ecp_muladd( grp, R, &one, R, &one, C ) ); in ecjpake_ecp_add3()
570 MBEDTLS_MPI_CHK( ecjpake_ecp_add3( &ctx->grp, &G, in mbedtls_ecjpake_read_round_two()
581 MBEDTLS_MPI_CHK( mbedtls_ecp_tls_read_group( &grp, &p, len ) ); in mbedtls_ecjpake_read_round_two()
589 MBEDTLS_MPI_CHK( ecjpake_kkp_read( ctx->md_info, &ctx->grp, in mbedtls_ecjpake_read_round_two()
622 MBEDTLS_MPI_CHK( mbedtls_mpi_fill_random( &b, 16, f_rng, p_rng ) ); in ecjpake_mul_secret()
623 MBEDTLS_MPI_CHK( mbedtls_mpi_mul_mpi( &b, &b, N ) ); in ecjpake_mul_secret()
624 MBEDTLS_MPI_CHK( mbedtls_mpi_add_mpi( &b, &b, S ) ); in ecjpake_mul_secret()
627 MBEDTLS_MPI_CHK( mbedtls_mpi_mul_mpi( R, X, &b ) ); in ecjpake_mul_secret()
629 MBEDTLS_MPI_CHK( mbedtls_mpi_mod_mpi( R, R, N ) ); in ecjpake_mul_secret()
664 MBEDTLS_MPI_CHK( ecjpake_ecp_add3( &ctx->grp, &G, in mbedtls_ecjpake_write_round_two()
666 MBEDTLS_MPI_CHK( ecjpake_mul_secret( &xm, 1, &ctx->xm2, &ctx->s, in mbedtls_ecjpake_write_round_two()
668 MBEDTLS_MPI_CHK( mbedtls_ecp_mul( &ctx->grp, &Xm, &xm, &G, f_rng, p_rng ) ); in mbedtls_ecjpake_write_round_two()
685 MBEDTLS_MPI_CHK( mbedtls_ecp_tls_write_group( &ctx->grp, &ec_len, in mbedtls_ecjpake_write_round_two()
695 MBEDTLS_MPI_CHK( mbedtls_ecp_tls_write_point( &ctx->grp, &Xm, in mbedtls_ecjpake_write_round_two()
699 MBEDTLS_MPI_CHK( ecjpake_zkp_write( ctx->md_info, &ctx->grp, in mbedtls_ecjpake_write_round_two()
736 MBEDTLS_MPI_CHK( mbedtls_mpi_lset( &one, 1 ) ); in mbedtls_ecjpake_derive_secret()
743 MBEDTLS_MPI_CHK( ecjpake_mul_secret( &m_xm2_s, -1, &ctx->xm2, &ctx->s, in mbedtls_ecjpake_derive_secret()
745 MBEDTLS_MPI_CHK( mbedtls_ecp_muladd( &ctx->grp, &K, in mbedtls_ecjpake_derive_secret()
748 MBEDTLS_MPI_CHK( mbedtls_ecp_mul( &ctx->grp, &K, &ctx->xm2, &K, in mbedtls_ecjpake_derive_secret()
753 MBEDTLS_MPI_CHK( mbedtls_mpi_write_binary( &K.X, kx, x_bytes ) ); in mbedtls_ecjpake_derive_secret()
754 MBEDTLS_MPI_CHK( mbedtls_md( ctx->md_info, kx, x_bytes, buf ) ); in mbedtls_ecjpake_derive_secret()
924 MBEDTLS_MPI_CHK( mbedtls_mpi_read_binary( &ctx->xm1, xm1, len1 ) ); in ecjpake_test_load()
925 MBEDTLS_MPI_CHK( mbedtls_mpi_read_binary( &ctx->xm2, xm2, len2 ) ); in ecjpake_test_load()
926 MBEDTLS_MPI_CHK( mbedtls_ecp_mul( &ctx->grp, &ctx->Xm1, &ctx->xm1, in ecjpake_test_load()
928 MBEDTLS_MPI_CHK( mbedtls_ecp_mul( &ctx->grp, &ctx->Xm2, &ctx->xm2, in ecjpake_test_load()
1034 MBEDTLS_MPI_CHK( ecjpake_test_load( &cli, in mbedtls_ecjpake_self_test()
1038 MBEDTLS_MPI_CHK( ecjpake_test_load( &srv, in mbedtls_ecjpake_self_test()