Home
last modified time | relevance | path

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

123

/optee_os-3.20.0/core/lib/libtomcrypt/src/pk/asn1/oid/
A Dpk_oid_str.c28 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()
37 if (j >= limit) { in pk_oid_str_to_num()
38 *oidlen = j; in pk_oid_str_to_num()
41 *oidlen = j + 1; in pk_oid_str_to_num()
48 unsigned long j, k; in pk_oid_num_to_str() local
56 j = oid[i]; in pk_oid_num_to_str()
57 if (j == 0) { in pk_oid_num_to_str()
62 while (j > 0) { in pk_oid_num_to_str()
65 j /= 10; in pk_oid_num_to_str()
[all …]
/optee_os-3.20.0/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-3.20.0/core/lib/libtomcrypt/src/misc/pkcs12/
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-3.20.0/core/lib/libtomcrypt/src/hashes/
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()
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-3.20.0/core/crypto/
A Dsm3.c60 int j; in sm3_process() local
62 for (j = 0; j < 16; j++) in sm3_process()
64 for (j = 16; j < 64; j++) in sm3_process()
96 for (j = 16; j < 68; j++) { in sm3_process()
102 Temp1 = W[j - 16] ^ W[j - 9]; in sm3_process()
106 Temp5 = ROTL(W[j - 13], 7) ^ W[j - 6]; in sm3_process()
110 for (j = 0; j < 64; j++) in sm3_process()
111 W1[j] = W[j] ^ W[j + 4]; in sm3_process()
122 for (j = 0; j < 16; j++) { in sm3_process()
123 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-3.20.0/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-3.20.0/core/lib/libtomcrypt/src/pk/ecc/
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()
A Decc_find_curve.c216 int i, j; in ecc_find_curve() local
228 for (j = 0; s_curve_names[i].names[j] != NULL && !OID; j++) { in ecc_find_curve()
229 if (s_name_match(s_curve_names[i].names[j], name_or_oid)) { in ecc_find_curve()
/optee_os-3.20.0/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-3.20.0/core/lib/libtomcrypt/src/ciphers/safer/
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()
120 kb[j] = *key++ = userkey_2[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()
138 *key++ = (ka[j] + safer_ebox[(int)safer_ebox[(int)((18 * i + j + 1)&0xFF)]]) & 0xFF; in s_safer_expand_userkey()
145 for (j = 0; j < LTC_SAFER_BLOCK_LEN; j++) { in s_safer_expand_userkey()
[all …]
/optee_os-3.20.0/core/lib/libtomcrypt/src/encauth/gcm/
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-3.20.0/lib/libmbedtls/mbedtls/library/
A Dblowfish.c152 unsigned int i, j, k; in mbedtls_blowfish_setkey() local
168 for( j = 0; j < 256; j++ ) in mbedtls_blowfish_setkey()
169 ctx->S[i][j] = S[i][j]; in mbedtls_blowfish_setkey()
172 j = 0; in mbedtls_blowfish_setkey()
178 data = ( data << 8 ) | key[j++]; in mbedtls_blowfish_setkey()
179 if( j >= keybits ) in mbedtls_blowfish_setkey()
180 j = 0; in mbedtls_blowfish_setkey()
197 for( j = 0; j < 256; j += 2 ) in mbedtls_blowfish_setkey()
200 ctx->S[i][j] = datal; in mbedtls_blowfish_setkey()
201 ctx->S[i][j + 1] = datar; in mbedtls_blowfish_setkey()
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 Dgcm.c80 int ret, i, j; in gcm_gen_table() local
128 for( j = 1; j < i; j++ ) in gcm_gen_table()
130 HiH[j] = vh ^ ctx->HH[j]; in gcm_gen_table()
131 HiL[j] = vl ^ ctx->HL[j]; in gcm_gen_table()
760 int i, j, ret; in mbedtls_gcm_self_test() local
763 for( j = 0; j < 3; j++ ) in mbedtls_gcm_self_test()
765 int key_len = 128 + 64 * j; in mbedtls_gcm_self_test()
813 if ( memcmp( buf, ct_test_data[j * 6 + i], in mbedtls_gcm_self_test()
851 memcmp( tag_buf, tag_test_data[j * 6 + i], 16 ) != 0 ) in mbedtls_gcm_self_test()
910 if( memcmp( buf, ct_test_data[j * 6 + i], in mbedtls_gcm_self_test()
[all …]
A Dmd2.c119 int i, j; in mbedtls_internal_md2_process() local
131 for( j = 0; j < 48; j++ ) in mbedtls_internal_md2_process()
133 ctx->state[j] = (unsigned char) in mbedtls_internal_md2_process()
134 ( ctx->state[j] ^ PI_SUBST[t] ); in mbedtls_internal_md2_process()
135 t = ctx->state[j]; in mbedtls_internal_md2_process()
/optee_os-3.20.0/core/lib/libtomcrypt/src/stream/salsa20/
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-3.20.0/core/lib/libtomcrypt/src/stream/chacha/
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-3.20.0/core/lib/libtomcrypt/src/pk/ec25519/
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 carry,i,j; in modL() local
354 for (j = i - 32;j < i - 12;++j) { in modL()
355 x[j] += carry - 16 * x[i] * L[j - (i - 32)]; in modL()
363 FOR(j,32) { in modL()
364 x[j] += carry - (x[31] >> 4) * L[j]; in modL()
368 FOR(j,32) x[j] -= carry * L[j]; in modL()
[all …]
/optee_os-3.20.0/core/lib/libtomcrypt/src/stream/rc4/
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-3.20.0/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-3.20.0/core/tee/
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-3.20.0/core/lib/libtomcrypt/src/ciphers/
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()

Completed in 23 milliseconds

123