Home
last modified time | relevance | path

Searched refs:mac (Results 1 – 25 of 35) sorted by relevance

12

/mbedtls-3.7.0/tests/suites/
Dtest_suite_poly1305.function14 unsigned char mac[16]; /* size set by the standard */
17 memset(mac, 0x00, sizeof(mac));
23 src_str->len, mac) == 0);
25 TEST_MEMORY_COMPARE(mac, expected_mac->len,
37 TEST_ASSERT(mbedtls_poly1305_finish(&ctx, mac) == 0);
39 TEST_MEMORY_COMPARE(mac, expected_mac->len,
54 TEST_ASSERT(mbedtls_poly1305_finish(&ctx, mac) == 0);
56 TEST_MEMORY_COMPARE(mac, expected_mac->len,
70 TEST_ASSERT(mbedtls_poly1305_finish(&ctx, mac) == 0);
72 TEST_MEMORY_COMPARE(mac, expected_mac->len,
Dtest_suite_chachapoly.function19 unsigned char mac[16]; /* size set by the standard */
33 input_str->x, output, mac) == 0);
36 TEST_ASSERT(memcmp(mac_str->x, mac, 16U) == 0);
87 unsigned char mac[16];
97 memset(mac, 0x00, sizeof(mac));
102 TEST_ASSERT(mbedtls_chachapoly_finish(&ctx, mac)
113 TEST_ASSERT(mbedtls_chachapoly_finish(&ctx, mac)
123 TEST_ASSERT(mbedtls_chachapoly_finish(&ctx, mac)
151 TEST_ASSERT(mbedtls_chachapoly_finish(&ctx, mac)
Dtest_suite_psa_crypto_op_fail.generated.data1547 PSA mac AEAD_WITH_SHORTENED_TAG(CCM,4): invalid with AES
1551 PSA mac AEAD_WITH_SHORTENED_TAG(CCM,4): invalid with ARIA
1555 PSA mac AEAD_WITH_SHORTENED_TAG(CCM,4): invalid with CAMELLIA
1887 PSA mac AEAD_WITH_SHORTENED_TAG(CCM,14): invalid with AES
1891 PSA mac AEAD_WITH_SHORTENED_TAG(CCM,14): invalid with ARIA
1895 PSA mac AEAD_WITH_SHORTENED_TAG(CCM,14): invalid with CAMELLIA
2087 PSA mac AEAD_WITH_SHORTENED_TAG(CCM,16): invalid with AES
2091 PSA mac AEAD_WITH_SHORTENED_TAG(CCM,16): invalid with ARIA
2095 PSA mac AEAD_WITH_SHORTENED_TAG(CCM,16): invalid with CAMELLIA
2430 PSA mac AT_LEAST_THIS_LENGTH_MAC(CBC_MAC,1): incompatible with AES
[all …]
Dtest_suite_psa_crypto_hash.function59 uint8_t mac[PSA_MAC_MAX_SIZE + 10] = { 0 };
63 PSA_ASSERT(psa_mac_compute(key, alg, (uint8_t const *) input, input_len, mac, sizeof(mac),
67 ASSERT_COMPARE(expected_mac->x, expected_mac->len, mac, mac_length);
/mbedtls-3.7.0/tests/src/drivers/
Dtest_driver_mac.c29 uint8_t *mac, in mbedtls_test_transparent_mac_compute() argument
46 mac, mac_size, mac_length); in mbedtls_test_transparent_mac_compute()
52 mac, mac_size, mac_length); in mbedtls_test_transparent_mac_compute()
60 (void) mac; in mbedtls_test_transparent_mac_compute()
177 uint8_t *mac, in mbedtls_test_transparent_mac_sign_finish() argument
191 operation, mac, mac_size, mac_length); in mbedtls_test_transparent_mac_sign_finish()
195 operation, mac, mac_size, mac_length); in mbedtls_test_transparent_mac_sign_finish()
198 (void) mac; in mbedtls_test_transparent_mac_sign_finish()
210 const uint8_t *mac, in mbedtls_test_transparent_mac_verify_finish() argument
223 operation, mac, mac_length); in mbedtls_test_transparent_mac_verify_finish()
[all …]
/mbedtls-3.7.0/library/
Dpsa_crypto_mac.c113 uint8_t *mac, in psa_hmac_finish_internal() argument
148 memcpy(mac, tmp, mac_size); in psa_hmac_finish_internal()
374 uint8_t *mac, size_t mac_size) in psa_mac_finish_internal() argument
381 memcpy(mac, tmp, mac_size); in psa_mac_finish_internal()
390 mac, mac_size); in psa_mac_finish_internal()
397 (void) mac; in psa_mac_finish_internal()
405 uint8_t *mac, in mbedtls_psa_mac_sign_finish() argument
415 status = psa_mac_finish_internal(operation, mac, mac_size); in mbedtls_psa_mac_sign_finish()
425 const uint8_t *mac, in mbedtls_psa_mac_verify_finish() argument
445 if (mbedtls_ct_memcmp(mac, actual_mac, mac_length) != 0) { in mbedtls_psa_mac_verify_finish()
[all …]
Dpoly1305.c172 unsigned char mac[16]) in poly1305_compute_mac()
222 MBEDTLS_PUT_UINT32_LE(acc0, mac, 0); in poly1305_compute_mac()
223 MBEDTLS_PUT_UINT32_LE(acc1, mac, 4); in poly1305_compute_mac()
224 MBEDTLS_PUT_UINT32_LE(acc2, mac, 8); in poly1305_compute_mac()
225 MBEDTLS_PUT_UINT32_LE(acc3, mac, 12); in poly1305_compute_mac()
327 unsigned char mac[16]) in mbedtls_poly1305_finish()
344 poly1305_compute_mac(ctx, mac); in mbedtls_poly1305_finish()
352 unsigned char mac[16]) in mbedtls_poly1305_mac()
369 ret = mbedtls_poly1305_finish(&ctx, mac); in mbedtls_poly1305_mac()
461 unsigned char mac[16]; in mbedtls_poly1305_self_test() local
[all …]
Dpsa_crypto_mac.h53 uint8_t *mac,
196 uint8_t *mac,
237 const uint8_t *mac,
Dchachapoly.c205 unsigned char mac[16]) in mbedtls_chachapoly_finish()
239 ret = mbedtls_poly1305_finish(&ctx->poly1305_ctx, mac); in mbedtls_chachapoly_finish()
433 unsigned char mac[16]; in mbedtls_chachapoly_self_test() local
452 mac); in mbedtls_chachapoly_self_test()
459 ASSERT(0 == memcmp(mac, test_mac[i], 16U), in mbedtls_chachapoly_self_test()
Dssl_tls13_keys.c676 (mbedtls_md_type_t) handshake->ciphersuite_info->mac); in ssl_tls13_key_schedule_stage_application()
788 mbedtls_md_type_t const md_type = (mbedtls_md_type_t) ssl->handshake->ciphersuite_info->mac; in mbedtls_ssl_tls13_calculate_verify_data()
791 (mbedtls_md_type_t) ssl->handshake->ciphersuite_info->mac); in mbedtls_ssl_tls13_calculate_verify_data()
1159 md_type = (mbedtls_md_type_t) ciphersuite_info->mac; in ssl_tls13_generate_early_key()
1161 hash_alg = mbedtls_md_psa_alg_from_type((mbedtls_md_type_t) ciphersuite_info->mac); in ssl_tls13_generate_early_key()
1289 hash_alg = mbedtls_md_psa_alg_from_type((mbedtls_md_type_t) handshake->ciphersuite_info->mac); in mbedtls_ssl_tls13_key_schedule_stage_early()
1361 md_type = (mbedtls_md_type_t) ciphersuite_info->mac; in ssl_tls13_generate_handshake_keys()
1363 hash_alg = mbedtls_md_psa_alg_from_type((mbedtls_md_type_t) ciphersuite_info->mac); in ssl_tls13_generate_handshake_keys()
1471 (mbedtls_md_type_t) handshake->ciphersuite_info->mac); in ssl_tls13_key_schedule_stage_handshake()
1608 md_type = (mbedtls_md_type_t) handshake->ciphersuite_info->mac; in ssl_tls13_generate_application_keys()
[all …]
Dpsa_crypto_driver_wrappers.h2556 uint8_t *mac, in psa_driver_wrapper_mac_compute() argument
2577 mac, mac_size, mac_length ); in psa_driver_wrapper_mac_compute()
2585 mac, mac_size, mac_length); in psa_driver_wrapper_mac_compute()
2594 mac, mac_size, mac_length ); in psa_driver_wrapper_mac_compute()
2607 mac, mac_size, mac_length ); in psa_driver_wrapper_mac_compute()
2618 (void) mac; in psa_driver_wrapper_mac_compute()
2833 uint8_t *mac, in psa_driver_wrapper_mac_sign_finish() argument
2842 mac, mac_size, mac_length ) ); in psa_driver_wrapper_mac_sign_finish()
2850 mac, mac_size, mac_length ) ); in psa_driver_wrapper_mac_sign_finish()
2855 mac, mac_size, mac_length ) ); in psa_driver_wrapper_mac_sign_finish()
[all …]
Dpsa_crypto.c2710 LOCAL_OUTPUT_DECLARE(mac_external, mac);
2711 LOCAL_OUTPUT_ALLOC(mac_external, mac_size, mac);
2737 mac, operation->mac_size,
2752 if (mac != NULL) {
2753 psa_wipe_tag_output_buffer(mac, status, mac_size, *mac_length);
2757 LOCAL_OUTPUT_FREE(mac_external, mac);
2768 LOCAL_INPUT_DECLARE(mac_external, mac);
2785 LOCAL_INPUT_ALLOC(mac_external, mac_length, mac);
2787 mac, mac_length);
2791 LOCAL_INPUT_FREE(mac_external, mac);
[all …]
Dssl_msg.c1041 unsigned char mac[MBEDTLS_SSL_MAC_ADD]; in mbedtls_ssl_encrypt_buf() local
1070 status = psa_mac_sign_finish(&operation, mac, MBEDTLS_SSL_MAC_ADD, in mbedtls_ssl_encrypt_buf()
1085 ret = mbedtls_md_hmac_finish(&transform->md_ctx_enc, mac); in mbedtls_ssl_encrypt_buf()
1095 memcpy(data + rec->data_len, mac, transform->maclen); in mbedtls_ssl_encrypt_buf()
1106 mbedtls_platform_zeroize(mac, transform->maclen); in mbedtls_ssl_encrypt_buf()
1375 unsigned char mac[MBEDTLS_SSL_MAC_ADD]; in mbedtls_ssl_encrypt_buf() local
1413 status = psa_mac_sign_finish(&operation, mac, MBEDTLS_SSL_MAC_ADD, in mbedtls_ssl_encrypt_buf()
1430 ret = mbedtls_md_hmac_finish(&transform->md_ctx_enc, mac); in mbedtls_ssl_encrypt_buf()
1440 memcpy(data + rec->data_len, mac, transform->maclen); in mbedtls_ssl_encrypt_buf()
1447 mbedtls_platform_zeroize(mac, transform->maclen); in mbedtls_ssl_encrypt_buf()
Dssl_tls13_generic.c360 (mbedtls_md_type_t) ssl->handshake->ciphersuite_info->mac, in mbedtls_ssl_tls13_process_certificate_verify()
1026 ssl, (mbedtls_md_type_t) ssl->handshake->ciphersuite_info->mac, in ssl_tls13_write_certificate_verify_body()
1528 ret = mbedtls_ssl_get_handshake_transcript(ssl, (mbedtls_md_type_t) ciphersuite_info->mac, in mbedtls_ssl_reset_transcript_for_hrr()
Dssl_tls13_client.c675 return mbedtls_md_psa_alg_from_type((mbedtls_md_type_t) ciphersuite_info->mac); in ssl_tls13_get_ciphersuite_hash_alg()
1113 if (mbedtls_md_psa_alg_from_type((mbedtls_md_type_t) ssl->handshake->ciphersuite_info->mac) in ssl_tls13_parse_server_pre_shared_key_ext()
2957 psa_hash_alg = mbedtls_md_psa_alg_from_type((mbedtls_md_type_t) ciphersuite_info->mac); in ssl_tls13_postprocess_new_session_ticket()
Dssl_tls.c788 if (ciphersuite_info->mac == MBEDTLS_MD_SHA384) { in mbedtls_ssl_optimize_checksum()
793 if (ciphersuite_info->mac != MBEDTLS_MD_SHA384) { in mbedtls_ssl_optimize_checksum()
2264 if (ssl->handshake->ciphersuite_info->mac == MBEDTLS_MD_SHA384) { in mbedtls_ssl_set_hs_psk()
7074 mbedtls_md_type_t hash_alg = (mbedtls_md_type_t) handshake->ciphersuite_info->mac; in ssl_compute_master()
7210 (mbedtls_md_type_t) ciphersuite_info->mac); in mbedtls_ssl_derive_keys()
8732 if (ciphersuite_info != NULL && ciphersuite_info->mac == MBEDTLS_MD_SHA384) { in ssl_tls12prf_from_cs()
8738 if (ciphersuite_info != NULL && ciphersuite_info->mac == MBEDTLS_MD_SHA256) { in ssl_tls12prf_from_cs()
8887 mac_alg = mbedtls_md_psa_alg_from_type((mbedtls_md_type_t) ciphersuite_info->mac); in ssl_tls12_populate_transform()
8890 (unsigned) ciphersuite_info->mac)); in ssl_tls12_populate_transform()
8894 md_info = mbedtls_md_info_from_type((mbedtls_md_type_t) ciphersuite_info->mac); in ssl_tls12_populate_transform()
[all …]
/mbedtls-3.7.0/tests/include/test/drivers/
Dmac.h43 uint8_t *mac,
68 uint8_t *mac,
74 const uint8_t *mac,
87 uint8_t *mac,
112 uint8_t *mac,
118 const uint8_t *mac,
/mbedtls-3.7.0/include/mbedtls/
Dpoly1305.h129 unsigned char mac[16]);
152 unsigned char mac[16]);
Dchachapoly.h254 unsigned char mac[16]);
Dssl_ciphersuites.h453 uint8_t MBEDTLS_PRIVATE(mac); /* mbedtls_md_type_t */
/mbedtls-3.7.0/include/psa/
Dcrypto.h1215 uint8_t *mac,
1256 const uint8_t *mac,
1500 uint8_t *mac,
1543 const uint8_t *mac,
Dcrypto_se_driver.h1309 const psa_drv_se_mac_t *MBEDTLS_PRIVATE(mac);
/mbedtls-3.7.0/tests/src/
Dpsa_exercise_key.c127 unsigned char mac[PSA_MAC_MAX_SIZE] = { 0 }; in exercise_mac_key() local
128 size_t mac_length = sizeof(mac); in exercise_mac_key()
146 mac, sizeof(mac), in exercise_mac_key()
164 TEST_EQUAL(psa_mac_verify_finish(&operation, mac, mac_length), in exercise_mac_key()
/mbedtls-3.7.0/scripts/data_files/driver_templates/
Dpsa_crypto_driver_wrappers.h.jinja2166 uint8_t *mac,
2184 mac, mac_size, mac_length );
2195 mac, mac_size, mac_length );
2208 mac, mac_size, mac_length );
2219 (void) mac;
2406 uint8_t *mac,
2415 mac, mac_size, mac_length ) );
2423 mac, mac_size, mac_length ) );
2428 mac, mac_size, mac_length ) );
2432 (void) mac;
[all …]
/mbedtls-3.7.0/tests/src/test_helpers/
Dssl_helpers.c1642 unsigned char mac[PSA_HASH_MAX_SIZE]; in mbedtls_test_ssl_prepare_record_mac() local
1644 mac, sizeof(mac), in mbedtls_test_ssl_prepare_record_mac()
1654 unsigned char mac[MBEDTLS_MD_MAX_SIZE]; in mbedtls_test_ssl_prepare_record_mac() local
1655 TEST_EQUAL(0, mbedtls_md_hmac_finish(&transform_out->md_ctx_enc, mac)); in mbedtls_test_ssl_prepare_record_mac()
1657 memcpy(record->buf + record->data_offset + record->data_len, mac, transform_out->maclen); in mbedtls_test_ssl_prepare_record_mac()

12