Home
last modified time | relevance | path

Searched refs:t1 (Results 1 – 25 of 38) sorted by relevance

12

/optee_os/core/lib/libtomcrypt/src/pk/ecc/
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()
66 if ((err = mp_sqr(R->z, t1)) != CRYPT_OK) { goto done; } in ltc_ecc_projective_dbl_point()
67 if ((err = mp_montgomery_reduce(t1, modulus, mp)) != CRYPT_OK) { goto done; } 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()
84 if ((err = mp_add(t1, R->x, t1)) != CRYPT_OK) { goto done; } in ltc_ecc_projective_dbl_point()
85 if (mp_cmp(t1, modulus) != LTC_MP_LT) { in ltc_ecc_projective_dbl_point()
86 if ((err = mp_sub(t1, modulus, t1)) != 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()
[all …]
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()
58 if ((err = mp_sub(modulus, Q->y, t1)) != CRYPT_OK) { goto done; } in ltc_ecc_projective_add_point()
59 if (mp_cmp(P->y, t1) == LTC_MP_EQ) { in ltc_ecc_projective_add_point()
73 if ((err = mp_sqr(Q->z, t1)) != CRYPT_OK) { goto done; } in ltc_ecc_projective_add_point()
74 if ((err = mp_montgomery_reduce(t1, modulus, mp)) != CRYPT_OK) { goto done; } in ltc_ecc_projective_add_point()
76 if ((err = mp_mul(t1, x, x)) != CRYPT_OK) { goto done; } in ltc_ecc_projective_add_point()
79 if ((err = mp_mul(Q->z, t1, t1)) != CRYPT_OK) { goto done; } in ltc_ecc_projective_add_point()
80 if ((err = mp_montgomery_reduce(t1, modulus, mp)) != 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()
27 if ((err = mp_sqr(y, t1)) != 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()
40 if ((err = mp_addmod(t1, t2, prime, t1)) != CRYPT_OK) goto cleanup; in ltc_ecc_is_point()
43 while (mp_cmp_d(t1, 0) == LTC_MP_LT) { in ltc_ecc_is_point()
44 if ((err = mp_add(t1, prime, t1)) != CRYPT_OK) goto cleanup; in ltc_ecc_is_point()
46 while (mp_cmp(t1, prime) != LTC_MP_LT) { in ltc_ecc_is_point()
47 if ((err = mp_sub(t1, prime, t1)) != CRYPT_OK) goto cleanup; in ltc_ecc_is_point()
51 if (mp_cmp(t1, b) != LTC_MP_EQ) { in ltc_ecc_is_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()
33 …if ((err = mp_sqr(x, t1)) != CRYPT_OK) { goto cleanup;… in ltc_ecc_import_point()
34 …if ((err = mp_mulmod(t1, x, prime, t1)) != 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()
39 …if ((err = mp_add(t1, b, 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()
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()
41 if ((err = mp_invmod(P->z, modulus, t1)) != CRYPT_OK) { goto done; } in ltc_ecc_map()
44 if ((err = mp_sqr(t1, 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()
47 if ((err = mp_mod(t1, modulus, t1)) != CRYPT_OK) { goto done; } in ltc_ecc_map()
52 if ((err = mp_mul(P->y, t1, P->y)) != 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()
174 …if ((err = mp_sqr(x, t1)) != CRYPT_OK) … in ecc_recover_key()
175 …if ((err = mp_mulmod(t1, x, m, t1)) != CRYPT_OK) … in ecc_recover_key()
178 …if ((err = mp_add(t1, t2, t1)) != CRYPT_OK) … in ecc_recover_key()
180 …if ((err = mp_add(t1, b, t1)) != CRYPT_OK) … in ecc_recover_key()
182 …if ((err = mp_sqrtmod_prime(t1, m, t2)) != 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
436 fp_init(&t1); in tfm_ecc_projective_dbl_point()
455 fp_sqr(R->z, &t1); in tfm_ecc_projective_dbl_point()
456 fp_montgomery_reduce(&t1, modulus, mp); in tfm_ecc_projective_dbl_point()
468 fp_sub(R->x, &t1, &t2); in tfm_ecc_projective_dbl_point()
473 fp_add(&t1, R->x, &t1); in tfm_ecc_projective_dbl_point()
474 if (fp_cmp(&t1, modulus) != FP_LT) { in tfm_ecc_projective_dbl_point()
475 fp_sub(&t1, modulus, &t1); in tfm_ecc_projective_dbl_point()
478 fp_mul(&t1, &t2, &t2); in tfm_ecc_projective_dbl_point()
481 fp_add(&t2, &t2, &t1); in tfm_ecc_projective_dbl_point()
[all …]
H A Dgmp_desc.c287 mpz_t t1, C, Q, S, Z, M, T, R, two; in sqrtmod_prime() local
302 mpz_init(t1); mpz_init(C); mpz_init(Q); in sqrtmod_prime()
310 i = mpz_mod_ui(t1, prime, 4); /* t1 is ignored here */ in sqrtmod_prime()
312 mpz_add_ui(t1, prime, 1); in sqrtmod_prime()
313 mpz_fdiv_q_2exp(t1, t1, 2); in sqrtmod_prime()
314 mpz_powm(ret, n, t1, prime); in sqrtmod_prime()
346 mpz_add_ui(t1, Q, 1); in sqrtmod_prime()
347 mpz_fdiv_q_2exp(t1, t1, 1); in sqrtmod_prime()
349 mpz_powm(R, n, t1, prime); in sqrtmod_prime()
358 mpz_set(t1, T); in sqrtmod_prime()
[all …]
/optee_os/core/arch/riscv/kernel/
H A Dentry.S36 li t1, CFG_TEE_CORE_NB_CORE
38 bge t0, t1, unhandled_cpu
40 lw t1, stack_tmp_stride
41 mul t1, t0, t1
45 add sp, t1, t0
51 la t1, sem_cpu_sync
53 add t1, t1, t0
55 sw t2, 0(t1)
62 li t1, THREAD_CORE_LOCAL_SIZE
63 mul t2, t1, t0
[all …]
H A Darch_scall_rv.S26 mv t1, a1
35 jalr t1
/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 …]
/optee_os/ldelf/
H A Dstart_rv64.S35 ld t1, 0(a2) /* t1 = r_offset */
44 add t1, a1, t1
45 ld t4, 0(t1)
48 sd t4, 0(t1)
H A Dsyscalls_rv.S20 li t1, \num_args
/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
303 t1 = in s_rijndael_ecb_encrypt()
324 s0 = t0; s1 = t1; s2 = t2; s3 = t3; in s_rijndael_ecb_encrypt()
341 t1 = in s_rijndael_ecb_encrypt()
367 Te1(LTC_BYTE(t1, 2)) ^ in s_rijndael_ecb_encrypt()
372 Te0(LTC_BYTE(t1, 3)) ^ in s_rijndael_ecb_encrypt()
381 Te3(LTC_BYTE(t1, 0)) ^ in s_rijndael_ecb_encrypt()
386 Te2(LTC_BYTE(t1, 1)) ^ in s_rijndael_ecb_encrypt()
399 (Te4_2[LTC_BYTE(t1, 2)]) ^ in s_rijndael_ecb_encrypt()
405 (Te4_3[LTC_BYTE(t1, 3)]) ^ in s_rijndael_ecb_encrypt()
[all …]
/optee_os/core/lib/libtomcrypt/src/prngs/
H A Drng_get_bytes.c59 clock_t t1; in s_rng_ansic() local
69 t1 = XCLOCK(); while (t1 == XCLOCK()) a ^= 1; in s_rng_ansic()
70 t1 = XCLOCK(); while (t1 == XCLOCK()) b ^= 1; in s_rng_ansic()
H A Dchacha20.c187 unsigned char t1[] = { 0x59, 0xB2, 0x26, 0x95, 0x2B, 0x01, 0x8F, 0x05, 0xBE, 0xD8 }; in chacha20_prng_test()
197 …if (compare_testvector(out, 10, t1, sizeof(t1), "CHACHA-PRNG", 1)) return CRYPT_FAIL_TESTVECT… in chacha20_prng_test()
H A Dsober128.c189 unsigned char t1[] = { 0x31, 0x82, 0xA7, 0xA5, 0x8B, 0xD7, 0xCB, 0x39, 0x86, 0x1A }; in sober128_test()
199 … if (compare_testvector(out, 10, t1, sizeof(t1), "SOBER128-PRNG", 1)) return CRYPT_FAIL_TESTVECTOR; in sober128_test()
/optee_os/core/lib/libtomcrypt/src/ciphers/
H A Didea.c104 ushort16 x0, x1, x2, x3, t0, t1; in s_process_block() local
118 t1 = t0 + (x1^x3); in s_process_block()
119 MUL(t1, m_key[i*6+5]); in s_process_block()
120 t0 += t1; in s_process_block()
121 x0 ^= t1; in s_process_block()
124 x1 = x2^t1; in s_process_block()
/optee_os/core/arch/arm/crypto/
H A Dsha256_armv8a_ce_a64.S19 t1 .req v23
31 add t1.4s, v\s0\().4s, \rc\().4s
38 sha256h dg0q, dg1q, t1.4s
39 sha256h2 dg1q, dg2q, t1.4s
H A Dsha1_armv8a_ce_a64.S19 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/ciphers/twofish/
H A Dtwofish.c470 ulong32 a,b,c,d,ta,tb,tc,td,t1,t2; in s_twofish_ecb_encrypt() local
498 t1 = g_func(a, skey) + t2; in s_twofish_ecb_encrypt()
499 c = RORc(c ^ (t1 + k[0]), 1); in s_twofish_ecb_encrypt()
500 d = ROLc(d, 1) ^ (t2 + t1 + k[1]); in s_twofish_ecb_encrypt()
503 t1 = g_func(c, skey) + t2; in s_twofish_ecb_encrypt()
504 a = RORc(a ^ (t1 + k[2]), 1); 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
575 t1 = g_func(c, skey) + t2; in s_twofish_ecb_decrypt()
576 a = ROLc(a, 1) ^ (t1 + k[2]); in s_twofish_ecb_decrypt()
[all …]
/optee_os/core/arch/riscv/include/kernel/
H A Dthread_arch.h73 unsigned long t1; member
112 unsigned long t1; member
137 unsigned long t1; member
H A Darch_scall.h17 *max_args = regs->t1; in scall_get_max_args()
/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
63 t1 = in s_four_rounds()
78 s0 = t0; s1 = t1; s2 = t2; s3 = t3; in s_four_rounds()
/optee_os/core/lib/libtomcrypt/src/hashes/sha2/
H A Dsha512.c91 ulong64 S[8], W[80], t0, t1; in ss_sha512_compress() local
113 t1 = Sigma0(S[0]) + Maj(S[0], S[1], S[2]); in ss_sha512_compress()
121 S[0] = t0 + t1; in ss_sha512_compress()
126 t1 = Sigma0(a) + Maj(a, b, c); \ in ss_sha512_compress()
128 h = t0 + t1; in ss_sha512_compress()

12