/optee_os/core/lib/libtomcrypt/src/pk/ecc/ |
A D | ltc_ecc_projective_dbl_point.c | 49 void *t1, *t2; in ltc_ecc_projective_dbl_point() local 91 if ((err = mp_add(t1, R->x, t1)) != CRYPT_OK) { goto done; } in ltc_ecc_projective_dbl_point() 93 if ((err = mp_sub(t1, modulus, t1)) != CRYPT_OK) { goto done; } in ltc_ecc_projective_dbl_point() 101 if ((err = mp_sub(t1, modulus, t1)) != CRYPT_OK) { goto done; } in ltc_ecc_projective_dbl_point() 104 if ((err = mp_add(t1, t2, t1)) != CRYPT_OK) { goto done; } in ltc_ecc_projective_dbl_point() 106 if ((err = mp_sub(t1, modulus, t1)) != CRYPT_OK) { goto done; } in ltc_ecc_projective_dbl_point() 120 if ((err = mp_add(t1, t2, t1)) != CRYPT_OK) { goto done; } in ltc_ecc_projective_dbl_point() 122 if ((err = mp_sub(t1, modulus, t1)) != CRYPT_OK) { goto done; } in ltc_ecc_projective_dbl_point() 125 if ((err = mp_add(t1, t2, t1)) != CRYPT_OK) { goto done; } in ltc_ecc_projective_dbl_point() 127 if ((err = mp_sub(t1, modulus, t1)) != CRYPT_OK) { goto done; } in ltc_ecc_projective_dbl_point() [all …]
|
A D | ltc_ecc_projective_add_point.c | 32 void *t1, *t2, *x, *y, *z; in ltc_ecc_projective_add_point() local 66 if (mp_cmp(P->y, t1) == LTC_MP_EQ) { in ltc_ecc_projective_add_point() 86 if ((err = mp_mul(Q->z, t1, t1)) != CRYPT_OK) { goto done; } in ltc_ecc_projective_add_point() 100 if ((err = mp_mul(z, t1, t1)) != CRYPT_OK) { goto done; } in ltc_ecc_projective_add_point() 103 if ((err = mp_mul(Q->y, t1, t1)) != CRYPT_OK) { goto done; } in ltc_ecc_projective_add_point() 112 if ((err = mp_add(t1, t1, t1)) != CRYPT_OK) { goto done; } in ltc_ecc_projective_add_point() 114 if ((err = mp_sub(t1, modulus, t1)) != CRYPT_OK) { goto done; } in ltc_ecc_projective_add_point() 117 if ((err = mp_add(t1, y, t1)) != CRYPT_OK) { goto done; } in ltc_ecc_projective_add_point() 119 if ((err = mp_sub(t1, modulus, t1)) != CRYPT_OK) { goto done; } in ltc_ecc_projective_add_point() 149 if ((err = mp_mul(t1, x, t1)) != CRYPT_OK) { goto done; } in ltc_ecc_projective_add_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() 34 if ((err = mp_sqr(y, t1)) != 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() 47 if ((err = mp_addmod(t1, t2, prime, t1)) != CRYPT_OK) goto cleanup; in ltc_ecc_is_point() 50 while (mp_cmp_d(t1, 0) == LTC_MP_LT) { in ltc_ecc_is_point() 51 if ((err = mp_add(t1, prime, t1)) != CRYPT_OK) goto cleanup; in ltc_ecc_is_point() 53 while (mp_cmp(t1, prime) != LTC_MP_LT) { in ltc_ecc_is_point() 54 if ((err = mp_sub(t1, prime, t1)) != CRYPT_OK) goto cleanup; in ltc_ecc_is_point() 58 if (mp_cmp(t1, b) != LTC_MP_EQ) { in ltc_ecc_is_point() [all …]
|
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() 40 …if ((err = mp_sqr(x, t1)) != CRYPT_OK) { goto cleanup;… in ltc_ecc_import_point() 41 …if ((err = mp_mulmod(t1, x, prime, t1)) != 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() 46 …if ((err = mp_add(t1, b, 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() 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() 48 if ((err = mp_invmod(P->z, modulus, t1)) != CRYPT_OK) { goto done; } in ltc_ecc_map() 51 if ((err = mp_sqr(t1, 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() 54 if ((err = mp_mod(t1, modulus, t1)) != CRYPT_OK) { goto done; } in ltc_ecc_map() 59 if ((err = mp_mul(P->y, t1, P->y)) != 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() 180 …if ((err = mp_sqr(x, t1)) != CRYPT_OK) … in ecc_recover_key() 181 …if ((err = mp_mulmod(t1, x, m, t1)) != CRYPT_OK) … in ecc_recover_key() 184 …if ((err = mp_add(t1, t2, t1)) != CRYPT_OK) … in ecc_recover_key() 186 …if ((err = mp_add(t1, b, t1)) != CRYPT_OK) … in ecc_recover_key() 188 …if ((err = mp_sqrtmod_prime(t1, m, t2)) != 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 | 480 fp_add(&t1, R->x, &t1); in tfm_ecc_projective_dbl_point() 493 fp_add(&t1, &t2, &t1); in tfm_ecc_projective_dbl_point() 509 fp_add(&t1, &t2, &t1); in tfm_ecc_projective_dbl_point() 514 fp_add(&t1, &t2, &t1); in tfm_ecc_projective_dbl_point() 519 fp_add(&t1, &t2, &t1); in tfm_ecc_projective_dbl_point() 658 fp_mul(&z, &t1, &t1); in tfm_ecc_projective_add_point() 661 fp_mul(Q->y, &t1, &t1); in tfm_ecc_projective_add_point() 670 fp_add(&t1, &t1, &t1); in tfm_ecc_projective_add_point() 675 fp_add(&t1, &y, &t1); in tfm_ecc_projective_add_point() 707 fp_mul(&t1, &x, &t1); in tfm_ecc_projective_add_point() [all …]
|
A D | gmp_desc.c | 320 mpz_fdiv_q_2exp(t1, t1, 2); in sqrtmod_prime() 353 mpz_add_ui(t1, Q, 1); in sqrtmod_prime() 354 mpz_fdiv_q_2exp(t1, t1, 1); in sqrtmod_prime() 365 mpz_set(t1, T); in sqrtmod_prime() 369 mpz_powm(t1, t1, two, prime); in sqrtmod_prime() 377 mpz_sub_ui(t1, M, i); in sqrtmod_prime() 378 mpz_sub_ui(t1, t1, 1); in sqrtmod_prime() 379 mpz_powm(t1, two, t1, prime); in sqrtmod_prime() 381 mpz_powm(t1, C, t1, prime); in sqrtmod_prime() 383 mpz_mul(C, t1, t1); in sqrtmod_prime() [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 …]
|
/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 …]
|
/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 …]
|
/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 …]
|
/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 …]
|
/optee_os/core/lib/libtomcrypt/src/ciphers/aes/ |
A D | aes.c | 324 t1 = in _rijndael_ecb_encrypt() 362 t1 = in _rijndael_ecb_encrypt() 388 Te1(LTC_BYTE(t1, 2)) ^ in _rijndael_ecb_encrypt() 393 Te0(LTC_BYTE(t1, 3)) ^ in _rijndael_ecb_encrypt() 402 Te3(LTC_BYTE(t1, 0)) ^ in _rijndael_ecb_encrypt() 407 Te2(LTC_BYTE(t1, 1)) ^ in _rijndael_ecb_encrypt() 420 (Te4_2[LTC_BYTE(t1, 2)]) ^ in _rijndael_ecb_encrypt() 426 (Te4_3[LTC_BYTE(t1, 3)]) ^ in _rijndael_ecb_encrypt() 436 (Te4_0[LTC_BYTE(t1, 0)]) ^ in _rijndael_ecb_encrypt() 507 t1 = in _rijndael_ecb_decrypt() [all …]
|
/optee_os/core/lib/libtomcrypt/src/prngs/ |
A D | rng_get_bytes.c | 66 clock_t t1; in _rng_ansic() local 76 t1 = XCLOCK(); while (t1 == XCLOCK()) a ^= 1; in _rng_ansic() 77 t1 = XCLOCK(); while (t1 == XCLOCK()) b ^= 1; in _rng_ansic()
|
A D | sober128.c | 196 unsigned char t1[] = { 0x31, 0x82, 0xA7, 0xA5, 0x8B, 0xD7, 0xCB, 0x39, 0x86, 0x1A }; in sober128_test() 206 … if (compare_testvector(out, 10, t1, sizeof(t1), "SOBER128-PRNG", 1)) return CRYPT_FAIL_TESTVECTOR; in sober128_test()
|
A D | chacha20.c | 194 unsigned char t1[] = { 0x59, 0xB2, 0x26, 0x95, 0x2B, 0x01, 0x8F, 0x05, 0xBE, 0xD8 }; in chacha20_prng_test() 204 …if (compare_testvector(out, 10, t1, sizeof(t1), "CHACHA-PRNG", 1)) return CRYPT_FAIL_TESTVECT… in chacha20_prng_test()
|
A D | rc4.c | 197 unsigned char t1[] = { 0xE0, 0x4D, 0x9A, 0xF6, 0xA8, 0x9D, 0x77, 0x53, 0xAE, 0x09 }; in rc4_test() 207 if (compare_testvector(out, 10, t1, sizeof(t1), "RC4-PRNG", 1)) return CRYPT_FAIL_TESTVECTOR; in rc4_test()
|
/optee_os/core/lib/libtomcrypt/src/ciphers/ |
A D | idea.c | 111 ushort16 x0, x1, x2, x3, t0, t1; in _process_block() local 125 t1 = t0 + (x1^x3); in _process_block() 126 _MUL(t1, m_key[i*6+5]); in _process_block() 127 t0 += t1; in _process_block() 128 x0 ^= t1; in _process_block() 131 x1 = x2^t1; in _process_block()
|
/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 505 t1 = g_func(a, skey) + t2; in _twofish_ecb_encrypt() 506 c = RORc(c ^ (t1 + k[0]), 1); in _twofish_ecb_encrypt() 510 t1 = g_func(c, skey) + t2; in _twofish_ecb_encrypt() 511 a = RORc(a ^ (t1 + k[2]), 1); in _twofish_ecb_encrypt() 551 ulong32 a,b,c,d,ta,tb,tc,td,t1,t2; in _twofish_ecb_decrypt() local 582 t1 = g_func(c, skey) + t2; in _twofish_ecb_decrypt() 583 a = ROLc(a, 1) ^ (t1 + k[2]); in _twofish_ecb_decrypt() 584 b = RORc(b ^ (t2 + t1 + k[3]), 1); in _twofish_ecb_decrypt() 587 t1 = g_func(a, skey) + t2; in _twofish_ecb_decrypt() [all …]
|
/optee_os/core/arch/arm/crypto/ |
A D | sha256_armv8a_ce_a64.S | 19 t1 .req v23 31 add t1.4s, v\s0\().4s, \rc\().4s 38 sha256h dg0q, dg1q, t1.4s 39 sha256h2 dg1q, dg2q, t1.4s
|
A D | sha1_armv8a_ce_a64.S | 19 t1 .req v5 35 add t1.4s, v\s0\().4s, \rc\().4s 47 sha1\op dg0q, dg2s, t1.4s
|
/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 70 t1 = in _four_rounds() 85 s0 = t0; s1 = t1; s2 = t2; s3 = t3; in _four_rounds()
|
/optee_os/core/lib/libtomcrypt/src/hashes/sha2/ |
A D | sha512.c | 98 ulong64 S[8], W[80], t0, t1; in _sha512_compress() local 120 t1 = Sigma0(S[0]) + Maj(S[0], S[1], S[2]); in _sha512_compress() 128 S[0] = t0 + t1; in _sha512_compress() 133 t1 = Sigma0(a) + Maj(a, b, c); \ in _sha512_compress() 135 h = t0 + t1; in _sha512_compress()
|
A D | sha256.c | 73 ulong32 S[8], W[64], t0, t1; in _sha256_compress() local 98 t1 = Sigma0(a) + Maj(a, b, c); \ in _sha256_compress() 100 h = t0 + t1; in _sha256_compress() 110 t1 = Sigma0(a) + Maj(a, b, c); \ in _sha256_compress() 112 h = t0 + t1; in _sha256_compress()
|