Home
last modified time | relevance | path

Searched refs:data (Results 1 – 25 of 175) sorted by relevance

1234567

/mbedtls-3.5.0/library/
Dalignment.h248 #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 …]
Dpsa_crypto.c586 if (slot->key.data != NULL) { in psa_allocate_buffer_to_slot()
590 slot->key.data = mbedtls_calloc(1, buffer_length); in psa_allocate_buffer_to_slot()
591 if (slot->key.data == NULL) { in psa_allocate_buffer_to_slot()
600 const uint8_t *data, in psa_copy_key_material_into_slot() argument
609 memcpy(slot->key.data, data, data_length); in psa_copy_key_material_into_slot()
615 const uint8_t *data, size_t data_length, in psa_import_key_into_slot() argument
637 memcpy(key_buffer, data, data_length); in psa_import_key_into_slot()
647 data, data_length, in psa_import_key_into_slot()
658 data, data_length, in psa_import_key_into_slot()
1036 if (slot->key.data != NULL) { in psa_remove_key_data_from_memory()
[all …]
Dpsa_crypto_storage.c89 const mbedtls_svc_key_id_t key, uint8_t *data, size_t data_size) in psa_crypto_storage_load() argument
101 status = psa_its_get(data_identifier, 0, (uint32_t) data_size, data, &data_length); in psa_crypto_storage_load()
141 const uint8_t *data, in psa_crypto_storage_store() argument
152 status = psa_its_set(data_identifier, (uint32_t) data_length, data, 0); in psa_crypto_storage_store()
248 void psa_format_key_data_for_storage(const uint8_t *data, in psa_format_key_data_for_storage() argument
266 memcpy(storage_format->key_data, data, data_length); in psa_format_key_data_for_storage()
269 static psa_status_t check_magic_header(const uint8_t *data) in check_magic_header() argument
271 if (memcmp(data, PSA_KEY_STORAGE_MAGIC_HEADER, in check_magic_header()
330 const uint8_t *data, in psa_save_persistent_key() argument
338 if (data == NULL || data_length == 0) { in psa_save_persistent_key()
[all …]
Dpsa_crypto_rsa.c72 psa_key_type_t type, const uint8_t *data, size_t data_length, in mbedtls_psa_rsa_load_representation() argument
83 mbedtls_pk_parse_key(&ctx, data, data_length, NULL, 0, in mbedtls_psa_rsa_load_representation()
87 mbedtls_pk_parse_public_key(&ctx, data, data_length)); in mbedtls_psa_rsa_load_representation()
134 const uint8_t *data, size_t data_length, in mbedtls_psa_rsa_import_key() argument
143 data, in mbedtls_psa_rsa_import_key()
171 uint8_t *data, in mbedtls_psa_rsa_export_key() argument
177 uint8_t *pos = data + data_size; in mbedtls_psa_rsa_export_key()
187 ret = mbedtls_pk_write_key_der(&pk, data, data_size); in mbedtls_psa_rsa_export_key()
189 ret = mbedtls_pk_write_pubkey(&pos, data, &pk); in mbedtls_psa_rsa_export_key()
194 memset(data, 0, data_size); in mbedtls_psa_rsa_export_key()
[all …]
Dtiming.c120 void mbedtls_timing_set_delay(void *data, uint32_t int_ms, uint32_t fin_ms) in mbedtls_timing_set_delay() argument
122 mbedtls_timing_delay_context *ctx = (mbedtls_timing_delay_context *) data; in mbedtls_timing_set_delay()
135 int mbedtls_timing_get_delay(void *data) in mbedtls_timing_get_delay() argument
137 mbedtls_timing_delay_context *ctx = (mbedtls_timing_delay_context *) data; in mbedtls_timing_get_delay()
161 const mbedtls_timing_delay_context *data) in mbedtls_timing_get_final_delay() argument
163 return data->fin_ms; in mbedtls_timing_get_final_delay()
Dmd5.c77 const unsigned char data[64]) in mbedtls_internal_md5_process()
83 local.X[0] = MBEDTLS_GET_UINT32_LE(data, 0); in mbedtls_internal_md5_process()
84 local.X[1] = MBEDTLS_GET_UINT32_LE(data, 4); in mbedtls_internal_md5_process()
85 local.X[2] = MBEDTLS_GET_UINT32_LE(data, 8); in mbedtls_internal_md5_process()
86 local.X[3] = MBEDTLS_GET_UINT32_LE(data, 12); in mbedtls_internal_md5_process()
87 local.X[4] = MBEDTLS_GET_UINT32_LE(data, 16); in mbedtls_internal_md5_process()
88 local.X[5] = MBEDTLS_GET_UINT32_LE(data, 20); in mbedtls_internal_md5_process()
89 local.X[6] = MBEDTLS_GET_UINT32_LE(data, 24); in mbedtls_internal_md5_process()
90 local.X[7] = MBEDTLS_GET_UINT32_LE(data, 28); in mbedtls_internal_md5_process()
91 local.X[8] = MBEDTLS_GET_UINT32_LE(data, 32); in mbedtls_internal_md5_process()
[all …]
Dssl_msg.c689 unsigned char *data; in mbedtls_ssl_encrypt_buf() local
735 data = rec->buf + rec->data_offset; in mbedtls_ssl_encrypt_buf()
738 data, rec->data_len); in mbedtls_ssl_encrypt_buf()
765 if (ssl_build_inner_plaintext(data, in mbedtls_ssl_encrypt_buf()
796 if (ssl_build_inner_plaintext(data, in mbedtls_ssl_encrypt_buf()
845 status = psa_mac_update(&operation, data, rec->data_len); in mbedtls_ssl_encrypt_buf()
861 ret = mbedtls_md_hmac_update(&transform->md_ctx_enc, data, rec->data_len); in mbedtls_ssl_encrypt_buf()
875 memcpy(data + rec->data_len, mac, transform->maclen); in mbedtls_ssl_encrypt_buf()
878 MBEDTLS_SSL_DEBUG_BUF(4, "computed mac", data + rec->data_len, in mbedtls_ssl_encrypt_buf()
983 data, rec->data_len, in mbedtls_ssl_encrypt_buf()
[all …]
Dentropy_poll.c57 int mbedtls_platform_entropy_poll(void *data, unsigned char *output, size_t len, in mbedtls_platform_entropy_poll() argument
61 ((void) data); in mbedtls_platform_entropy_poll()
158 int mbedtls_platform_entropy_poll(void *data, in mbedtls_platform_entropy_poll() argument
164 ((void) data); in mbedtls_platform_entropy_poll()
215 int mbedtls_nv_seed_poll(void *data, in mbedtls_nv_seed_poll() argument
220 ((void) data); in mbedtls_nv_seed_poll()
Dpsa_crypto_ecp.c47 const uint8_t *data, size_t data_length, in mbedtls_psa_ecp_load_representation() argument
120 data, in mbedtls_psa_ecp_load_representation()
137 data, in mbedtls_psa_ecp_load_representation()
164 const uint8_t *data, size_t data_length, in mbedtls_psa_ecp_import_key() argument
174 data, in mbedtls_psa_ecp_import_key()
206 uint8_t *data, in mbedtls_psa_ecp_export_key() argument
229 data, in mbedtls_psa_ecp_export_key()
232 memset(data, 0, data_size); in mbedtls_psa_ecp_export_key()
243 data, in mbedtls_psa_ecp_export_key()
248 memset(data, 0, data_size); in mbedtls_psa_ecp_export_key()
[all …]
Dpsa_crypto_client.c37 const uint8_t *data, in psa_set_key_domain_parameters() argument
47 memcpy(copy, data, data_length); in psa_set_key_domain_parameters()
66 uint8_t *data, size_t data_size, size_t *data_length) in psa_get_key_domain_parameters() argument
73 memcpy(data, attributes->domain_parameters, in psa_get_key_domain_parameters()
/mbedtls-3.5.0/tests/suites/
Dtest_suite_asn1write.function15 int generic_write_start_step(generic_write_data_t *data)
17 mbedtls_test_set_step(data->size);
18 mbedtls_free(data->output);
19 data->output = NULL;
20 ASSERT_ALLOC(data->output, data->size == 0 ? 1 : data->size);
21 data->end = data->output + data->size;
22 data->p = data->end;
23 data->start = data->end - data->size;
29 int generic_write_finish_step(generic_write_data_t *data,
34 if (data->size < expected->len) {
[all …]
Dtest_suite_asn1write.data346 Store named data: not found
349 Store named data: empty haystack
352 Store named data: first
355 Store named data: last
358 Store named data: skip suffix
361 Store named data: skip prefix
364 Store named data: first match
367 Store named data: found, null to zero
370 Store named data: found, null to data
373 Store named data: found, data to zero
[all …]
Dtest_suite_constant_time_hmac.function30 /* TLS additional data is 13 bytes (hence the "lucky 13" name) */
33 unsigned char *data = NULL;
89 ASSERT_ALLOC(data, max_in_len);
95 /* Set up dummy data and add_data */
99 data[i] = (i & 0xff) ^ rec_num;
107 data, in_len,
112 data, in_len,
125 data, in_len));
132 TEST_EQUAL(0, mbedtls_md_hmac_update(&ref_ctx, data, in_len));
141 mbedtls_free(data);
[all …]
Dtest_suite_psa_its.function10 * before changing how test data is constructed or validated.
87 void set_get_remove(int uid_arg, int flags_arg, data_t *data)
95 ASSERT_ALLOC(buffer, data->len);
97 PSA_ASSERT(psa_its_set_wrap(uid, data->len, data->x, flags));
100 TEST_ASSERT(info.size == data->len);
102 PSA_ASSERT(psa_its_get(uid, 0, data->len, buffer, &ret_len));
103 ASSERT_COMPARE(data->x, data->len, buffer, ret_len);
205 void get_at(int uid_arg, data_t *data,
221 PSA_ASSERT(psa_its_set_wrap(uid, data->len, data->x, 0));
226 ASSERT_COMPARE(data->x + offset, (size_t) length_arg,
[all …]
Dtest_suite_ecjpake.data22 ECJPAKE round one: KKP1: no data
31 ECJPAKE round one: KKP1: no point data
49 ECJPAKE round one: KKP1: no second point data
61 ECJPAKE round one: KKP1: no data for r
70 ECJPAKE round one: KKP2: no data
79 ECJPAKE round one: KKP2: no point data
97 ECJPAKE round one: KKP2: no second point data
109 ECJPAKE round one: KKP2: no data for r
124 ECJPAKE round two client: no data
136 ECJPAKE round two client: no data after ECParams
[all …]
Dtest_suite_psa_crypto_persistent_key.function12 * before changing how test data is constructed or validated.
126 uint8_t *data = NULL;
130 ASSERT_ALLOC(data, data_length);
137 TEST_EQUAL(psa_import_key(&attributes, data, data_length, &key_id),
145 mbedtls_free(data);
204 data_t *data, int restart, int expected_status)
216 TEST_EQUAL(psa_import_key(&attributes, data->x, data->len, &returned_key_id),
258 void import_export_persistent_key(data_t *data, int type_arg,
266 size_t export_size = data->len;
279 PSA_ASSERT(psa_import_key(&attributes, data->x, data->len,
[all …]
Dtest_suite_mps.function33 * - After processing, the consuming layer commits the data
41 * since the consumer's request can be fulfilled from the data
78 * - After processing, the consuming layer commits the data
86 * since the consumer's request can be fulfilled from the data
133 * - After processing, the consuming layer commits the data
141 * since the consumer's requests can be fulfilled from the data
145 /* Lower layer provides data that the upper layer fully consumes
263 * hold the requested amount of data.
266 * but it should be possible to continue fetching data as if
269 * because of data remaining.
[all …]
/mbedtls-3.5.0/tests/scripts/
Dgenerate_pkcs7_tests.py70 data = fp.read()
71 lines = [line.strip() for line in data.split('\n') if len(line.strip()) > 1]
96 def asn1_mutate(data): argument
111 mutations.append(["00"] + data)
113 mutations.append(data + ["00"])
120 while i < len(data):
123 data_i = leng_i + 1 + (int(data[leng_i][1], 16) if data[leng_i][0] == '8' else 0)
124 if data[leng_i][0] == '8':
125 length = int(''.join(data[leng_i + 1: data_i]), 16)
127 length = int(data[leng_i], 16)
[all …]
Dtest_generate_test_code.py288 def __init__(self, file_name, data, line_no=0): argument
296 super(StringIOWrapper, self).__init__(data)
336 data = '''#include "mbedtls/ecp.h"
346 stream = StringIOWrapper('test_suite_ut.function', data, line_no=0)
356 data = '''#include "mbedtls/ecp.h"
367 stream = StringIOWrapper('test_suite_ut.function', data,
378 data = '''#include "mbedtls/ecp.h"
383 stream = StringIOWrapper('test_suite_ut.function', data)
398 data = '''
404 stream = StringIOWrapper('test_suite_ut.function', data)
[all …]
Dpsa_collect_statuses.py105 data = Statuses()
106 data.collect_log(options.log_file)
107 data.get_constant_names(options.psa_constant_names)
112 return data
136 data = collect_status_logs(options)
137 data.report()
/mbedtls-3.5.0/tests/src/drivers/
Dtest_driver_key_management.c262 const uint8_t *data, in mbedtls_test_transparent_import_key() argument
284 data, data_length, in mbedtls_test_transparent_import_key()
291 data, data_length, in mbedtls_test_transparent_import_key()
301 data, data_length, in mbedtls_test_transparent_import_key()
308 data, data_length, in mbedtls_test_transparent_import_key()
314 (void) data; in mbedtls_test_transparent_import_key()
328 const uint8_t *data, in mbedtls_test_opaque_import_key() argument
367 memcpy(key_buffer_temp, data, data_length); in mbedtls_test_opaque_import_key()
375 data, data_length, in mbedtls_test_opaque_import_key()
382 data, data_length, in mbedtls_test_opaque_import_key()
[all …]
/mbedtls-3.5.0/scripts/
Dgenerate_psa_constants.py314 data = {}
315 data['status_cases'] = self._make_status_cases()
316 data['ecc_curve_cases'] = self._make_ecc_curve_cases()
317 data['dh_group_cases'] = self._make_dh_group_cases()
318 data['key_type_cases'] = self._make_key_type_cases()
319 data['key_type_code'] = (self._make_ecc_key_type_code() +
321 data['hash_algorithm_cases'] = self._make_hash_algorithm_cases()
322 data['ka_algorithm_cases'] = self._make_ka_algorithm_cases()
323 data['algorithm_cases'] = self._make_algorithm_cases()
324 data['algorithm_code'] = self._make_algorithm_code()
[all …]
/mbedtls-3.5.0/programs/ssl/
Dssl_mail_client.c237 unsigned char data[128]; in write_ssl_and_get_response() local
250 len = sizeof(data) - 1; in write_ssl_and_get_response()
251 memset(data, 0, sizeof(data)); in write_ssl_and_get_response()
252 ret = mbedtls_ssl_read(ssl, data, len); in write_ssl_and_get_response()
267 mbedtls_printf("\n%s", data); in write_ssl_and_get_response()
270 if (data[i] != '\n') { in write_ssl_and_get_response()
272 code[idx++] = data[i]; in write_ssl_and_get_response()
290 unsigned char data[128]; in write_and_get_response() local
301 len = sizeof(data) - 1; in write_and_get_response()
302 memset(data, 0, sizeof(data)); in write_and_get_response()
[all …]
/mbedtls-3.5.0/tests/include/test/drivers/
Dkey_management.h91 uint8_t *data, size_t data_size, size_t *data_length);
96 uint8_t *data, size_t data_size, size_t *data_length);
101 uint8_t *data, size_t data_size, size_t *data_length);
105 const uint8_t *data,
114 const uint8_t *data,
/mbedtls-3.5.0/tests/
DCMakeLists.txt16 # generated .data files will go there
56 # Derive generated file paths in the build directory. The generated data
162 # Get the test names of the tests with generated .data files
170 # Remove the ".data" extension
179 # Remove the ".data" extension
188 # Remove the ".data" extension
197 ${CMAKE_CURRENT_BINARY_DIR}/suites/test_suite_${data_name}.data)
201 ${CMAKE_CURRENT_BINARY_DIR}/suites/test_suite_${data_name}.data)
205 ${CMAKE_CURRENT_BINARY_DIR}/suites/test_suite_${data_name}.data)
209 ${CMAKE_CURRENT_SOURCE_DIR}/suites/test_suite_${data_name}.data)
[all …]

1234567