/AliOS-Things-master/components/mbedtls/library/ |
A D | ecp.c | 561 grp->pbits = 0; in mbedtls_ecp_group_init() 562 grp->nbits = 0; in mbedtls_ecp_group_init() 563 grp->h = 0; in mbedtls_ecp_group_init() 564 grp->modp = NULL; in mbedtls_ecp_group_init() 568 grp->T = NULL; in mbedtls_ecp_group_init() 569 grp->T_size = 0; in mbedtls_ecp_group_init() 604 if( grp == NULL ) in mbedtls_ecp_group_free() 607 if( grp->h != 1 ) in mbedtls_ecp_group_free() 2028 T = grp->T; in ecp_mul_comb() 2824 pub->grp.id != prv->grp.id || [all …]
|
A D | ecjpake.c | 67 mbedtls_ecp_group_init( &ctx->grp ); in mbedtls_ecjpake_init() 90 mbedtls_ecp_group_free( &ctx->grp ); in mbedtls_ecjpake_free() 144 ctx->grp.id == MBEDTLS_ECP_DP_NONE || in mbedtls_ecjpake_check() 169 ret = mbedtls_ecp_point_write_binary( grp, P, pf, in ecjpake_write_len_point() 524 &ctx->grp.G, in mbedtls_ecjpake_read_round_one() 543 &ctx->grp.G, in mbedtls_ecjpake_write_round_one() 581 mbedtls_ecp_group grp; in mbedtls_ecjpake_read_round_two() local 587 mbedtls_ecp_group_init( &grp ); in mbedtls_ecjpake_read_round_two() 608 if( grp.id != ctx->grp.id ) in mbedtls_ecjpake_read_round_two() 626 mbedtls_ecp_group_free( &grp ); in mbedtls_ecjpake_read_round_two() [all …]
|
A D | ecdsa.c | 233 size_t n_size = ( grp->nbits + 7 ) / 8; in derive_mpi() 237 if( use_size * 8 > grp->nbits ) in derive_mpi() 241 if( mbedtls_mpi_cmp_mpi( x, &grp->N ) >= 0 ) in derive_mpi() 266 if( grp->N.p == NULL ) in ecdsa_sign_restartable() 325 MBEDTLS_MPI_CHK( mbedtls_ecp_mul_restartable( grp, &R, pk, &grp->G, in ecdsa_sign_restartable() 388 ECDSA_VALIDATE_RET( grp != NULL ); in mbedtls_ecdsa_sign() 414 size_t grp_len = ( grp->nbits + 7 ) / 8; in ecdsa_sign_det_restartable() 474 ECDSA_VALIDATE_RET( grp != NULL ); in mbedtls_ecdsa_sign_det() 505 if( grp->N.p == NULL ) in ecdsa_verify_restartable() 603 ECDSA_VALIDATE_RET( grp != NULL ); in mbedtls_ecdsa_verify() [all …]
|
A D | ecp_curves.c | 602 grp->pbits = mbedtls_mpi_bitlen( &grp->P ); in ecp_group_load() 603 grp->nbits = mbedtls_mpi_bitlen( &grp->N ); in ecp_group_load() 605 grp->h = 1; in ecp_group_load() 680 MBEDTLS_MPI_CHK( mbedtls_mpi_sub_int( &grp->P, &grp->P, 19 ) ); in ecp_use_curve25519() 681 grp->pbits = mbedtls_mpi_bitlen( &grp->P ); in ecp_use_curve25519() 695 grp->nbits = 254; in ecp_use_curve25519() 722 MBEDTLS_MPI_CHK( mbedtls_mpi_sub_int( &grp->P, &grp->P, 1 ) ); in ecp_use_curve448() 724 MBEDTLS_MPI_CHK( mbedtls_mpi_sub_int( &grp->P, &grp->P, 1 ) ); in ecp_use_curve448() 725 grp->pbits = mbedtls_mpi_bitlen( &grp->P ); in ecp_use_curve448() 737 MBEDTLS_MPI_CHK( mbedtls_mpi_sub_mpi( &grp->N, &grp->N, &Ns ) ); in ecp_use_curve448() [all …]
|
A D | ecdh.c | 74 MBEDTLS_MPI_CHK( mbedtls_ecp_mul_restartable( grp, Q, d, &grp->G, in ecdh_gen_public_restartable() 88 ECDH_VALIDATE_RET( grp != NULL ); in mbedtls_ecdh_gen_public() 137 ECDH_VALIDATE_RET( grp != NULL ); in mbedtls_ecdh_compute_shared() 141 return( ecdh_compute_shared_restartable( grp, z, Q, d, in mbedtls_ecdh_compute_shared() 148 mbedtls_ecp_group_init( &ctx->grp ); in ecdh_init_internal() 187 ret = mbedtls_ecp_group_load( &ctx->grp, grp_id ); in ecdh_setup_internal() 220 mbedtls_ecp_group_free( &ctx->grp ); in ecdh_free_internal() 287 if( ctx->grp.pbits == 0 ) in ecdh_make_params_internal() 476 if( ctx->grp.pbits == 0 ) in ecdh_make_public_internal() 588 if( ctx == NULL || ctx->grp.pbits == 0 ) in ecdh_calc_secret_internal() [all …]
|
A D | pkparse.c | 295 grp->pbits = mbedtls_mpi_bitlen( &grp->P ); in pk_group_from_specified() 350 if( ( ret = mbedtls_ecp_point_read_binary( grp, &grp->G, in pk_group_from_specified() 362 mbedtls_mpi_lset( &grp->G.Z, 1 ) != 0 ) in pk_group_from_specified() 376 grp->nbits = mbedtls_mpi_bitlen( &grp->N ); in pk_group_from_specified() 404 if( grp->pbits == ref.pbits && grp->nbits == ref.nbits && in pk_group_id_from_group() 437 mbedtls_ecp_group grp; in pk_group_id_from_specified() local 439 mbedtls_ecp_group_init( &grp ); in pk_group_id_from_specified() 444 ret = pk_group_id_from_group( &grp, grp_id ); in pk_group_id_from_specified() 447 mbedtls_ecp_group_free( &grp ); in pk_group_id_from_specified() 484 if( grp->id != MBEDTLS_ECP_DP_NONE && grp->id != grp_id ) in pk_use_ecparams() [all …]
|
A D | pk_wrap.c | 223 return( ((mbedtls_ecp_keypair *) ctx)->grp.pbits ); in eckey_get_bitlen() 341 if( rs->ecdsa_ctx.grp.pbits == 0 ) in eckey_verify_rs_wrap() 366 if( rs->ecdsa_ctx.grp.pbits == 0 ) in eckey_sign_rs_wrap()
|
A D | pkwrite.c | 117 if( ( ret = mbedtls_ecp_point_write_binary( &ec->grp, &ec->Q, in pk_write_ec_pubkey() 146 if( ( ret = mbedtls_oid_get_oid_by_ec_grp( ec->grp.id, &oid, &oid_len ) ) != 0 ) in pk_write_ec_param()
|
A D | ssl_cli.c | 2034 grp_id = ssl->handshake->ecdh_ctx.grp.id; in ssl_check_server_ecdh_params() 2051 if( ssl->handshake->ecdh_ctx.grp.nbits < 163 || in ssl_check_server_ecdh_params() 2052 ssl->handshake->ecdh_ctx.grp.nbits > 521 ) in ssl_check_server_ecdh_params()
|
A D | x509_crt.c | 215 const mbedtls_ecp_group_id gid = mbedtls_pk_ec( *pk )->grp.id; in x509_profile_check_key()
|
A D | ssl_srv.c | 683 mbedtls_ecp_group_id grp_id = mbedtls_pk_ec( *pk )->grp.id; in ssl_check_key_curve()
|
A D | ssl_tls.c | 5835 mbedtls_ssl_check_curve( ssl, mbedtls_pk_ec( *pk )->grp.id ) != 0 ) in mbedtls_ssl_parse_certificate()
|
/AliOS-Things-master/components/mbedtls/include/mbedtls/ |
A D | ecp_internal.h | 75 unsigned char mbedtls_internal_ecp_grp_capable( const mbedtls_ecp_group *grp ); 92 int mbedtls_internal_ecp_init( const mbedtls_ecp_group *grp ); 100 void mbedtls_internal_ecp_free( const mbedtls_ecp_group *grp ); 120 int mbedtls_internal_ecp_randomize_jac( const mbedtls_ecp_group *grp, 165 int mbedtls_internal_ecp_add_mixed( const mbedtls_ecp_group *grp, 190 int mbedtls_internal_ecp_double_jac( const mbedtls_ecp_group *grp, 220 int mbedtls_internal_ecp_normalize_jac_many( const mbedtls_ecp_group *grp, 238 int mbedtls_internal_ecp_normalize_jac( const mbedtls_ecp_group *grp, 247 int mbedtls_internal_ecp_double_add_mxz( const mbedtls_ecp_group *grp, 268 int mbedtls_internal_ecp_randomize_mxz( const mbedtls_ecp_group *grp, [all …]
|
A D | ecp.h | 238 int mbedtls_ecp_check_budget( const mbedtls_ecp_group *grp, 244 MBEDTLS_MPI_CHK( mbedtls_ecp_check_budget( grp, rs_ctx, \ 482 void mbedtls_ecp_group_init( mbedtls_ecp_group *grp ); 505 void mbedtls_ecp_group_free( mbedtls_ecp_group *grp ); 682 int mbedtls_ecp_tls_read_point( const mbedtls_ecp_group *grp, 749 int mbedtls_ecp_tls_read_group( mbedtls_ecp_group *grp, 935 mbedtls_ecp_group *grp, mbedtls_ecp_point *R, 967 int mbedtls_ecp_check_pubkey( const mbedtls_ecp_group *grp, 989 int mbedtls_ecp_check_privkey( const mbedtls_ecp_group *grp, 1007 int mbedtls_ecp_gen_privkey( const mbedtls_ecp_group *grp, [all …]
|
A D | ecdh.h | 86 mbedtls_ecp_group grp; /*!< The elliptic curve used. */ member 107 mbedtls_ecp_group grp; /*!< The elliptic curve used. */ member 167 int mbedtls_ecdh_gen_public( mbedtls_ecp_group *grp, mbedtls_mpi *d, mbedtls_ecp_point *Q, 205 int mbedtls_ecdh_compute_shared( mbedtls_ecp_group *grp, mbedtls_mpi *z,
|
A D | ecdsa.h | 153 int mbedtls_ecdsa_sign( mbedtls_ecp_group *grp, mbedtls_mpi *r, mbedtls_mpi *s, 193 int mbedtls_ecdsa_sign_det( mbedtls_ecp_group *grp, mbedtls_mpi *r, 231 int mbedtls_ecdsa_verify( mbedtls_ecp_group *grp,
|
A D | ecjpake.h | 74 mbedtls_ecp_group grp; /**< Elliptic curve */ member
|
A D | config.h.bak | 457 * const mbedtls_ecp_group *grp ) 458 * int mbedtls_internal_ecp_init( const mbedtls_ecp_group *grp ) 459 * void mbedtls_internal_ecp_free( const mbedtls_ecp_group *grp )
|
/AliOS-Things-master/components/mbedtls/programs/pkey/ |
A D | ecdh_curve25519.c | 107 ret = mbedtls_ecp_group_load( &ctx_cli.grp, MBEDTLS_ECP_DP_CURVE25519 ); in main() 114 ret = mbedtls_ecdh_gen_public( &ctx_cli.grp, &ctx_cli.d, &ctx_cli.Q, in main() 137 ret = mbedtls_ecp_group_load( &ctx_srv.grp, MBEDTLS_ECP_DP_CURVE25519 ); in main() 144 ret = mbedtls_ecdh_gen_public( &ctx_srv.grp, &ctx_srv.d, &ctx_srv.Q, in main() 181 ret = mbedtls_ecdh_compute_shared( &ctx_srv.grp, &ctx_srv.z, in main() 212 ret = mbedtls_ecdh_compute_shared( &ctx_cli.grp, &ctx_cli.z, in main()
|
A D | ecdsa.c | 89 if( mbedtls_ecp_point_write_binary( &key->grp, &key->Q, in dump_pubkey() 172 mbedtls_printf( " ok (key size: %d bits)\n", (int) ctx_sign.grp.pbits ); in main() 220 if( ( ret = mbedtls_ecp_group_copy( &ctx_verify.grp, &ctx_sign.grp ) ) != 0 ) in main()
|
A D | gen_key.c | 411 mbedtls_ecp_curve_info_from_grp_id( ecp->grp.id )->name ); in main()
|
/AliOS-Things-master/components/mbedtls/programs/test/ |
A D | benchmark.c | 232 void ecp_clear_precomputed( mbedtls_ecp_group *grp ) in ecp_clear_precomputed() argument 234 if( grp->T != NULL ) in ecp_clear_precomputed() 237 for( i = 0; i < grp->T_size; i++ ) in ecp_clear_precomputed() 238 mbedtls_ecp_point_free( &grp->T[i] ); in ecp_clear_precomputed() 239 mbedtls_free( grp->T ); in ecp_clear_precomputed() 241 grp->T = NULL; in ecp_clear_precomputed() 242 grp->T_size = 0; in ecp_clear_precomputed() 845 ecp_clear_precomputed( &ecdsa.grp ); in main() 868 ecp_clear_precomputed( &ecdsa.grp ); in main() 911 ecp_clear_precomputed( &ecdh.grp ); in main() [all …]
|