/third_party/mbedtls/include/mbedtls/ |
D | bignum.h | 189 typedef struct mbedtls_mpi struct 195 mbedtls_mpi; typedef 205 void mbedtls_mpi_init( mbedtls_mpi *X ); 214 void mbedtls_mpi_free( mbedtls_mpi *X ); 229 int mbedtls_mpi_grow( mbedtls_mpi *X, size_t nblimbs ); 246 int mbedtls_mpi_shrink( mbedtls_mpi *X, size_t nblimbs ); 261 int mbedtls_mpi_copy( mbedtls_mpi *X, const mbedtls_mpi *Y ); 269 void mbedtls_mpi_swap( mbedtls_mpi *X, mbedtls_mpi *Y ); 295 int mbedtls_mpi_safe_cond_assign( mbedtls_mpi *X, const mbedtls_mpi *Y, unsigned char assign ); 320 int mbedtls_mpi_safe_cond_swap( mbedtls_mpi *X, mbedtls_mpi *Y, unsigned char assign ); [all …]
|
D | rsa.h | 99 mbedtls_mpi MBEDTLS_PRIVATE(N); /*!< The public modulus. */ 100 mbedtls_mpi MBEDTLS_PRIVATE(E); /*!< The public exponent. */ 102 mbedtls_mpi MBEDTLS_PRIVATE(D); /*!< The private exponent. */ 103 mbedtls_mpi MBEDTLS_PRIVATE(P); /*!< The first prime factor. */ 104 mbedtls_mpi MBEDTLS_PRIVATE(Q); /*!< The second prime factor. */ 106 mbedtls_mpi MBEDTLS_PRIVATE(DP); /*!< <code>D % (P - 1)</code>. */ 107 mbedtls_mpi MBEDTLS_PRIVATE(DQ); /*!< <code>D % (Q - 1)</code>. */ 108 mbedtls_mpi MBEDTLS_PRIVATE(QP); /*!< <code>1 / (Q % P)</code>. */ 110 mbedtls_mpi MBEDTLS_PRIVATE(RN); /*!< cached <code>R^2 mod N</code>. */ 112 mbedtls_mpi MBEDTLS_PRIVATE(RP); /*!< cached <code>R^2 mod P</code>. */ [all …]
|
D | dhm.h | 116 mbedtls_mpi MBEDTLS_PRIVATE(P); /*!< The prime modulus. */ 117 mbedtls_mpi MBEDTLS_PRIVATE(G); /*!< The generator. */ 118 mbedtls_mpi MBEDTLS_PRIVATE(X); /*!< Our secret value. */ 119 mbedtls_mpi MBEDTLS_PRIVATE(GX); /*!< Our public key = \c G^X mod \c P. */ 120 mbedtls_mpi MBEDTLS_PRIVATE(GY); /*!< The public key of the peer = \c G^Y mod \c P. */ 121 mbedtls_mpi MBEDTLS_PRIVATE(K); /*!< The shared secret = \c G^(XY) mod \c P. */ 122 mbedtls_mpi MBEDTLS_PRIVATE(RP); /*!< The cached value = \c R^2 mod \c P. */ 123 mbedtls_mpi MBEDTLS_PRIVATE(Vi); /*!< The blinding value. */ 124 mbedtls_mpi MBEDTLS_PRIVATE(Vf); /*!< The unblinding value. */ 125 mbedtls_mpi MBEDTLS_PRIVATE(pX); /*!< The previous \c X. */ [all …]
|
D | ecp.h | 174 mbedtls_mpi MBEDTLS_PRIVATE(X); /*!< The X coordinate of the ECP point. */ 175 mbedtls_mpi MBEDTLS_PRIVATE(Y); /*!< The Y coordinate of the ECP point. */ 176 mbedtls_mpi MBEDTLS_PRIVATE(Z); /*!< The Z coordinate of the ECP point. */ 230 mbedtls_mpi P; /*!< The prime modulus of the base field. */ 231 mbedtls_mpi A; /*!< For Short Weierstrass: \p A in the equation. For 233 mbedtls_mpi B; /*!< For Short Weierstrass: \p B in the equation. 236 mbedtls_mpi N; /*!< The order of \p G. */ 244 int (*MBEDTLS_PRIVATE(modp))(mbedtls_mpi *); /*!< The function for fast pseudo-reduction 424 mbedtls_mpi MBEDTLS_PRIVATE(d); /*!< our secret value */ 942 const mbedtls_mpi *m, const mbedtls_ecp_point *P, [all …]
|
D | ecdsa.h | 169 int mbedtls_ecdsa_sign( mbedtls_ecp_group *grp, mbedtls_mpi *r, mbedtls_mpi *s, 170 const mbedtls_mpi *d, const unsigned char *buf, size_t blen, 213 int mbedtls_ecdsa_sign_det_ext( mbedtls_ecp_group *grp, mbedtls_mpi *r, 214 mbedtls_mpi *s, const mbedtls_mpi *d, 255 const mbedtls_ecp_point *Q, const mbedtls_mpi *r, 256 const mbedtls_mpi *s);
|
D | ecdh.h | 103 mbedtls_mpi MBEDTLS_PRIVATE(d); /*!< The private key. */ 106 mbedtls_mpi MBEDTLS_PRIVATE(z); /*!< The shared secret. */ 124 mbedtls_mpi MBEDTLS_PRIVATE(d); /*!< The private key. */ 127 mbedtls_mpi MBEDTLS_PRIVATE(z); /*!< The shared secret. */ 131 mbedtls_mpi MBEDTLS_PRIVATE(_d); /*!< The previous \p d. */ 195 int mbedtls_ecdh_gen_public( mbedtls_ecp_group *grp, mbedtls_mpi *d, mbedtls_ecp_point *Q, 230 int mbedtls_ecdh_compute_shared( mbedtls_ecp_group *grp, mbedtls_mpi *z, 231 const mbedtls_ecp_point *Q, const mbedtls_mpi *d,
|
D | ecjpake.h | 84 mbedtls_mpi MBEDTLS_PRIVATE(xm1); /**< My private key 1 C: x1, S: x3 */ 85 mbedtls_mpi MBEDTLS_PRIVATE(xm2); /**< My private key 2 C: x2, S: x4 */ 87 mbedtls_mpi MBEDTLS_PRIVATE(s); /**< Pre-shared secret (passphrase) */
|
/third_party/mbedtls/library/ |
D | rsa_alt_helpers.h | 91 int mbedtls_rsa_deduce_primes( mbedtls_mpi const *N, mbedtls_mpi const *E, 92 mbedtls_mpi const *D, 93 mbedtls_mpi *P, mbedtls_mpi *Q ); 116 int mbedtls_rsa_deduce_private_exponent( mbedtls_mpi const *P, 117 mbedtls_mpi const *Q, 118 mbedtls_mpi const *E, 119 mbedtls_mpi *D ); 142 int mbedtls_rsa_deduce_crt( const mbedtls_mpi *P, const mbedtls_mpi *Q, 143 const mbedtls_mpi *D, mbedtls_mpi *DP, 144 mbedtls_mpi *DQ, mbedtls_mpi *QP ); [all …]
|
D | rsa_alt_helpers.c | 62 int mbedtls_rsa_deduce_primes( mbedtls_mpi const *N, in mbedtls_rsa_deduce_primes() 63 mbedtls_mpi const *E, mbedtls_mpi const *D, in mbedtls_rsa_deduce_primes() 64 mbedtls_mpi *P, mbedtls_mpi *Q ) in mbedtls_rsa_deduce_primes() 73 mbedtls_mpi T; /* Holds largest odd divisor of DE - 1 */ in mbedtls_rsa_deduce_primes() 74 mbedtls_mpi K; /* Temporary holding the current candidate */ in mbedtls_rsa_deduce_primes() 197 int mbedtls_rsa_deduce_private_exponent( mbedtls_mpi const *P, in mbedtls_rsa_deduce_private_exponent() 198 mbedtls_mpi const *Q, in mbedtls_rsa_deduce_private_exponent() 199 mbedtls_mpi const *E, in mbedtls_rsa_deduce_private_exponent() 200 mbedtls_mpi *D ) in mbedtls_rsa_deduce_private_exponent() 203 mbedtls_mpi K, L; in mbedtls_rsa_deduce_private_exponent() [all …]
|
D | bignum.c | 86 void mbedtls_mpi_init( mbedtls_mpi *X ) in mbedtls_mpi_init() 98 void mbedtls_mpi_free( mbedtls_mpi *X ) in mbedtls_mpi_free() 117 int mbedtls_mpi_grow( mbedtls_mpi *X, size_t nblimbs ) in mbedtls_mpi_grow() 148 int mbedtls_mpi_shrink( mbedtls_mpi *X, size_t nblimbs ) in mbedtls_mpi_shrink() 187 static int mbedtls_mpi_resize_clear( mbedtls_mpi *X, size_t limbs ) in mbedtls_mpi_resize_clear() 216 int mbedtls_mpi_copy( mbedtls_mpi *X, const mbedtls_mpi *Y ) in mbedtls_mpi_copy() 262 void mbedtls_mpi_swap( mbedtls_mpi *X, mbedtls_mpi *Y ) in mbedtls_mpi_swap() 264 mbedtls_mpi T; in mbedtls_mpi_swap() 268 memcpy( &T, X, sizeof( mbedtls_mpi ) ); in mbedtls_mpi_swap() 269 memcpy( X, Y, sizeof( mbedtls_mpi ) ); in mbedtls_mpi_swap() [all …]
|
D | ecdsa.c | 63 mbedtls_mpi u1, u2; /* intermediate values */ 101 mbedtls_mpi k; /* per-signature random */ 102 mbedtls_mpi r; /* r value */ 227 static int derive_mpi( const mbedtls_ecp_group *grp, mbedtls_mpi *x, in derive_mpi() 253 mbedtls_mpi *r, mbedtls_mpi *s, in ecdsa_sign_restartable() 254 const mbedtls_mpi *d, const unsigned char *buf, size_t blen, in ecdsa_sign_restartable() 263 mbedtls_mpi k, e, t; in ecdsa_sign_restartable() 264 mbedtls_mpi *pk = &k, *pr = r; in ecdsa_sign_restartable() 403 int mbedtls_ecdsa_sign( mbedtls_ecp_group *grp, mbedtls_mpi *r, mbedtls_mpi *s, in mbedtls_ecdsa_sign() 404 const mbedtls_mpi *d, const unsigned char *buf, size_t blen, in mbedtls_ecdsa_sign() [all …]
|
D | dhm.c | 66 static int dhm_read_bignum( mbedtls_mpi *X, in dhm_read_bignum() 101 static int dhm_check_range( const mbedtls_mpi *param, const mbedtls_mpi *P ) in dhm_check_range() 103 mbedtls_mpi U; in dhm_check_range() 139 mbedtls_mpi *dest ) in mbedtls_dhm_get_value() 141 const mbedtls_mpi *src = NULL; in mbedtls_dhm_get_value() 194 static int dhm_random_below( mbedtls_mpi *R, const mbedtls_mpi *M, in dhm_random_below() 299 const mbedtls_mpi *P, in mbedtls_dhm_set_group() 300 const mbedtls_mpi *G ) in mbedtls_dhm_set_group() 376 mbedtls_mpi R; in dhm_update_blinding() 442 mbedtls_mpi GYb; in mbedtls_dhm_calc_secret() [all …]
|
D | ecp.c | 1026 static int ecp_modp( mbedtls_mpi *N, const mbedtls_ecp_group *grp ) in ecp_modp() 1081 mbedtls_mpi *X, in mbedtls_mpi_mul_mod() 1082 const mbedtls_mpi *A, in mbedtls_mpi_mul_mod() 1083 const mbedtls_mpi *B ) in mbedtls_mpi_mul_mod() 1108 mbedtls_mpi *X, in mbedtls_mpi_sub_mod() 1109 const mbedtls_mpi *A, in mbedtls_mpi_sub_mod() 1110 const mbedtls_mpi *B ) in mbedtls_mpi_sub_mod() 1130 mbedtls_mpi *X, in mbedtls_mpi_add_mod() 1131 const mbedtls_mpi *A, in mbedtls_mpi_add_mod() 1132 const mbedtls_mpi *B ) in mbedtls_mpi_add_mod() [all …]
|
D | ecjpake.c | 206 mbedtls_mpi *h ) in ecjpake_hash() 258 mbedtls_mpi r, h; in ecjpake_zkp_read() 323 const mbedtls_mpi *x, in ecjpake_zkp_write() 333 mbedtls_mpi v; in ecjpake_zkp_write() 334 mbedtls_mpi h; /* later recycled to hold r */ in ecjpake_zkp_write() 421 mbedtls_mpi *x, in ecjpake_kkp_write() 491 mbedtls_mpi *xm1, in ecjpake_kkpp_write() 493 mbedtls_mpi *xm2, in ecjpake_kkpp_write() 561 mbedtls_mpi one; in ecjpake_ecp_add3() 639 static int ecjpake_mul_secret( mbedtls_mpi *R, int sign, in ecjpake_mul_secret() [all …]
|
D | rsa.c | 78 const mbedtls_mpi *N, in mbedtls_rsa_import() 79 const mbedtls_mpi *P, const mbedtls_mpi *Q, in mbedtls_rsa_import() 80 const mbedtls_mpi *D, const mbedtls_mpi *E ) in mbedtls_rsa_import() 382 mbedtls_mpi *N, mbedtls_mpi *P, mbedtls_mpi *Q, in mbedtls_rsa_export() 383 mbedtls_mpi *D, mbedtls_mpi *E ) in mbedtls_rsa_export() 427 mbedtls_mpi *DP, mbedtls_mpi *DQ, mbedtls_mpi *QP ) in mbedtls_rsa_export_crt() 544 mbedtls_mpi H, G, L; in mbedtls_rsa_gen_key() 743 mbedtls_mpi T; in mbedtls_rsa_public() 794 mbedtls_mpi R; in rsa_prepare_blinding() 883 mbedtls_mpi T; in mbedtls_rsa_private() [all …]
|
D | ecp_invasive.h | 47 void mbedtls_ecp_fix_negative( mbedtls_mpi *N, signed char c, size_t bits ); 73 mbedtls_mpi *d,
|
D | constant_time.c | 536 int mbedtls_mpi_safe_cond_assign( mbedtls_mpi *X, in mbedtls_mpi_safe_cond_assign() 537 const mbedtls_mpi *Y, in mbedtls_mpi_safe_cond_assign() 568 int mbedtls_mpi_safe_cond_swap( mbedtls_mpi *X, in mbedtls_mpi_safe_cond_swap() 569 mbedtls_mpi *Y, in mbedtls_mpi_safe_cond_swap() 607 int mbedtls_mpi_lt_mpi_ct( const mbedtls_mpi *X, in mbedtls_mpi_lt_mpi_ct() 608 const mbedtls_mpi *Y, in mbedtls_mpi_lt_mpi_ct()
|
D | ecp_curves.c | 4514 static inline void ecp_mpi_load( mbedtls_mpi *X, const mbedtls_mpi_uint *p, size_t len ) in ecp_mpi_load() 4524 static inline void ecp_mpi_set1( mbedtls_mpi *X ) in ecp_mpi_set1() 4571 static int ecp_mod_p192( mbedtls_mpi * ); 4574 static int ecp_mod_p224( mbedtls_mpi * ); 4577 static int ecp_mod_p256( mbedtls_mpi * ); 4580 static int ecp_mod_p384( mbedtls_mpi * ); 4583 static int ecp_mod_p521( mbedtls_mpi * ); 4593 static int ecp_mod_p255( mbedtls_mpi * ); 4596 static int ecp_mod_p448( mbedtls_mpi * ); 4599 static int ecp_mod_p192k1( mbedtls_mpi * ); [all …]
|
D | ecdh.c | 75 mbedtls_mpi *d, mbedtls_ecp_point *Q, in ecdh_gen_public_restartable() 98 int mbedtls_ecdh_gen_public( mbedtls_ecp_group *grp, mbedtls_mpi *d, mbedtls_ecp_point *Q, in mbedtls_ecdh_gen_public() 115 mbedtls_mpi *z, in ecdh_compute_shared_restartable() 116 const mbedtls_ecp_point *Q, const mbedtls_mpi *d, in ecdh_compute_shared_restartable() 146 int mbedtls_ecdh_compute_shared( mbedtls_ecp_group *grp, mbedtls_mpi *z, in mbedtls_ecdh_compute_shared() 147 const mbedtls_ecp_point *Q, const mbedtls_mpi *d, in mbedtls_ecdh_compute_shared()
|
/third_party/mbedtls/tests/include/alt-dummy/ |
D | ecp_alt.h | 25 const mbedtls_mpi P; 26 const mbedtls_mpi A; 27 const mbedtls_mpi B; 29 const mbedtls_mpi N;
|
/third_party/mbedtls/tests/suites/ |
D | test_suite_mpi.function | 12 static int sign_is_valid( const mbedtls_mpi *X ) 133 mbedtls_mpi X, Y, Z; 154 mbedtls_mpi X; 182 mbedtls_mpi X; 202 mbedtls_mpi X; 224 mbedtls_mpi X; 256 mbedtls_mpi X; 287 mbedtls_mpi X; 323 mbedtls_mpi X, Y; 353 mbedtls_mpi X; [all …]
|
D | test_suite_debug.data | 40 Debug print mbedtls_mpi: 0 (empty representation) 43 Debug print mbedtls_mpi: 0 (non-empty representation) 46 Debug print mbedtls_mpi #2: 3 bits 49 Debug print mbedtls_mpi: 49 bits 52 Debug print mbedtls_mpi: 759 bits 55 Debug print mbedtls_mpi: 764 bits #1 58 Debug print mbedtls_mpi: 764 bits #2
|
D | test_suite_dhm.function | 6 const mbedtls_mpi *expected ) 8 mbedtls_mpi actual; 24 static int check_dhm_param_output( const mbedtls_mpi *expected, 30 mbedtls_mpi actual; 230 mbedtls_mpi P, G; 261 mbedtls_mpi P, G;
|
D | test_suite_pkcs1_v21.function | 19 mbedtls_mpi N, E; 66 mbedtls_mpi N, P, Q, E; 130 mbedtls_mpi N, P, Q, E; 198 mbedtls_mpi N, E; 237 mbedtls_mpi N, E;
|
D | test_suite_ecp.function | 124 mbedtls_mpi dA, xA, yA, dB, xZ, yZ; 212 mbedtls_mpi u1, u2, xR, yR; 276 mbedtls_mpi dA, xA, yA, dB, xB, yB, xZ, yZ; 332 mbedtls_mpi dA, xA, dB, xB, xS; 387 mbedtls_mpi n; 433 mbedtls_mpi d; 464 mbedtls_mpi u1, u2; 506 mbedtls_mpi N, R; 574 mbedtls_mpi X, Y, Z; 617 mbedtls_mpi X, Y, Z; [all …]
|