Home
last modified time | relevance | path

Searched refs:j (Results 1 – 25 of 88) sorted by relevance

1234

/optee_os/lib/libutils/isoc/newlib/
H A Dstr-two-way.h128 size_t j; /* Index into NEEDLE for current candidate suffix. */ in critical_factorization() local
144 j = 0; in critical_factorization()
146 while (j + k < needle_len) in critical_factorization()
148 a = CANON_ELEMENT (needle[j + k]); in critical_factorization()
153 j += k; in critical_factorization()
155 p = j - max_suffix; in critical_factorization()
164 j += p; in critical_factorization()
171 max_suffix = j++; in critical_factorization()
179 j = 0; in critical_factorization()
181 while (j + k < needle_len) in critical_factorization()
[all …]
H A Dstrchr.c104 unsigned long mask,j; variable
138 for (j = 8; j < LBLOCKSIZE * 8; j <<= 1)
139 mask = (mask << j) | mask;
/optee_os/core/lib/libtomcrypt/src/pk/asn1/oid/
H A Dpk_oid_str.c8 unsigned long i, j, limit, oid_j; in pk_oid_str_to_num() local
22 for (i = 0, j = 0; i < OID_len; i++) { in pk_oid_str_to_num()
24 if (++j >= limit) continue; in pk_oid_str_to_num()
27 if ((j >= limit) || (oid == NULL)) continue; in pk_oid_str_to_num()
28 oid_j = oid[j]; in pk_oid_str_to_num()
29 oid[j] = oid[j] * 10 + (OID[i] - '0'); in pk_oid_str_to_num()
30 if (oid[j] < oid_j) return CRYPT_OVERFLOW; in pk_oid_str_to_num()
36 if (j == 0) return CRYPT_ERROR; in pk_oid_str_to_num()
37 if (j >= limit) { in pk_oid_str_to_num()
38 *oidlen = j; in pk_oid_str_to_num()
[all …]
/optee_os/core/lib/libtomcrypt/src/misc/pkcs12/
H A Dpkcs12_kdf.c21 unsigned int tmp, i, j, n; in pkcs12_kdf() local
44 for (j = 1; j < iterations; j++) { in pkcs12_kdf()
49 for (j = 0; j < v; j++) B[j] = A[j % Alen]; in pkcs12_kdf()
51 for (j = v; j > 0; j--) { in pkcs12_kdf()
52 if (++B[j - 1] != 0) break; in pkcs12_kdf()
57 for (j = v; j > 0; j--) { in pkcs12_kdf()
58 tmp = I[n * v + j - 1] + B[j - 1] + ch; in pkcs12_kdf()
60 I[n * v + j - 1] = (unsigned char)(tmp & 0xFF); in pkcs12_kdf()
/optee_os/core/lib/libtomcrypt/src/hashes/
H A Dmd2.c54 int j; in s_md2_update_chksum() local
57 for (j = 0; j < 16; j++) { in s_md2_update_chksum()
62 L = (md->md2.chksum[j] ^= PI_SUBST[(int)(md->md2.buf[j] ^ L)] & 255); in s_md2_update_chksum()
68 int j, k; in s_md2_compress() local
72 for (j = 0; j < 16; j++) { in s_md2_compress()
73 md->md2.X[16+j] = md->md2.buf[j]; in s_md2_compress()
74 md->md2.X[32+j] = md->md2.X[j] ^ md->md2.X[16+j]; in s_md2_compress()
80 for (j = 0; j < 18; j++) { in s_md2_compress()
84 t = (t + (unsigned char)j) & 255; in s_md2_compress()
H A Dsha3.c159 int i, j, round; in s_keccakf() local
169 for(j = 0; j < 25; j += 5) { in s_keccakf()
170 s[j + i] ^= t; in s_keccakf()
176 j = s_keccakf_piln[i]; in s_keccakf()
177 bc[0] = s[j]; in s_keccakf()
178 s[j] = ROL64(t, s_keccakf_rotc[i]); in s_keccakf()
182 for(j = 0; j < 25; j += 5) { in s_keccakf()
184 bc[i] = s[j + i]; in s_keccakf()
187 s[j + i] ^= (~bc[(i + 1) % 5]) & bc[(i + 2) % 5]; in s_keccakf()
/optee_os/core/crypto/
H A Dsm3.c74 int j; in sm3_process() local
76 for (j = 0; j < 16; j++) in sm3_process()
77 T[j] = 0x79CC4519; in sm3_process()
78 for (j = 16; j < 64; j++) in sm3_process()
79 T[j] = 0x7A879D8A; in sm3_process()
107 for (j = 16; j < 68; j++) { in sm3_process()
113 Temp1 = W[j - 16] ^ W[j - 9]; in sm3_process()
114 Temp2 = ROTL(W[j - 3], 15); in sm3_process()
117 Temp5 = ROTL(W[j - 13], 7) ^ W[j - 6]; in sm3_process()
118 W[j] = Temp4 ^ Temp5; in sm3_process()
[all …]
H A Daes-gcm-ghash-tbl.c51 int i, j; in internal_aes_gcm_ghash_gen_tbl() local
85 for (j = 1; j < i; j++) { in internal_aes_gcm_ghash_gen_tbl()
86 HiH[j] = vh ^ ghash_key->HH[j]; in internal_aes_gcm_ghash_gen_tbl()
87 HiL[j] = vl ^ ghash_key->HL[j]; in internal_aes_gcm_ghash_gen_tbl()
/optee_os/core/arch/arm/plat-hikey/
H A Dspi_test.c75 size_t i, j, len = 3; in spi_test_with_manual_cs_control() local
103 for (j = 0; j < 10; j++) { in spi_test_with_manual_cs_control()
104 DMSG("SPI test loop: %zu", j); in spi_test_with_manual_cs_control()
121 for (j = 10; j < 20; j++) { in spi_test_with_manual_cs_control()
122 DMSG("SPI test loop: %zu", j); in spi_test_with_manual_cs_control()
140 for (j = 20; j < 30; j++) { in spi_test_with_manual_cs_control()
141 DMSG("SPI test loop: %zu", j); in spi_test_with_manual_cs_control()
164 size_t i, j, len = 3; in spi_test_with_registered_cs_cb() local
186 for (j = 0; j < 20; j++) { in spi_test_with_registered_cs_cb()
187 DMSG("SPI test loop: %zu", j); in spi_test_with_registered_cs_cb()
[all …]
/optee_os/core/lib/libtomcrypt/src/pk/ecc/
H A Dltc_ecc_mulmod.c29 int i, j, err, inf; in ltc_ecc_mulmod() local
62 for (j = 0; j < i; j++) { in ltc_ecc_mulmod()
63 ltc_ecc_del_point(M[j]); in ltc_ecc_mulmod()
92 for (j = 9; j < 16; j++) { in ltc_ecc_mulmod()
93 if ((err = ltc_mp.ecc_ptadd(M[j-9], tG, M[j-8], ma, modulus, mp)) != CRYPT_OK) { goto done; } in ltc_ecc_mulmod()
145 for (j = 0; j < WINSIZE; j++) { in ltc_ecc_mulmod()
161 for (j = 0; j < bitcpy; j++) { in ltc_ecc_mulmod()
/optee_os/core/arch/riscv/kernel/
H A Dthread_optee_abi_rv.S180 j thread_return_to_udomain
193 j thread_return_to_udomain
208 j thread_return_to_udomain
221 j vector_std_abi_entry
222 j vector_fast_abi_entry
223 j .
224 j .
225 j .
226 j .
227 j vector_fiq_entry
[all …]
/optee_os/core/lib/libtomcrypt/src/ciphers/safer/
H A Dsafer.c106 { unsigned int i, j, k; in s_safer_expand_userkey() local
117 for (j = 0; j < LTC_SAFER_BLOCK_LEN; j++) { in s_safer_expand_userkey()
118 ka[j] = ROL8(userkey_1[j], 5); in s_safer_expand_userkey()
119 ka[LTC_SAFER_BLOCK_LEN] ^= ka[j]; in s_safer_expand_userkey()
120 kb[j] = *key++ = userkey_2[j]; in s_safer_expand_userkey()
121 kb[LTC_SAFER_BLOCK_LEN] ^= kb[j]; in s_safer_expand_userkey()
124 for (j = 0; j < LTC_SAFER_BLOCK_LEN + 1; j++) { in s_safer_expand_userkey()
125 ka[j] = ROL8(ka[j], 6); in s_safer_expand_userkey()
126 kb[j] = ROL8(kb[j], 6); in s_safer_expand_userkey()
132 for (j = 0; j < LTC_SAFER_BLOCK_LEN; j++) { in s_safer_expand_userkey()
[all …]
/optee_os/lib/libutee/
H A Dtcb.c93 size_t j = 0; in __utee_tcb_init() local
98 for (j = 0; j < dlpi->dlpi_phnum; j++) { in __utee_tcb_init()
99 phdr = dlpi->dlpi_phdr + j; in __utee_tcb_init()
132 for (j = 0; j < dlpi->dlpi_phnum; j++) { in __utee_tcb_init()
133 phdr = dlpi->dlpi_phdr + j; in __utee_tcb_init()
/optee_os/core/lib/libtomcrypt/src/encauth/gcm/
H A Dgcm_gf_mult.c111 int i, j, k, u; in gcm_gf_mult() local
164 for (j = 0; j < (int)(WPV-1); j++) { in gcm_gf_mult()
166 u = (pB[j] >> ((i^1)<<2)) & 15; in gcm_gf_mult()
170 tmp[k+j] ^= B[u][k]; in gcm_gf_mult()
175 for (z = j = 0; j < (int)(32 / sizeof(LTC_FAST_TYPE)); j++) { in gcm_gf_mult()
176 zz = tmp[j] << (BPD-4); in gcm_gf_mult()
177 tmp[j] = (tmp[j] >> 4) | z; in gcm_gf_mult()
/optee_os/core/drivers/
H A Dstm32_hsem.c76 unsigned int j = 0; in apply_rif_config() local
135 for (j = 0; j < HSEM_NB_SEM_PER_GROUP; j++) in apply_rif_config()
136 if (hsem_d->conf_data.cid_confs[j + grp_idx] != in apply_rif_config()
148 for (j = 0; j < HSEM_NB_PROC; j++) { in apply_rif_config()
149 uint32_t proc_cid = hsem_d->rif_proc_conf[j] >> in apply_rif_config()
156 BIT(j + HSEM_GpCIDCFGR_SEM_WLIST_SHIFT); in apply_rif_config()
H A Dffa_console.c28 size_t j = 0; in copy_buf_to_args() local
32 for (i = 0, j = 0; j < len; i++, j += reg_size) in copy_buf_to_args()
33 memcpy(&args->a2 + i, buf + j, MIN(len - j, reg_size)); in copy_buf_to_args()
/optee_os/core/lib/libtomcrypt/src/pk/ec25519/
H A Dtweetnacl.c71 int i,j,b; in pack25519() local
77 FOR(j,2) { in pack25519()
130 i64 i,j,t[31]; in M() local
132 FOR(i,16) FOR(j,16) t[i+j]+=a[i]*b[j]; in M()
351 i64 i,j; in modL() local
355 for (j = i - 32;j < i - 12;++j) { in modL()
356 x[j] += carry - 16 * x[i] * L[j - (i - 32)]; in modL()
357 carry = (x[j] + 128) >> 8; in modL()
358 x[j] -= carry << 8; in modL()
360 x[j] += carry; in modL()
[all …]
/optee_os/core/lib/libtomcrypt/src/stream/salsa20/
H A Dsalsa20_crypt.c52 unsigned long i, j; in salsa20_crypt() local
62 j = MIN(st->ksleft, inlen); in salsa20_crypt()
63 for (i = 0; i < j; ++i, st->ksleft--) out[i] = in[i] ^ st->kstream[64 - st->ksleft]; in salsa20_crypt()
64 inlen -= j; in salsa20_crypt()
66 out += j; in salsa20_crypt()
67 in += j; in salsa20_crypt()
/optee_os/core/lib/libtomcrypt/src/stream/chacha/
H A Dchacha_crypt.c51 unsigned long i, j; in chacha_crypt() local
61 j = MIN(st->ksleft, inlen); in chacha_crypt()
62 for (i = 0; i < j; ++i, st->ksleft--) out[i] = in[i] ^ st->kstream[64 - st->ksleft]; in chacha_crypt()
63 inlen -= j; in chacha_crypt()
65 out += j; in chacha_crypt()
66 in += j; in chacha_crypt()
/optee_os/core/lib/libtomcrypt/src/stream/rc4/
H A Drc4_stream.c19 unsigned long j; in rc4_stream_setup() local
30 for (j = x = y = 0; x < 256; x++) { in rc4_stream_setup()
31 y = (y + s[x] + key[j++]) & 255; in rc4_stream_setup()
32 if (j == keylen) { in rc4_stream_setup()
33 j = 0; in rc4_stream_setup()
/optee_os/core/lib/zlib/
H A Dzutil.c166 uInt j; local
168 for (j = 0; j < len; j++) {
169 if (s1[j] != s2[j]) return 2*(s1[j] > s2[j])-1;
/optee_os/lib/libmbedtls/mbedtls/library/
H A Daria.c325 uint8_t i, j; in aria_rot128() local
331 j = (n / 32) % 4; // initial word offset in aria_rot128()
332 t = ARIA_P3(b[j]); // big endian in aria_rot128()
334 j = (j + 1) % 4; // get next word, big endian in aria_rot128()
335 u = ARIA_P3(b[j]); in aria_rot128()
412 int i, j, k, ret; in mbedtls_aria_setkey_dec() local
420 for (i = 0, j = ctx->nr; i < j; i++, j--) { in mbedtls_aria_setkey_dec()
423 ctx->rk[i][k] = ctx->rk[j][k]; in mbedtls_aria_setkey_dec()
424 ctx->rk[j][k] = t; in mbedtls_aria_setkey_dec()
819 size_t j; in mbedtls_aria_self_test() local
[all …]
/optee_os/core/tee/
H A Dtee_cryp_pbkdf2.c33 size_t i, j; in pbkdf2_f() local
65 for (j = 0; j < len; j++) in pbkdf2_f()
66 out[j] ^= u[j]; in pbkdf2_f()
/optee_os/core/lib/libtomcrypt/src/ciphers/
H A Drc5.c51 ulong32 L[64], *S, A, B, i, j, v, s, t, l; in s_rc5_setup() local
74 for (A = i = j = 0; i < (ulong32)keylen; ) { in s_rc5_setup()
77 L[j++] = BSWAP(A); in s_rc5_setup()
84 L[j++] = BSWAP(A); in s_rc5_setup()
92 s = 3 * MAX(t, j); in s_rc5_setup()
93 l = j; in s_rc5_setup()
94 for (A = B = i = j = v = 0; v < s; v++) { in s_rc5_setup()
96 B = L[j] = ROL(L[j] + A + B, (A+B)); in s_rc5_setup()
98 if (++j == l) { j = 0; } in s_rc5_setup()
/optee_os/core/lib/libtomcrypt/src/modes/xts/
H A Dxts_test.c198 int i, j, k, err, idx; in xts_test()
216 for (j = 0; j < 2; j++) { in xts_test()
222 if ((j == 1) && ((tests[i].PTLEN < 32) || (tests[i].PTLEN % 32))) { in xts_test()
225 if ((k > 0) && (j == 1)) { in xts_test()
240 if (j == 0) { in xts_test()
265 if (j == 0) { in xts_test()

1234