Home
last modified time | relevance | path

Searched refs:Q (Results 1 – 25 of 28) sorted by relevance

12

/optee_os-3.20.0/lib/libmbedtls/mbedtls/library/
A Drsa_internal.c64 mbedtls_mpi *P, mbedtls_mpi *Q ) in mbedtls_rsa_deduce_primes() argument
88 if( P == NULL || Q == NULL || P->p != NULL || Q->p != NULL ) in mbedtls_rsa_deduce_primes()
209 mbedtls_mpi_cmp_int( Q, 1 ) <= 0 || in mbedtls_rsa_deduce_private_exponent()
220 MBEDTLS_MPI_CHK( mbedtls_mpi_sub_int( &L, Q, 1 ) ); in mbedtls_rsa_deduce_private_exponent()
276 if( Q == NULL ) in mbedtls_rsa_validate_crt()
282 MBEDTLS_MPI_CHK( mbedtls_mpi_sub_int( &K, Q, 1 ) ); in mbedtls_rsa_validate_crt()
296 if( P == NULL || Q == NULL ) in mbedtls_rsa_validate_crt()
360 if( f_rng != NULL && Q != NULL && in mbedtls_rsa_validate_params()
375 if( P != NULL && Q != NULL && N != NULL ) in mbedtls_rsa_validate_params()
406 if( P != NULL && Q != NULL && D != NULL && E != NULL ) in mbedtls_rsa_validate_params()
[all …]
A Decdh.c73 mbedtls_mpi *d, mbedtls_ecp_point *Q, in ecdh_gen_public_restartable() argument
86 MBEDTLS_MPI_CHK( mbedtls_ecp_mul_restartable( grp, Q, d, &grp->G, in ecdh_gen_public_restartable()
102 ECDH_VALIDATE_RET( Q != NULL ); in mbedtls_ecdh_gen_public()
124 MBEDTLS_MPI_CHK( mbedtls_ecp_mul_restartable( grp, &P, d, Q, in ecdh_compute_shared_restartable()
150 ECDH_VALIDATE_RET( Q != NULL ); in mbedtls_ecdh_compute_shared()
153 return( ecdh_compute_shared_restartable( grp, z, Q, d, in mbedtls_ecdh_compute_shared()
162 mbedtls_ecp_point_init( &ctx->Q ); in ecdh_init_internal()
241 mbedtls_ecp_point_free( &ctx->Q ); in ecdh_free_internal()
327 if( ( ret = mbedtls_ecdh_gen_public( &ctx->grp, &ctx->d, &ctx->Q, in ecdh_make_params_internal()
453 return( mbedtls_ecp_copy( &ctx->Qp, &key->Q ) ); in ecdh_get_params_internal()
[all …]
A Drsa.c89 ( Q != NULL && ( ret = mbedtls_mpi_copy( &ctx->Q, Q ) ) != 0 ) || in mbedtls_rsa_import()
121 if( Q != NULL ) in mbedtls_rsa_import_raw()
122 MBEDTLS_MPI_CHK( mbedtls_mpi_read_binary( &ctx->Q, Q, Q_len ) ); in mbedtls_rsa_import_raw()
350 mbedtls_mpi_cmp_int( &ctx->Q, 0 ) != 0 && in mbedtls_rsa_export_raw()
369 if( Q != NULL ) in mbedtls_rsa_export_raw()
370 MBEDTLS_MPI_CHK( mbedtls_mpi_write_binary( &ctx->Q, Q, Q_len ) ); in mbedtls_rsa_export_raw()
412 ( Q != NULL && ( ret = mbedtls_mpi_copy( Q, &ctx->Q ) ) != 0 ) || in mbedtls_rsa_export()
576 MBEDTLS_MPI_CHK( mbedtls_mpi_sub_int( &ctx->Q, &ctx->Q, 1 ) ); in mbedtls_rsa_gen_key()
598 MBEDTLS_MPI_CHK( mbedtls_mpi_add_int( &ctx->Q, &ctx->Q, 1 ) ); in mbedtls_rsa_gen_key()
2330 MBEDTLS_MPI_CHK( mbedtls_mpi_copy( &dst->Q, &src->Q ) ); in mbedtls_rsa_copy()
[all …]
A Decp.c1627 if( Q->Z.p != NULL && mbedtls_mpi_cmp_int( &Q->Z, 0 ) == 0 ) in ecp_add_mixed()
1633 if( Q->Z.p != NULL && mbedtls_mpi_cmp_int( &Q->Z, 1 ) != 0 ) in ecp_add_mixed()
2536 MBEDTLS_MPI_CHK( mbedtls_mpi_add_mod( grp, &C, &Q->X, &Q->Z ) ); in ecp_double_add_mxz()
2537 MBEDTLS_MPI_CHK( mbedtls_mpi_sub_mod( grp, &D, &Q->X, &Q->Z ) ); in ecp_double_add_mxz()
3362 mbedtls_ecp_point Q; in mbedtls_ecp_check_pub_priv() local
3369 mbedtls_mpi_cmp_mpi( &pub->Q.X, &prv->Q.X ) || in mbedtls_ecp_check_pub_priv()
3370 mbedtls_mpi_cmp_mpi( &pub->Q.Y, &prv->Q.Y ) || in mbedtls_ecp_check_pub_priv()
3371 mbedtls_mpi_cmp_mpi( &pub->Q.Z, &prv->Q.Z ) ) in mbedtls_ecp_check_pub_priv()
3385 if( mbedtls_mpi_cmp_mpi( &Q.X, &prv->Q.X ) || in mbedtls_ecp_check_pub_priv()
3386 mbedtls_mpi_cmp_mpi( &Q.Y, &prv->Q.Y ) || in mbedtls_ecp_check_pub_priv()
[all …]
A Decdsa.c600 const mbedtls_ecp_point *Q, in ecdsa_verify_restartable() argument
670 &R, pu1, &grp->G, pu2, Q, ECDSA_RS_ECP ) ); in ecdsa_verify_restartable()
708 const mbedtls_ecp_point *Q, in mbedtls_ecdsa_verify() argument
713 ECDSA_VALIDATE_RET( Q != NULL ); in mbedtls_ecdsa_verify()
718 return( ecdsa_verify_restartable( grp, buf, blen, Q, r, s, NULL ) ); in mbedtls_ecdsa_verify()
888 &ctx->Q, &r, &s ) ) != 0 ) in mbedtls_ecdsa_read_signature_restartable()
892 &ctx->Q, &r, &s, rs_ctx ) ) != 0 ) in mbedtls_ecdsa_read_signature_restartable()
925 &ctx->Q, f_rng, p_rng ) ); in mbedtls_ecdsa_genkey()
940 ( ret = mbedtls_ecp_copy( &ctx->Q, &key->Q ) ) != 0 ) in mbedtls_ecdsa_from_keypair()
A Decp_curves.c1346 mbedtls_mpi M, Q; in ecp_mod_p448() local
1370 Q = M; in ecp_mod_p448()
1371 Q.p = Qp; in ecp_mod_p448()
1373 MBEDTLS_MPI_CHK( mbedtls_mpi_shift_r( &Q, 224 ) ); in ecp_mod_p448()
1374 MBEDTLS_MPI_CHK( mbedtls_mpi_add_mpi( N, N, &Q ) ); in ecp_mod_p448()
1381 MBEDTLS_MPI_CHK( mbedtls_mpi_add_mpi( &M, &M, &Q ) ); in ecp_mod_p448()
A Dbignum.c1690 int mbedtls_mpi_div_mpi( mbedtls_mpi *Q, mbedtls_mpi *R, const mbedtls_mpi *A, in mbedtls_mpi_div_mpi() argument
1718 if( Q != NULL ) MBEDTLS_MPI_CHK( mbedtls_mpi_lset( Q, 0 ) ); in mbedtls_mpi_div_mpi()
1790 if( Q != NULL ) in mbedtls_mpi_div_mpi()
1792 MBEDTLS_MPI_CHK( mbedtls_mpi_copy( Q, &Z ) ); in mbedtls_mpi_div_mpi()
1793 Q->s = A->s * B->s; in mbedtls_mpi_div_mpi()
1818 int mbedtls_mpi_div_int( mbedtls_mpi *Q, mbedtls_mpi *R, in mbedtls_mpi_div_int() argument
1831 return( mbedtls_mpi_div_mpi( Q, R, A, &B ) ); in mbedtls_mpi_div_int()
A Dpkparse.c500 if( ( ret = mbedtls_ecp_point_read_binary( &key->grp, &key->Q, in pk_get_ecpubkey()
503 ret = mbedtls_ecp_check_pubkey( &key->grp, &key->Q ); in pk_get_ecpubkey()
969 ( ret = mbedtls_ecp_mul( &eck->grp, &eck->Q, &eck->d, &eck->grp.G, in pk_parse_key_sec1_der()
A Ddebug.c389 &ctx->Q ); in mbedtls_debug_printf_ecdh_internal()
A Dpkwrite.c118 if( ( ret = mbedtls_ecp_point_write_binary( &ec->grp, &ec->Q, in pk_write_ec_pubkey()
/optee_os-3.20.0/lib/libmbedtls/mbedtls/include/mbedtls/
A Drsa_internal.h97 mbedtls_mpi *P, mbedtls_mpi *Q );
121 mbedtls_mpi const *Q,
146 int mbedtls_rsa_deduce_crt( const mbedtls_mpi *P, const mbedtls_mpi *Q,
182 const mbedtls_mpi *Q, const mbedtls_mpi *D,
216 int mbedtls_rsa_validate_crt( const mbedtls_mpi *P, const mbedtls_mpi *Q,
A Decdh.h88 mbedtls_ecp_point Q; /*!< The public key. */ member
109 mbedtls_ecp_point Q; /*!< The public key. */ member
179 int mbedtls_ecdh_gen_public( mbedtls_ecp_group *grp, mbedtls_mpi *d, mbedtls_ecp_point *Q,
218 const mbedtls_ecp_point *Q, const mbedtls_mpi *d,
A Decp.h440 mbedtls_ecp_point Q; /*!< our public value */ member
672 int mbedtls_ecp_copy( mbedtls_ecp_point *P, const mbedtls_ecp_point *Q );
723 const mbedtls_ecp_point *Q );
1040 const mbedtls_mpi *n, const mbedtls_ecp_point *Q );
1085 const mbedtls_mpi *n, const mbedtls_ecp_point *Q,
1190 mbedtls_mpi *d, mbedtls_ecp_point *Q,
1218 mbedtls_ecp_point *Q,
A Drsa.h122 mbedtls_mpi Q; /*!< The second prime factor. */ member
216 const mbedtls_mpi *P, const mbedtls_mpi *Q,
256 unsigned char const *Q, size_t Q_len,
335 mbedtls_mpi *N, mbedtls_mpi *P, mbedtls_mpi *Q,
388 unsigned char *Q, size_t Q_len,
A Decp_internal.h171 const mbedtls_ecp_point *Q );
253 const mbedtls_ecp_point *Q, const mbedtls_mpi *d );
A Dbignum.h772 int mbedtls_mpi_div_mpi( mbedtls_mpi *Q, mbedtls_mpi *R, const mbedtls_mpi *A,
793 int mbedtls_mpi_div_int( mbedtls_mpi *Q, mbedtls_mpi *R, const mbedtls_mpi *A,
A Decdsa.h319 const mbedtls_ecp_point *Q, const mbedtls_mpi *r,
/optee_os-3.20.0/core/lib/libtomcrypt/src/pk/ecc/
A Dltc_ecc_projective_add_point.c29 LTC_ARGCHK(Q != NULL); in ltc_ecc_projective_add_point()
41 err = ltc_ecc_copy_point(Q, R); in ltc_ecc_projective_add_point()
45 if ((err = ltc_ecc_is_point_at_infinity(Q, modulus, &inf)) != CRYPT_OK) return err; in ltc_ecc_projective_add_point()
52 if ((mp_cmp(P->x, Q->x) == LTC_MP_EQ) && (mp_cmp(P->z, Q->z) == LTC_MP_EQ)) { in ltc_ecc_projective_add_point()
53 if (mp_cmp(P->y, Q->y) == LTC_MP_EQ) { in ltc_ecc_projective_add_point()
58 if ((err = mp_sub(modulus, Q->y, t1)) != CRYPT_OK) { goto done; } in ltc_ecc_projective_add_point()
71 if (Q->z != NULL) { in ltc_ecc_projective_add_point()
73 if ((err = mp_sqr(Q->z, t1)) != CRYPT_OK) { goto done; } in ltc_ecc_projective_add_point()
79 if ((err = mp_mul(Q->z, t1, t1)) != CRYPT_OK) { goto done; } in ltc_ecc_projective_add_point()
90 if ((err = mp_mul(Q->x, t1, t2)) != CRYPT_OK) { goto done; } in ltc_ecc_projective_add_point()
[all …]
/optee_os-3.20.0/lib/libmbedtls/core/
A Decc.c178 if ((mbedtls_mpi_bitlen(&ecdsa.Q.X) > key_size_bits) || in ecc_generate_keypair()
179 (mbedtls_mpi_bitlen(&ecdsa.Q.Y) > key_size_bits) || in ecc_generate_keypair()
187 if (mbedtls_mpi_bitlen(&ecdsa.Q.Z) != 1) { in ecc_generate_keypair()
195 crypto_bignum_copy(key->x, (void *)&ecdsa.Q.X); in ecc_generate_keypair()
196 crypto_bignum_copy(key->y, (void *)&ecdsa.Q.Y); in ecc_generate_keypair()
316 ecdsa.Q.X = *(mbedtls_mpi *)key->x; in ecc_verify()
317 ecdsa.Q.Y = *(mbedtls_mpi *)key->y; in ecc_verify()
318 mbedtls_mpi_read_binary(&ecdsa.Q.Z, one, sizeof(one)); in ecc_verify()
336 lmd_res = mbedtls_ecdsa_verify(&ecdsa.grp, msg, msg_len, &ecdsa.Q, in ecc_verify()
346 mbedtls_mpi_init(&ecdsa.Q.X); in ecc_verify()
[all …]
A Drsa.c107 rsa->Q = *(mbedtls_mpi *)key->q; in rsa_init_from_key_pair()
123 mbedtls_mpi_init(&rsa->Q); in mbd_rsa_free()
257 crypto_bignum_copy(key->q, (void *)&rsa.Q); in sw_crypto_acipher_gen_rsa_key()
/optee_os-3.20.0/core/lib/libtomcrypt/src/math/
A Dgmp_desc.c287 mpz_t t1, C, Q, S, Z, M, T, R, two; in sqrtmod_prime() local
302 mpz_init(t1); mpz_init(C); mpz_init(Q); in sqrtmod_prime()
322 mpz_set(Q, prime); in sqrtmod_prime()
323 mpz_sub_ui(Q, Q, 1); in sqrtmod_prime()
327 while (mpz_even_p(Q)) { in sqrtmod_prime()
328 mpz_fdiv_q_2exp(Q, Q, 1); in sqrtmod_prime()
344 mpz_powm(C, Z, Q, prime); in sqrtmod_prime()
346 mpz_add_ui(t1, Q, 1); in sqrtmod_prime()
351 mpz_powm(T, n, Q, prime); in sqrtmod_prime()
390 mpz_clear(t1); mpz_clear(C); mpz_clear(Q); in sqrtmod_prime()
A Dtfm_desc.c601 ltc_mp.copy(Q->x, R->x); in tfm_ecc_projective_add_point()
602 ltc_mp.copy(Q->y, R->y); in tfm_ecc_projective_add_point()
603 ltc_mp.copy(Q->z, R->z); in tfm_ecc_projective_add_point()
619 (Q->z != NULL && fp_cmp(P->z, Q->z) == FP_EQ) && in tfm_ecc_projective_add_point()
629 if (Q->z != NULL) { in tfm_ecc_projective_add_point()
631 fp_sqr(Q->z, &t1); in tfm_ecc_projective_add_point()
637 fp_mul(Q->z, &t1, &t1); in tfm_ecc_projective_add_point()
648 fp_mul(Q->x, &t1, &t2); in tfm_ecc_projective_add_point()
654 fp_mul(Q->y, &t1, &t1); in tfm_ecc_projective_add_point()
689 if (Q->z != NULL) { in tfm_ecc_projective_add_point()
[all …]
/optee_os-3.20.0/core/arch/arm/dts/
A Dstm32mp135f-dk.dts169 /* VCO = 1066.0 MHz => P = 266 (AXI), Q = 266, R = 533 (DDR) */
182 /* VCO = 417.8 MHz => P = 209, Q = 24, R = 11 */
195 /* VCO = 600.0 MHz => P = 50, Q = 10, R = 50 */
/optee_os-3.20.0/core/lib/libtomcrypt/src/headers/
A Dtomcrypt_math.h401 const ecc_point *Q,
A Dtomcrypt_private.h309 int ltc_ecc_projective_add_point(const ecc_point *P, const ecc_point *Q, ecc_point *R, void *ma, vo…

Completed in 48 milliseconds

12