/optee_os/core/lib/libtomcrypt/src/pk/ecc/ |
A D | ltc_ecc_projective_add_point.c | 32 void *t1, *t2, *x, *y, *z; in ltc_ecc_projective_add_point() local 127 if ((err = mp_add(t2, t2, t2)) != CRYPT_OK) { goto done; } in ltc_ecc_projective_add_point() 129 if ((err = mp_sub(t2, modulus, t2)) != CRYPT_OK) { goto done; } in ltc_ecc_projective_add_point() 132 if ((err = mp_add(t2, x, t2)) != CRYPT_OK) { goto done; } in ltc_ecc_projective_add_point() 134 if ((err = mp_sub(t2, modulus, t2)) != CRYPT_OK) { goto done; } in ltc_ecc_projective_add_point() 155 if ((err = mp_mul(t2, x, t2)) != CRYPT_OK) { goto done; } in ltc_ecc_projective_add_point() 171 if ((err = mp_sub(t2, x, t2)) != CRYPT_OK) { goto done; } in ltc_ecc_projective_add_point() 173 if ((err = mp_add(t2, modulus, t2)) != CRYPT_OK) { goto done; } in ltc_ecc_projective_add_point() 176 if ((err = mp_sub(t2, x, t2)) != CRYPT_OK) { goto done; } in ltc_ecc_projective_add_point() 178 if ((err = mp_add(t2, modulus, t2)) != CRYPT_OK) { goto done; } in ltc_ecc_projective_add_point() [all …]
|
A D | ltc_ecc_projective_dbl_point.c | 49 void *t1, *t2; in ltc_ecc_projective_dbl_point() local 57 if ((err = mp_init_multi(&t1, &t2, NULL)) != CRYPT_OK) { in ltc_ecc_projective_dbl_point() 86 if ((err = mp_sub(R->x, t1, t2)) != CRYPT_OK) { goto done; } in ltc_ecc_projective_dbl_point() 87 if (mp_cmp_d(t2, 0) == LTC_MP_LT) { in ltc_ecc_projective_dbl_point() 88 if ((err = mp_add(t2, modulus, t2)) != CRYPT_OK) { goto done; } in ltc_ecc_projective_dbl_point() 96 if ((err = mp_mul(t1, t2, t2)) != CRYPT_OK) { goto done; } in ltc_ecc_projective_dbl_point() 99 if ((err = mp_add(t2, t2, t1)) != CRYPT_OK) { goto done; } in ltc_ecc_projective_dbl_point() 148 if (mp_isodd(t2)) { in ltc_ecc_projective_dbl_point() 149 if ((err = mp_add(t2, modulus, t2)) != CRYPT_OK) { goto done; } in ltc_ecc_projective_dbl_point() 151 if ((err = mp_div_2(t2, t2)) != CRYPT_OK) { goto done; } in ltc_ecc_projective_dbl_point() [all …]
|
A D | ltc_ecc_is_point.c | 24 void *prime, *a, *b, *t1, *t2; in ltc_ecc_is_point() local 31 if ((err = mp_init_multi(&t1, &t2, NULL)) != CRYPT_OK) return err; in ltc_ecc_is_point() 37 if ((err = mp_sqr(x, t2)) != CRYPT_OK) goto cleanup; in ltc_ecc_is_point() 38 if ((err = mp_mod(t2, prime, t2)) != CRYPT_OK) goto cleanup; in ltc_ecc_is_point() 39 if ((err = mp_mul(x, t2, t2)) != CRYPT_OK) goto cleanup; in ltc_ecc_is_point() 42 if ((err = mp_sub(t1, t2, t1)) != CRYPT_OK) goto cleanup; in ltc_ecc_is_point() 45 if ((err = mp_submod(prime, a, prime, t2)) != CRYPT_OK) goto cleanup; in ltc_ecc_is_point() 46 if ((err = mp_mulmod(t2, x, prime, t2)) != CRYPT_OK) goto cleanup; in ltc_ecc_is_point() 47 if ((err = mp_addmod(t1, t2, prime, t1)) != CRYPT_OK) goto cleanup; in ltc_ecc_is_point() 65 mp_clear_multi(t1, t2, NULL); in ltc_ecc_is_point()
|
A D | ltc_ecc_import_point.c | 19 void *t1, *t2; in ltc_ecc_import_point() local 22 if (mp_init_multi(&t1, &t2, NULL) != CRYPT_OK) { in ltc_ecc_import_point() 43 …if ((err = mp_mulmod(a, x, prime, t2)) != CRYPT_OK) { goto cleanup;… in ltc_ecc_import_point() 44 …if ((err = mp_add(t1, t2, t1)) != CRYPT_OK) { goto cleanup;… in ltc_ecc_import_point() 48 …if ((err = mp_sqrtmod_prime(t1, prime, t2)) != CRYPT_OK) { goto cleanup;… in ltc_ecc_import_point() 50 if ((mp_isodd(t2) && in[0] == 0x03) || (!mp_isodd(t2) && in[0] == 0x02)) { in ltc_ecc_import_point() 51 … if ((err = mp_mod(t2, prime, y)) != CRYPT_OK) { goto cleanup; } in ltc_ecc_import_point() 54 … if ((err = mp_submod(prime, t2, prime, y)) != CRYPT_OK) { goto cleanup; } in ltc_ecc_import_point() 64 mp_clear_multi(t1, t2, NULL); in ltc_ecc_import_point()
|
A D | ltc_ecc_map.c | 29 void *t1, *t2; in ltc_ecc_map() local 40 if ((err = mp_init_multi(&t1, &t2, NULL)) != CRYPT_OK) { in ltc_ecc_map() 51 if ((err = mp_sqr(t1, t2)) != CRYPT_OK) { goto done; } in ltc_ecc_map() 52 if ((err = mp_mod(t2, modulus, t2)) != CRYPT_OK) { goto done; } in ltc_ecc_map() 53 if ((err = mp_mul(t1, t2, t1)) != CRYPT_OK) { goto done; } in ltc_ecc_map() 57 if ((err = mp_mul(P->x, t2, P->x)) != CRYPT_OK) { goto done; } in ltc_ecc_map() 65 mp_clear_multi(t1, t2, NULL); in ltc_ecc_map()
|
A D | ecc_recover_key.c | 39 void *r, *s, *v, *w, *t1, *t2, *u1, *u2, *v1, *v2, *e, *x, *y, *a_plus3; in ecc_recover_key() local 56 …if ((err = mp_init_multi(&r, &s, &v, &w, &t1, &t2, &u1, &u2, &v1, &v2, &e, &x, &y, &a_plus3, NULL)… in ecc_recover_key() 183 …if ((err = mp_mulmod(a, x, m, t2)) != CRYPT_OK) … in ecc_recover_key() 184 …if ((err = mp_add(t1, t2, t1)) != CRYPT_OK) … in ecc_recover_key() 188 …if ((err = mp_sqrtmod_prime(t1, m, t2)) != CRYPT_OK) … in ecc_recover_key() 192 if ((mp_isodd(t2) && (recid%2)) || (!mp_isodd(t2) && !(recid%2))) { in ecc_recover_key() 193 …if ((err = mp_mod(t2, m, mR->y)) != CRYPT_OK) … in ecc_recover_key() 196 …if ((err = mp_submod(m, t2, m, mR->y)) != CRYPT_OK) … in ecc_recover_key() 261 mp_clear_multi(a_plus3, y, x, e, v2, v1, u2, u1, t2, t1, w, v, s, r, NULL); in ecc_recover_key()
|
/optee_os/core/lib/libtomcrypt/src/math/ |
A D | tfm_desc.c | 485 fp_mul(&t1, &t2, &t2); in tfm_ecc_projective_dbl_point() 488 fp_add(&t2, &t2, &t1); in tfm_ecc_projective_dbl_point() 538 fp_add(&t2, modulus, &t2); in tfm_ecc_projective_dbl_point() 540 fp_div_2(&t2, &t2); in tfm_ecc_projective_dbl_point() 685 fp_add(&t2, &t2, &t2); in tfm_ecc_projective_add_point() 687 fp_sub(&t2, modulus, &t2); in tfm_ecc_projective_add_point() 690 fp_add(&t2, &x, &t2); in tfm_ecc_projective_add_point() 713 fp_mul(&t2, &x, &t2); in tfm_ecc_projective_add_point() 729 fp_sub(&t2, &x, &t2); in tfm_ecc_projective_add_point() 734 fp_sub(&t2, &x, &t2); in tfm_ecc_projective_add_point() [all …]
|
/optee_os/out/arm/export-ta_arm64/host_include/ |
A D | utee_defines.h | 268 #define TEE_TIME_LT(t1, t2) \ argument 269 (((t1).seconds == (t2).seconds) ? \ 270 ((t1).millis < (t2).millis) : \ 271 ((t1).seconds < (t2).seconds)) 273 #define TEE_TIME_LE(t1, t2) \ argument 274 (((t1).seconds == (t2).seconds) ? \ 275 ((t1).millis <= (t2).millis) : \ 276 ((t1).seconds <= (t2).seconds)) 278 #define TEE_TIME_ADD(t1, t2, dst) do { \ argument 279 (dst).seconds = (t1).seconds + (t2).seconds; \ [all …]
|
A D | tee_api_defines.h | 466 #define TEE_PARAM_TYPES(t0,t1,t2,t3) \ argument 467 ((t0) | ((t1) << 4) | ((t2) << 8) | ((t3) << 12))
|
/optee_os/out/arm/export-ta_arm64/include/ |
A D | utee_defines.h | 268 #define TEE_TIME_LT(t1, t2) \ argument 269 (((t1).seconds == (t2).seconds) ? \ 270 ((t1).millis < (t2).millis) : \ 271 ((t1).seconds < (t2).seconds)) 273 #define TEE_TIME_LE(t1, t2) \ argument 274 (((t1).seconds == (t2).seconds) ? \ 275 ((t1).millis <= (t2).millis) : \ 276 ((t1).seconds <= (t2).seconds)) 278 #define TEE_TIME_ADD(t1, t2, dst) do { \ argument 279 (dst).seconds = (t1).seconds + (t2).seconds; \ [all …]
|
A D | tee_api_defines.h | 466 #define TEE_PARAM_TYPES(t0,t1,t2,t3) \ argument 467 ((t0) | ((t1) << 4) | ((t2) << 8) | ((t3) << 12))
|
/optee_os/lib/libutee/include/ |
A D | utee_defines.h | 268 #define TEE_TIME_LT(t1, t2) \ argument 269 (((t1).seconds == (t2).seconds) ? \ 270 ((t1).millis < (t2).millis) : \ 271 ((t1).seconds < (t2).seconds)) 273 #define TEE_TIME_LE(t1, t2) \ argument 274 (((t1).seconds == (t2).seconds) ? \ 275 ((t1).millis <= (t2).millis) : \ 276 ((t1).seconds <= (t2).seconds)) 278 #define TEE_TIME_ADD(t1, t2, dst) do { \ argument 279 (dst).seconds = (t1).seconds + (t2).seconds; \ [all …]
|
A D | tee_api_defines.h | 466 #define TEE_PARAM_TYPES(t0,t1,t2,t3) \ argument 467 ((t0) | ((t1) << 4) | ((t2) << 8) | ((t3) << 12))
|
/optee_os/out/arm/export-ta_arm32/host_include/ |
A D | utee_defines.h | 268 #define TEE_TIME_LT(t1, t2) \ argument 269 (((t1).seconds == (t2).seconds) ? \ 270 ((t1).millis < (t2).millis) : \ 271 ((t1).seconds < (t2).seconds)) 273 #define TEE_TIME_LE(t1, t2) \ argument 274 (((t1).seconds == (t2).seconds) ? \ 275 ((t1).millis <= (t2).millis) : \ 276 ((t1).seconds <= (t2).seconds)) 278 #define TEE_TIME_ADD(t1, t2, dst) do { \ argument 279 (dst).seconds = (t1).seconds + (t2).seconds; \ [all …]
|
A D | tee_api_defines.h | 466 #define TEE_PARAM_TYPES(t0,t1,t2,t3) \ argument 467 ((t0) | ((t1) << 4) | ((t2) << 8) | ((t3) << 12))
|
/optee_os/out/arm/export-ta_arm32/include/ |
A D | utee_defines.h | 268 #define TEE_TIME_LT(t1, t2) \ argument 269 (((t1).seconds == (t2).seconds) ? \ 270 ((t1).millis < (t2).millis) : \ 271 ((t1).seconds < (t2).seconds)) 273 #define TEE_TIME_LE(t1, t2) \ argument 274 (((t1).seconds == (t2).seconds) ? \ 275 ((t1).millis <= (t2).millis) : \ 276 ((t1).seconds <= (t2).seconds)) 278 #define TEE_TIME_ADD(t1, t2, dst) do { \ argument 279 (dst).seconds = (t1).seconds + (t2).seconds; \ [all …]
|
A D | tee_api_defines.h | 466 #define TEE_PARAM_TYPES(t0,t1,t2,t3) \ argument 467 ((t0) | ((t1) << 4) | ((t2) << 8) | ((t3) << 12))
|
/optee_os/core/lib/libtomcrypt/src/ciphers/aes/ |
A D | aes.c | 330 t2 = in _rijndael_ecb_encrypt() 368 t2 = in _rijndael_ecb_encrypt() 389 Te2(LTC_BYTE(t2, 1)) ^ in _rijndael_ecb_encrypt() 394 Te1(LTC_BYTE(t2, 2)) ^ in _rijndael_ecb_encrypt() 399 Te0(LTC_BYTE(t2, 3)) ^ in _rijndael_ecb_encrypt() 408 Te3(LTC_BYTE(t2, 0)) ^ in _rijndael_ecb_encrypt() 421 (Te4_1[LTC_BYTE(t2, 1)]) ^ in _rijndael_ecb_encrypt() 427 (Te4_2[LTC_BYTE(t2, 2)]) ^ in _rijndael_ecb_encrypt() 433 (Te4_3[LTC_BYTE(t2, 3)]) ^ in _rijndael_ecb_encrypt() 513 t2 = in _rijndael_ecb_decrypt() [all …]
|
/optee_os/core/tee/ |
A D | tee_time_generic.c | 71 TEE_Time t2; in tee_time_get_ta_time() local 82 TEE_TIME_ADD(t, *offs, t2); in tee_time_get_ta_time() 85 if (TEE_TIME_LT(t2, t)) in tee_time_get_ta_time() 88 TEE_TIME_SUB(t, *offs, t2); in tee_time_get_ta_time() 91 if (TEE_TIME_LE(t, t2)) in tee_time_get_ta_time() 94 *time = t2; in tee_time_get_ta_time()
|
/optee_os/core/lib/libtomcrypt/src/ciphers/twofish/ |
A D | twofish.c | 477 ulong32 a,b,c,d,ta,tb,tc,td,t1,t2; in _twofish_ecb_encrypt() local 504 t2 = g1_func(b, skey); in _twofish_ecb_encrypt() 505 t1 = g_func(a, skey) + t2; in _twofish_ecb_encrypt() 509 t2 = g1_func(d, skey); in _twofish_ecb_encrypt() 510 t1 = g_func(c, skey) + t2; in _twofish_ecb_encrypt() 551 ulong32 a,b,c,d,ta,tb,tc,td,t1,t2; in _twofish_ecb_decrypt() local 581 t2 = g1_func(d, skey); in _twofish_ecb_decrypt() 582 t1 = g_func(c, skey) + t2; in _twofish_ecb_decrypt() 584 b = RORc(b ^ (t2 + t1 + k[3]), 1); in _twofish_ecb_decrypt() 586 t2 = g1_func(b, skey); in _twofish_ecb_decrypt() [all …]
|
/optee_os/core/lib/libtomcrypt/src/mac/pelican/ |
A D | pelican.c | 57 ulong32 s0, s1, s2, s3, t0, t1, t2, t3; in _four_rounds() local 75 t2 = in _four_rounds() 85 s0 = t0; s1 = t1; s2 = t2; s3 = t3; in _four_rounds()
|
/optee_os/core/lib/libtomcrypt/src/prngs/ |
A D | sober128.c | 197 unsigned char t2[] = { 0x6B, 0x43, 0x9E, 0xBC, 0xE7, 0x62, 0x9B, 0xE6, 0x9B, 0x83 }; in sober128_test() 214 … if (compare_testvector(out, 10, t2, sizeof(t2), "SOBER128-PRNG", 2)) return CRYPT_FAIL_TESTVECTOR; in sober128_test()
|
A D | chacha20.c | 195 unsigned char t2[] = { 0x47, 0xC9, 0x0D, 0x03, 0xE4, 0x75, 0x34, 0x27, 0xBD, 0xDE }; in chacha20_prng_test() 212 …if (compare_testvector(out, 10, t2, sizeof(t2), "CHACHA-PRNG", 2)) return CRYPT_FAIL_TESTVECT… in chacha20_prng_test()
|
A D | rc4.c | 198 unsigned char t2[] = { 0xEF, 0x80, 0xA2, 0xE6, 0x50, 0x91, 0xF3, 0x17, 0x4A, 0x8A }; in rc4_test() 215 if (compare_testvector(out, 10, t2, sizeof(t2), "RC4-PRNG", 2)) return CRYPT_FAIL_TESTVECTOR; in rc4_test()
|
/optee_os/core/arch/arm/crypto/ |
A D | aes_modes_armv8a_ce_a64.S | 100 .macro encrypt_block, in, rounds, t0, t1, t2 104 .macro encrypt_block2x, i0, i1, rounds, t0, t1, t2 108 .macro encrypt_block4x, i0, i1, i2, i3, rounds, t0, t1, t2 112 .macro decrypt_block, in, rounds, t0, t1, t2 116 .macro decrypt_block2x, i0, i1, rounds, t0, t1, t2 120 .macro decrypt_block4x, i0, i1, i2, i3, rounds, t0, t1, t2
|