Home
last modified time | relevance | path

Searched refs:input_len (Results 1 – 18 of 18) sorted by relevance

/mbedtls-3.7.0/tests/suites/
Dtest_suite_psa_crypto_memory.function85 void local_input_alloc(int input_len, psa_status_t exp_status)
93 TEST_CALLOC(input, input_len);
94 fill_buffer_pattern(input, input_len);
96 status = psa_crypto_local_input_alloc(input, input_len, &local_input);
100 MBEDTLS_TEST_MEMORY_UNPOISON(input, input_len);
101 if (input_len != 0) {
104 TEST_MEMORY_COMPARE(input, input_len,
115 void local_input_free(int input_len)
120 local_input.length = input_len;
Dtest_suite_chachapoly.function88 size_t input_len = sizeof(input);
104 TEST_ASSERT(mbedtls_chachapoly_update(&ctx, input_len, input, output)
115 TEST_ASSERT(mbedtls_chachapoly_update(&ctx, input_len, input, output)
127 TEST_ASSERT(mbedtls_chachapoly_update(&ctx, input_len, input, output)
135 TEST_ASSERT(mbedtls_chachapoly_update(&ctx, input_len, input, output)
137 TEST_ASSERT(mbedtls_chachapoly_update(&ctx, input_len, input, output)
Dtest_suite_psa_crypto_hash.function62 size_t input_len = strlen(input);
63 PSA_ASSERT(psa_mac_compute(key, alg, (uint8_t const *) input, input_len, mac, sizeof(mac),
70 PSA_ASSERT(psa_mac_verify(key, alg, (uint8_t const *) input, input_len, expected_mac->x,
75 TEST_EQUAL(psa_mac_verify(key, alg, (uint8_t const *) input, input_len, expected_mac->x,
Dtest_suite_ssl.function163 size_t input_len;
193 input_len = 0;
197 input_len += put_ret[j];
202 if (input_len == 0) {
203 input_len = 1;
205 TEST_CALLOC(input, input_len);
213 TEST_ASSERT(output_len <= input_len);
223 for (i = 0; i < input_len; i++) {
/mbedtls-3.7.0/library/
Dpsa_crypto_invasive.h76 psa_status_t psa_crypto_copy_input(const uint8_t *input, size_t input_len,
85 extern void (*psa_input_pre_copy_hook)(const uint8_t *input, size_t input_len);
86 extern void (*psa_input_post_copy_hook)(const uint8_t *input, size_t input_len);
Dcipher.c841 static int get_pkcs_padding(unsigned char *input, size_t input_len, in get_pkcs_padding() argument
851 padding_len = input[input_len - 1]; in get_pkcs_padding()
852 *data_len = input_len - padding_len; in get_pkcs_padding()
854 mbedtls_ct_condition_t bad = mbedtls_ct_uint_gt(padding_len, input_len); in get_pkcs_padding()
859 pad_idx = input_len - padding_len; in get_pkcs_padding()
860 for (i = 0; i < input_len; i++) { in get_pkcs_padding()
886 static int get_one_and_zeros_padding(unsigned char *input, size_t input_len, in get_one_and_zeros_padding() argument
898 for (ptrdiff_t i = (ptrdiff_t) (input_len) - 1; i >= 0; i--) { in get_one_and_zeros_padding()
930 static int get_zeros_and_len_padding(unsigned char *input, size_t input_len, in get_zeros_and_len_padding() argument
941 padding_len = input[input_len - 1]; in get_zeros_and_len_padding()
[all …]
Dccm.c359 const unsigned char *input, size_t input_len, in mbedtls_ccm_update() argument
379 if (ctx->tag_len != 0 && ctx->processed + input_len > ctx->plaintext_len) { in mbedtls_ccm_update()
383 if (output_size < input_len) { in mbedtls_ccm_update()
386 *output_len = input_len; in mbedtls_ccm_update()
390 while (input_len > 0) { in mbedtls_ccm_update()
395 if (use_len > input_len) { in mbedtls_ccm_update()
396 use_len = input_len; in mbedtls_ccm_update()
461 input_len -= use_len; in mbedtls_ccm_update()
Dpem.c244 static int pem_check_pkcs_padding(unsigned char *input, size_t input_len, size_t *data_len) in pem_check_pkcs_padding() argument
247 size_t pad_len = input[input_len - 1]; in pem_check_pkcs_padding()
250 if (pad_len > input_len) { in pem_check_pkcs_padding()
254 *data_len = input_len - pad_len; in pem_check_pkcs_padding()
256 for (i = *data_len; i < input_len; i++) { in pem_check_pkcs_padding()
Dpsa_crypto.c7161 size_t input_len, argument
7166 if (input_len > PSA_HASH_BLOCK_LENGTH(hash_alg)) {
7167 return psa_hash_compute(hash_alg, input, input_len, output,
7169 } else if (input_len > 0) {
7170 memcpy(output, input, input_len);
7179 size_t input_len, argument
7184 if (input_len != PSA_MAC_LENGTH(PSA_KEY_TYPE_AES, 128U, PSA_ALG_CMAC)) {
7195 PSA_ALG_CMAC, input, input_len,
7202 memcpy(output, input, input_len);
9006 void (*psa_input_pre_copy_hook)(const uint8_t *input, size_t input_len) = NULL;
[all …]
Dssl_tls13_keys.h453 const unsigned char *input, size_t input_len,
Dpsa_crypto_core.h905 psa_status_t psa_crypto_local_input_alloc(const uint8_t *input, size_t input_len,
Dssl_tls13_keys.c337 const unsigned char *input, size_t input_len, in mbedtls_ssl_tls13_evolve_secret() argument
375 if (input != NULL && input_len != 0) { in mbedtls_ssl_tls13_evolve_secret()
377 l_input_len = input_len; in mbedtls_ssl_tls13_evolve_secret()
/mbedtls-3.7.0/tests/src/test_helpers/
Dssl_helpers.c138 const unsigned char *input, size_t input_len) in mbedtls_test_ssl_buffer_put() argument
147 if ((buf->content_length + input_len) > buf->capacity) { in mbedtls_test_ssl_buffer_put()
148 input_len = buf->capacity - buf->content_length; in mbedtls_test_ssl_buffer_put()
152 return (input_len == 0) ? 0 : -1; in mbedtls_test_ssl_buffer_put()
161 if (buf->start + buf->content_length + input_len in mbedtls_test_ssl_buffer_put()
163 overflow = (buf->start + buf->content_length + input_len) in mbedtls_test_ssl_buffer_put()
168 input_len - overflow); in mbedtls_test_ssl_buffer_put()
169 memcpy(buf->buffer, input + input_len - overflow, overflow); in mbedtls_test_ssl_buffer_put()
174 input, input_len); in mbedtls_test_ssl_buffer_put()
177 buf->content_length += input_len; in mbedtls_test_ssl_buffer_put()
[all …]
/mbedtls-3.7.0/include/mbedtls/
Dccm.h474 const unsigned char *input, size_t input_len,
Dssl.h1083 size_t input_len);
/mbedtls-3.7.0/programs/ssl/
Dssl_server2.c1137 size_t input_len; member
1157 size_t input_len) in ssl_async_start() argument
1197 if (input_len > SSL_ASYNC_INPUT_MAX_SIZE) { in ssl_async_start()
1208 memcpy(ctx->input, input, input_len); in ssl_async_start()
1209 ctx->input_len = input_len; in ssl_async_start()
1234 size_t input_len) in ssl_async_decrypt() argument
1238 input, input_len); in ssl_async_decrypt()
1263 ctx->input, ctx->input_len, in ssl_async_resume()
1270 ctx->input, ctx->input_len, in ssl_async_resume()
/mbedtls-3.7.0/tests/include/test/
Dssl_helpers.h256 const unsigned char *input, size_t input_len);
/mbedtls-3.7.0/docs/architecture/
Dpsa-shared-memory.md547 psa_status_t psa_crypto_local_input_alloc(const uint8_t *input, size_t input_len,
553 … to allocate a new buffer of length `input_len`, copies the contents across from `input`. It then …