Home
last modified time | relevance | path

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

123

/optee_os/lib/libutils/isoc/newlib/
A Dstr-two-way.h144 j = 0; in critical_factorization()
153 j += k; in critical_factorization()
164 j += p; in critical_factorization()
179 j = 0; in critical_factorization()
188 j += k; in critical_factorization()
199 j += p; in critical_factorization()
251 j = 0; in two_way_short_needle()
285 j = 0; in two_way_short_needle()
356 j = 0; in two_way_long_needle()
372 j += shift; in two_way_long_needle()
[all …]
A Dstrchr.c103 unsigned long mask,j; variable
137 for (j = 8; j < LBLOCKSIZE * 8; j <<= 1)
138 mask = (mask << j) | mask;
/optee_os/core/lib/libtomcrypt/src/pk/asn1/oid/
A Dpk_oid_str.c34 oid_j = oid[j]; in pk_oid_str_to_num()
35 oid[j] = oid[j] * 10 + (OID[i] - '0'); in pk_oid_str_to_num()
43 if (j >= limit) { in pk_oid_str_to_num()
44 *oidlen = j; in pk_oid_str_to_num()
47 *oidlen = j + 1; in pk_oid_str_to_num()
54 unsigned long j, k; in pk_oid_num_to_str() local
62 j = oid[i]; in pk_oid_num_to_str()
63 if (j == 0) { in pk_oid_num_to_str()
68 while (j > 0) { in pk_oid_num_to_str()
71 j /= 10; in pk_oid_num_to_str()
[all …]
/optee_os/core/crypto/
A Dsm3.c55 int j; in sm3_process() local
57 for (j = 0; j < 16; j++) in sm3_process()
59 for (j = 16; j < 64; j++) in sm3_process()
91 for (j = 16; j < 68; j++) { in sm3_process()
97 Temp1 = W[j - 16] ^ W[j - 9]; in sm3_process()
101 Temp5 = ROTL(W[j - 13], 7) ^ W[j - 6]; in sm3_process()
105 for (j = 0; j < 64; j++) in sm3_process()
106 W1[j] = W[j] ^ W[j + 4]; in sm3_process()
117 for (j = 0; j < 16; j++) { in sm3_process()
118 SS1 = ROTL(ROTL(A, 12) + E + ROTL(T[j], j), 7); in sm3_process()
[all …]
A Daes-gcm-ghash-tbl.c52 int i, j; in internal_aes_gcm_ghash_gen_tbl() local
86 for (j = 1; j < i; j++) { in internal_aes_gcm_ghash_gen_tbl()
87 HiH[j] = vh ^ ghash_key->HH[j]; in internal_aes_gcm_ghash_gen_tbl()
88 HiL[j] = vl ^ ghash_key->HL[j]; in internal_aes_gcm_ghash_gen_tbl()
/optee_os/core/lib/libtomcrypt/src/misc/pkcs12/
A Dpkcs12_kdf.c28 unsigned int tmp, i, j, n; in pkcs12_kdf() local
51 for (j = 1; j < iterations; j++) { in pkcs12_kdf()
56 for (j = 0; j < v; j++) B[j] = A[j % Alen]; in pkcs12_kdf()
58 for (j = v; j > 0; j--) { in pkcs12_kdf()
59 if (++B[j - 1] != 0) break; in pkcs12_kdf()
64 for (j = v; j > 0; j--) { in pkcs12_kdf()
65 tmp = I[n * v + j - 1] + B[j - 1] + ch; in pkcs12_kdf()
67 I[n * v + j - 1] = (unsigned char)(tmp & 0xFF); in pkcs12_kdf()
/optee_os/core/lib/libtomcrypt/src/hashes/
A Dmd2.c61 int j; in md2_update_chksum() local
64 for (j = 0; j < 16; j++) { in md2_update_chksum()
69 L = (md->md2.chksum[j] ^= PI_SUBST[(int)(md->md2.buf[j] ^ L)] & 255); in md2_update_chksum()
75 int j, k; in md2_compress() local
79 for (j = 0; j < 16; j++) { in md2_compress()
80 md->md2.X[16+j] = md->md2.buf[j]; in md2_compress()
81 md->md2.X[32+j] = md->md2.X[j] ^ md->md2.X[16+j]; in md2_compress()
87 for (j = 0; j < 18; j++) { in md2_compress()
91 t = (t + (unsigned char)j) & 255; in md2_compress()
A Dsha3.c166 int i, j, round; in keccakf() local
176 for(j = 0; j < 25; j += 5) { in keccakf()
177 s[j + i] ^= t; in keccakf()
183 j = keccakf_piln[i]; in keccakf()
184 bc[0] = s[j]; in keccakf()
185 s[j] = ROL64(t, keccakf_rotc[i]); in keccakf()
189 for(j = 0; j < 25; j += 5) { in keccakf()
191 bc[i] = s[j + i]; in keccakf()
194 s[j + i] ^= (~bc[(i + 1) % 5]) & bc[(i + 2) % 5]; in keccakf()
/optee_os/core/arch/arm/plat-hikey/
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()
213 size_t i, j, len = 3; in spi_test_with_builtin_cs_control() local
[all …]
/optee_os/core/lib/libtomcrypt/src/pk/ecc/
A Dltc_ecc_mulmod.c36 int i, j, err, inf; in ltc_ecc_mulmod() local
69 for (j = 0; j < i; j++) { in ltc_ecc_mulmod()
70 ltc_ecc_del_point(M[j]); in ltc_ecc_mulmod()
99 for (j = 9; j < 16; j++) { in ltc_ecc_mulmod()
100 if ((err = ltc_mp.ecc_ptadd(M[j-9], tG, M[j-8], ma, modulus, mp)) != CRYPT_OK) { goto done; } in ltc_ecc_mulmod()
152 for (j = 0; j < WINSIZE; j++) { in ltc_ecc_mulmod()
168 for (j = 0; j < bitcpy; j++) { in ltc_ecc_mulmod()
/optee_os/core/lib/libtomcrypt/src/ciphers/safer/
A Dsafer.c113 { unsigned int i, j, k; in _Safer_Expand_Userkey() local
124 for (j = 0; j < LTC_SAFER_BLOCK_LEN; j++) { in _Safer_Expand_Userkey()
125 ka[j] = ROL8(userkey_1[j], 5); in _Safer_Expand_Userkey()
127 kb[j] = *key++ = userkey_2[j]; in _Safer_Expand_Userkey()
131 for (j = 0; j < LTC_SAFER_BLOCK_LEN + 1; j++) { in _Safer_Expand_Userkey()
132 ka[j] = ROL8(ka[j], 6); in _Safer_Expand_Userkey()
133 kb[j] = ROL8(kb[j], 6); in _Safer_Expand_Userkey()
139 for (j = 0; j < LTC_SAFER_BLOCK_LEN; j++) { in _Safer_Expand_Userkey()
145 *key++ = (ka[j] + safer_ebox[(int)safer_ebox[(int)((18 * i + j + 1)&0xFF)]]) & 0xFF; in _Safer_Expand_Userkey()
152 for (j = 0; j < LTC_SAFER_BLOCK_LEN; j++) { in _Safer_Expand_Userkey()
[all …]
/optee_os/core/lib/libtomcrypt/src/encauth/gcm/
A Dgcm_gf_mult.c118 int i, j, k, u; in gcm_gf_mult() local
171 for (j = 0; j < (int)(WPV-1); j++) { in gcm_gf_mult()
173 u = (pB[j] >> ((i^1)<<2)) & 15; in gcm_gf_mult()
177 tmp[k+j] ^= B[u][k]; in gcm_gf_mult()
182 for (z = j = 0; j < (int)(32 / sizeof(LTC_FAST_TYPE)); j++) { in gcm_gf_mult()
183 zz = tmp[j] << (BPD-4); in gcm_gf_mult()
184 tmp[j] = (tmp[j] >> 4) | z; in gcm_gf_mult()
/optee_os/lib/libutee/arch/arm/
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/lib/libmbedtls/mbedtls/library/
A Dbase64.c246 uint32_t j, x; in mbedtls_base64_decode() local
251 for( i = n = j = 0; i < slen; i++ ) in mbedtls_base64_decode()
276 if( src[i] == '=' && ++j > 2 ) in mbedtls_base64_decode()
284 if( dec_map_lookup < 64 && j != 0 ) in mbedtls_base64_decode()
301 n -= j; in mbedtls_base64_decode()
309 for( j = 3, n = x = 0, p = dst; i > 0; i--, src++ ) in mbedtls_base64_decode()
316 mbedtls_base64_cond_assign_uint32( &j, j - 1, mbedtls_base64_eq( dec_map_lookup, 64 ) ); in mbedtls_base64_decode()
322 if( j > 0 ) *p++ = (unsigned char)( x >> 16 ); in mbedtls_base64_decode()
323 if( j > 1 ) *p++ = (unsigned char)( x >> 8 ); in mbedtls_base64_decode()
324 if( j > 2 ) *p++ = (unsigned char)( x ); in mbedtls_base64_decode()
A Dblowfish.c175 unsigned int i, j, k; in mbedtls_blowfish_setkey() local
191 for( j = 0; j < 256; j++ ) in mbedtls_blowfish_setkey()
192 ctx->S[i][j] = S[i][j]; in mbedtls_blowfish_setkey()
195 j = 0; in mbedtls_blowfish_setkey()
201 data = ( data << 8 ) | key[j++]; in mbedtls_blowfish_setkey()
202 if( j >= keybits ) in mbedtls_blowfish_setkey()
203 j = 0; in mbedtls_blowfish_setkey()
220 for( j = 0; j < 256; j += 2 ) in mbedtls_blowfish_setkey()
223 ctx->S[i][j] = datal; in mbedtls_blowfish_setkey()
224 ctx->S[i][j + 1] = datar; in mbedtls_blowfish_setkey()
A Dgcm.c103 int ret, i, j; in gcm_gen_table() local
151 for( j = 1; j < i; j++ ) in gcm_gen_table()
153 HiH[j] = vh ^ ctx->HH[j]; in gcm_gen_table()
154 HiL[j] = vl ^ ctx->HL[j]; in gcm_gen_table()
781 int i, j, ret; in mbedtls_gcm_self_test() local
784 for( j = 0; j < 3; j++ ) in mbedtls_gcm_self_test()
786 int key_len = 128 + 64 * j; in mbedtls_gcm_self_test()
834 if ( memcmp( buf, ct_test_data[j * 6 + i], in mbedtls_gcm_self_test()
872 memcmp( tag_buf, tag_test_data[j * 6 + i], 16 ) != 0 ) in mbedtls_gcm_self_test()
931 if( memcmp( buf, ct_test_data[j * 6 + i], in mbedtls_gcm_self_test()
[all …]
A Darc4.c64 int i, j, a; in mbedtls_arc4_setup() local
75 j = k = 0; in mbedtls_arc4_setup()
82 j = ( j + a + key[k] ) & 0xFF; in mbedtls_arc4_setup()
83 m[i] = m[j]; in mbedtls_arc4_setup()
84 m[j] = (unsigned char) a; in mbedtls_arc4_setup()
A Dbignum.c548 for( j = 0; j < biL; j++, count++ ) in mbedtls_mpi_lsb()
560 size_t j; in mbedtls_clz() local
563 for( j = 0; j < biL; j++ ) in mbedtls_clz()
659 for( i = slen, j = 0; i > 0; i--, j++ ) in mbedtls_mpi_read_string()
780 for( j = ciL; j > 0; j-- ) in mbedtls_mpi_write_string()
1242 for( j = Y->n; j > 0; j-- ) in mbedtls_mpi_cmp_abs()
1274 for( j = Y->n; j > 0; j-- ) in mbedtls_mpi_cmp_mpi()
1439 for( j = B->n; j > 0; j-- ) in mbedtls_mpi_add_abs()
1780 for( j = B->n; j > 0; j-- ) in mbedtls_mpi_mul_mpi()
1789 for( ; j > 0; j-- ) in mbedtls_mpi_mul_mpi()
[all …]
/optee_os/core/lib/libtomcrypt/src/pk/ec25519/
A Dtweetnacl.c78 int i,j,b; in pack25519() local
84 FOR(j,2) { in pack25519()
137 i64 i,j,t[31]; in M() local
139 FOR(i,16) FOR(j,16) t[i+j]+=a[i]*b[j]; in M()
354 i64 carry,i,j; in modL() local
357 for (j = i - 32;j < i - 12;++j) { in modL()
358 x[j] += carry - 16 * x[i] * L[j - (i - 32)]; in modL()
366 FOR(j,32) { in modL()
367 x[j] += carry - (x[31] >> 4) * L[j]; in modL()
371 FOR(j,32) x[j] -= carry * L[j]; in modL()
[all …]
/optee_os/core/lib/libtomcrypt/src/ciphers/
A Drc5.c58 ulong32 L[64], *S, A, B, i, j, v, s, t, l; in _rc5_setup() local
81 for (A = i = j = 0; i < (ulong32)keylen; ) { in _rc5_setup()
84 L[j++] = BSWAP(A); in _rc5_setup()
91 L[j++] = BSWAP(A); in _rc5_setup()
99 s = 3 * MAX(t, j); in _rc5_setup()
100 l = j; in _rc5_setup()
101 for (A = B = i = j = v = 0; v < s; v++) { in _rc5_setup()
103 B = L[j] = ROL(L[j] + A + B, (A+B)); in _rc5_setup()
105 if (++j == l) { j = 0; } in _rc5_setup()
A Drc6.c55 ulong32 L[64], S[50], A, B, i, j, v, s, l; in _rc6_setup() local
71 for (A = i = j = 0; i < (ulong32)keylen; ) { in _rc6_setup()
74 L[j++] = BSWAP(A); in _rc6_setup()
82 L[j++] = BSWAP(A); in _rc6_setup()
89 s = 3 * MAX(44, j); in _rc6_setup()
90 l = j; in _rc6_setup()
91 for (A = B = i = j = v = 0; v < s; v++) { in _rc6_setup()
93 B = L[j] = ROL(L[j] + A + B, (A+B)); in _rc6_setup()
95 if (++j == l) { j = 0; } in _rc6_setup()
/optee_os/core/lib/libtomcrypt/src/stream/salsa20/
A Dsalsa20_crypt.c59 unsigned long i, j; in salsa20_crypt() local
69 j = MIN(st->ksleft, inlen); in salsa20_crypt()
70 for (i = 0; i < j; ++i, st->ksleft--) out[i] = in[i] ^ st->kstream[64 - st->ksleft]; in salsa20_crypt()
71 inlen -= j; in salsa20_crypt()
73 out += j; in salsa20_crypt()
74 in += j; in salsa20_crypt()
/optee_os/core/lib/zlib/
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/core/lib/libtomcrypt/src/stream/chacha/
A Dchacha_crypt.c58 unsigned long i, j; in chacha_crypt() local
68 j = MIN(st->ksleft, inlen); in chacha_crypt()
69 for (i = 0; i < j; ++i, st->ksleft--) out[i] = in[i] ^ st->kstream[64 - st->ksleft]; in chacha_crypt()
70 inlen -= j; in chacha_crypt()
72 out += j; in chacha_crypt()
73 in += j; in chacha_crypt()
/optee_os/core/lib/libtomcrypt/src/modes/xts/
A Dxts_test.c205 int i, j, k, err, idx; in xts_test()
223 for (j = 0; j < 2; j++) { in xts_test()
229 if ((j == 1) && ((tests[i].PTLEN < 32) || (tests[i].PTLEN % 32))) { in xts_test()
232 if ((k > 0) && (j == 1)) { in xts_test()
247 if (j == 0) { in xts_test()
272 if (j == 0) { in xts_test()

Completed in 37 milliseconds

123