Home
last modified time | relevance | path

Searched refs:grp (Results 1 – 22 of 22) sorted by relevance

/optee_os-3.20.0/lib/libmbedtls/mbedtls/library/
A Decp.c700 grp->pbits = 0; in mbedtls_ecp_group_init()
701 grp->nbits = 0; in mbedtls_ecp_group_init()
702 grp->h = 0; in mbedtls_ecp_group_init()
707 grp->T = NULL; in mbedtls_ecp_group_init()
708 grp->T_size = 0; in mbedtls_ecp_group_init()
2329 T = grp->T; in ecp_mul_comb()
3050 return( ecp_check_bad_points_mx( &pt->X, &grp->P, grp->id ) ); in ecp_check_pubkey_mx()
3368 pub->grp.id != prv->grp.id || in mbedtls_ecp_check_pub_priv()
3380 mbedtls_ecp_group_copy( &grp, &prv->grp ); in mbedtls_ecp_check_pub_priv()
3550 &grp, &R, &m, &grp.G, in mbedtls_ecp_self_test()
[all …]
A Decjpake.c62 mbedtls_ecp_group_init( &ctx->grp ); in mbedtls_ecjpake_init()
85 mbedtls_ecp_group_free( &ctx->grp ); in mbedtls_ecjpake_free()
139 ctx->grp.id == MBEDTLS_ECP_DP_NONE || in mbedtls_ecjpake_check()
164 ret = mbedtls_ecp_point_write_binary( grp, P, pf, in ecjpake_write_len_point()
514 &ctx->grp.G, in mbedtls_ecjpake_read_round_one()
533 &ctx->grp.G, in mbedtls_ecjpake_write_round_one()
571 mbedtls_ecp_group grp; in mbedtls_ecjpake_read_round_two() local
577 mbedtls_ecp_group_init( &grp ); in mbedtls_ecjpake_read_round_two()
598 if( grp.id != ctx->grp.id ) in mbedtls_ecjpake_read_round_two()
616 mbedtls_ecp_group_free( &grp ); in mbedtls_ecjpake_read_round_two()
[all …]
A Decdsa.c231 size_t n_size = ( grp->nbits + 7 ) / 8; in derive_mpi()
235 if( use_size * 8 > grp->nbits ) in derive_mpi()
267 if( ! mbedtls_ecdsa_can_do( grp->id ) || grp->N.p == NULL ) in ecdsa_sign_restartable()
326 MBEDTLS_MPI_CHK( mbedtls_ecp_mul_restartable( grp, &R, pk, &grp->G, in ecdsa_sign_restartable()
407 ECDSA_VALIDATE_RET( grp != NULL ); in mbedtls_ecdsa_sign()
436 size_t grp_len = ( grp->nbits + 7 ) / 8; in ecdsa_sign_det_restartable()
562 ECDSA_VALIDATE_RET( grp != NULL ); in mbedtls_ecdsa_sign_det()
581 ECDSA_VALIDATE_RET( grp != NULL ); in mbedtls_ecdsa_sign_det_ext()
614 if( ! mbedtls_ecdsa_can_do( grp->id ) || grp->N.p == NULL ) in ecdsa_verify_restartable()
712 ECDSA_VALIDATE_RET( grp != NULL ); in mbedtls_ecdsa_verify()
[all …]
A Decp_curves.c623 grp->pbits = mbedtls_mpi_bitlen( &grp->P ); in ecp_group_load()
624 grp->nbits = mbedtls_mpi_bitlen( &grp->N ); in ecp_group_load()
626 grp->h = 1; in ecp_group_load()
711 MBEDTLS_MPI_CHK( mbedtls_mpi_sub_int( &grp->P, &grp->P, 19 ) ); in ecp_use_curve25519()
712 grp->pbits = mbedtls_mpi_bitlen( &grp->P ); in ecp_use_curve25519()
726 grp->nbits = 254; in ecp_use_curve25519()
762 MBEDTLS_MPI_CHK( mbedtls_mpi_sub_int( &grp->P, &grp->P, 1 ) ); in ecp_use_curve448()
764 MBEDTLS_MPI_CHK( mbedtls_mpi_sub_int( &grp->P, &grp->P, 1 ) ); in ecp_use_curve448()
765 grp->pbits = mbedtls_mpi_bitlen( &grp->P ); in ecp_use_curve448()
777 MBEDTLS_MPI_CHK( mbedtls_mpi_sub_mpi( &grp->N, &grp->N, &Ns ) ); in ecp_use_curve448()
[all …]
A Decdh.c51 return( ctx->grp.id ); in mbedtls_ecdh_grp_id()
86 MBEDTLS_MPI_CHK( mbedtls_ecp_mul_restartable( grp, Q, d, &grp->G, in ecdh_gen_public_restartable()
100 ECDH_VALIDATE_RET( grp != NULL ); in mbedtls_ecdh_gen_public()
149 ECDH_VALIDATE_RET( grp != NULL ); in mbedtls_ecdh_compute_shared()
160 mbedtls_ecp_group_init( &ctx->grp ); in ecdh_init_internal()
199 ret = mbedtls_ecp_group_load( &ctx->grp, grp_id ); in ecdh_setup_internal()
239 mbedtls_ecp_group_free( &ctx->grp ); in ecdh_free_internal()
311 if( ctx->grp.pbits == 0 ) in ecdh_make_params_internal()
533 if( ctx->grp.pbits == 0 ) in ecdh_make_public_internal()
655 if( ctx == NULL || ctx->grp.pbits == 0 ) in ecdh_calc_secret_internal()
[all …]
A Dpkparse.c290 grp->pbits = mbedtls_mpi_bitlen( &grp->P ); in pk_group_from_specified()
345 if( ( ret = mbedtls_ecp_point_read_binary( grp, &grp->G, in pk_group_from_specified()
357 mbedtls_mpi_lset( &grp->G.Z, 1 ) != 0 ) in pk_group_from_specified()
371 grp->nbits = mbedtls_mpi_bitlen( &grp->N ); in pk_group_from_specified()
399 if( grp->pbits == ref.pbits && grp->nbits == ref.nbits && in pk_group_id_from_group()
432 mbedtls_ecp_group grp; in pk_group_id_from_specified() local
434 mbedtls_ecp_group_init( &grp ); in pk_group_id_from_specified()
439 ret = pk_group_id_from_group( &grp, grp_id ); in pk_group_id_from_specified()
442 mbedtls_ecp_group_free( &grp ); in pk_group_id_from_specified()
479 if( grp->id != MBEDTLS_ECP_DP_NONE && grp->id != grp_id ) in pk_use_ecparams()
[all …]
A Dpk_wrap.c228 return( ((mbedtls_ecp_keypair *) ctx)->grp.pbits ); in eckey_get_bitlen()
346 if( rs->ecdsa_ctx.grp.pbits == 0 ) in eckey_verify_rs_wrap()
371 if( rs->ecdsa_ctx.grp.pbits == 0 ) in eckey_sign_rs_wrap()
557 mbedtls_ecc_group_to_psa( ctx->grp.id, &curve_bits ); in ecdsa_verify_wrap()
558 const size_t signature_part_size = ( ctx->grp.nbits + 7 ) / 8; in ecdsa_verify_wrap()
A Dpkwrite.c118 if( ( ret = mbedtls_ecp_point_write_binary( &ec->grp, &ec->Q, in pk_write_ec_pubkey()
147 if( ( ret = mbedtls_oid_get_oid_by_ec_grp( ec->grp.id, &oid, &oid_len ) ) != 0 ) in pk_write_ec_param()
162 size_t byte_length = ( ec->grp.pbits + 7 ) / 8; in pk_write_ec_private()
A Dpk.c617 d_len = ( ec->grp.nbits + 7 ) / 8; in mbedtls_pk_wrap_as_opaque()
621 curve_id = mbedtls_ecc_group_to_psa( ec->grp.id, &bits ); in mbedtls_pk_wrap_as_opaque()
A Dssl_cli.c2687 grp_id = ssl->handshake->ecdh_ctx.grp.id; in ssl_check_server_ecdh_params()
2704 if( ssl->handshake->ecdh_ctx.grp.nbits < 163 || in ssl_check_server_ecdh_params()
2705 ssl->handshake->ecdh_ctx.grp.nbits > 521 ) in ssl_check_server_ecdh_params()
A Dx509_crt.c212 const mbedtls_ecp_group_id gid = mbedtls_pk_ec( *pk )->grp.id; in x509_profile_check_key()
A Dssl_srv.c931 mbedtls_ecp_group_id grp_id = mbedtls_pk_ec( *pk )->grp.id; in ssl_check_key_curve()
A Dssl_tls.c2722 mbedtls_ssl_check_curve( ssl, mbedtls_pk_ec( *pk )->grp.id ) != 0 ) in ssl_parse_certificate_verify()
/optee_os-3.20.0/lib/libmbedtls/mbedtls/include/mbedtls/
A Decp_internal.h79 unsigned char mbedtls_internal_ecp_grp_capable( const mbedtls_ecp_group *grp );
96 int mbedtls_internal_ecp_init( const mbedtls_ecp_group *grp );
104 void mbedtls_internal_ecp_free( const mbedtls_ecp_group *grp );
124 int mbedtls_internal_ecp_randomize_jac( const mbedtls_ecp_group *grp,
169 int mbedtls_internal_ecp_add_mixed( const mbedtls_ecp_group *grp,
194 int mbedtls_internal_ecp_double_jac( const mbedtls_ecp_group *grp,
224 int mbedtls_internal_ecp_normalize_jac_many( const mbedtls_ecp_group *grp,
242 int mbedtls_internal_ecp_normalize_jac( const mbedtls_ecp_group *grp,
251 int mbedtls_internal_ecp_double_add_mxz( const mbedtls_ecp_group *grp,
272 int mbedtls_internal_ecp_randomize_mxz( const mbedtls_ecp_group *grp,
[all …]
A Decp.h410 int mbedtls_ecp_check_budget( const mbedtls_ecp_group *grp,
416 MBEDTLS_MPI_CHK( mbedtls_ecp_check_budget( grp, rs_ctx, \
608 void mbedtls_ecp_group_init( mbedtls_ecp_group *grp );
631 void mbedtls_ecp_group_free( mbedtls_ecp_group *grp );
814 int mbedtls_ecp_tls_read_point( const mbedtls_ecp_group *grp,
881 int mbedtls_ecp_tls_read_group( mbedtls_ecp_group *grp,
1083 mbedtls_ecp_group *grp, mbedtls_ecp_point *R,
1116 int mbedtls_ecp_check_pubkey( const mbedtls_ecp_group *grp,
1138 int mbedtls_ecp_check_privkey( const mbedtls_ecp_group *grp,
1156 int mbedtls_ecp_gen_privkey( const mbedtls_ecp_group *grp,
[all …]
A Decdh.h86 mbedtls_ecp_group grp; /*!< The elliptic curve used. */ member
107 mbedtls_ecp_group grp; /*!< The elliptic curve used. */ member
179 int mbedtls_ecdh_gen_public( mbedtls_ecp_group *grp, mbedtls_mpi *d, mbedtls_ecp_point *Q,
217 int mbedtls_ecdh_compute_shared( mbedtls_ecp_group *grp, mbedtls_mpi *z,
A Decdsa.h172 int mbedtls_ecdsa_sign( mbedtls_ecp_group *grp, mbedtls_mpi *r, mbedtls_mpi *s,
231 int mbedtls_ecdsa_sign_det( mbedtls_ecp_group *grp, mbedtls_mpi *r,
277 int mbedtls_ecdsa_sign_det_ext( mbedtls_ecp_group *grp, mbedtls_mpi *r,
317 int mbedtls_ecdsa_verify( mbedtls_ecp_group *grp,
A Decjpake.h77 mbedtls_ecp_group grp; /**< Elliptic curve */ member
/optee_os-3.20.0/lib/libmbedtls/core/
A Dsm2-dsa.c30 mbedtls_ecp_group grp = { }; in sm2_mbedtls_dsa_sign() local
52 mbedtls_ecp_group_init(&grp); in sm2_mbedtls_dsa_sign()
67 res = mbed_gen_random_upto(&k, &grp.N); in sm2_mbedtls_dsa_sign()
75 mres = mbedtls_ecp_mul(&grp, &x1y1p, &k, &grp.G, mbd_rand, in sm2_mbedtls_dsa_sign()
96 !mbedtls_mpi_cmp_mpi(&tmp, &grp.N)); in sm2_mbedtls_dsa_sign()
103 mres = mbedtls_mpi_inv_mod(&s, &s, &grp.N); in sm2_mbedtls_dsa_sign()
142 mbedtls_ecp_group_free(&grp); in sm2_mbedtls_dsa_sign()
155 mbedtls_ecp_group grp = { }; in sm2_mbedtls_dsa_verify() local
177 mbedtls_ecp_group_init(&grp); in sm2_mbedtls_dsa_verify()
237 mres = mbedtls_ecp_muladd(&grp, &x1y1p, &sprime, &grp.G, &t, &PA); in sm2_mbedtls_dsa_verify()
[all …]
A Dsm2-pke.c24 sm2_uncompressed_bytes_to_point(const mbedtls_ecp_group *grp, in sm2_uncompressed_bytes_to_point() argument
48 mres = mbedtls_ecp_check_pubkey(grp, p); in sm2_uncompressed_bytes_to_point()
82 return sm2_uncompressed_bytes_to_point(grp, p, buf + 1, in sm2_bytes_to_point()
119 mbedtls_ecp_group grp = { }; in sm2_mbedtls_pke_decrypt() local
139 mbedtls_ecp_group_init(&grp); in sm2_mbedtls_pke_decrypt()
263 mbedtls_ecp_group_free(&grp); in sm2_mbedtls_pke_decrypt()
307 mbedtls_ecp_group grp = { }; in sm2_mbedtls_pke_encrypt() local
325 mbedtls_ecp_group_init(&grp); in sm2_mbedtls_pke_encrypt()
334 res = mbed_gen_random_upto(&k, &grp.N); in sm2_mbedtls_pke_encrypt()
340 mres = mbedtls_ecp_mul(&grp, &C1, &k, &grp.G, mbd_rand, NULL); in sm2_mbedtls_pke_encrypt()
[all …]
A Dsm2-kep.c65 mres = mbedtls_mpi_write_binary(&grp->A, buf, SM2_INT_SIZE_BYTES); in sm2_kep_compute_Z()
74 mres = mbedtls_mpi_write_binary(&grp->B, buf, SM2_INT_SIZE_BYTES); in sm2_kep_compute_Z()
292 mbedtls_ecp_group grp = { }; in crypto_acipher_sm2_kep_derive() local
327 mbedtls_ecp_group_init(&grp); in crypto_acipher_sm2_kep_derive()
328 mres = mbedtls_ecp_group_load(&grp, MBEDTLS_ECP_DP_SM2); in crypto_acipher_sm2_kep_derive()
353 mres = mbedtls_mpi_mod_mpi(&tA, &tA, &grp.N); in crypto_acipher_sm2_kep_derive()
359 mres = mbedtls_mpi_mod_mpi(&tA, &tA, &grp.N); in crypto_acipher_sm2_kep_derive()
368 mres = mbedtls_ecp_check_pubkey(&grp, &RB); in crypto_acipher_sm2_kep_derive()
399 mres = mbedtls_ecp_muladd(&grp, &U, &one, &PB, &x2bar, &RB); in crypto_acipher_sm2_kep_derive()
404 mres = mbedtls_ecp_mul(&grp, &U, &tA, &U, mbd_rand, NULL); in crypto_acipher_sm2_kep_derive()
[all …]
A Decc.c113 static void ecc_clear_precomputed(mbedtls_ecp_group *grp) in ecc_clear_precomputed() argument
117 if (grp->T) { in ecc_clear_precomputed()
118 for (i = 0; i < grp->T_size; i++) in ecc_clear_precomputed()
119 mbedtls_ecp_point_free(&grp->T[i]); in ecc_clear_precomputed()
120 free(grp->T); in ecc_clear_precomputed()
122 grp->T = NULL; in ecc_clear_precomputed()
123 grp->T_size = 0; in ecc_clear_precomputed()
175 ecc_clear_precomputed(&ecdsa.grp); in ecc_generate_keypair()
232 lmd_res = mbedtls_ecp_group_load(&ecdsa.grp, gid); in ecc_sign()
310 lmd_res = mbedtls_ecp_group_load(&ecdsa.grp, gid); in ecc_verify()
[all …]

Completed in 67 milliseconds