| /lib/mbedtls/external/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 | 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 | 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 | 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 …]
|
| /lib/mbedtls/external/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 …]
|
| /lib/lwip/lwip/src/apps/snmp/ |
| A D | snmp_pbuf_stream.c | 49 pbuf_stream->offset = offset; in snmp_pbuf_stream_init() 63 if (pbuf_copy_partial(pbuf_stream->pbuf, data, 1, pbuf_stream->offset) == 0) { in snmp_pbuf_stream_read() 67 pbuf_stream->offset++; in snmp_pbuf_stream_read() 90 pbuf_stream->offset += buf_len; in snmp_pbuf_stream_writebuf() 127 pbuf_stream->offset += chunk_len; in snmp_pbuf_stream_writeto() 136 snmp_pbuf_stream_seek(struct snmp_pbuf_stream *pbuf_stream, s32_t offset) in snmp_pbuf_stream_seek() argument 138 if (((pbuf_stream->offset + offset) < 0) || (offset > pbuf_stream->length)) { in snmp_pbuf_stream_seek() 143 pbuf_stream->offset += (u16_t)offset; in snmp_pbuf_stream_seek() 144 pbuf_stream->length -= (u16_t)offset; in snmp_pbuf_stream_seek() 150 snmp_pbuf_stream_seek_abs(struct snmp_pbuf_stream *pbuf_stream, u32_t offset) in snmp_pbuf_stream_seek_abs() argument [all …]
|
| A D | snmp_pbuf_stream.h | 54 u16_t offset; member 58 err_t snmp_pbuf_stream_init(struct snmp_pbuf_stream *pbuf_stream, struct pbuf *p, u16_t offset, u16… 63 err_t snmp_pbuf_stream_seek(struct snmp_pbuf_stream *pbuf_stream, s32_t offset); 64 err_t snmp_pbuf_stream_seek_abs(struct snmp_pbuf_stream *pbuf_stream, u32_t offset);
|
| /lib/ |
| A D | tpm-common.c | 25 size_t offset = 0, length = 0; in pack_byte_string() local 33 offset = va_arg(args, size_t); in pack_byte_string() 38 offset = va_arg(args, size_t); in pack_byte_string() 43 offset = va_arg(args, size_t); in pack_byte_string() 48 offset = va_arg(args, size_t); in pack_byte_string() 58 if (offset + length > size) { in pack_byte_string() 65 str[offset] = value; in pack_byte_string() 86 size_t offset = 0, length = 0; in unpack_byte_string() local 120 if (offset + length > size) { in unpack_byte_string() 123 size, offset, length); in unpack_byte_string() [all …]
|
| A D | tpm-v2.c | 225 uint offset = 27; in tpm2_clear() local 251 offset += pw_sz; in tpm2_clear() 317 uint offset = 33; in tpm2_pcr_extend() local 577 uint offset = 27; in tpm2_send_pcr_allocate() local 610 offset += pw_sz; in tpm2_send_pcr_allocate() 757 unsigned int offset = 27; in tpm2_dam_reset() local 766 offset += pw_sz; in tpm2_dam_reset() 800 unsigned int offset = 27; in tpm2_dam_parameters() local 815 offset += pw_sz + 12; in tpm2_dam_parameters() 826 unsigned int offset = 27; in tpm2_change_auth() local [all …]
|
| A D | fdtdec.c | 402 int offset, node; in fdtdec_add_aliases_for_id() local 428 offset > 0; in fdtdec_add_aliases_for_id() 429 offset = fdt_next_property_offset(blob, offset)) { in fdtdec_add_aliases_for_id() 1290 int offset, err; in fdtdec_set_ethernet_mac_address() local 1302 if (offset < 0) { in fdtdec_set_ethernet_mac_address() 1494 int offset, len; in fdtdec_get_carveout() local 1498 if (offset < 0) in fdtdec_get_carveout() 1499 return offset; in fdtdec_get_carveout() 1520 if (offset < 0) { in fdtdec_get_carveout() 1522 return offset; in fdtdec_get_carveout() [all …]
|
| A D | lz4.c | 197 size_t offset; in LZ4_decompress_generic() local 238 offset = LZ4_readLE16(ip); in LZ4_decompress_generic() 240 match = op - offset; in LZ4_decompress_generic() 245 (offset >= 8) && in LZ4_decompress_generic() 358 offset = LZ4_readLE16(ip); in LZ4_decompress_generic() 360 match = op - offset; in LZ4_decompress_generic() 380 LZ4_write32(op, (U32)offset); in LZ4_decompress_generic() 474 if (unlikely(offset < 8)) { in LZ4_decompress_generic() 479 match += inc32table[offset]; in LZ4_decompress_generic() 481 match -= dec64table[offset]; in LZ4_decompress_generic()
|
| /lib/lwip/lwip/test/unit/mdns/ |
| A D | test_mdns.c | 45 u16_t offset; in START_TEST() local 64 u16_t offset; in START_TEST() local 83 u16_t offset; in START_TEST() local 108 u16_t offset; in START_TEST() local 164 u16_t offset; in START_TEST() local 618 offset = 2; in START_TEST() 653 offset = 2; in START_TEST() 725 offset = 2; in START_TEST() 759 offset = 2; in START_TEST() 794 offset = 2; in START_TEST() [all …]
|
| /lib/lwip/lwip/contrib/apps/LwipMibCompiler/SharpSnmpLib/Mib/ |
| A D | ValueMap.cs | 26 Int64 offset = values[0]; in GetContinousRanges() 31 if (last == offset) in GetContinousRanges() 33 result.Add(new ValueRange(offset, null)); in GetContinousRanges() 37 result.Add(new ValueRange(offset, last)); in GetContinousRanges() 40 offset = values[i]; in GetContinousRanges() 46 if (last == offset) in GetContinousRanges() 48 result.Add(new ValueRange(offset, null)); in GetContinousRanges() 52 result.Add(new ValueRange(offset, last)); in GetContinousRanges()
|
| /lib/lwip/lwip/src/apps/mdns/ |
| A D | mdns_domain.c | 214 c = pbuf_get_at(p, offset); in mdns_readname_loop() 215 offset++; in mdns_readname_loop() 220 if (offset >= p->tot_len) { in mdns_readname_loop() 225 offset++; in mdns_readname_loop() 251 offset += c; in mdns_readname_loop() 258 return offset; in mdns_readname_loop() 550 target_len = (u8_t)(target_end - *offset); in mdns_compress_domain() 564 *offset += targetpos; in mdns_compress_domain() 595 u16_t offset = outpkt->domain_offsets[i]; in mdns_write_domain() local 596 if (offset) { in mdns_write_domain() [all …]
|
| /lib/lwip/lwip/src/core/ |
| A D | pbuf.c | 227 u16_t offset = (u16_t)layer; in pbuf_alloc() local 269 offset = 0; in pbuf_alloc() 366 u16_t offset = (u16_t)l; in pbuf_alloced_custom() local 1070 if ((offset != 0) && (offset >= p->len)) { in pbuf_copy_partial() 1072 offset = (u16_t)(offset - p->len); in pbuf_copy_partial() 1075 buf_copy_len = (u16_t)(p->len - offset); in pbuf_copy_partial() 1084 offset = 0; in pbuf_copy_partial() 1114 q = pbuf_skip_const(p, offset, &out_offset); in pbuf_get_contiguous() 1404 int ret = pbuf_try_get_at(p, offset); in pbuf_get_at() 1467 u16_t start = offset; in pbuf_memcmp() [all …]
|
| /lib/mbedtls/external/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()
|
| /lib/libavb/ |
| A D | avb_cmdline.c | 119 size_t offset, key_len, value_len; in cmdline_append_option() local 125 offset = 0; in cmdline_append_option() 127 offset = avb_strlen(slot_data->cmdline); in cmdline_append_option() 128 if (offset > 0) { in cmdline_append_option() 129 offset += 1; in cmdline_append_option() 133 new_cmdline = avb_calloc(offset + key_len + value_len + 2); in cmdline_append_option() 137 if (offset > 0) { in cmdline_append_option() 138 avb_memcpy(new_cmdline, slot_data->cmdline, offset - 1); in cmdline_append_option() 139 new_cmdline[offset - 1] = ' '; in cmdline_append_option() 141 avb_memcpy(new_cmdline + offset, key, key_len); in cmdline_append_option() [all …]
|
| /lib/lwip/lwip/src/include/lwip/ |
| A D | pbuf.h | 299 …pbuf_copy_partial_pbuf(struct pbuf *p_to, const struct pbuf *p_from, u16_t copy_len, u16_t offset); 300 u16_t pbuf_copy_partial(const struct pbuf *p, void *dataptr, u16_t len, u16_t offset); 301 … *pbuf_get_contiguous(const struct pbuf *p, void *buffer, size_t bufsize, u16_t len, u16_t offset); 303 err_t pbuf_take_at(struct pbuf *buf, const void *dataptr, u16_t len, u16_t offset); 315 u8_t pbuf_get_at(const struct pbuf* p, u16_t offset); 316 int pbuf_try_get_at(const struct pbuf* p, u16_t offset); 317 void pbuf_put_at(struct pbuf* p, u16_t offset, u8_t data); 318 u16_t pbuf_memcmp(const struct pbuf* p, u16_t offset, const void* s2, u16_t n);
|
| /lib/lwip/lwip/test/unit/core/ |
| A D | test_timers.c | 47 do_test_cyclic_timers(u32_t offset) in do_test_cyclic_timers() argument 52 lwip_sys_now = offset + 0; in do_test_cyclic_timers() 59 lwip_sys_now = offset + test_cyclic.interval_ms; in do_test_cyclic_timers() 69 lwip_sys_now = offset + 0; in do_test_cyclic_timers() 76 lwip_sys_now = offset + 2*test_cyclic.interval_ms; in do_test_cyclic_timers() 128 do_test_timers(u32_t offset) in do_test_timers() argument 132 lwip_sys_now = offset + 0; in do_test_timers()
|
| /lib/fwu_updates/ |
| A D | fwu_mtd.c | 42 fdt_addr_t offset, size = 0; in fwu_mtd_get_alt_num() local 56 offset = mtd_img_info->start; in fwu_mtd_get_alt_num() 77 dfu->data.mtd.start != offset || in fwu_mtd_get_alt_num() 132 u32 offset, size; in gen_image_alt_info() local 144 offset = mtd_img_info->start; in gen_image_alt_info() 148 i == 0 ? "=" : ";", i, offset, size); in gen_image_alt_info()
|