Home
last modified time | relevance | path

Searched refs:mbedtls_mpi (Results 1 – 25 of 44) sorted by relevance

12

/net-tools-latest/mbedtls-2.4.0/include/mbedtls/
Dbignum.h150 mbedtls_mpi; typedef
159 void mbedtls_mpi_init( mbedtls_mpi *X );
166 void mbedtls_mpi_free( mbedtls_mpi *X );
177 int mbedtls_mpi_grow( mbedtls_mpi *X, size_t nblimbs );
188 int mbedtls_mpi_shrink( mbedtls_mpi *X, size_t nblimbs );
199 int mbedtls_mpi_copy( mbedtls_mpi *X, const mbedtls_mpi *Y );
207 void mbedtls_mpi_swap( mbedtls_mpi *X, mbedtls_mpi *Y );
226 int mbedtls_mpi_safe_cond_assign( mbedtls_mpi *X, const mbedtls_mpi *Y, unsigned char assign );
245 int mbedtls_mpi_safe_cond_swap( mbedtls_mpi *X, mbedtls_mpi *Y, unsigned char assign );
256 int mbedtls_mpi_lset( mbedtls_mpi *X, mbedtls_mpi_sint z );
[all …]
Ddhm.h152 mbedtls_mpi P; /*!< prime modulus */
153 mbedtls_mpi G; /*!< generator */
154 mbedtls_mpi X; /*!< secret value */
155 mbedtls_mpi GX; /*!< self = G^X mod P */
156 mbedtls_mpi GY; /*!< peer = G^Y mod P */
157 mbedtls_mpi K; /*!< key = GY^X mod P */
158 mbedtls_mpi RP; /*!< cached R^2 mod P */
159 mbedtls_mpi Vi; /*!< blinding value */
160 mbedtls_mpi Vf; /*!< un-blinding value */
161 mbedtls_mpi pX; /*!< previous X */
Decp.h99 mbedtls_mpi X; /*!< the point's X coordinate */
100 mbedtls_mpi Y; /*!< the point's Y coordinate */
101 mbedtls_mpi Z; /*!< the point's Z coordinate */
132 mbedtls_mpi P; /*!< prime modulus of the base field */
133 mbedtls_mpi A; /*!< 1. A in the equation, or 2. (A + 2) / 4 */
134 mbedtls_mpi B; /*!< 1. B in the equation, or 2. unused */
136 mbedtls_mpi N; /*!< 1. the order of G, or 2. unused */
140 int (*modp)(mbedtls_mpi *); /*!< function for fast reduction mod P */
159 mbedtls_mpi d; /*!< our secret value */
522 const mbedtls_mpi *m, const mbedtls_ecp_point *P,
[all …]
Drsa.h84 mbedtls_mpi N; /*!< public modulus */
85 mbedtls_mpi E; /*!< public exponent */
87 mbedtls_mpi D; /*!< private exponent */
88 mbedtls_mpi P; /*!< 1st prime factor */
89 mbedtls_mpi Q; /*!< 2nd prime factor */
90 mbedtls_mpi DP; /*!< D % (P - 1) */
91 mbedtls_mpi DQ; /*!< D % (Q - 1) */
92 mbedtls_mpi QP; /*!< 1 / (Q % P) */
94 mbedtls_mpi RN; /*!< cached R^2 mod N */
95 mbedtls_mpi RP; /*!< cached R^2 mod P */
[all …]
Decdsa.h75 int mbedtls_ecdsa_sign( mbedtls_ecp_group *grp, mbedtls_mpi *r, mbedtls_mpi *s,
76 const mbedtls_mpi *d, const unsigned char *buf, size_t blen,
95 int mbedtls_ecdsa_sign_det( mbedtls_ecp_group *grp, mbedtls_mpi *r, mbedtls_mpi *s,
96 const mbedtls_mpi *d, const unsigned char *buf, size_t blen,
116 const mbedtls_ecp_point *Q, const mbedtls_mpi *r, const mbedtls_mpi *s);
Decdh.h47 mbedtls_mpi d; /*!< our secret value (private key) */
50 mbedtls_mpi z; /*!< shared secret */
54 mbedtls_mpi _d; /*!< previous d (for later) */
71 int mbedtls_ecdh_gen_public( mbedtls_ecp_group *grp, mbedtls_mpi *d, mbedtls_ecp_point *Q,
93 int mbedtls_ecdh_compute_shared( mbedtls_ecp_group *grp, mbedtls_mpi *z,
94 const mbedtls_ecp_point *Q, const mbedtls_mpi *d,
Decjpake.h82 mbedtls_mpi xm1; /**< My private key 1 C: x1, S: x3 */
83 mbedtls_mpi xm2; /**< My private key 2 C: x2, S: x4 */
85 mbedtls_mpi s; /**< Pre-shared secret (passphrase) */
Dx509_crt.h133 mbedtls_mpi serial;
442 int mbedtls_x509write_crt_set_serial( mbedtls_x509write_cert *ctx, const mbedtls_mpi *serial );
Dasn1write.h85 int mbedtls_asn1_write_mpi( unsigned char **p, unsigned char *start, const mbedtls_mpi *X );
Dasn1.h275 mbedtls_mpi *X );
Ddebug.h177 const char *text, const mbedtls_mpi *X );
/net-tools-latest/mbedtls-2.4.0/library/
Dbignum.c82 void mbedtls_mpi_init( mbedtls_mpi *X ) in mbedtls_mpi_init()
95 void mbedtls_mpi_free( mbedtls_mpi *X ) in mbedtls_mpi_free()
114 int mbedtls_mpi_grow( mbedtls_mpi *X, size_t nblimbs ) in mbedtls_mpi_grow()
144 int mbedtls_mpi_shrink( mbedtls_mpi *X, size_t nblimbs ) in mbedtls_mpi_shrink()
180 int mbedtls_mpi_copy( mbedtls_mpi *X, const mbedtls_mpi *Y ) in mbedtls_mpi_copy()
214 void mbedtls_mpi_swap( mbedtls_mpi *X, mbedtls_mpi *Y ) in mbedtls_mpi_swap()
216 mbedtls_mpi T; in mbedtls_mpi_swap()
218 memcpy( &T, X, sizeof( mbedtls_mpi ) ); in mbedtls_mpi_swap()
219 memcpy( X, Y, sizeof( mbedtls_mpi ) ); in mbedtls_mpi_swap()
220 memcpy( Y, &T, sizeof( mbedtls_mpi ) ); in mbedtls_mpi_swap()
[all …]
Decdsa.c49 static int derive_mpi( const mbedtls_ecp_group *grp, mbedtls_mpi *x, in derive_mpi()
72 int mbedtls_ecdsa_sign( mbedtls_ecp_group *grp, mbedtls_mpi *r, mbedtls_mpi *s, in mbedtls_ecdsa_sign()
73 const mbedtls_mpi *d, const unsigned char *buf, size_t blen, in mbedtls_ecdsa_sign()
78 mbedtls_mpi k, e, t; in mbedtls_ecdsa_sign()
161 int mbedtls_ecdsa_sign_det( mbedtls_ecp_group *grp, mbedtls_mpi *r, mbedtls_mpi *s, in mbedtls_ecdsa_sign_det()
162 const mbedtls_mpi *d, const unsigned char *buf, size_t blen, in mbedtls_ecdsa_sign_det()
170 mbedtls_mpi h; in mbedtls_ecdsa_sign_det()
201 const mbedtls_ecp_point *Q, const mbedtls_mpi *r, const mbedtls_mpi *s) in mbedtls_ecdsa_verify()
204 mbedtls_mpi e, s_inv, u1, u2; in mbedtls_ecdsa_verify()
284 static int ecdsa_signature_to_asn1( const mbedtls_mpi *r, const mbedtls_mpi *s, in ecdsa_signature_to_asn1()
[all …]
Decp_curves.c554 static inline void ecp_mpi_load( mbedtls_mpi *X, const mbedtls_mpi_uint *p, size_t len ) in ecp_mpi_load()
564 static inline void ecp_mpi_set1( mbedtls_mpi *X ) in ecp_mpi_set1()
604 static int ecp_mod_p192( mbedtls_mpi * );
607 static int ecp_mod_p224( mbedtls_mpi * );
610 static int ecp_mod_p256( mbedtls_mpi * );
613 static int ecp_mod_p384( mbedtls_mpi * );
616 static int ecp_mod_p521( mbedtls_mpi * );
626 static int ecp_mod_p255( mbedtls_mpi * );
629 static int ecp_mod_p192k1( mbedtls_mpi * );
632 static int ecp_mod_p224k1( mbedtls_mpi * );
[all …]
Decjpake.c185 mbedtls_mpi *h ) in ecjpake_hash()
239 mbedtls_mpi r, h; in ecjpake_zkp_read()
304 const mbedtls_mpi *x, in ecjpake_zkp_write()
314 mbedtls_mpi v; in ecjpake_zkp_write()
315 mbedtls_mpi h; /* later recycled to hold r */ in ecjpake_zkp_write()
402 mbedtls_mpi *x, in ecjpake_kkp_write()
472 mbedtls_mpi *xm1, in ecjpake_kkpp_write()
474 mbedtls_mpi *xm2, in ecjpake_kkpp_write()
534 mbedtls_mpi one; in ecjpake_ecp_add3()
609 static int ecjpake_mul_secret( mbedtls_mpi *R, int sign, in ecjpake_mul_secret()
[all …]
Decp.c663 static int ecp_modp( mbedtls_mpi *N, const mbedtls_ecp_group *grp ) in ecp_modp()
746 mbedtls_mpi Zi, ZZi; in ecp_normalize_jac()
794 mbedtls_mpi *c, u, Zi, ZZi; in ecp_normalize_jac_many()
799 if( ( c = mbedtls_calloc( t_len, sizeof( mbedtls_mpi ) ) ) == NULL ) in ecp_normalize_jac_many()
876 mbedtls_mpi mQY; in ecp_safe_invert_jac()
909 mbedtls_mpi M, S, T, U; in ecp_double_jac()
1000 mbedtls_mpi T1, T2, T3, T4, X, Y, Z; in ecp_add_mixed()
1082 mbedtls_mpi l, ll; in ecp_randomize_jac()
1152 unsigned char w, const mbedtls_mpi *m ) in ecp_comb_fixed()
1310 const mbedtls_mpi *m, const mbedtls_ecp_point *P, in ecp_mul_comb()
[all …]
Decdh.c44 int mbedtls_ecdh_gen_public( mbedtls_ecp_group *grp, mbedtls_mpi *d, mbedtls_ecp_point *Q, in mbedtls_ecdh_gen_public()
54 int mbedtls_ecdh_compute_shared( mbedtls_ecp_group *grp, mbedtls_mpi *z, in mbedtls_ecdh_compute_shared()
55 const mbedtls_ecp_point *Q, const mbedtls_mpi *d, in mbedtls_ecdh_compute_shared()
Ddhm.c68 static int dhm_read_bignum( mbedtls_mpi *X, in dhm_read_bignum()
100 static int dhm_check_range( const mbedtls_mpi *param, const mbedtls_mpi *P ) in dhm_check_range()
102 mbedtls_mpi L, U; in dhm_check_range()
354 mbedtls_mpi GYb; in mbedtls_dhm_calc_secret()
478 mbedtls_mpi rec; in mbedtls_dhm_parse_dhm()
/net-tools-latest/mbedtls-2.4.0/tests/suites/
Dtest_suite_mpi.function13 mbedtls_mpi X, Y, Z;
34 mbedtls_mpi X;
58 mbedtls_mpi X;
81 mbedtls_mpi X;
114 mbedtls_mpi X;
151 mbedtls_mpi X, Y;
181 mbedtls_mpi X;
195 mbedtls_mpi X, Y;
215 mbedtls_mpi X;
229 mbedtls_mpi X;
[all …]
Dtest_suite_debug.data48 Debug print mbedtls_mpi #1
51 Debug print mbedtls_mpi #2
54 Debug print mbedtls_mpi #3
57 Debug print mbedtls_mpi #4
60 Debug print mbedtls_mpi #5
63 Debug print mbedtls_mpi #6
Dtest_suite_ecp.function60 mbedtls_mpi dA, xA, yA, dB, xB, yB, xZ, yZ;
114 mbedtls_mpi dA, xA, dB, xB, xS;
163 mbedtls_mpi N, R;
232 mbedtls_mpi X, Y, Z;
270 mbedtls_mpi X, Y, Z;
418 mbedtls_mpi d;
465 mbedtls_mpi d;
Dtest_suite_ecdsa.function15 mbedtls_mpi d, r, s;
49 mbedtls_mpi d, r, s, r_check, s_check;
103 mbedtls_mpi d, r, s, r_check, s_check;
Dtest_suite_ecdh.function15 mbedtls_mpi dA, dB, zA, zB;
52 mbedtls_mpi dA, dB, zA, zB, check;
/net-tools-latest/mbedtls-2.4.0/programs/pkey/
Dmpi_demo.c51 mbedtls_mpi E, P, Q, N, H, D, X, Y, Z; in main()
Ddh_genprime.c72 mbedtls_mpi G, P, Q; in main()

12