Home
last modified time | relevance | path

Searched refs:ltc_mp (Results 1 – 25 of 42) sorted by relevance

12

/optee_os-3.20.0/core/lib/libtomcrypt/src/misc/crypt/
A Dcrypt_inits.c16 ltc_mp = ltm_desc; in init_LTM()
23 ltc_mp = tfm_desc; in init_TFM()
30 ltc_mp = gmp_desc; in init_GMP()
41 ltc_mp = ltm_desc; in crypt_mp_init()
47 ltc_mp = tfm_desc; in crypt_mp_init()
53 ltc_mp = gmp_desc; in crypt_mp_init()
61 ltc_mp = EXT_MATH_LIB; in crypt_mp_init()
A Dcrypt_fsa.c19 XMEMCPY(&ltc_mp, mp, sizeof(ltc_mp)); in crypt_fsa()
A Dcrypt_ltc_mp_descriptor.c6 ltc_math_descriptor ltc_mp = { 0 }; variable
/optee_os-3.20.0/core/lib/libtomcrypt/src/headers/
A Dtomcrypt_private.h166 #define mp_init(a) ltc_mp.init(a)
170 #define mp_clear(a) ltc_mp.deinit(a)
175 #define mp_neg(a, b) ltc_mp.neg(a, b)
176 #define mp_copy(a, b) ltc_mp.copy(a, b)
180 #define mp_get_int(a) ltc_mp.get_int(a)
195 #define mp_add(a, b, c) ltc_mp.add(a, b, c)
197 #define mp_sub(a, b, c) ltc_mp.sub(a, b, c)
199 #define mp_mul(a, b, c) ltc_mp.mul(a, b, c)
201 #define mp_sqr(a, b) ltc_mp.sqr(a, b)
204 #define mp_div_2(a, b) ltc_mp.div_2(a, b)
[all …]
/optee_os-3.20.0/core/lib/libtomcrypt/src/pk/ecc/
A Dltc_ecc_points.c47 if ((err = ltc_mp.set_int(p->x, x)) != CRYPT_OK) return err; in ltc_ecc_set_point_xyz()
48 if ((err = ltc_mp.set_int(p->y, y)) != CRYPT_OK) return err; in ltc_ecc_set_point_xyz()
49 if ((err = ltc_mp.set_int(p->z, z)) != CRYPT_OK) return err; in ltc_ecc_set_point_xyz()
56 if ((err = ltc_mp.copy(src->x, dst->x)) != CRYPT_OK) return err; in ltc_ecc_copy_point()
57 if ((err = ltc_mp.copy(src->y, dst->y)) != CRYPT_OK) return err; in ltc_ecc_copy_point()
58 if ((err = ltc_mp.copy(src->z, dst->z)) != CRYPT_OK) return err; in ltc_ecc_copy_point()
A Dltc_ecc_verify_key.c25 if (ltc_mp.compare_d(key->pubkey.z, 1) == LTC_MP_EQ) { in ltc_ecc_verify_key()
26 if ((ltc_mp.compare(key->pubkey.x, prime) != LTC_MP_LT) || in ltc_ecc_verify_key()
27 (ltc_mp.compare(key->pubkey.y, prime) != LTC_MP_LT) || in ltc_ecc_verify_key()
28 (ltc_mp.compare_d(key->pubkey.x, 0) == LTC_MP_LT) || in ltc_ecc_verify_key()
29 (ltc_mp.compare_d(key->pubkey.y, 0) == LTC_MP_LT) || in ltc_ecc_verify_key()
A Dltc_ecc_mulmod.c87 if ((err = ltc_mp.ecc_ptdbl(tG, M[0], ma, modulus, mp)) != CRYPT_OK) { goto done; } in ltc_ecc_mulmod()
88 if ((err = ltc_mp.ecc_ptdbl(M[0], M[0], ma, modulus, mp)) != CRYPT_OK) { goto done; } in ltc_ecc_mulmod()
89 if ((err = ltc_mp.ecc_ptdbl(M[0], M[0], ma, modulus, mp)) != CRYPT_OK) { goto done; } in ltc_ecc_mulmod()
93 if ((err = ltc_mp.ecc_ptadd(M[j-9], tG, M[j-8], ma, modulus, mp)) != CRYPT_OK) { goto done; } in ltc_ecc_mulmod()
112 bitcnt = (int) ltc_mp.bits_per_digit; in ltc_ecc_mulmod()
117 i = (buf >> (ltc_mp.bits_per_digit - 1)) & 1; in ltc_ecc_mulmod()
127 if ((err = ltc_mp.ecc_ptdbl(R, R, ma, modulus, mp)) != CRYPT_OK) { goto done; } in ltc_ecc_mulmod()
146 if ((err = ltc_mp.ecc_ptdbl(R, R, ma, modulus, mp)) != CRYPT_OK) { goto done; } in ltc_ecc_mulmod()
150 … if ((err = ltc_mp.ecc_ptadd(R, M[bitbuf-8], R, ma, modulus, mp)) != CRYPT_OK) { goto done; } in ltc_ecc_mulmod()
164 if ((err = ltc_mp.ecc_ptdbl(R, R, ma, modulus, mp)) != CRYPT_OK) { goto done; } in ltc_ecc_mulmod()
[all …]
A Dltc_ecc_mulmod_timing.c85 if ((err = ltc_mp.ecc_ptdbl(tG, M[1], ma, modulus, mp)) != CRYPT_OK) { goto done; } in ltc_ecc_mulmod()
111 if ((err = ltc_mp.ecc_ptadd(M[0], M[1], M[2], ma, modulus, mp)) != CRYPT_OK) { goto done; } in ltc_ecc_mulmod()
112 if ((err = ltc_mp.ecc_ptdbl(M[1], M[2], ma, modulus, mp)) != CRYPT_OK) { goto done; } in ltc_ecc_mulmod()
119 if ((err = ltc_mp.ecc_ptadd(M[0], M[1], M[2], ma, modulus, mp)) != CRYPT_OK) { goto done; } in ltc_ecc_mulmod()
120 if ((err = ltc_mp.ecc_ptdbl(M[1], M[2], ma, modulus, mp)) != CRYPT_OK) { goto done; } in ltc_ecc_mulmod()
124 if ((err = ltc_mp.ecc_ptadd(M[0], M[1], M[i^1], ma, modulus, mp)) != CRYPT_OK) { goto done; } in ltc_ecc_mulmod()
125 if ((err = ltc_mp.ecc_ptdbl(M[i], M[i], ma, modulus, mp)) != CRYPT_OK) { goto done; } in ltc_ecc_mulmod()
A Dltc_ecc_mul2add.c107 …if ((err = ltc_mp.ecc_ptdbl(precomp[1], precomp[2], ma, modulus, mp)) != CRYPT_OK) … in ltc_ecc_mul2add()
108 …if ((err = ltc_mp.ecc_ptadd(precomp[1], precomp[2], precomp[3], ma, modulus, mp)) != CRYPT_OK) … in ltc_ecc_mul2add()
111 …if ((err = ltc_mp.ecc_ptdbl(precomp[1<<2], precomp[2<<2], ma, modulus, mp)) != CRYPT_OK) … in ltc_ecc_mul2add()
112 …if ((err = ltc_mp.ecc_ptadd(precomp[1<<2], precomp[2<<2], precomp[3<<2], ma, modulus, mp)) != CRYP… in ltc_ecc_mul2add()
117 …if ((err = ltc_mp.ecc_ptadd(precomp[x], precomp[(y<<2)], precomp[x+(y<<2)], ma, modulus, mp)) != C… in ltc_ecc_mul2add()
151 … if ((err = ltc_mp.ecc_ptdbl(C, C, ma, modulus, mp)) != CRYPT_OK) { goto ERR_MU; } in ltc_ecc_mul2add()
152 … if ((err = ltc_mp.ecc_ptdbl(C, C, ma, modulus, mp)) != CRYPT_OK) { goto ERR_MU; } in ltc_ecc_mul2add()
163 …if ((err = ltc_mp.ecc_ptadd(C, precomp[nA + (nB<<2)], C, ma, modulus, mp)) != CRYPT_OK) { goto ERR… in ltc_ecc_mul2add()
A Decc_verify_hash.c172 if (ltc_mp.ecc_mul2add == NULL) { in ecc_verify_hash_ex()
173 …if ((err = ltc_mp.ecc_ptmul(u1, mG, mG, a, m, 0)) != CRYPT_OK) … in ecc_verify_hash_ex()
174 …if ((err = ltc_mp.ecc_ptmul(u2, mQ, mQ, a, m, 0)) != CRYPT_OK) … in ecc_verify_hash_ex()
177 …if ((err = ltc_mp.ecc_ptadd(mQ, mG, mG, ma, m, mp)) != CRYPT_OK) … in ecc_verify_hash_ex()
180 …if ((err = ltc_mp.ecc_map(mG, m, mp)) != CRYPT_OK) … in ecc_verify_hash_ex()
183 …if ((err = ltc_mp.ecc_mul2add(mG, u1, mQ, u2, mG, ma, m)) != CRYPT_OK) … in ecc_verify_hash_ex()
A Decc_make_key.c42 LTC_ARGCHK(ltc_mp.name != NULL); in ecc_generate_key()
58 …if ((err = ltc_mp.ecc_ptmul(key->k, &key->dp.base, &key->pubkey, key->dp.A, key->dp.prime, 1)) != … in ecc_generate_key()
A Decc_shared_secret.c48 …if ((err = ltc_mp.ecc_ptmul(private_key->k, &public_key->pubkey, result, a, prime, 1)) != CRYPT_OK… in ecc_shared_secret()
/optee_os-3.20.0/core/lib/libtomcrypt/src/pk/dh/
A Ddh_set.c27 LTC_ARGCHK(ltc_mp.name != NULL); in dh_set_pg()
55 LTC_ARGCHK(ltc_mp.name != NULL); in dh_set_pg_groupsize()
90 LTC_ARGCHK(ltc_mp.name != NULL); in dh_set_key()
A Ddh_set_pg_dhparam.c23 LTC_ARGCHK(ltc_mp.name != NULL); in dh_set_pg_dhparam()
A Ddh_generate_key.c44 LTC_ARGCHK(ltc_mp.name != NULL); in dh_generate_key()
/optee_os-3.20.0/core/lib/libtomcrypt/src/pk/rsa/
A Drsa_set.c30 LTC_ARGCHK(ltc_mp.name != NULL); in rsa_set_key()
71 LTC_ARGCHK(ltc_mp.name != NULL); in rsa_set_factors()
109 LTC_ARGCHK(ltc_mp.name != NULL); in rsa_set_crt_params()
A Drsa_import_x509.c34 LTC_ARGCHK(ltc_mp.name != NULL); in rsa_import_x509()
A Drsa_decrypt_key.c75 if ((err = ltc_mp.rsa_me(in, inlen, tmp, &x, PK_PRIVATE, key)) != CRYPT_OK) { in rsa_decrypt_key_ex()
A Drsa_encrypt_key.c89 return ltc_mp.rsa_me(out, x, out, outlen, PK_PUBLIC, key); in rsa_encrypt_key_ex()
/optee_os-3.20.0/core/lib/libtomcrypt/
A Drsa.c189 ltc_mp.copy(ltc_tmp_key.d, key->d); in sw_crypto_acipher_gen_rsa_key()
190 ltc_mp.copy(ltc_tmp_key.N, key->n); in sw_crypto_acipher_gen_rsa_key()
191 ltc_mp.copy(ltc_tmp_key.p, key->p); in sw_crypto_acipher_gen_rsa_key()
192 ltc_mp.copy(ltc_tmp_key.q, key->q); in sw_crypto_acipher_gen_rsa_key()
193 ltc_mp.copy(ltc_tmp_key.qP, key->qp); in sw_crypto_acipher_gen_rsa_key()
194 ltc_mp.copy(ltc_tmp_key.dP, key->dp); in sw_crypto_acipher_gen_rsa_key()
195 ltc_mp.copy(ltc_tmp_key.dQ, key->dq); in sw_crypto_acipher_gen_rsa_key()
364 mod_size = ltc_mp.unsigned_size((void *)(ltc_key.N)); in sw_crypto_acipher_rsaes_decrypt()
446 mod_size = ltc_mp.unsigned_size((void *)(ltc_key.N)); in sw_crypto_acipher_rsaes_encrypt()
559 mod_size = ltc_mp.unsigned_size((void *)(ltc_key.N)); in sw_crypto_acipher_rsassa_sign()
[all …]
A Ddh.c60 ltc_mp.copy(ltc_tmp_key.y, key->y); in crypto_acipher_gen_dh_key()
61 ltc_mp.copy(ltc_tmp_key.x, key->x); in crypto_acipher_gen_dh_key()
/optee_os-3.20.0/core/lib/libtomcrypt/src/pk/dsa/
A Ddsa_set.c30 LTC_ARGCHK(ltc_mp.name != NULL); in dsa_set_pqg()
77 LTC_ARGCHK(ltc_mp.name != NULL); in dsa_set_key()
A Ddsa_generate_key.c24 LTC_ARGCHK(ltc_mp.name != NULL); in dsa_generate_key()
A Ddsa_set_pqg_dsaparam.c25 LTC_ARGCHK(ltc_mp.name != NULL); in dsa_set_pqg_dsaparam()
/optee_os-3.20.0/core/lib/libtomcrypt/src/math/
A Dtfm_desc.c448 ltc_mp.set_int(R->x, 1); in tfm_ecc_projective_dbl_point()
449 ltc_mp.set_int(R->y, 1); in tfm_ecc_projective_dbl_point()
450 ltc_mp.set_int(R->z, 0); in tfm_ecc_projective_dbl_point()
601 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()
610 ltc_mp.copy(P->x, R->x); in tfm_ecc_projective_add_point()
611 ltc_mp.copy(P->y, R->y); in tfm_ecc_projective_add_point()
612 ltc_mp.copy(P->z, R->z); in tfm_ecc_projective_add_point()

Completed in 20 milliseconds

12