Home
last modified time | relevance | path

Searched refs:idx (Results 1 – 20 of 20) sorted by relevance

/mbedtls-latest/library/
Ddebug.c121 size_t i, idx = 0; in mbedtls_debug_print_buf() local
130 mbedtls_snprintf(str + idx, sizeof(str) - idx, "dumping '%s' (%u bytes)\n", in mbedtls_debug_print_buf()
143 mbedtls_snprintf(str + idx, sizeof(str) - idx, " %s\n", txt); in mbedtls_debug_print_buf()
146 idx = 0; in mbedtls_debug_print_buf()
150 idx += mbedtls_snprintf(str + idx, sizeof(str) - idx, "%04x: ", in mbedtls_debug_print_buf()
155 idx += mbedtls_snprintf(str + idx, sizeof(str) - idx, " %02x", in mbedtls_debug_print_buf()
162 idx += mbedtls_snprintf(str + idx, sizeof(str) - idx, " "); in mbedtls_debug_print_buf()
165 mbedtls_snprintf(str + idx, sizeof(str) - idx, " %s\n", txt); in mbedtls_debug_print_buf()
198 size_t i, idx = 0; in mbedtls_debug_print_ec_coord() local
200 mbedtls_snprintf(str + idx, sizeof(str) - idx, "value of '%s' (%u bits) is:\n", in mbedtls_debug_print_ec_coord()
[all …]
Dlms.c539 unsigned int idx; in mbedtls_lms_private_free() local
543 for (idx = 0; idx < MERKLE_TREE_LEAF_NODE_AM(ctx->params.type); idx++) { in mbedtls_lms_private_free()
544 mbedtls_lmots_private_free(&ctx->ots_private_keys[idx]); in mbedtls_lms_private_free()
549 for (idx = 0; idx < MERKLE_TREE_LEAF_NODE_AM(ctx->params.type); idx++) { in mbedtls_lms_private_free()
550 mbedtls_lmots_public_free(&ctx->ots_public_keys[idx]); in mbedtls_lms_private_free()
569 unsigned int idx = 0; in mbedtls_lms_generate_private_key() local
613 for (idx = 0; idx < MERKLE_TREE_LEAF_NODE_AM(ctx->params.type); idx++) { in mbedtls_lms_generate_private_key()
614 mbedtls_lmots_private_init(&ctx->ots_private_keys[idx]); in mbedtls_lms_generate_private_key()
615 mbedtls_lmots_public_init(&ctx->ots_public_keys[idx]); in mbedtls_lms_generate_private_key()
619 for (idx = 0; idx < MERKLE_TREE_LEAF_NODE_AM(ctx->params.type); idx++) { in mbedtls_lms_generate_private_key()
[all …]
Dcamellia.c295 int idx; in mbedtls_camellia_setkey_enc() local
309 case 128: ctx->nr = 3; idx = 0; break; in mbedtls_camellia_setkey_enc()
311 case 256: ctx->nr = 4; idx = 1; break; in mbedtls_camellia_setkey_enc()
374 SHIFT_AND_PLACE(idx, 0); in mbedtls_camellia_setkey_enc()
378 SHIFT_AND_PLACE(idx, 1); in mbedtls_camellia_setkey_enc()
382 SHIFT_AND_PLACE(idx, 2); in mbedtls_camellia_setkey_enc()
386 SHIFT_AND_PLACE(idx, 3); in mbedtls_camellia_setkey_enc()
391 if (transposes[idx][i] != -1) { in mbedtls_camellia_setkey_enc()
392 RK[32 + 12 * idx + i] = RK[transposes[idx][i]]; in mbedtls_camellia_setkey_enc()
407 int idx, ret; in mbedtls_camellia_setkey_dec() local
[all …]
Daes.c468 #define AES_RT0(idx) RT0[idx] argument
469 #define AES_RT1(idx) ROTL8(RT0[idx]) argument
470 #define AES_RT2(idx) ROTL16(RT0[idx]) argument
471 #define AES_RT3(idx) ROTL24(RT0[idx]) argument
473 #define AES_FT0(idx) FT0[idx] argument
474 #define AES_FT1(idx) ROTL8(FT0[idx]) argument
475 #define AES_FT2(idx) ROTL16(FT0[idx]) argument
476 #define AES_FT3(idx) ROTL24(FT0[idx]) argument
480 #define AES_RT0(idx) RT0[idx] argument
481 #define AES_RT1(idx) RT1[idx] argument
[all …]
Dversion_features.c819 const char * const *idx = features; in mbedtls_version_check_feature() local
821 if (*idx == NULL) { in mbedtls_version_check_feature()
835 while (*idx != NULL) { in mbedtls_version_check_feature()
836 if (!strcmp(*idx, feature)) { in mbedtls_version_check_feature()
839 idx++; in mbedtls_version_check_feature()
Dentropy.c90 int idx, ret = 0; in mbedtls_entropy_add_source() local
98 idx = ctx->source_count; in mbedtls_entropy_add_source()
99 if (idx >= MBEDTLS_ENTROPY_MAX_SOURCES) { in mbedtls_entropy_add_source()
104 ctx->source[idx].f_source = f_source; in mbedtls_entropy_add_source()
105 ctx->source[idx].p_source = p_source; in mbedtls_entropy_add_source()
106 ctx->source[idx].threshold = threshold; in mbedtls_entropy_add_source()
107 ctx->source[idx].strong = strong; in mbedtls_entropy_add_source()
Dssl_tls13_generic.c189 size_t idx; in ssl_tls13_create_verify_structure() local
201 idx = 64; in ssl_tls13_create_verify_structure()
204 memcpy(verify_buffer + idx, mbedtls_ssl_tls13_labels.client_cv, in ssl_tls13_create_verify_structure()
206 idx += MBEDTLS_SSL_TLS1_3_LBL_LEN(client_cv); in ssl_tls13_create_verify_structure()
208 memcpy(verify_buffer + idx, mbedtls_ssl_tls13_labels.server_cv, in ssl_tls13_create_verify_structure()
210 idx += MBEDTLS_SSL_TLS1_3_LBL_LEN(server_cv); in ssl_tls13_create_verify_structure()
213 verify_buffer[idx++] = 0x0; in ssl_tls13_create_verify_structure()
215 memcpy(verify_buffer + idx, transcript_hash, transcript_hash_len); in ssl_tls13_create_verify_structure()
216 idx += transcript_hash_len; in ssl_tls13_create_verify_structure()
218 *verify_buffer_len = idx; in ssl_tls13_create_verify_structure()
Dsha3.c95 #define ABSORB(ctx, idx, v) do { ctx->state[(idx) >> 3] ^= ((uint64_t) (v)) << (((idx) & 0x7) << 3)… argument
97 #define SQUEEZE(ctx, idx) ((uint8_t) (ctx->state[(idx) >> 3] >> (((idx) & 0x7) << 3))) argument
Dlmots.c86 size_t idx; in lmots_checksum_calculate() local
89 for (idx = 0; idx < MBEDTLS_LMOTS_N_HASH_LEN(params->type); idx++) { in lmots_checksum_calculate()
90 sum += DIGIT_MAX_VALUE - digest[idx]; in lmots_checksum_calculate()
Dssl_ticket.c159 const unsigned char idx = 1 - ctx->active; in mbedtls_ssl_ticket_rotate() local
160 mbedtls_ssl_ticket_key * const key = ctx->keys + idx; in mbedtls_ssl_ticket_rotate()
200 ctx->active = idx; in mbedtls_ssl_ticket_rotate()
Dssl_msg.c1956 size_t idx; in mbedtls_ssl_decrypt_buf() local
1958 for (idx = start_idx; idx < rec->data_len; idx++) { in mbedtls_ssl_decrypt_buf()
1962 const mbedtls_ct_condition_t a = mbedtls_ct_uint_ge(idx, padding_idx); in mbedtls_ssl_decrypt_buf()
1964 const mbedtls_ct_condition_t b = mbedtls_ct_uint_eq(check[idx], padlen - 1); in mbedtls_ssl_decrypt_buf()
Dbignum.c411 size_t idx = pos % biL; in mbedtls_mpi_set_bit() local
425 X->p[off] &= ~((mbedtls_mpi_uint) 0x01 << idx); in mbedtls_mpi_set_bit()
426 X->p[off] |= (mbedtls_mpi_uint) val << idx; in mbedtls_mpi_set_bit()
/mbedtls-latest/scripts/data_files/
Dversion_features.fmt25 const char * const *idx = features;
27 if (*idx == NULL) {
41 while (*idx != NULL) {
42 if (!strcmp(*idx, feature)) {
45 idx++;
/mbedtls-latest/programs/ssl/
Dssl_mail_client.c227 size_t i, idx = 0; in write_ssl_and_get_response() local
259 if (idx < 4) { in write_ssl_and_get_response()
260 code[idx++] = data[i]; in write_ssl_and_get_response()
265 if (idx == 4 && code[0] >= '0' && code[0] <= '9' && code[3] == ' ') { in write_ssl_and_get_response()
270 idx = 0; in write_ssl_and_get_response()
280 size_t i, idx = 0; in write_and_get_response() local
303 if (idx < 4) { in write_and_get_response()
304 code[idx++] = data[i]; in write_and_get_response()
309 if (idx == 4 && code[0] >= '0' && code[0] <= '9' && code[3] == ' ') { in write_and_get_response()
314 idx = 0; in write_and_get_response()
Dssl_client2.c639 size_t idx = 0; in report_cid_usage() local
663 while (idx < peer_cid_len) { in report_cid_usage()
664 mbedtls_printf("%02x ", peer_cid[idx]); in report_cid_usage()
665 idx++; in report_cid_usage()
Dssl_server2.c1362 size_t idx = 0; in report_cid_usage() local
1368 while (idx < peer_cid_len) { in report_cid_usage()
1369 mbedtls_printf("%02x ", peer_cid[idx]); in report_cid_usage()
1370 idx++; in report_cid_usage()
/mbedtls-latest/tests/scripts/
Dcheck_test_cases.py30 def idx(self): member in ScriptOutputError
116 for idx, line in enumerate(listed.splitlines()):
123 raise ScriptOutputError(script_name, idx, line.decode("utf-8"))
127 idx,
232 results.error(e.script_name, e.idx,
Daudit-validity-dates.py295 for idx, m in enumerate(re.finditer(X509Parser.PEM_REGEX, data, flags=re.S), 1):
299 result.locations.append("{}#{}".format(filename, idx))
357 for idx, test_arg in enumerate(test_args):
368 idx + 1))
/mbedtls-latest/tests/suites/
Dtest_suite_lmots.function8 size_t idx;
10 for (idx = MBEDTLS_LMOTS_SIG_SIGNATURE_OFFSET(MBEDTLS_LMOTS_SHA256_N32_W8);
11 idx < MBEDTLS_LMOTS_SIG_LEN(MBEDTLS_LMOTS_SHA256_N32_W8);
12 idx++) {
13 TEST_EQUAL(sig[idx], 0x7E);
Dtest_suite_ctr_drbg.function63 /* CTR_DRBG_Reseed(entropy[idx:idx+entropy->len],
79 /* CTR_DRBG_Reseed(entropy[idx:idx+entropy->len],