/mbedtls-3.5.0/library/ |
D | alignment.h | 248 #define MBEDTLS_GET_UINT32_BE(data, offset) \ argument 250 ? mbedtls_get_unaligned_uint32((data) + (offset)) \ 251 : MBEDTLS_BSWAP32(mbedtls_get_unaligned_uint32((data) + (offset))) \ 263 #define MBEDTLS_PUT_UINT32_BE(n, data, offset) \ argument 267 mbedtls_put_unaligned_uint32((data) + (offset), (uint32_t) (n)); \ 271 mbedtls_put_unaligned_uint32((data) + (offset), MBEDTLS_BSWAP32((uint32_t) (n))); \ 284 #define MBEDTLS_GET_UINT32_LE(data, offset) \ argument 286 ? MBEDTLS_BSWAP32(mbedtls_get_unaligned_uint32((data) + (offset))) \ 287 : mbedtls_get_unaligned_uint32((data) + (offset)) \ 300 #define MBEDTLS_PUT_UINT32_LE(n, data, offset) \ argument [all …]
|
D | ccm.c | 114 size_t offset, size_t use_len, in mbedtls_ccm_crypt() argument 129 mbedtls_xor(output, input, tmp_buf + offset, use_len); in mbedtls_ccm_crypt() 272 size_t olen, use_len, offset; in mbedtls_ccm_update_ad() local 297 offset = (ctx->processed + 2) % 16; /* account for y[0] and y[1] in mbedtls_ccm_update_ad() 299 use_len = 16 - offset; in mbedtls_ccm_update_ad() 305 mbedtls_xor(ctx->y + offset, ctx->y + offset, add, use_len); in mbedtls_ccm_update_ad() 311 if (use_len + offset == 16 || ctx->processed == ctx->add_len) { in mbedtls_ccm_update_ad() 336 size_t use_len, offset, olen; in mbedtls_ccm_update() local 359 offset = ctx->processed % 16; in mbedtls_ccm_update() 361 use_len = 16 - offset; in mbedtls_ccm_update() [all …]
|
D | chacha20.c | 147 size_t offset = i * 4U; in chacha20_block() local 149 MBEDTLS_PUT_UINT32_LE(working_state[i], keystream, offset); in chacha20_block() 218 size_t offset = 0U; in mbedtls_chacha20_update() local 222 output[offset] = input[offset] in mbedtls_chacha20_update() 226 offset++; in mbedtls_chacha20_update() 236 mbedtls_xor(output + offset, input + offset, ctx->keystream8, 64U); in mbedtls_chacha20_update() 238 offset += CHACHA20_BLOCK_SIZE_BYTES; in mbedtls_chacha20_update() 248 mbedtls_xor(output + offset, input + offset, ctx->keystream8, size); in mbedtls_chacha20_update()
|
D | constant_time.c | 436 size_t offset) in mbedtls_ct_mem_move_to_left() argument 444 unsigned no_op = mbedtls_ct_size_gt(total - offset, i); in mbedtls_ct_mem_move_to_left() 491 size_t offset, in mbedtls_ct_memcpy_offset() argument 500 offsetval, offset); in mbedtls_ct_memcpy_offset() 548 size_t offset; in mbedtls_ct_hmac() local 590 for (offset = min_data_len; offset <= max_data_len; offset++) { in mbedtls_ct_hmac() 596 offset, data_len_secret); in mbedtls_ct_hmac() 598 if (offset < max_data_len) { in mbedtls_ct_hmac() 599 PSA_CHK(psa_hash_update(&operation, data + offset, 1)); in mbedtls_ct_hmac() 667 size_t offset; in mbedtls_ct_hmac() local [all …]
|
D | gcm.c | 336 size_t use_len, offset; in mbedtls_gcm_update_ad() local 343 offset = ctx->add_len % 16; in mbedtls_gcm_update_ad() 346 if (offset != 0) { in mbedtls_gcm_update_ad() 347 use_len = 16 - offset; in mbedtls_gcm_update_ad() 352 mbedtls_xor(ctx->buf + offset, ctx->buf + offset, p, use_len); in mbedtls_gcm_update_ad() 354 if (offset + use_len == 16) { in mbedtls_gcm_update_ad() 396 size_t offset, size_t use_len, in gcm_mask() argument 410 mbedtls_xor(ctx->buf + offset, ctx->buf + offset, input, use_len); in gcm_mask() 412 mbedtls_xor(output, ectr + offset, input, use_len); in gcm_mask() 414 mbedtls_xor(ctx->buf + offset, ctx->buf + offset, output, use_len); in gcm_mask() [all …]
|
D | poly1305.c | 85 size_t offset = 0U; in poly1305_process() local 106 d0 = MBEDTLS_GET_UINT32_LE(input, offset + 0); in poly1305_process() 107 d1 = MBEDTLS_GET_UINT32_LE(input, offset + 4); in poly1305_process() 108 d2 = MBEDTLS_GET_UINT32_LE(input, offset + 8); in poly1305_process() 109 d3 = MBEDTLS_GET_UINT32_LE(input, offset + 12); in poly1305_process() 166 offset += POLY1305_BLOCK_SIZE_BYTES; in poly1305_process() 286 size_t offset = 0U; in mbedtls_poly1305_update() local 315 offset += queue_free_len; in mbedtls_poly1305_update() 323 poly1305_process(ctx, nblocks, &input[offset], 1U); in mbedtls_poly1305_update() 325 offset += nblocks * POLY1305_BLOCK_SIZE_BYTES; in mbedtls_poly1305_update() [all …]
|
D | ssl_msg.c | 2910 static void ssl_bitmask_set(unsigned char *mask, size_t offset, size_t len) in ssl_bitmask_set() argument 2914 start_bits = 8 - (offset % 8); in ssl_bitmask_set() 2916 size_t first_byte_idx = offset / 8; in ssl_bitmask_set() 2928 offset += start_bits; /* Now offset % 8 == 0 */ in ssl_bitmask_set() 2938 size_t last_byte_idx = (offset + len) / 8; in ssl_bitmask_set() 2947 memset(mask + offset / 8, 0xFF, len / 8); in ssl_bitmask_set() 3098 unsigned offset; in mbedtls_ssl_update_handshake_status() local 3112 for (offset = 0, hs_buf = &hs->buffering.hs[0]; in mbedtls_ssl_update_handshake_status() 3113 offset + 1 < MBEDTLS_SSL_MAX_BUFFERED_HS; in mbedtls_ssl_update_handshake_status() 3114 offset++, hs_buf++) { in mbedtls_ssl_update_handshake_status() [all …]
|
D | camellia.c | 883 size_t offset, len; in mbedtls_camellia_self_test() local 1006 offset = 0; in mbedtls_camellia_self_test() 1013 mbedtls_camellia_crypt_ctr(&ctx, len, &offset, nonce_counter, stream_block, in mbedtls_camellia_self_test() 1026 mbedtls_camellia_crypt_ctr(&ctx, len, &offset, nonce_counter, stream_block, in mbedtls_camellia_self_test()
|
D | ssl_tls12_client.c | 1913 size_t offset, size_t *olen, in ssl_write_encrypted_pms() argument 1921 if (offset + len_bytes > MBEDTLS_SSL_OUT_CONTENT_LEN) { in ssl_write_encrypted_pms() 1964 ssl->out_msg + offset + len_bytes, olen, in ssl_write_encrypted_pms() 1965 MBEDTLS_SSL_OUT_CONTENT_LEN - offset - len_bytes, in ssl_write_encrypted_pms() 1972 MBEDTLS_PUT_UINT16_BE(*olen, ssl->out_msg, offset); in ssl_write_encrypted_pms() 3239 size_t n = 0, offset = 0; in ssl_write_certificate_verify() local 3327 offset = 2; in ssl_write_certificate_verify() 3337 ssl->out_msg + 6 + offset, in ssl_write_certificate_verify() 3338 out_buf_len - 6 - offset, in ssl_write_certificate_verify() 3350 MBEDTLS_PUT_UINT16_BE(n, ssl->out_msg, offset + 4); in ssl_write_certificate_verify() [all …]
|
D | constant_time_internal.h | 263 size_t offset,
|
D | aes.c | 1764 size_t offset; in mbedtls_aes_self_test() local 1943 offset = 0; in mbedtls_aes_self_test() 1965 ret = mbedtls_aes_crypt_cfb128(&ctx, mode, 64, &offset, iv, buf, buf); in mbedtls_aes_self_test() 2002 offset = 0; in mbedtls_aes_self_test() 2024 ret = mbedtls_aes_crypt_ofb(&ctx, 64, &offset, iv, buf, buf); in mbedtls_aes_self_test() 2060 offset = 0; in mbedtls_aes_self_test() 2075 ret = mbedtls_aes_crypt_ctr(&ctx, len, &offset, nonce_counter, in mbedtls_aes_self_test()
|
D | bignum_core.c | 204 size_t offset = ((i % ciL) << 3); in mbedtls_mpi_core_read_le() local 205 X[i / ciL] |= ((mbedtls_mpi_uint) input[i]) << offset; in mbedtls_mpi_core_read_le()
|
D | rsa.c | 1663 size_t slen, min_slen, hlen, offset = 0; in rsa_rsassa_pss_sign() local 1743 offset = 1; in rsa_rsassa_pss_sign() 1747 ret = mgf_mask(sig + offset, olen - hlen - 1 - offset, p, hlen, in rsa_rsassa_pss_sign()
|
/mbedtls-3.5.0/tests/suites/ |
D | test_suite_constant_time.data | 2 Constant-flow memcpy from offset: small 6 Constant-flow memcpy from offset: medium 10 Constant-flow memcpy from offset: large 55 mbedtls_ct_memcmp len 1 offset 1 different 58 mbedtls_ct_memcmp len 17 offset 1 different 61 mbedtls_ct_memcmp len 17 offset 1 different 1 64 mbedtls_ct_memcmp len 17 offset 1 different 5 67 mbedtls_ct_memcmp len 1 offset 1 70 mbedtls_ct_memcmp len 1 offset 2 73 mbedtls_ct_memcmp len 1 offset 3 [all …]
|
D | test_suite_alignment.data | 10 Unaligned 16-bit access offset=1 13 Unaligned 32-bit access offset=1 16 Unaligned 64-bit access offset=1 19 Unaligned 16-bit access offset=4 22 Unaligned 32-bit access offset=4 25 Unaligned 64-bit access offset=4 28 Unaligned 16-bit access offset=7 31 Unaligned 32-bit access offset=7 34 Unaligned 64-bit access offset=7 37 Unaligned 16-bit access offset=8 [all …]
|
D | test_suite_constant_time.function | 29 void mbedtls_ct_memcmp(int same, int size, int offset) 32 ASSERT_ALLOC(a, size + offset); 33 ASSERT_ALLOC(b, size + offset); 35 TEST_CF_SECRET(a + offset, size); 36 TEST_CF_SECRET(b + offset, size); 39 * same gives the number of bytes (after the initial offset) 42 for (int i = 0; i < size + offset; i++) { 44 if (same == -1 || (i - offset) < same) { 51 int reference = memcmp(a + offset, b + offset, size); 52 int actual = mbedtls_ct_memcmp(a + offset, b + offset, size); [all …]
|
D | test_suite_alignment.function | 34 void mbedtls_unaligned_access(int size, int offset) 50 r = mbedtls_get_unaligned_uint16(x + offset); 53 r = mbedtls_get_unaligned_uint32(x + offset); 56 r = mbedtls_get_unaligned_uint64(x + offset); 71 /* example for offset == 1: 81 uint64_t b = offset + i; 99 x[i + offset] = 0xff; 107 mbedtls_put_unaligned_uint16(x + offset, r); 110 mbedtls_put_unaligned_uint32(x + offset, r); 113 mbedtls_put_unaligned_uint64(x + offset, r); [all …]
|
D | test_suite_dhm.function | 27 size_t *offset) 36 TEST_ASSERT(size >= *offset + 2); 37 n = (buffer[*offset] << 8) | buffer[*offset + 1]; 38 *offset += 2; 42 TEST_ASSERT(size >= *offset + n); 43 TEST_EQUAL(0, mbedtls_mpi_read_binary(&actual, buffer + *offset, n)); 45 *offset += n; 59 size_t offset = 0; 70 if (!check_dhm_param_output(&ctx->P, ske, ske_len, &offset)) { 73 if (!check_dhm_param_output(&ctx->G, ske, ske_len, &offset)) { [all …]
|
D | test_suite_asn1parse.function | 186 size_t offset; 191 offset = content - state->input_start; 192 mbedtls_test_set_step(offset); 198 TEST_EQUAL(n, offset); 566 * two integers: the offset of the element (offset from the start 624 * three integers: the offset of the element's content (offset from
|
D | test_suite_psa_its.function | 206 int offset, int length_arg, 223 status = psa_its_get(uid, offset, length_arg, buffer, &ret_len); 226 ASSERT_COMPARE(data->x + offset, (size_t) length_arg,
|
D | test_suite_ssl.function | 1262 * to succeed starting from some offset. Always keep 1266 * to succeed starting from some offset. Always keep 1271 * some offset. 1286 size_t offset; /* Available space at beginning/end/both */ 1287 size_t threshold = 96; /* Maximum offset to test against */ 1311 for (offset = 0; offset <= threshold; offset++) { 1316 memset(rec.ctr, offset, sizeof(rec.ctr)); 1318 rec.ver[0] = offset; 1319 rec.ver[1] = offset; 1328 rec.data_offset = offset; [all …]
|
/mbedtls-3.5.0/programs/aes/ |
D | crypt_and_hash.c | 92 long filesize, offset; in main() local 95 __int64 filesize, offset; in main() local 97 off_t filesize, offset; in main() local 332 for (offset = 0; offset < filesize; offset += mbedtls_cipher_get_block_size(&cipher_ctx)) { in main() 333 ilen = ((unsigned int) filesize - offset > mbedtls_cipher_get_block_size(&cipher_ctx)) ? in main() 334 mbedtls_cipher_get_block_size(&cipher_ctx) : (unsigned int) (filesize - offset); in main() 483 for (offset = 0; offset < filesize; offset += mbedtls_cipher_get_block_size(&cipher_ctx)) { in main() 484 ilen = ((unsigned int) filesize - offset > mbedtls_cipher_get_block_size(&cipher_ctx)) ? in main() 485 mbedtls_cipher_get_block_size(&cipher_ctx) : (unsigned int) (filesize - offset); in main()
|
/mbedtls-3.5.0/programs/test/ |
D | udp_proxy.c | 649 uint8_t offset; in send_delayed() local 651 for (offset = 0; offset < prev_len; offset++) { in send_delayed() 652 ret = send_packet(&prev[offset], "delayed"); in send_delayed()
|
D | benchmark.c | 373 LARGE_INTEGER offset; in mbedtls_timing_hardclock() local 375 QueryPerformanceCounter(&offset); in mbedtls_timing_hardclock() 377 return (unsigned long) (offset.QuadPart); in mbedtls_timing_hardclock()
|
/mbedtls-3.5.0/scripts/ |
D | assemble_changelog.py | 254 offset = (self.header + self.top_version_title).count('\n') + 1 255 self.add_categories_from_text(input_stream.name, offset,
|