Home
last modified time | relevance | path

Searched refs:t2 (Results 1 – 22 of 22) sorted by relevance

/optee_os-3.20.0/core/lib/libtomcrypt/src/pk/ecc/
A Dltc_ecc_is_point.c17 void *prime, *a, *b, *t1, *t2; in ltc_ecc_is_point() local
24 if ((err = mp_init_multi(&t1, &t2, LTC_NULL)) != CRYPT_OK) return err; in ltc_ecc_is_point()
30 if ((err = mp_sqr(x, t2)) != CRYPT_OK) goto cleanup; in ltc_ecc_is_point()
31 if ((err = mp_mod(t2, prime, t2)) != CRYPT_OK) goto cleanup; in ltc_ecc_is_point()
32 if ((err = mp_mul(x, t2, t2)) != CRYPT_OK) goto cleanup; in ltc_ecc_is_point()
35 if ((err = mp_sub(t1, t2, t1)) != CRYPT_OK) goto cleanup; in ltc_ecc_is_point()
38 if ((err = mp_submod(prime, a, prime, t2)) != CRYPT_OK) goto cleanup; in ltc_ecc_is_point()
39 if ((err = mp_mulmod(t2, x, prime, t2)) != CRYPT_OK) goto cleanup; in ltc_ecc_is_point()
40 if ((err = mp_addmod(t1, t2, prime, t1)) != CRYPT_OK) goto cleanup; in ltc_ecc_is_point()
58 mp_clear_multi(t1, t2, LTC_NULL); in ltc_ecc_is_point()
A Dltc_ecc_projective_add_point.c25 void *t1, *t2, *x, *y, *z; in ltc_ecc_projective_add_point() local
120 if ((err = mp_add(t2, t2, t2)) != CRYPT_OK) { goto done; } in ltc_ecc_projective_add_point()
122 if ((err = mp_sub(t2, modulus, t2)) != CRYPT_OK) { goto done; } in ltc_ecc_projective_add_point()
125 if ((err = mp_add(t2, x, t2)) != CRYPT_OK) { goto done; } in ltc_ecc_projective_add_point()
127 if ((err = mp_sub(t2, modulus, t2)) != CRYPT_OK) { goto done; } in ltc_ecc_projective_add_point()
148 if ((err = mp_mul(t2, x, t2)) != CRYPT_OK) { goto done; } in ltc_ecc_projective_add_point()
164 if ((err = mp_sub(t2, x, t2)) != CRYPT_OK) { goto done; } in ltc_ecc_projective_add_point()
166 if ((err = mp_add(t2, modulus, t2)) != CRYPT_OK) { goto done; } in ltc_ecc_projective_add_point()
169 if ((err = mp_sub(t2, x, t2)) != CRYPT_OK) { goto done; } in ltc_ecc_projective_add_point()
171 if ((err = mp_add(t2, modulus, t2)) != CRYPT_OK) { goto done; } in ltc_ecc_projective_add_point()
[all …]
A Dltc_ecc_projective_dbl_point.c42 void *t1, *t2; in ltc_ecc_projective_dbl_point() local
50 if ((err = mp_init_multi(&t1, &t2, LTC_NULL)) != CRYPT_OK) { in ltc_ecc_projective_dbl_point()
79 if ((err = mp_sub(R->x, t1, t2)) != CRYPT_OK) { goto done; } in ltc_ecc_projective_dbl_point()
80 if (mp_cmp_d(t2, 0) == LTC_MP_LT) { in ltc_ecc_projective_dbl_point()
81 if ((err = mp_add(t2, modulus, t2)) != CRYPT_OK) { goto done; } in ltc_ecc_projective_dbl_point()
89 if ((err = mp_mul(t1, t2, t2)) != CRYPT_OK) { goto done; } in ltc_ecc_projective_dbl_point()
92 if ((err = mp_add(t2, t2, t1)) != CRYPT_OK) { goto done; } in ltc_ecc_projective_dbl_point()
141 if (mp_isodd(t2)) { in ltc_ecc_projective_dbl_point()
142 if ((err = mp_add(t2, modulus, t2)) != CRYPT_OK) { goto done; } in ltc_ecc_projective_dbl_point()
144 if ((err = mp_div_2(t2, t2)) != CRYPT_OK) { goto done; } in ltc_ecc_projective_dbl_point()
[all …]
A Dltc_ecc_import_point.c12 void *t1, *t2; in ltc_ecc_import_point() local
15 if (mp_init_multi(&t1, &t2, LTC_NULL) != CRYPT_OK) { in ltc_ecc_import_point()
36 …if ((err = mp_mulmod(a, x, prime, t2)) != CRYPT_OK) { goto cleanup;… in ltc_ecc_import_point()
37 …if ((err = mp_add(t1, t2, t1)) != CRYPT_OK) { goto cleanup;… in ltc_ecc_import_point()
41 …if ((err = mp_sqrtmod_prime(t1, prime, t2)) != CRYPT_OK) { goto cleanup;… in ltc_ecc_import_point()
43 if ((mp_isodd(t2) && in[0] == 0x03) || (!mp_isodd(t2) && in[0] == 0x02)) { in ltc_ecc_import_point()
44 … if ((err = mp_mod(t2, prime, y)) != CRYPT_OK) { goto cleanup; } in ltc_ecc_import_point()
47 … if ((err = mp_submod(prime, t2, prime, y)) != CRYPT_OK) { goto cleanup; } in ltc_ecc_import_point()
57 mp_clear_multi(t1, t2, LTC_NULL); in ltc_ecc_import_point()
A Dltc_ecc_map.c22 void *t1, *t2; in ltc_ecc_map() local
33 if ((err = mp_init_multi(&t1, &t2, LTC_NULL)) != CRYPT_OK) { in ltc_ecc_map()
44 if ((err = mp_sqr(t1, t2)) != CRYPT_OK) { goto done; } in ltc_ecc_map()
45 if ((err = mp_mod(t2, modulus, t2)) != CRYPT_OK) { goto done; } in ltc_ecc_map()
46 if ((err = mp_mul(t1, t2, t1)) != CRYPT_OK) { goto done; } in ltc_ecc_map()
50 if ((err = mp_mul(P->x, t2, P->x)) != CRYPT_OK) { goto done; } in ltc_ecc_map()
58 mp_clear_multi(t1, t2, LTC_NULL); in ltc_ecc_map()
A Decc_recover_key.c32 void *r, *s, *v, *w, *t1, *t2, *u1, *u2, *v1, *v2, *e, *x, *y, *a_plus3; in ecc_recover_key() local
49 …if ((err = mp_init_multi(&r, &s, &v, &w, &t1, &t2, &u1, &u2, &v1, &v2, &e, &x, &y, &a_plus3, LTC_N… in ecc_recover_key()
177 …if ((err = mp_mulmod(a, x, m, t2)) != CRYPT_OK) … in ecc_recover_key()
178 …if ((err = mp_add(t1, t2, t1)) != CRYPT_OK) … in ecc_recover_key()
182 …if ((err = mp_sqrtmod_prime(t1, m, t2)) != CRYPT_OK) … in ecc_recover_key()
186 if ((mp_isodd(t2) && (recid%2)) || (!mp_isodd(t2) && !(recid%2))) { in ecc_recover_key()
187 …if ((err = mp_mod(t2, m, mR->y)) != CRYPT_OK) … in ecc_recover_key()
190 …if ((err = mp_submod(m, t2, m, mR->y)) != CRYPT_OK) … in ecc_recover_key()
255 mp_clear_multi(a_plus3, y, x, e, v2, v1, u2, u1, t2, t1, w, v, s, r, LTC_NULL); in ecc_recover_key()
/optee_os-3.20.0/core/lib/libtomcrypt/src/math/
A Dtfm_desc.c478 fp_mul(&t1, &t2, &t2); in tfm_ecc_projective_dbl_point()
481 fp_add(&t2, &t2, &t1); in tfm_ecc_projective_dbl_point()
531 fp_add(&t2, modulus, &t2); in tfm_ecc_projective_dbl_point()
533 fp_div_2(&t2, &t2); in tfm_ecc_projective_dbl_point()
678 fp_add(&t2, &t2, &t2); in tfm_ecc_projective_add_point()
680 fp_sub(&t2, modulus, &t2); in tfm_ecc_projective_add_point()
683 fp_add(&t2, &x, &t2); in tfm_ecc_projective_add_point()
706 fp_mul(&t2, &x, &t2); in tfm_ecc_projective_add_point()
722 fp_sub(&t2, &x, &t2); in tfm_ecc_projective_add_point()
727 fp_sub(&t2, &x, &t2); in tfm_ecc_projective_add_point()
[all …]
/optee_os-3.20.0/lib/libutee/include/
A Dutee_defines.h276 #define TEE_TIME_LT(t1, t2) \ argument
277 (((t1).seconds == (t2).seconds) ? \
278 ((t1).millis < (t2).millis) : \
279 ((t1).seconds < (t2).seconds))
281 #define TEE_TIME_LE(t1, t2) \ argument
282 (((t1).seconds == (t2).seconds) ? \
283 ((t1).millis <= (t2).millis) : \
284 ((t1).seconds <= (t2).seconds))
286 #define TEE_TIME_ADD(t1, t2, dst) do { \ argument
287 (dst).seconds = (t1).seconds + (t2).seconds; \
[all …]
A Dtee_api_defines.h580 #define TEE_PARAM_TYPES(t0,t1,t2,t3) \ argument
581 ((t0) | ((t1) << 4) | ((t2) << 8) | ((t3) << 12))
/optee_os-3.20.0/ldelf/
A Dstart_rv64.S36 ld t2, 8(a2) /* t2 = r_info */
39 and t2, t2, 0xff
41 bne t2, t4, 3f
/optee_os-3.20.0/core/tee/
A Dtee_time_generic.c71 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-3.20.0/core/lib/libtomcrypt/src/ciphers/aes/
A Daes.c323 t2 = in s_rijndael_ecb_encrypt()
361 t2 = in s_rijndael_ecb_encrypt()
382 Te2(LTC_BYTE(t2, 1)) ^ in s_rijndael_ecb_encrypt()
387 Te1(LTC_BYTE(t2, 2)) ^ in s_rijndael_ecb_encrypt()
392 Te0(LTC_BYTE(t2, 3)) ^ in s_rijndael_ecb_encrypt()
401 Te3(LTC_BYTE(t2, 0)) ^ in s_rijndael_ecb_encrypt()
414 (Te4_1[LTC_BYTE(t2, 1)]) ^ in s_rijndael_ecb_encrypt()
420 (Te4_2[LTC_BYTE(t2, 2)]) ^ in s_rijndael_ecb_encrypt()
426 (Te4_3[LTC_BYTE(t2, 3)]) ^ in s_rijndael_ecb_encrypt()
506 t2 = in s_rijndael_ecb_decrypt()
[all …]
/optee_os-3.20.0/core/lib/libtomcrypt/src/ciphers/twofish/
A Dtwofish.c470 ulong32 a,b,c,d,ta,tb,tc,td,t1,t2; in s_twofish_ecb_encrypt() local
497 t2 = g1_func(b, skey); in s_twofish_ecb_encrypt()
498 t1 = g_func(a, skey) + t2; in s_twofish_ecb_encrypt()
502 t2 = g1_func(d, skey); in s_twofish_ecb_encrypt()
503 t1 = g_func(c, skey) + t2; in s_twofish_ecb_encrypt()
544 ulong32 a,b,c,d,ta,tb,tc,td,t1,t2; in s_twofish_ecb_decrypt() local
574 t2 = g1_func(d, skey); in s_twofish_ecb_decrypt()
575 t1 = g_func(c, skey) + t2; in s_twofish_ecb_decrypt()
577 b = RORc(b ^ (t2 + t1 + k[3]), 1); in s_twofish_ecb_decrypt()
579 t2 = g1_func(b, skey); in s_twofish_ecb_decrypt()
[all …]
/optee_os-3.20.0/core/arch/riscv/include/kernel/
A Dthread_arch.h54 unsigned long t2; member
82 unsigned long t2; member
/optee_os-3.20.0/core/lib/libtomcrypt/src/mac/pelican/
A Dpelican.c50 ulong32 s0, s1, s2, s3, t0, t1, t2, t3; in s_four_rounds() local
68 t2 = in s_four_rounds()
78 s0 = t0; s1 = t1; s2 = t2; s3 = t3; in s_four_rounds()
/optee_os-3.20.0/core/lib/libtomcrypt/src/prngs/
A Dchacha20.c188 unsigned char t2[] = { 0x47, 0xC9, 0x0D, 0x03, 0xE4, 0x75, 0x34, 0x27, 0xBD, 0xDE }; in chacha20_prng_test()
205 …if (compare_testvector(out, 10, t2, sizeof(t2), "CHACHA-PRNG", 2)) return CRYPT_FAIL_TESTVECT… in chacha20_prng_test()
A Dsober128.c190 unsigned char t2[] = { 0x6B, 0x43, 0x9E, 0xBC, 0xE7, 0x62, 0x9B, 0xE6, 0x9B, 0x83 }; in sober128_test()
207 … if (compare_testvector(out, 10, t2, sizeof(t2), "SOBER128-PRNG", 2)) return CRYPT_FAIL_TESTVECTOR; in sober128_test()
A Drc4.c191 unsigned char t2[] = { 0xEF, 0x80, 0xA2, 0xE6, 0x50, 0x91, 0xF3, 0x17, 0x4A, 0x8A }; in rc4_test()
208 if (compare_testvector(out, 10, t2, sizeof(t2), "RC4-PRNG", 2)) return CRYPT_FAIL_TESTVECTOR; in rc4_test()
/optee_os-3.20.0/core/arch/arm/crypto/
A Daes_modes_armv8a_ce_a64.S100 .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
A Dghash-ce-core_a32.S114 veor t2l, t2l, t2h @ t2 = (N) (P4 + P5) << 24
/optee_os-3.20.0/core/drivers/
A Dversal_trng.c331 unsigned char t2 = 0; in setup_key() local
337 t2 = schedule[i - 2]; in setup_key()
340 rota4(&t0, &t1, &t2, &t3); in setup_key()
344 sbox4(&t0, &t1, &t2, &t3); in setup_key()
349 schedule[i + 2] = schedule[ik + 2] ^ t2; in setup_key()
/optee_os-3.20.0/core/lib/libtomcrypt/src/hashes/
A Dtiger.c32 #define t2 (table+256) macro
555 … *a -= t1[LTC_BYTE(tmp, 0)] ^ t2[LTC_BYTE(tmp, 2)] ^ t3[LTC_BYTE(tmp, 4)] ^ t4[LTC_BYTE(tmp, 6)]; in tiger_round()
556 …tmp = (*b += t4[LTC_BYTE(tmp, 1)] ^ t3[LTC_BYTE(tmp, 3)] ^ t2[LTC_BYTE(tmp,5)] ^ t1[LTC_BYTE(tmp,7… in tiger_round()

Completed in 27 milliseconds