/external/mbedtls/library/ |
D | psa_crypto_aead.c | 116 operation->tag_length = PSA_ALG_AEAD_GET_TAG_LENGTH(alg); in psa_aead_setup() 143 if (ciphertext_size < (plaintext_length + operation.tag_length)) { in mbedtls_psa_aead_encrypt() 158 tag, operation.tag_length)); in mbedtls_psa_aead_encrypt() 170 operation.tag_length, tag)); in mbedtls_psa_aead_encrypt() 175 if (operation.tag_length != 16) { in mbedtls_psa_aead_encrypt() 201 *ciphertext_length = plaintext_length + operation.tag_length; in mbedtls_psa_aead_encrypt() 215 static psa_status_t psa_aead_unpadded_locate_tag(size_t tag_length, in psa_aead_unpadded_locate_tag() argument 222 if (tag_length > ciphertext_length) { in psa_aead_unpadded_locate_tag() 225 payload_length = ciphertext_length - tag_length; in psa_aead_unpadded_locate_tag() 253 status = psa_aead_unpadded_locate_tag(operation.tag_length, in mbedtls_psa_aead_decrypt() [all …]
|
/external/openthread/third_party/mbedtls/repo/library/ |
D | psa_crypto_aead.c | 112 operation->tag_length = PSA_ALG_AEAD_GET_TAG_LENGTH(alg); in psa_aead_setup() 139 if (ciphertext_size < (plaintext_length + operation.tag_length)) { in mbedtls_psa_aead_encrypt() 154 tag, operation.tag_length)); in mbedtls_psa_aead_encrypt() 166 operation.tag_length, tag)); in mbedtls_psa_aead_encrypt() 171 if (operation.tag_length != 16) { in mbedtls_psa_aead_encrypt() 197 *ciphertext_length = plaintext_length + operation.tag_length; in mbedtls_psa_aead_encrypt() 211 static psa_status_t psa_aead_unpadded_locate_tag(size_t tag_length, in psa_aead_unpadded_locate_tag() argument 218 if (tag_length > ciphertext_length) { in psa_aead_unpadded_locate_tag() 221 payload_length = ciphertext_length - tag_length; in psa_aead_unpadded_locate_tag() 249 status = psa_aead_unpadded_locate_tag(operation.tag_length, in mbedtls_psa_aead_decrypt() [all …]
|
/external/grpc-grpc/src/core/tsi/alts/zero_copy_frame_protector/ |
D | alts_iovec_record_protocol.cc | 35 size_t tag_length; member 93 if (tag.iov_len != rp->tag_length) { in ensure_header_and_tag_length() 173 return rp->tag_length; in alts_iovec_record_protocol_get_tag_length() 184 kZeroCopyFrameMessageTypeFieldSize + rp->tag_length; in alts_iovec_record_protocol_max_unprotected_data_size() 219 status = write_frame_header(data_length + rp->tag_length, in alts_iovec_record_protocol_integrity_only_protect() 235 if (bytes_written != rp->tag_length) { in alts_iovec_record_protocol_integrity_only_protect() 271 status = verify_frame_header(data_length + rp->tag_length, in alts_iovec_record_protocol_integrity_only_unprotect() 323 rp->tag_length) { in alts_iovec_record_protocol_privacy_integrity_protect() 329 data_length + rp->tag_length, in alts_iovec_record_protocol_privacy_integrity_protect() 338 iovec_t ciphertext = {ciphertext_buffer, data_length + rp->tag_length}; in alts_iovec_record_protocol_privacy_integrity_protect() [all …]
|
D | alts_grpc_integrity_only_record_protocol.cc | 50 unprotected_slices->length + rp->header_length + rp->tag_length; in alts_grpc_integrity_only_extra_copy_protect() 64 rp->tag_length}; in alts_grpc_integrity_only_extra_copy_protect() 98 grpc_slice tag_slice = GRPC_SLICE_MALLOC(rp->tag_length); in alts_grpc_integrity_only_protect() 133 if (protected_slices->length < rp->header_length + rp->tag_length) { in alts_grpc_integrity_only_unprotect() 151 protected_slices->length - rp->tag_length, in alts_grpc_integrity_only_unprotect() 153 GPR_ASSERT(protected_slices->length == rp->tag_length); in alts_grpc_integrity_only_unprotect() 154 iovec_t tag_iovec = {nullptr, rp->tag_length}; in alts_grpc_integrity_only_unprotect() 223 static_cast<unsigned char*>(gpr_malloc(impl->base.tag_length)); in alts_grpc_integrity_only_record_protocol_create()
|
D | alts_grpc_privacy_integrity_record_protocol.cc | 87 if (protected_slices->length < rp->header_length + rp->tag_length) { in alts_grpc_privacy_integrity_unprotect() 92 protected_slices->length - rp->header_length - rp->tag_length; in alts_grpc_privacy_integrity_unprotect()
|
D | alts_grpc_record_protocol_common.h | 53 size_t tag_length; member
|
/external/rust/android-crates-io/crates/grpcio-sys/grpc/src/core/tsi/alts/zero_copy_frame_protector/ |
D | alts_iovec_record_protocol.cc | 35 size_t tag_length; member 93 if (tag.iov_len != rp->tag_length) { in ensure_header_and_tag_length() 173 return rp->tag_length; in alts_iovec_record_protocol_get_tag_length() 184 kZeroCopyFrameMessageTypeFieldSize + rp->tag_length; in alts_iovec_record_protocol_max_unprotected_data_size() 219 status = write_frame_header(data_length + rp->tag_length, in alts_iovec_record_protocol_integrity_only_protect() 235 if (bytes_written != rp->tag_length) { in alts_iovec_record_protocol_integrity_only_protect() 271 status = verify_frame_header(data_length + rp->tag_length, in alts_iovec_record_protocol_integrity_only_unprotect() 323 rp->tag_length) { in alts_iovec_record_protocol_privacy_integrity_protect() 329 data_length + rp->tag_length, in alts_iovec_record_protocol_privacy_integrity_protect() 338 iovec_t ciphertext = {ciphertext_buffer, data_length + rp->tag_length}; in alts_iovec_record_protocol_privacy_integrity_protect() [all …]
|
D | alts_grpc_integrity_only_record_protocol.cc | 50 unprotected_slices->length + rp->header_length + rp->tag_length; in alts_grpc_integrity_only_extra_copy_protect() 64 rp->tag_length}; in alts_grpc_integrity_only_extra_copy_protect() 98 grpc_slice tag_slice = GRPC_SLICE_MALLOC(rp->tag_length); in alts_grpc_integrity_only_protect() 133 if (protected_slices->length < rp->header_length + rp->tag_length) { in alts_grpc_integrity_only_unprotect() 151 protected_slices->length - rp->tag_length, in alts_grpc_integrity_only_unprotect() 153 GPR_ASSERT(protected_slices->length == rp->tag_length); in alts_grpc_integrity_only_unprotect() 154 iovec_t tag_iovec = {nullptr, rp->tag_length}; in alts_grpc_integrity_only_unprotect() 223 static_cast<unsigned char*>(gpr_malloc(impl->base.tag_length)); in alts_grpc_integrity_only_record_protocol_create()
|
D | alts_grpc_privacy_integrity_record_protocol.cc | 87 if (protected_slices->length < rp->header_length + rp->tag_length) { in alts_grpc_privacy_integrity_unprotect() 92 protected_slices->length - rp->header_length - rp->tag_length; in alts_grpc_privacy_integrity_unprotect()
|
D | alts_grpc_record_protocol_common.h | 53 size_t tag_length; member
|
/external/webrtc/media/base/ |
D | rtp_utils.cc | 82 size_t tag_length = packet_time_params.srtp_auth_tag_len; in UpdateRtpAuthTag() local 86 if (tag_length < kRocLength || tag_length > length) { in UpdateRtpAuthTag() 91 uint8_t* auth_tag = rtp + (length - tag_length); in UpdateRtpAuthTag() 94 RTC_DCHECK_EQ(0, memcmp(auth_tag, kFakeAuthTag, tag_length)); in UpdateRtpAuthTag() 99 size_t auth_required_length = length - tag_length + kRocLength; in UpdateRtpAuthTag() 107 if (result < tag_length) { in UpdateRtpAuthTag() 114 memcpy(auth_tag, output, tag_length); in UpdateRtpAuthTag()
|
/external/openthread/third_party/mbedtls/repo/tests/suites/ |
D | test_suite_psa_crypto_metadata.function | 223 size_t tag_length) 238 TEST_EQUAL(tag_length, PSA_AEAD_TAG_LENGTH(key_type, key_bits, alg)); 426 size_t tag_length = tag_length_arg; 432 key_type, key_bits, tag_length); 435 for (n = 1; n <= tag_length; n++) { 446 TEST_EQUAL(PSA_ALG_AEAD_WITH_SHORTENED_TAG(truncated_alg, tag_length - 1), 447 PSA_ALG_AEAD_WITH_SHORTENED_TAG(alg, tag_length - 1)); 448 TEST_EQUAL(PSA_ALG_AEAD_WITH_SHORTENED_TAG(truncated_alg, tag_length), 449 PSA_ALG_AEAD_WITH_SHORTENED_TAG(alg, tag_length)); 460 n), tag_length - 1), [all …]
|
/external/mbedtls/tests/suites/ |
D | test_suite_psa_crypto_metadata.function | 223 size_t tag_length) 238 TEST_EQUAL(tag_length, PSA_AEAD_TAG_LENGTH(key_type, key_bits, alg)); 426 size_t tag_length = tag_length_arg; 432 key_type, key_bits, tag_length); 435 for (n = 1; n <= tag_length; n++) { 446 TEST_EQUAL(PSA_ALG_AEAD_WITH_SHORTENED_TAG(truncated_alg, tag_length - 1), 447 PSA_ALG_AEAD_WITH_SHORTENED_TAG(alg, tag_length - 1)); 448 TEST_EQUAL(PSA_ALG_AEAD_WITH_SHORTENED_TAG(truncated_alg, tag_length), 449 PSA_ALG_AEAD_WITH_SHORTENED_TAG(alg, tag_length)); 460 n), tag_length - 1), [all …]
|
/external/rust/android-crates-io/crates/grpcio-sys/grpc/src/core/tsi/alts/crypt/ |
D | aes_gcm.cc | 49 size_t tag_length; member 101 plaintext_length + aes_gcm_crypter->tag_length; in gsec_aes_gcm_aead_crypter_max_ciphertext_and_tag_length() 115 if (ciphertext_and_tag_length < aes_gcm_crypter->tag_length) { in gsec_aes_gcm_aead_crypter_max_plaintext_length() 122 ciphertext_and_tag_length - aes_gcm_crypter->tag_length; in gsec_aes_gcm_aead_crypter_max_plaintext_length() 155 const gsec_aead_crypter* crypter, size_t* tag_length, in gsec_aes_gcm_aead_crypter_tag_length() argument 157 if (tag_length == nullptr) { in gsec_aes_gcm_aead_crypter_tag_length() 164 *tag_length = aes_gcm_crypter->tag_length; in gsec_aes_gcm_aead_crypter_tag_length() 636 size_t tag_length, bool rekey, in gsec_aes_gcm_aead_crypter_create() argument 651 (tag_length != kAesGcmTagLength) || in gsec_aes_gcm_aead_crypter_create() 664 aes_gcm_crypter->tag_length = tag_length; in gsec_aes_gcm_aead_crypter_create()
|
D | gsec.h | 171 grpc_status_code (*tag_length)(const gsec_aead_crypter* crypter, member 455 size_t tag_length, bool rekey,
|
D | gsec.cc | 174 crypter->vtable->tag_length != nullptr) { in gsec_aead_crypter_tag_length() 175 return crypter->vtable->tag_length(crypter, tag_length_to_return, in gsec_aead_crypter_tag_length()
|
/external/mbedtls/tests/src/drivers/ |
D | test_driver_aead.c | 344 size_t *tag_length) in mbedtls_test_transparent_aead_finish() argument 357 tag, tag_size, tag_length); in mbedtls_test_transparent_aead_finish() 362 tag_length); in mbedtls_test_transparent_aead_finish() 370 (void) tag_length; in mbedtls_test_transparent_aead_finish() 384 size_t tag_length) in mbedtls_test_transparent_aead_verify() argument 423 if (tag_length != check_tag_length || in mbedtls_test_transparent_aead_verify() 424 mbedtls_ct_memcmp(tag, check_tag, tag_length) in mbedtls_test_transparent_aead_verify()
|
/external/openthread/third_party/mbedtls/repo/tests/src/drivers/ |
D | test_driver_aead.c | 344 size_t *tag_length) in mbedtls_test_transparent_aead_finish() argument 357 tag, tag_size, tag_length); in mbedtls_test_transparent_aead_finish() 362 tag_length); in mbedtls_test_transparent_aead_finish() 370 (void) tag_length; in mbedtls_test_transparent_aead_finish() 384 size_t tag_length) in mbedtls_test_transparent_aead_verify() argument 423 if (tag_length != check_tag_length || in mbedtls_test_transparent_aead_verify() 424 mbedtls_ct_memcmp(tag, check_tag, tag_length) in mbedtls_test_transparent_aead_verify()
|
/external/grpc-grpc/src/core/tsi/alts/crypt/ |
D | aes_gcm.cc | 144 size_t tag_length; member 195 plaintext_length + aes_gcm_crypter->tag_length; in gsec_aes_gcm_aead_crypter_max_ciphertext_and_tag_length() 209 if (ciphertext_and_tag_length < aes_gcm_crypter->tag_length) { in gsec_aes_gcm_aead_crypter_max_plaintext_length() 216 ciphertext_and_tag_length - aes_gcm_crypter->tag_length; in gsec_aes_gcm_aead_crypter_max_plaintext_length() 249 const gsec_aead_crypter* crypter, size_t* tag_length, in gsec_aes_gcm_aead_crypter_tag_length() argument 251 if (tag_length == nullptr) { in gsec_aes_gcm_aead_crypter_tag_length() 258 *tag_length = aes_gcm_crypter->tag_length; in gsec_aes_gcm_aead_crypter_tag_length() 705 size_t tag_length, gsec_aead_crypter** crypter, char** error_details) { in gsec_aes_gcm_aead_crypter_create() argument 718 (tag_length != kAesGcmTagLength) || in gsec_aes_gcm_aead_crypter_create() 731 aes_gcm_crypter->tag_length = tag_length; in gsec_aes_gcm_aead_crypter_create()
|
D | gsec.cc | 174 crypter->vtable->tag_length != nullptr) { in gsec_aead_crypter_tag_length() 175 return crypter->vtable->tag_length(crypter, tag_length_to_return, in gsec_aead_crypter_tag_length()
|
/external/grpc-grpc/test/core/tsi/alts/zero_copy_frame_protector/ |
D | alts_iovec_record_protocol_test.cc | 51 size_t tag_length; member 184 var->tag_length = kTagLength; in alts_iovec_record_protocol_test_var_create() 185 var->tag_buf = static_cast<uint8_t*>(gpr_malloc(var->tag_length)); in alts_iovec_record_protocol_test_var_create() 187 var->tag_iovec.iov_len = var->tag_length; in alts_iovec_record_protocol_test_var_create() 199 var->header_length + var->data_length + var->tag_length; in alts_iovec_record_protocol_test_var_create() 336 offset = alter_random_byte(var->tag_buf, var->tag_length); in integrity_only_corrupted_data() 378 iovec_t tag_iovec = {nullptr, var->tag_length}; in integrity_only_protect_input_check() 423 iovec_t tag_iovec = {nullptr, var->tag_length}; in integrity_only_unprotect_input_check() 460 var->data_length + var->tag_length, &var->data_iovec, in privacy_integrity_random_seal_unseal() 476 size_t empty_payload_frame_size = var->header_length + var->tag_length; in privacy_integrity_empty_seal_unseal() [all …]
|
D | alts_grpc_record_protocol_test.cc | 52 size_t tag_length; member 277 var->tag_length = kTagLength; in alts_grpc_record_protocol_test_var_create() 317 data_length + var->header_length + var->tag_length); in random_seal_unseal() 338 ASSERT_EQ(var->protected_sb.length, var->header_length + var->tag_length); in empty_seal_unseal() 409 &var->protected_sb, var->header_length + var->tag_length - 1, &temp_sb); in input_check()
|
/external/openthread/third_party/mbedtls/repo/tests/include/test/drivers/ |
D | aead.h | 107 size_t *tag_length); 115 size_t tag_length);
|
/external/mbedtls/tests/include/test/drivers/ |
D | aead.h | 107 size_t *tag_length); 115 size_t tag_length);
|
/external/grpc-grpc/test/core/tsi/alts/crypt/ |
D | aes_gcm_test.cc | 90 size_t nonce_length, tag_length; in gsec_test_random_encrypt_decrypt() local 94 gsec_aead_crypter_tag_length(crypter, &tag_length, /*error_details=*/nullptr); in gsec_test_random_encrypt_decrypt() 116 ASSERT_EQ(message_length + tag_length, ciphertext_and_tag_length); in gsec_test_random_encrypt_decrypt() 141 if (tag_length >= kTestMinTagLengthForCorruption) { in gsec_test_random_encrypt_decrypt() 248 size_t nonce_length, tag_length; in gsec_test_multiple_random_encrypt_decrypt() local 256 gsec_aead_crypter_tag_length(crypter, &tag_length, /*error_details=*/nullptr); in gsec_test_multiple_random_encrypt_decrypt() 297 ASSERT_EQ(message_length + tag_length, ciphertext_and_tag_lengths[ind]); in gsec_test_multiple_random_encrypt_decrypt() 566 size_t nonce_length, tag_length; in gsec_test_decryption_failure() local 571 gsec_aead_crypter_tag_length(crypter, &tag_length, /*error_details=*/nullptr); in gsec_test_decryption_failure() 651 if (tag_length > 0) { in gsec_test_decryption_failure() [all …]
|