/optee_os/core/lib/libtomcrypt/src/pk/ecc/ |
A D | ltc_ecc_projective_dbl_point.c | 54 LTC_ARGCHK(modulus != NULL); in ltc_ecc_projective_dbl_point() 65 if ((err = ltc_ecc_is_point_at_infinity(P, modulus, &inf)) != CRYPT_OK) return err; in ltc_ecc_projective_dbl_point() 74 if ((err = mp_montgomery_reduce(t1, modulus, mp)) != CRYPT_OK) { goto done; } in ltc_ecc_projective_dbl_point() 80 if (mp_cmp(R->z, modulus) != LTC_MP_LT) { in ltc_ecc_projective_dbl_point() 92 if (mp_cmp(t1, modulus) != LTC_MP_LT) { in ltc_ecc_projective_dbl_point() 100 if (mp_cmp(t1, modulus) != LTC_MP_LT) { in ltc_ecc_projective_dbl_point() 105 if (mp_cmp(t1, modulus) != LTC_MP_LT) { in ltc_ecc_projective_dbl_point() 121 if (mp_cmp(t1, modulus) != LTC_MP_LT) { in ltc_ecc_projective_dbl_point() 126 if (mp_cmp(t1, modulus) != LTC_MP_LT) { in ltc_ecc_projective_dbl_point() 131 if (mp_cmp(t1, modulus) != LTC_MP_LT) { in ltc_ecc_projective_dbl_point() [all …]
|
A D | ltc_ecc_projective_add_point.c | 38 LTC_ARGCHK(modulus != NULL); in ltc_ecc_projective_add_point() 45 if ((err = ltc_ecc_is_point_at_infinity(P, modulus, &inf)) != CRYPT_OK) return err; in ltc_ecc_projective_add_point() 52 if ((err = ltc_ecc_is_point_at_infinity(Q, modulus, &inf)) != CRYPT_OK) return err; in ltc_ecc_projective_add_point() 63 return ltc_ecc_projective_dbl_point(P, R, ma, modulus, mp); in ltc_ecc_projective_add_point() 65 if ((err = mp_sub(modulus, Q->y, t1)) != CRYPT_OK) { goto done; } in ltc_ecc_projective_add_point() 81 if ((err = mp_montgomery_reduce(t1, modulus, mp)) != CRYPT_OK) { goto done; } in ltc_ecc_projective_add_point() 84 if ((err = mp_montgomery_reduce(x, modulus, mp)) != CRYPT_OK) { goto done; } in ltc_ecc_projective_add_point() 113 if (mp_cmp(t1, modulus) != LTC_MP_LT) { in ltc_ecc_projective_add_point() 118 if (mp_cmp(t1, modulus) != LTC_MP_LT) { in ltc_ecc_projective_add_point() 128 if (mp_cmp(t2, modulus) != LTC_MP_LT) { in ltc_ecc_projective_add_point() [all …]
|
A D | ltc_ecc_mulmod_timing.c | 32 int ltc_ecc_mulmod(void *k, const ecc_point *G, ecc_point *R, void *a, void *modulus, int map) in ltc_ecc_mulmod() argument 43 LTC_ARGCHK(modulus != NULL); in ltc_ecc_mulmod() 45 if ((err = ltc_ecc_is_point_at_infinity(G, modulus, &inf)) != CRYPT_OK) return err; in ltc_ecc_mulmod() 52 if ((err = mp_montgomery_setup(modulus, &mp)) != CRYPT_OK) { goto error; } in ltc_ecc_mulmod() 54 if ((err = mp_montgomery_normalization(mu, modulus)) != CRYPT_OK) { goto error; } in ltc_ecc_mulmod() 59 if (mp_cmp(a_plus3, modulus) != LTC_MP_EQ) { in ltc_ecc_mulmod() 61 if ((err = mp_mulmod(a, mu, modulus, ma)) != CRYPT_OK) { goto error; } in ltc_ecc_mulmod() 82 if ((err = mp_mulmod(G->x, mu, modulus, tG->x)) != CRYPT_OK) { goto done; } in ltc_ecc_mulmod() 83 if ((err = mp_mulmod(G->y, mu, modulus, tG->y)) != CRYPT_OK) { goto done; } in ltc_ecc_mulmod() 84 if ((err = mp_mulmod(G->z, mu, modulus, tG->z)) != CRYPT_OK) { goto done; } in ltc_ecc_mulmod() [all …]
|
A D | ltc_ecc_mul2add.c | 36 void *modulus) in ltc_ecc_mul2add() argument 51 LTC_ARGCHK(modulus != NULL); in ltc_ecc_mul2add() 94 if ((err = mp_montgomery_setup(modulus, &mp)) != CRYPT_OK) { in ltc_ecc_mul2add() 100 if ((err = mp_montgomery_normalization(mu, modulus)) != CRYPT_OK) { in ltc_ecc_mul2add() 105 …if ((err = mp_mulmod(A->x, mu, modulus, precomp[1]->x)) != CRYPT_OK) … in ltc_ecc_mul2add() 106 …if ((err = mp_mulmod(A->y, mu, modulus, precomp[1]->y)) != CRYPT_OK) … in ltc_ecc_mul2add() 107 …if ((err = mp_mulmod(A->z, mu, modulus, precomp[1]->z)) != CRYPT_OK) … in ltc_ecc_mul2add() 158 … if ((err = ltc_mp.ecc_ptdbl(C, C, ma, modulus, mp)) != CRYPT_OK) { goto ERR_MU; } in ltc_ecc_mul2add() 159 … if ((err = ltc_mp.ecc_ptdbl(C, C, ma, modulus, mp)) != CRYPT_OK) { goto ERR_MU; } in ltc_ecc_mul2add() 170 …if ((err = ltc_mp.ecc_ptadd(C, precomp[nA + (nB<<2)], C, ma, modulus, mp)) != CRYPT_OK) { goto ERR… in ltc_ecc_mul2add() [all …]
|
A D | ltc_ecc_mulmod.c | 33 int ltc_ecc_mulmod(void *k, const ecc_point *G, ecc_point *R, void *a, void *modulus, int map) in ltc_ecc_mulmod() argument 44 LTC_ARGCHK(modulus != NULL); in ltc_ecc_mulmod() 46 if ((err = ltc_ecc_is_point_at_infinity(G, modulus, &inf)) != CRYPT_OK) return err; in ltc_ecc_mulmod() 53 if ((err = mp_montgomery_setup(modulus, &mp)) != CRYPT_OK) { goto error; } in ltc_ecc_mulmod() 55 if ((err = mp_montgomery_normalization(mu, modulus)) != CRYPT_OK) { goto error; } in ltc_ecc_mulmod() 60 if (mp_cmp(a_plus3, modulus) != LTC_MP_EQ) { in ltc_ecc_mulmod() 62 if ((err = mp_mulmod(a, mu, modulus, ma)) != CRYPT_OK) { goto error; } in ltc_ecc_mulmod() 85 if ((err = mp_mulmod(G->x, mu, modulus, tG->x)) != CRYPT_OK) { goto done; } in ltc_ecc_mulmod() 86 if ((err = mp_mulmod(G->y, mu, modulus, tG->y)) != CRYPT_OK) { goto done; } in ltc_ecc_mulmod() 87 if ((err = mp_mulmod(G->z, mu, modulus, tG->z)) != CRYPT_OK) { goto done; } in ltc_ecc_mulmod() [all …]
|
A D | ltc_ecc_map.c | 27 int ltc_ecc_map(ecc_point *P, void *modulus, void *mp) in ltc_ecc_map() argument 33 LTC_ARGCHK(modulus != NULL); in ltc_ecc_map() 45 if ((err = mp_montgomery_reduce(P->z, modulus, mp)) != CRYPT_OK) { goto done; } in ltc_ecc_map() 48 if ((err = mp_invmod(P->z, modulus, t1)) != CRYPT_OK) { goto done; } in ltc_ecc_map() 52 if ((err = mp_mod(t2, modulus, t2)) != CRYPT_OK) { goto done; } in ltc_ecc_map() 54 if ((err = mp_mod(t1, modulus, t1)) != CRYPT_OK) { goto done; } in ltc_ecc_map() 58 if ((err = mp_montgomery_reduce(P->x, modulus, mp)) != CRYPT_OK) { goto done; } in ltc_ecc_map() 60 if ((err = mp_montgomery_reduce(P->y, modulus, mp)) != CRYPT_OK) { goto done; } in ltc_ecc_map()
|
A D | ltc_ecc_is_point_at_infinity.c | 19 int ltc_ecc_is_point_at_infinity(const ecc_point *P, void *modulus, int *retval) in ltc_ecc_is_point_at_infinity() argument 40 if ((err = mp_mulmod(P->y, P->y, modulus, y2)) != CRYPT_OK) goto cleanup; in ltc_ecc_is_point_at_infinity() 43 if ((err = mp_mulmod(P->x, P->x, modulus, x3)) != CRYPT_OK) goto cleanup; in ltc_ecc_is_point_at_infinity() 44 if ((err = mp_mulmod(P->x, x3, modulus, x3)) != CRYPT_OK) goto cleanup; in ltc_ecc_is_point_at_infinity()
|
/optee_os/core/lib/libtomcrypt/src/math/ |
A D | tfm_desc.c | 438 LTC_ARGCHK(modulus != NULL); in tfm_ecc_projective_dbl_point() 538 fp_add(&t2, modulus, &t2); in tfm_ecc_projective_dbl_point() 594 LTC_ARGCHK(modulus != NULL); in tfm_ecc_projective_add_point() 624 fp_sub(modulus, Q->y, &t1); in tfm_ecc_projective_add_point() 667 fp_add(&y, modulus, &y); in tfm_ecc_projective_add_point() 672 fp_sub(&t1, modulus, &t1); in tfm_ecc_projective_add_point() 677 fp_sub(&t1, modulus, &t1); in tfm_ecc_projective_add_point() 682 fp_add(&x, modulus, &x); in tfm_ecc_projective_add_point() 725 fp_add(&x, modulus, &x); in tfm_ecc_projective_add_point() 744 fp_add(&y, modulus, &y); in tfm_ecc_projective_add_point() [all …]
|
/optee_os/core/lib/libtomcrypt/src/math/fp/ |
A D | ltc_ecc_fp_mulmod.c | 686 bitlen = mp_unsigned_bin_size(modulus) << 3; in _build_lut() 789 y = mp_unsigned_bin_size(modulus); in _accel_fp_mul() 825 bitlen = mp_unsigned_bin_size(modulus) << 3; in _accel_fp_mul() 893 err = ltc_ecc_map(R, modulus, mp); in _accel_fp_mul() 914 y = mp_unsigned_bin_size(modulus); in _accel_fp_mul2add() 952 y = mp_unsigned_bin_size(modulus); in _accel_fp_mul2add() 988 bitlen = mp_unsigned_bin_size(modulus) << 3; in _accel_fp_mul2add() 1099 return ltc_ecc_map(R, modulus, mp); in _accel_fp_mul2add() 1116 void *modulus) in ltc_ecc_fp_mul2add() argument 1283 err = ltc_ecc_mulmod(k, G, R, a, modulus, map); in ltc_ecc_fp_mulmod() [all …]
|
/optee_os/core/lib/libtomcrypt/src/headers/ |
A D | tomcrypt_math.h | 395 void *modulus, 411 void *modulus, 425 void *modulus, 438 int (*ecc_map)(ecc_point *P, void *modulus, void *mp); 454 void *modulus);
|
A D | tomcrypt_private.h | 270 int ltc_ecc_is_point_at_infinity(const ecc_point *P, void *modulus, int *retval); 278 int ltc_ecc_projective_dbl_point(const ecc_point *P, ecc_point *R, void *ma, void *modulus, void *m… 281 …add_point(const ecc_point *P, const ecc_point *Q, ecc_point *R, void *ma, void *modulus, void *mp); 286 int ltc_ecc_fp_mulmod(void *k, ecc_point *G, ecc_point *R, void *a, void *modulus, int map); 292 int ltc_ecc_fp_add_point(ecc_point *g, void *modulus, int lock); 299 int ltc_ecc_mulmod(void *k, const ecc_point *G, ecc_point *R, void *a, void *modulus, int map); 307 void *modulus); 315 void *modulus); 322 int ltc_ecc_map(ecc_point *P, void *modulus, void *mp);
|
/optee_os/core/drivers/crypto/crypto_api/math/ |
A D | sub.mk | 1 srcs-y += modulus.c
|
/optee_os/out/arm/export-ta_arm64/host_include/ |
A D | tee_api.h | 348 const TEE_BigInt *modulus);
|
/optee_os/out/arm/export-ta_arm64/include/ |
A D | tee_api.h | 348 const TEE_BigInt *modulus);
|
/optee_os/lib/libutee/include/ |
A D | tee_api.h | 348 const TEE_BigInt *modulus);
|
/optee_os/out/arm/export-ta_arm32/host_include/ |
A D | tee_api.h | 348 const TEE_BigInt *modulus);
|
/optee_os/out/arm/export-ta_arm32/include/ |
A D | tee_api.h | 348 const TEE_BigInt *modulus);
|
/optee_os/lib/libutee/ |
A D | tee_api_arith_mpi.c | 795 const TEE_BigInt *modulus __unused) in TEE_BigIntInitFMMContext()
|
/optee_os/lib/libmbedtls/mbedtls/ |
A D | ChangeLog | 2191 modulus 1 and therefore to hang. Found by blaufish. #641.
|