Home
last modified time | relevance | path

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

12

/optee_os/core/lib/libtomcrypt/src/pk/ecc/
H A Dltc_ecc_projective_add_point.c25 void *t1, *t2, *x, *y, *z; in ltc_ecc_projective_add_point() local
34 if ((err = mp_init_multi(&t1, &t2, &x, &y, &z, LTC_NULL)) != CRYPT_OK) { in ltc_ecc_projective_add_point()
55 mp_clear_multi(t1, t2, x, y, z, LTC_NULL); in ltc_ecc_projective_add_point()
90 if ((err = mp_mul(Q->x, t1, t2)) != 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()
115 if ((err = mp_sub(x, t2, x)) != CRYPT_OK) { goto done; } in ltc_ecc_projective_add_point()
120 if ((err = mp_add(t2, t2, t2)) != CRYPT_OK) { goto done; } in ltc_ecc_projective_add_point()
121 if (mp_cmp(t2, modulus) != LTC_MP_LT) { 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()
[all …]
H 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()
H 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()
90 if ((err = mp_montgomery_reduce(t2, modulus, mp)) != 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()
97 if ((err = mp_add(t1, t2, t1)) != CRYPT_OK) { goto done; } in ltc_ecc_projective_dbl_point()
104 if ((err = mp_sqr(t1, t2)) != CRYPT_OK) { goto done; } in ltc_ecc_projective_dbl_point()
[all …]
H 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()
H 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()
H 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/core/lib/libtomcrypt/src/math/
H A Dtfm_desc.c425 fp_int t1, t2; in tfm_ecc_projective_dbl_point() local
437 fp_init(&t2); in tfm_ecc_projective_dbl_point()
468 fp_sub(R->x, &t1, &t2); in tfm_ecc_projective_dbl_point()
469 if (fp_cmp_d(&t2, 0) == LTC_MP_LT) { in tfm_ecc_projective_dbl_point()
470 fp_add(&t2, modulus, &t2); in tfm_ecc_projective_dbl_point()
478 fp_mul(&t1, &t2, &t2); in tfm_ecc_projective_dbl_point()
479 fp_montgomery_reduce(&t2, modulus, mp); in tfm_ecc_projective_dbl_point()
481 fp_add(&t2, &t2, &t1); in tfm_ecc_projective_dbl_point()
486 fp_add(&t1, &t2, &t1); in tfm_ecc_projective_dbl_point()
493 fp_sqr(&t1, &t2); in tfm_ecc_projective_dbl_point()
[all …]
/optee_os/core/arch/riscv/kernel/
H A Dentry.S42 la t2, stack_tmp_rel
43 lw t0, 0(t2)
44 add t0, t0, t2
54 li t2, SEM_CPU_READY
55 sw t2, 0(t1)
63 mul t2, t1, t0
66 add tp, tp, t2
75 li t2, SEM_CPU_READY
79 bne t1, t2, 1b
87 li t2, SEM_CPU_READY
[all …]
H A Dabort.c105 EMSG_RAW("t2\t%016" PRIxPTR " s0\t%016" PRIxPTR, in __print_abort_info()
106 ai->regs->t2, ai->regs->s0); in __print_abort_info()
/optee_os/lib/libutee/include/
H A Dutee_defines.h320 #define TEE_TIME_LT(t1, t2) \ argument
321 (((t1).seconds == (t2).seconds) ? \
322 ((t1).millis < (t2).millis) : \
323 ((t1).seconds < (t2).seconds))
325 #define TEE_TIME_LE(t1, t2) \ argument
326 (((t1).seconds == (t2).seconds) ? \
327 ((t1).millis <= (t2).millis) : \
328 ((t1).seconds <= (t2).seconds))
330 #define TEE_TIME_ADD(t1, t2, dst) do { \ argument
331 (dst).seconds = (t1).seconds + (t2).seconds; \
[all …]
H A Dtee_api_defines.h675 #define TEE_PARAM_TYPES(t0,t1,t2,t3) \ argument
676 ((t0) | ((t1) << 4) | ((t2) << 8) | ((t3) << 12))
/optee_os/core/lib/libtomcrypt/src/ciphers/aes/
H A Daes.c269 ulong32 s0, s1, s2, s3, t0, t1, t2, t3; in s_rijndael_ecb_encrypt() local
309 t2 = in s_rijndael_ecb_encrypt()
324 s0 = t0; s1 = t1; s2 = t2; s3 = t3; in s_rijndael_ecb_encrypt()
347 t2 = in s_rijndael_ecb_encrypt()
368 Te2(LTC_BYTE(t2, 1)) ^ in s_rijndael_ecb_encrypt()
373 Te1(LTC_BYTE(t2, 2)) ^ in s_rijndael_ecb_encrypt()
378 Te0(LTC_BYTE(t2, 3)) ^ in s_rijndael_ecb_encrypt()
387 Te3(LTC_BYTE(t2, 0)) ^ in s_rijndael_ecb_encrypt()
400 (Te4_1[LTC_BYTE(t2, 1)]) ^ in s_rijndael_ecb_encrypt()
406 (Te4_2[LTC_BYTE(t2, 2)]) ^ in s_rijndael_ecb_encrypt()
[all …]
/optee_os/core/tee/
H A Dtee_time_generic.c70 TEE_Time t2; in tee_time_get_ta_time() local
81 TEE_TIME_ADD(t, *offs, t2); in tee_time_get_ta_time()
84 if (TEE_TIME_LT(t2, t)) in tee_time_get_ta_time()
87 TEE_TIME_SUB(t, *offs, t2); in tee_time_get_ta_time()
90 if (TEE_TIME_LE(t, t2)) in tee_time_get_ta_time()
93 *time = t2; in tee_time_get_ta_time()
/optee_os/ldelf/
H A Dstart_rv64.S36 ld t2, 8(a2) /* t2 = r_info */
39 and t2, t2, 0xff
41 bne t2, t4, 3f
/optee_os/core/lib/libtomcrypt/src/ciphers/twofish/
H 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()
500 d = ROLc(d, 1) ^ (t2 + t1 + k[1]); 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()
505 b = ROLc(b, 1) ^ (t2 + t1 + k[3]); 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()
[all …]
/optee_os/core/arch/riscv/include/kernel/
H A Dthread_arch.h74 unsigned long t2; member
113 unsigned long t2; member
138 unsigned long t2; member
/optee_os/core/lib/libtomcrypt/src/mac/pelican/
H 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/core/lib/libtomcrypt/src/prngs/
H 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()
H 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()
H 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/lib/libmbedtls/mbedtls/library/
H A Dx509.c1037 const mbedtls_x509_time *t2) in mbedtls_x509_time_cmp() argument
1042 ((t2->year << 9) | (t2->mon << 5) | (t2->day))); in mbedtls_x509_time_cmp()
1048 ((t2->hour << 12) | (t2->min << 6) | (t2->sec))); in mbedtls_x509_time_cmp()
/optee_os/core/arch/arm/crypto/
H A Daes_modes_armv8a_ce_a64.S100 .macro encrypt_block, in, rounds, t0, t1, t2 argument
104 .macro encrypt_block2x, i0, i1, rounds, t0, t1, t2 argument
108 .macro encrypt_block4x, i0, i1, i2, i3, rounds, t0, t1, t2 argument
112 .macro decrypt_block, in, rounds, t0, t1, t2 argument
116 .macro decrypt_block2x, i0, i1, rounds, t0, t1, t2 argument
120 .macro decrypt_block4x, i0, i1, i2, i3, rounds, t0, t1, t2 argument
/optee_os/lib/libmbedtls/mbedtls/include/mbedtls/
H A Dx509.h386 int mbedtls_x509_time_cmp(const mbedtls_x509_time *t1, const mbedtls_x509_time *t2);
/optee_os/core/drivers/
H 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/core/lib/libtomcrypt/src/hashes/
H A Dtiger.c50 #define t2 (table+256) macro
573 … *a -= t1[LTC_BYTE(tmp, 0)] ^ t2[LTC_BYTE(tmp, 2)] ^ t3[LTC_BYTE(tmp, 4)] ^ t4[LTC_BYTE(tmp, 6)]; in tiger_round()
574 …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()

12