Home
last modified time | relevance | path

Searched refs:i (Results 76 – 100 of 387) sorted by relevance

12345678910>>...16

/optee_os/lib/libmbedtls/mbedtls/library/
H A Dpkcs12.c83 size_t i; in pkcs12_pbe_derive_key_iv() local
98 for (i = 0; i < pwdlen; i++) { in pkcs12_pbe_derive_key_iv()
99 unipwd[i * 2 + 1] = pwd[i]; in pkcs12_pbe_derive_key_iv()
274 size_t i; in calculate_hashes() local
313 for (i = 1; i < (size_t) iterations; i++) { in calculate_hashes()
342 size_t hlen, use_len, v, i; in mbedtls_pkcs12_derivation() local
399 for (i = v; i > 0; i--) { in mbedtls_pkcs12_derivation()
400 if (++hash_block[i - 1] != 0) { in mbedtls_pkcs12_derivation()
408 for (i = v; i > 0; i--) { in mbedtls_pkcs12_derivation()
409 j = salt_block[i - 1] + hash_block[i - 1] + c; in mbedtls_pkcs12_derivation()
[all …]
H A Dchacha20.c107 size_t i; in chacha20_block() local
113 for (i = 0U; i < 10U; i++) { in chacha20_block()
134 for (i = 0U; i < 16; i++) { in chacha20_block()
135 size_t offset = i * 4U; in chacha20_block()
137 MBEDTLS_PUT_UINT32_LE(working_state[i], keystream, offset); in chacha20_block()
463 unsigned i; in mbedtls_chacha20_self_test() local
466 for (i = 0U; i < 2U; i++) { in mbedtls_chacha20_self_test()
468 mbedtls_printf(" ChaCha20 test %u ", i); in mbedtls_chacha20_self_test()
471 ret = mbedtls_chacha20_crypt(test_keys[i], in mbedtls_chacha20_self_test()
472 test_nonces[i], in mbedtls_chacha20_self_test()
[all …]
H A Dbignum.c93 size_t i = mbedtls_ct_size_if_else_0(X_is_negative, 1); in mbedtls_mpi_lt_mpi_ct() local
94 mbedtls_ct_condition_t lt = mbedtls_mpi_core_lt_ct(p[i], p[i ^ 1], X->n); in mbedtls_mpi_lt_mpi_ct()
137 for (size_t i = Y->n; i < X->n; i++) { in mbedtls_mpi_safe_cond_assign() local
138 X->p[i] = mbedtls_ct_mpi_uint_if_else_0(do_not_assign, X->p[i]); in mbedtls_mpi_safe_cond_assign()
281 size_t i; in mbedtls_mpi_shrink() local
293 for (i = X->n - 1; i > 0; i--) { in mbedtls_mpi_shrink()
294 if (X->p[i] != 0) { in mbedtls_mpi_shrink()
298 i++; in mbedtls_mpi_shrink()
300 if (i < nblimbs) { in mbedtls_mpi_shrink()
301 i = nblimbs; in mbedtls_mpi_shrink()
[all …]
H A Dentropy.c201 int i; in entropy_gather_internal() local
213 for (i = 0; i < ctx->source_count; i++) { in entropy_gather_internal()
214 if (ctx->source[i].strong == MBEDTLS_ENTROPY_SOURCE_STRONG) { in entropy_gather_internal()
219 if ((ret = ctx->source[i].f_source(ctx->source[i].p_source, in entropy_gather_internal()
228 if ((ret = entropy_update(ctx, (unsigned char) i, in entropy_gather_internal()
232 ctx->source[i].size += olen; in entropy_gather_internal()
272 int ret, count = 0, i, thresholds_reached; in mbedtls_entropy_func() local
314 for (i = 0; i < ctx->source_count; i++) { in mbedtls_entropy_func()
315 if (ctx->source[i].size < ctx->source[i].threshold) { in mbedtls_entropy_func()
318 if (ctx->source[i].strong == MBEDTLS_ENTROPY_SOURCE_STRONG) { in mbedtls_entropy_func()
[all …]
H A Dsha512.c213 static void sha512_put_uint64_be(uint64_t n, unsigned char *b, uint8_t i) in sha512_put_uint64_be() argument
215 MBEDTLS_PUT_UINT64_BE(n, b, i); in sha512_put_uint64_be()
604 int i; in mbedtls_internal_sha512_process_c() local
630 for (i = 0; i < 8; i++) { in mbedtls_internal_sha512_process_c()
631 local.A[i] = ctx->state[i]; in mbedtls_internal_sha512_process_c()
635 for (i = 0; i < 80; i++) { in mbedtls_internal_sha512_process_c()
636 if (i < 16) { in mbedtls_internal_sha512_process_c()
637 local.W[i] = MBEDTLS_GET_UINT64_BE(data, i << 3); in mbedtls_internal_sha512_process_c()
639 local.W[i] = S1(local.W[i - 2]) + local.W[i - 7] + in mbedtls_internal_sha512_process_c()
640 S0(local.W[i - 15]) + local.W[i - 16]; in mbedtls_internal_sha512_process_c()
[all …]
/optee_os/core/lib/libtomcrypt/src/hashes/
H A Dmd5.c98 ulong32 i, W[16], a, b, c, d; in ss_md5_compress() local
104 for (i = 0; i < 16; i++) { in ss_md5_compress()
105 LOAD32L(W[i], buf + (4*i)); in ss_md5_compress()
115 for (i = 0; i < 16; ++i) { in ss_md5_compress()
116 FF(a,b,c,d,W[Worder[i]],Rorder[i],Korder[i]); in ss_md5_compress()
120 for (; i < 32; ++i) { in ss_md5_compress()
121 GG(a,b,c,d,W[Worder[i]],Rorder[i],Korder[i]); in ss_md5_compress()
125 for (; i < 48; ++i) { in ss_md5_compress()
126 HH(a,b,c,d,W[Worder[i]],Rorder[i],Korder[i]); in ss_md5_compress()
130 for (; i < 64; ++i) { in ss_md5_compress()
[all …]
H A Dmd2.c145 unsigned long i, k; in md2_done() local
157 for (i = md->md2.curlen; i < 16; i++) { in md2_done()
158 md->md2.buf[i] = (unsigned char)k; in md2_done()
223 int i; in md2_test()
227 for (i = 0; i < (int)(sizeof(tests) / sizeof(tests[0])); i++) { in md2_test()
229 md2_process(&md, (unsigned char*)tests[i].msg, (unsigned long)XSTRLEN(tests[i].msg)); in md2_test()
231 if (compare_testvector(tmp, sizeof(tmp), tests[i].hash, sizeof(tests[i].hash), "MD2", i)) { in md2_test()
/optee_os/core/arch/arm/plat-synquacer/
H A Drng_pta.c161 uint32_t i = 0; in health_test() local
163 for (i = 0; i < (SENSOR_DATA_SIZE - 1); i++) { in health_test()
164 if ((sensors_data[sensor_id][i] ^ in health_test()
165 sensors_data[sensor_id][i + 1]) & 0x1) { in health_test()
166 falling_edge_count += (sensors_data[sensor_id][i] & in health_test()
168 rising_edge_count += (sensors_data[sensor_id][i + 1] & in health_test()
184 uint32_t i = 0; in pool_check_add_entropy() local
189 for (i = 0; i < NUM_SENSORS; i++) { in pool_check_add_entropy()
197 (SENSOR_DATA_SIZE * (NUM_SENSORS - i - 1))); in pool_check_add_entropy()
227 uint8_t i = 0; in rng_collect_entropy() local
[all …]
/optee_os/core/lib/libtomcrypt/
H A Dsha256_accel.c123 int i; in sha256_done() local
161 for (i = 0; i < 8; i++) { in sha256_done()
162 STORE32H(md->sha256.state[i], out+(4*i)); in sha256_done()
197 int i; in sha256_test()
201 for (i = 0; i < (int)(sizeof(tests) / sizeof(tests[0])); i++) { in sha256_test()
203 sha256_process(&md, (unsigned char*)tests[i].msg, (unsigned long)strlen(tests[i].msg)); in sha256_test()
205 if (XMEMCMP(tmp, tests[i].hash, 32) != 0) { in sha256_test()
/optee_os/core/lib/libtomcrypt/src/ciphers/
H A Dkseed.c196 int i; in kseed_setup() local
213 for (i = 0; i < 16; i++) { in kseed_setup()
214 skey->kseed.K[2*i+0] = G(k1 + k3 - KCi[i]); in kseed_setup()
215 skey->kseed.K[2*i+1] = G(k2 - k4 + KCi[i]); in kseed_setup()
216 if (i&1) { in kseed_setup()
226 skey->kseed.dK[2*(15-i)+0] = skey->kseed.K[2*i+0]; in kseed_setup()
227 skey->kseed.dK[2*(15-i)+1] = skey->kseed.K[2*i+1]; in kseed_setup()
236 int i; in rounds() local
237 for (i = 0; i < 16; i += 2) { in rounds()
/optee_os/core/drivers/amd/
H A Dgpio_common.c19 uint32_t i = 0; in amd_gpio_get_bank_and_pin() local
23 for (i = 0; i < bdata->max_bank; i++) { in amd_gpio_get_bank_and_pin()
24 if (gpio >= bdata->bank_min[i] && in amd_gpio_get_bank_and_pin()
25 gpio <= bdata->bank_max[i]) { in amd_gpio_get_bank_and_pin()
26 *bank = i; in amd_gpio_get_bank_and_pin()
27 *pin = gpio - bdata->bank_min[i]; in amd_gpio_get_bank_and_pin()
/optee_os/core/lib/libtomcrypt/src/hashes/sha2/
H A Dsha224.c102 int i; in sha224_test()
106 for (i = 0; i < (int)(sizeof(tests) / sizeof(tests[0])); i++) { in sha224_test()
108 sha224_process(&md, (unsigned char*)tests[i].msg, (unsigned long)XSTRLEN(tests[i].msg)); in sha224_test()
110 if (compare_testvector(tmp, sizeof(tmp), tests[i].hash, sizeof(tests[i].hash), "SHA224", i)) { in sha224_test()
H A Dsha384.c108 int i; in sha384_test()
112 for (i = 0; i < (int)(sizeof(tests) / sizeof(tests[0])); i++) { in sha384_test()
114 sha384_process(&md, (unsigned char*)tests[i].msg, (unsigned long)XSTRLEN(tests[i].msg)); in sha384_test()
116 if (compare_testvector(tmp, sizeof(tmp), tests[i].hash, sizeof(tests[i].hash), "SHA384", i)) { in sha384_test()
H A Dsha512_224.c104 int i; in sha512_224_test()
108 for (i = 0; i < (int)(sizeof(tests) / sizeof(tests[0])); i++) { in sha512_224_test()
110 sha512_224_process(&md, (unsigned char*)tests[i].msg, (unsigned long)XSTRLEN(tests[i].msg)); in sha512_224_test()
112 … if (compare_testvector(tmp, sizeof(tmp), tests[i].hash, sizeof(tests[i].hash), "SHA512-224", i)) { in sha512_224_test()
H A Dsha512_256.c104 int i; in sha512_256_test()
108 for (i = 0; i < (int)(sizeof(tests) / sizeof(tests[0])); i++) { in sha512_256_test()
110 sha512_256_process(&md, (unsigned char*)tests[i].msg, (unsigned long)XSTRLEN(tests[i].msg)); in sha512_256_test()
112 … if (compare_testvector(tmp, sizeof(tmp), tests[i].hash, sizeof(tests[i].hash), "SHA512-265", i)) { in sha512_256_test()
/optee_os/scripts/
H A Dgen_stmm_hex.py38 i = 0
39 while i < size:
40 if i % 8 == 0:
42 outf.write('0x{:02x},'.format(bytes[i]))
43 i = i + 1
44 if i % 8 == 0 or i == size:
/optee_os/core/lib/libtomcrypt/src/misc/crypt/
H A Dcrypt_sizes.c292 int i; in crypt_get_size() local
294 for (i=0; i<count; i++) { in crypt_get_size()
295 if (XSTRCMP(s_crypt_sizes[i].name, namein) == 0) { in crypt_get_size()
296 *sizeout = s_crypt_sizes[i].size; in crypt_get_size()
314 int i; in crypt_list_all_sizes() local
321 for (i=0; i<count; i++) { in crypt_list_all_sizes()
322 number_len = snprintf(NULL, 0, "%s,%u\n", s_crypt_sizes[i].name, s_crypt_sizes[i].size); in crypt_list_all_sizes()
338 for (i=0; i<count; i++) { in crypt_list_all_sizes()
339 … number_len = snprintf(ptr, total_len, "%s,%u\n", s_crypt_sizes[i].name, s_crypt_sizes[i].size); in crypt_list_all_sizes()
/optee_os/core/lib/libtomcrypt/src/pk/asn1/oid/
H A Dpk_get_oid.c27 unsigned int i; in pk_get_oid() local
29 for (i = 0; i < sizeof(pka_oids)/sizeof(pka_oids[0]); ++i) { in pk_get_oid()
30 if (pka_oids[i].id == id) { in pk_get_oid()
31 *st = pka_oids[i].oid; in pk_get_oid()
/optee_os/lib/libutils/isoc/newlib/
H A Dabs.c73 _DEFUN (abs, (i), int i)
75 return (i < 0) ? -i : i;
/optee_os/lib/libmbedtls/core/
H A Dsm2-pke.c98 size_t i = 0; in is_zero() local
100 for (i = 0; i < size; i++) in is_zero()
101 v |= buf[i]; in is_zero()
124 size_t i = 0; in sm2_mbedtls_pke_decrypt() local
213 for (i = 0; i < out_len; i++) in sm2_mbedtls_pke_decrypt()
214 dst[i] = src[C1_len + i] ^ t[i]; in sm2_mbedtls_pke_decrypt()
222 for (i = out_len; i < C2_len; i++) in sm2_mbedtls_pke_decrypt()
223 eom[i - out_len] = src[C1_len + i] ^ t[i]; in sm2_mbedtls_pke_decrypt()
317 size_t i = 0; in sm2_mbedtls_pke_encrypt() local
418 for (i = 0; i < src_len; i++) in sm2_mbedtls_pke_encrypt()
[all …]
/optee_os/core/drivers/crypto/se050/adaptors/utils/
H A Dutils.c31 size_t i = 0; in delete_transient_objects() local
48 for (i = 0; i < len; i += 4) { in delete_transient_objects()
49 id = (list[i + 0] << (3 * 8)) | in delete_transient_objects()
50 (list[i + 1] << (2 * 8)) | in delete_transient_objects()
51 (list[i + 2] << (1 * 8)) | in delete_transient_objects()
52 (list[i + 3] << (0 * 8)); in delete_transient_objects()
73 size_t i = 0; in generate_oid() local
75 for (i = 0; i < NBR_OID; i++) { in generate_oid()
/optee_os/core/drivers/firewall/
H A Dstm32_risaf.c329 unsigned int i = 0; in risaf_check_overlap() local
331 for (i = 0; i < index; i++) { in risaf_check_overlap()
333 if (!region[i].cfg) in risaf_check_overlap()
338 region[i].addr, in risaf_check_overlap()
339 region[i].len)) { in risaf_check_overlap()
341 risaf->pdata.base.pa, index, i); in risaf_check_overlap()
466 size_t i = 0; in stm32_risaf_pm_resume() local
468 for (i = 0; i < risaf->pdata.nregions; i++) { in stm32_risaf_pm_resume()
469 uint32_t id = _RISAF_GET_REGION_ID(regions[i].cfg); in stm32_risaf_pm_resume()
478 cfg = stm32_risaf_get_region_config(regions[i].cfg); in stm32_risaf_pm_resume()
[all …]
H A Dstm32_rifsc.c391 unsigned int i = 0; in stm32_rifsc_dt_conf_risup() local
406 for (i = 0; i < pdata->nrisup; i++) { in stm32_rifsc_dt_conf_risup()
407 uint32_t value = fdt32_to_cpu(conf_list[i]); in stm32_rifsc_dt_conf_risup()
408 struct risup_cfg *risup = pdata->risup + i; in stm32_rifsc_dt_conf_risup()
424 unsigned int i = 0; in stm32_rifsc_dt_conf_rimu() local
439 for (i = 0; i < pdata->nrimu; i++) { in stm32_rifsc_dt_conf_rimu()
440 uint32_t value = fdt32_to_cpu(conf_list[i]); in stm32_rifsc_dt_conf_rimu()
441 struct rimu_cfg *rimu = pdata->rimu + i; in stm32_rifsc_dt_conf_rimu()
456 int i = 0; in stm32_rifsc_dt_conf_risal() local
473 for (i = 0; i < len; i++) { in stm32_rifsc_dt_conf_risal()
[all …]
/optee_os/core/kernel/
H A Dpseudo_ta.c344 int i = 0; in to_bounce_params() local
351 for (i = 0; i < TEE_NUM_PARAMS; i++) { in to_bounce_params()
352 switch (TEE_PARAM_TYPE_GET(param_types, i)) { in to_bounce_params()
356 size = params[i].memref.size; in to_bounce_params()
357 uptr = params[i].memref.buffer; in to_bounce_params()
361 bparams[i].memref.buffer = kptr; in to_bounce_params()
362 bparams[i].memref.size = size; in to_bounce_params()
367 switch (TEE_PARAM_TYPE_GET(param_types, i)) { in to_bounce_params()
376 bparams[i].value.a = params[i].value.a; in to_bounce_params()
377 bparams[i].value.b = params[i].value.b; in to_bounce_params()
[all …]
/optee_os/core/arch/arm/plat-sam/
H A Dmatrix.c59 unsigned int i = 0; in matrix_base() local
63 pmatrix = matrix_get(i++); in matrix_base()
95 unsigned int i = 0; in get_peri_security() local
99 p = peri_security_get(i++); in get_peri_security()
130 unsigned int i = 0; in matrix_dt_get_id() local
139 p = peri_security_get(i++); in matrix_dt_get_id()
163 unsigned int i = 0; in matrix_configure_periph_non_secure() local
173 for (i = 0; i < size; i++) { in matrix_configure_periph_non_secure()
215 unsigned int i = 0; in matrix_suspend() local
218 for (pmatrix = matrix_get(i++); pmatrix; pmatrix = matrix_get(i++)) in matrix_suspend()
[all …]

12345678910>>...16