| /mbedtls/library/ |
| A D | alignment.h | 557 #define MBEDTLS_GET_UINT24_BE(data, offset) \ argument 559 ((uint32_t) (data)[(offset)] << 16) \ 560 | ((uint32_t) (data)[(offset) + 1] << 8) \ 561 | ((uint32_t) (data)[(offset) + 2]) \ 573 #define MBEDTLS_PUT_UINT24_BE(n, data, offset) \ argument 575 (data)[(offset)] = MBEDTLS_BYTE_2(n); \ 576 (data)[(offset) + 1] = MBEDTLS_BYTE_1(n); \ 589 #define MBEDTLS_GET_UINT24_LE(data, offset) \ argument 591 ((uint32_t) (data)[(offset)]) \ 592 | ((uint32_t) (data)[(offset) + 1] << 8) \ [all …]
|
| A D | ccm.c | 124 size_t offset, size_t use_len, in mbedtls_ccm_crypt() argument 143 mbedtls_xor(output, input, tmp_buf + offset, use_len); in mbedtls_ccm_crypt() 294 size_t use_len, offset; in mbedtls_ccm_update_ad() local 324 use_len = 16 - offset; in mbedtls_ccm_update_ad() 330 mbedtls_xor(ctx->y + offset, ctx->y + offset, add, use_len); in mbedtls_ccm_update_ad() 365 size_t use_len, offset; in mbedtls_ccm_update() local 391 offset = ctx->processed % 16; in mbedtls_ccm_update() 393 use_len = 16 - offset; in mbedtls_ccm_update() 403 mbedtls_xor(ctx->y + offset, ctx->y + offset, input, use_len); in mbedtls_ccm_update() 417 ret = mbedtls_ccm_crypt(ctx, offset, use_len, input, output); in mbedtls_ccm_update() [all …]
|
| A D | chacha20.c | 135 size_t offset = i * 4U; in chacha20_block() local 137 MBEDTLS_PUT_UINT32_LE(working_state[i], keystream, offset); in chacha20_block() 206 size_t offset = 0U; in mbedtls_chacha20_update() local 210 output[offset] = input[offset] in mbedtls_chacha20_update() 214 offset++; in mbedtls_chacha20_update() 224 mbedtls_xor(output + offset, input + offset, ctx->keystream8, 64U); in mbedtls_chacha20_update() 226 offset += CHACHA20_BLOCK_SIZE_BYTES; in mbedtls_chacha20_update() 236 mbedtls_xor(output + offset, input + offset, ctx->keystream8, size); in mbedtls_chacha20_update()
|
| A D | poly1305.c | 73 size_t offset = 0U; in poly1305_process() local 94 d0 = MBEDTLS_GET_UINT32_LE(input, offset + 0); in poly1305_process() 95 d1 = MBEDTLS_GET_UINT32_LE(input, offset + 4); in poly1305_process() 96 d2 = MBEDTLS_GET_UINT32_LE(input, offset + 8); in poly1305_process() 97 d3 = MBEDTLS_GET_UINT32_LE(input, offset + 12); in poly1305_process() 154 offset += POLY1305_BLOCK_SIZE_BYTES; in poly1305_process() 274 size_t offset = 0U; in mbedtls_poly1305_update() local 303 offset += queue_free_len; in mbedtls_poly1305_update() 311 poly1305_process(ctx, nblocks, &input[offset], 1U); in mbedtls_poly1305_update() 313 offset += nblocks * POLY1305_BLOCK_SIZE_BYTES; in mbedtls_poly1305_update() [all …]
|
| A D | gcm.c | 471 size_t use_len, offset; in mbedtls_gcm_update_ad() local 486 offset = ctx->add_len % 16; in mbedtls_gcm_update_ad() 489 if (offset != 0) { in mbedtls_gcm_update_ad() 490 use_len = 16 - offset; in mbedtls_gcm_update_ad() 495 mbedtls_xor(ctx->buf + offset, ctx->buf + offset, p, use_len); in mbedtls_gcm_update_ad() 497 if (offset + use_len == 16) { in mbedtls_gcm_update_ad() 554 mbedtls_xor(ctx->buf + offset, ctx->buf + offset, input, use_len); in gcm_mask() 558 mbedtls_xor(ctx->buf + offset, ctx->buf + offset, output, use_len); in gcm_mask() 572 size_t offset; in mbedtls_gcm_update() local 603 offset = ctx->len % 16; in mbedtls_gcm_update() [all …]
|
| A D | constant_time.c | 151 void mbedtls_ct_memmove_left(void *start, size_t total, size_t offset) in mbedtls_ct_memmove_left() argument 155 mbedtls_ct_condition_t no_op = mbedtls_ct_uint_gt(total - offset, i); in mbedtls_ct_memmove_left() 217 size_t offset, in mbedtls_ct_memcpy_offset() argument 225 mbedtls_ct_memcpy_if(mbedtls_ct_uint_eq(offsetval, offset), dest, src + offsetval, NULL, in mbedtls_ct_memcpy_offset()
|
| A D | ssl_msg.c | 98 size_t offset; in mbedtls_ct_hmac() local 140 for (offset = min_data_len; offset <= max_data_len; offset++) { in mbedtls_ct_hmac() 218 size_t offset; in mbedtls_ct_hmac() local 244 for (offset = min_data_len; offset <= max_data_len; offset++) { in mbedtls_ct_hmac() 3321 unsigned offset; in mbedtls_ssl_update_handshake_status() local 4316 unsigned offset; in ssl_load_buffered_message() local 4317 for (offset = 1; offset < MBEDTLS_SSL_MAX_BUFFERED_HS; offset++) { in ssl_load_buffered_message() 4370 int offset; in ssl_buffer_make_space() local 4389 offset >= 0; offset--) { in ssl_buffer_make_space() 6248 unsigned offset; in mbedtls_ssl_buffering_free() local [all …]
|
| A D | constant_time_internal.h | 467 size_t offset); 533 size_t offset,
|
| A D | camellia.c | 873 size_t offset, len; in mbedtls_camellia_self_test() local 1008 offset = 0; in mbedtls_camellia_self_test() 1015 mbedtls_camellia_crypt_ctr(&ctx, len, &offset, nonce_counter, stream_block, in mbedtls_camellia_self_test() 1028 mbedtls_camellia_crypt_ctr(&ctx, len, &offset, nonce_counter, stream_block, in mbedtls_camellia_self_test()
|
| A D | aes.c | 1447 size_t offset = *nc_off; in mbedtls_aes_crypt_ctr() local 1449 if (offset > 0x0F) { in mbedtls_aes_crypt_ctr() 1455 if (offset == 0) { in mbedtls_aes_crypt_ctr() 1462 n -= offset; in mbedtls_aes_crypt_ctr() 1468 mbedtls_xor(&output[i], &input[i], &stream_block[offset], n); in mbedtls_aes_crypt_ctr() 1470 offset = 0; in mbedtls_aes_crypt_ctr() 1833 size_t offset; in mbedtls_aes_self_test() local 2048 offset = 0; in mbedtls_aes_self_test() 2112 offset = 0; in mbedtls_aes_self_test() 2134 ret = mbedtls_aes_crypt_ofb(&ctx, 64, &offset, iv, buf, buf); in mbedtls_aes_self_test() [all …]
|
| A D | ssl_tls12_client.c | 1911 size_t offset, size_t *olen, in ssl_write_encrypted_pms() argument 1919 if (offset + len_bytes > MBEDTLS_SSL_OUT_CONTENT_LEN) { in ssl_write_encrypted_pms() 1962 ssl->out_msg + offset + len_bytes, olen, in ssl_write_encrypted_pms() 1963 MBEDTLS_SSL_OUT_CONTENT_LEN - offset - len_bytes, in ssl_write_encrypted_pms() 1970 MBEDTLS_PUT_UINT16_BE(*olen, ssl->out_msg, offset); in ssl_write_encrypted_pms() 3243 size_t n = 0, offset = 0; in ssl_write_certificate_verify() local 3331 offset = 2; in ssl_write_certificate_verify() 3341 ssl->out_msg + 6 + offset, in ssl_write_certificate_verify() 3342 out_buf_len - 6 - offset, in ssl_write_certificate_verify() 3354 MBEDTLS_PUT_UINT16_BE(n, ssl->out_msg, offset + 4); in ssl_write_certificate_verify() [all …]
|
| /mbedtls/tests/suites/ |
| A 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 …]
|
| A D | test_suite_constant_time.function | 216 for (size_t offset = 0; offset < size; offset++) { 231 a[offset] = 0; 246 TEST_CALLOC(a, size + offset); 247 TEST_CALLOC(b, size + offset); 262 int reference = memcmp(a + offset, b + offset, size); 267 int actual = mbedtls_ct_memcmp(a + offset, b + offset, size); 339 TEST_CALLOC(src, size + offset); 365 /* Apply offset to src only */ 398 mbedtls_ct_memcpy_if(mbedtls_ct_bool(secret_eq), result, src + offset, src2 + offset, size); 418 mbedtls_ct_memcpy_if(mbedtls_ct_bool(secret_eq), src + offset, src + offset, src + offset, [all …]
|
| A D | test_suite_alignment.function | 31 void mbedtls_unaligned_access(int size, int offset) 47 r = mbedtls_get_unaligned_uint16(x + offset); 50 r = mbedtls_get_unaligned_uint32(x + offset); 53 r = mbedtls_get_unaligned_uint64(x + offset); 81 x[i + offset] = 0xff; 89 mbedtls_put_unaligned_uint16(x + offset, r); 92 mbedtls_put_unaligned_uint32(x + offset, r); 95 mbedtls_put_unaligned_uint64(x + offset, r); 246 TEST_ASSERT(offset >= 0 && offset < 8); 292 uint64_t b = x[i + offset]; [all …]
|
| A D | test_suite_test_helpers.data | 1 Memory poison+unpoison: offset=0 len=42 4 Memory poison+unpoison: offset=0 len=1 7 Memory poison+unpoison: offset=0 len=2 10 Memory poison+unpoison: offset=1 len=1 13 Memory poison+unpoison: offset=1 len=2 16 Memory poison+unpoison: offset=7 len=1 19 Memory poison+unpoison: offset=7 len=2 22 Memory poison+unpoison: offset=0 len=0
|
| A D | test_suite_constant_time.data | 2 Constant-flow memcpy from offset: small 6 Constant-flow memcpy from offset: medium 67 mbedtls_ct_memcmp len 1 offset 1 70 mbedtls_ct_memcmp len 1 offset 2 73 mbedtls_ct_memcmp len 1 offset 3 76 mbedtls_ct_memcmp len 5 offset 1 79 mbedtls_ct_memcmp len 5 offset 2 82 mbedtls_ct_memcmp len 5 offset 3 85 mbedtls_ct_memcmp len 17 offset 1 88 mbedtls_ct_memcmp len 17 offset 2 [all …]
|
| A 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); 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)) { 76 if (!check_dhm_param_output(&ctx->GX, ske, ske_len, &offset)) { [all …]
|
| A 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
|
| A 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 TEST_MEMORY_COMPARE(data->x + offset, (size_t) length_arg,
|
| A D | test_suite_ssl.function | 1364 * to succeed starting from some offset. Always keep 1368 * to succeed starting from some offset. Always keep 1373 * some offset. 1388 size_t offset; /* Available space at beginning/end/both */ 1413 for (offset = 0; offset <= threshold; offset++) { 1418 memset(rec.ctr, offset, sizeof(rec.ctr)); 1420 rec.ver[0] = offset; 1421 rec.ver[1] = offset; 1430 rec.data_offset = offset; 1440 rec.data_offset = offset; [all …]
|
| /mbedtls/programs/aes/ |
| A D | crypt_and_hash.c | 83 long filesize, offset; in main() local 86 __int64 filesize, offset; in main() local 88 off_t filesize, offset; in main() local 330 for (offset = 0; offset < filesize; offset += cipher_block_size) { in main() 331 ilen = ((unsigned int) filesize - offset > cipher_block_size) ? in main() 332 cipher_block_size : (unsigned int) (filesize - offset); in main() 484 for (offset = 0; offset < filesize; offset += cipher_block_size) { in main() 485 ilen = ((unsigned int) filesize - offset > cipher_block_size) ? in main() 486 cipher_block_size : (unsigned int) (filesize - offset); in main()
|
| /mbedtls/programs/test/ |
| A D | metatest.c | 201 size_t start = 0, offset = 0, count = 0; in test_memory_poison() local 208 &start, &offset, &count, &direction) != 4) { in test_memory_poison() 233 if (offset >= count) { in test_memory_poison() 237 __func__, offset, count); in test_memory_poison() 244 aligned.buf[start + offset] = 'b'; in test_memory_poison() 248 mbedtls_printf("%u\n", (unsigned) aligned.buf[start + offset]); in test_memory_poison()
|
| A D | udp_proxy.c | 636 uint8_t offset; in send_delayed() local 638 for (offset = 0; offset < prev_len; offset++) { in send_delayed() 639 ret = send_packet(&prev[offset], "delayed"); in send_delayed()
|
| A D | benchmark.c | 369 LARGE_INTEGER offset; in mbedtls_timing_hardclock() local 371 QueryPerformanceCounter(&offset); in mbedtls_timing_hardclock() 373 return (unsigned long) (offset.QuadPart); in mbedtls_timing_hardclock()
|
| /mbedtls/scripts/ |
| A D | assemble_changelog.py | 249 offset = (self.header + self.top_version_title).count('\n') + 1 251 self.add_categories_from_text(input_stream.name, offset,
|