Home
last modified time | relevance | path

Searched refs:mp (Results 1 – 16 of 16) sorted by relevance

/optee_os-3.20.0/core/lib/libtomcrypt/src/pk/ecc/
A Dltc_ecc_mulmod_timing.c29 void *mp = NULL, *mu = NULL, *ma = NULL, *a_plus3 = NULL; in ltc_ecc_mulmod() local
45 if ((err = mp_montgomery_setup(modulus, &mp)) != CRYPT_OK) { goto error; } in ltc_ecc_mulmod()
65 mp_montgomery_free(mp); in ltc_ecc_mulmod()
85 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()
133 err = ltc_ecc_map(R, modulus, mp); in ltc_ecc_mulmod()
[all …]
A Dltc_ecc_projective_add_point.c32 LTC_ARGCHK(mp != NULL); in ltc_ecc_projective_add_point()
56 return ltc_ecc_projective_dbl_point(P, R, ma, modulus, mp); in ltc_ecc_projective_add_point()
74 if ((err = mp_montgomery_reduce(t1, modulus, mp)) != CRYPT_OK) { goto done; } in ltc_ecc_projective_add_point()
77 if ((err = mp_montgomery_reduce(x, modulus, mp)) != CRYPT_OK) { goto done; } in ltc_ecc_projective_add_point()
80 if ((err = mp_montgomery_reduce(t1, modulus, mp)) != CRYPT_OK) { goto done; } in ltc_ecc_projective_add_point()
83 if ((err = mp_montgomery_reduce(y, modulus, mp)) != CRYPT_OK) { goto done; } in ltc_ecc_projective_add_point()
88 if ((err = mp_montgomery_reduce(t1, modulus, mp)) != CRYPT_OK) { goto done; } in ltc_ecc_projective_add_point()
91 if ((err = mp_montgomery_reduce(t2, modulus, mp)) != CRYPT_OK) { goto done; } in ltc_ecc_projective_add_point()
94 if ((err = mp_montgomery_reduce(t1, modulus, mp)) != CRYPT_OK) { goto done; } in ltc_ecc_projective_add_point()
97 if ((err = mp_montgomery_reduce(t1, modulus, mp)) != CRYPT_OK) { goto done; } in ltc_ecc_projective_add_point()
[all …]
A Dltc_ecc_mulmod.c30 void *mp = NULL, *mu = NULL, *ma = NULL, *a_plus3 = NULL; in ltc_ecc_mulmod() local
46 if ((err = mp_montgomery_setup(modulus, &mp)) != CRYPT_OK) { goto error; } in ltc_ecc_mulmod()
87 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()
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()
164 if ((err = ltc_mp.ecc_ptdbl(R, R, ma, modulus, mp)) != CRYPT_OK) { goto done; } in ltc_ecc_mulmod()
183 err = ltc_ecc_map(R, modulus, mp); in ltc_ecc_mulmod()
[all …]
A Dltc_ecc_mul2add.c36 void *mp, *mu; in ltc_ecc_mul2add() local
87 if ((err = mp_montgomery_setup(modulus, &mp)) != CRYPT_OK) { in ltc_ecc_mul2add()
107 …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()
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()
169 err = ltc_ecc_map(C, modulus, mp); in ltc_ecc_mul2add()
[all …]
A Dltc_ecc_map.c20 int ltc_ecc_map(ecc_point *P, void *modulus, void *mp) in ltc_ecc_map() argument
27 LTC_ARGCHK(mp != NULL); in ltc_ecc_map()
38 if ((err = mp_montgomery_reduce(P->z, modulus, mp)) != CRYPT_OK) { goto done; } in ltc_ecc_map()
51 if ((err = mp_montgomery_reduce(P->x, modulus, mp)) != CRYPT_OK) { goto done; } in ltc_ecc_map()
53 if ((err = mp_montgomery_reduce(P->y, modulus, mp)) != CRYPT_OK) { goto done; } in ltc_ecc_map()
A Dltc_ecc_projective_dbl_point.c40 …t ltc_ecc_projective_dbl_point(const ecc_point *P, ecc_point *R, void *ma, void *modulus, void *mp) in ltc_ecc_projective_dbl_point() argument
48 LTC_ARGCHK(mp != NULL); in ltc_ecc_projective_dbl_point()
67 if ((err = mp_montgomery_reduce(t1, modulus, mp)) != CRYPT_OK) { goto done; } in ltc_ecc_projective_dbl_point()
70 if ((err = mp_montgomery_reduce(R->z, modulus, mp)) != CRYPT_OK) { goto done; } in ltc_ecc_projective_dbl_point()
90 if ((err = mp_montgomery_reduce(t2, modulus, mp)) != CRYPT_OK) { goto done; } in ltc_ecc_projective_dbl_point()
105 if ((err = mp_montgomery_reduce(t2, modulus, mp)) != CRYPT_OK) { goto done; } in ltc_ecc_projective_dbl_point()
108 if ((err = mp_montgomery_reduce(t1, modulus, mp)) != CRYPT_OK) { goto done; } in ltc_ecc_projective_dbl_point()
111 if ((err = mp_montgomery_reduce(t2, modulus, mp)) != CRYPT_OK) { goto done; } in ltc_ecc_projective_dbl_point()
136 if ((err = mp_montgomery_reduce(R->y, modulus, mp)) != CRYPT_OK) { goto done; } in ltc_ecc_projective_dbl_point()
139 if ((err = mp_montgomery_reduce(t2, modulus, mp)) != CRYPT_OK) { goto done; } in ltc_ecc_projective_dbl_point()
[all …]
A Decc_verify_hash.c31 void *mp = NULL; in ecc_verify_hash_ex() local
162 …if ((err = mp_montgomery_setup(m, &mp)) != 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()
202 if (mp != NULL) mp_montgomery_free(mp); in ecc_verify_hash_ex()
A Decc_recover_key.c34 void *mp = NULL; in ecc_recover_key() local
213 …if ((err = mp_montgomery_setup(m, &mp)) != CRYPT_OK) … in ecc_recover_key()
251 if (mp != NULL) mp_montgomery_free(mp); in ecc_recover_key()
/optee_os-3.20.0/core/lib/libtomcrypt/src/misc/crypt/
A Dcrypt_fsa.c12 int crypt_fsa(void *mp, ...) in crypt_fsa() argument
17 va_start(args, mp); in crypt_fsa()
18 if (mp != NULL) { in crypt_fsa()
19 XMEMCPY(&ltc_mp, mp, sizeof(ltc_mp)); in crypt_fsa()
/optee_os-3.20.0/core/lib/libtomcrypt/src/math/fp/
A Dltc_ecc_fp_mulmod.c1112 void *mp, *mu; in ltc_ecc_fp_mul2add() local
1114 mp = NULL; in ltc_ecc_fp_mul2add()
1172 if (mp == NULL) { in ltc_ecc_fp_mul2add()
1193 if (mp == NULL) { in ltc_ecc_fp_mul2add()
1203 if (mp != NULL) { in ltc_ecc_fp_mul2add()
1225 void *mp, *mu; in ltc_ecc_fp_mulmod() local
1227 mp = NULL; in ltc_ecc_fp_mulmod()
1270 if (mp == NULL) { in ltc_ecc_fp_mulmod()
1280 if (mp != NULL) { in ltc_ecc_fp_mulmod()
1330 void *mp = NULL; in ltc_ecc_fp_add_point() local
[all …]
/optee_os-3.20.0/core/lib/libtomcrypt/src/math/
A Dtfm_desc.c426 fp_digit mp; in tfm_ecc_projective_dbl_point() local
434 mp = *((fp_digit*)Mp); in tfm_ecc_projective_dbl_point()
456 fp_montgomery_reduce(&t1, modulus, mp); in tfm_ecc_projective_dbl_point()
528 fp_montgomery_reduce(&t2, modulus, mp); in tfm_ecc_projective_dbl_point()
581 fp_digit mp; in tfm_ecc_projective_add_point() local
590 mp = *((fp_digit*)Mp); in tfm_ecc_projective_add_point()
646 fp_montgomery_reduce(&t1, modulus, mp); in tfm_ecc_projective_add_point()
649 fp_montgomery_reduce(&t2, modulus, mp); in tfm_ecc_projective_add_point()
697 fp_montgomery_reduce(&z, modulus, mp); in tfm_ecc_projective_add_point()
704 fp_montgomery_reduce(&x, modulus, mp); in tfm_ecc_projective_add_point()
[all …]
/optee_os-3.20.0/core/lib/libtomcrypt/src/headers/
A Dtomcrypt_math.h405 void *mp);
419 void *mp);
431 int (*ecc_map)(ecc_point *P, void *modulus, void *mp);
A Dtomcrypt_misc.h96 int crypt_fsa(void *mp, ...) LTC_NULL_TERMINATED;
A Dtomcrypt_private.h306 … ltc_ecc_projective_dbl_point(const ecc_point *P, ecc_point *R, void *ma, void *modulus, void *mp);
309 …add_point(const ecc_point *P, const ecc_point *Q, ecc_point *R, void *ma, void *modulus, void *mp);
350 int ltc_ecc_map(ecc_point *P, void *modulus, void *mp);
/optee_os-3.20.0/core/lib/libtomcrypt/
A Dsm2-dsa.c149 void *mp = NULL; in sm2_ltc_dsa_verify() local
211 ltc_res = mp_montgomery_setup(ltc_key.dp.prime, &mp); in sm2_ltc_dsa_verify()
244 mp_montgomery_free(mp); in sm2_ltc_dsa_verify()
A Dsm2-kep.c228 void *mp = NULL; in sm2_kep_derive() local
286 ltc_res = mp_montgomery_setup(peer_key->dp.prime, &mp); in sm2_kep_derive()
397 mp_montgomery_free(mp); in sm2_kep_derive()

Completed in 17 milliseconds