Home
last modified time | relevance | path

Searched refs:tag_len (Results 1 – 15 of 15) sorted by relevance

/mbedtls/programs/cipher/
A Dcipher_aead_demo.c116 size_t *tag_len) in aead_prepare() argument
124 *tag_len = 16; in aead_prepare()
127 *tag_len = 16; in aead_prepare()
130 *tag_len = 8; in aead_prepare()
133 *tag_len = 16; in aead_prepare()
198 p += tag_len; in aead_encrypt()
215 size_t tag_len; in aead_demo() local
219 CHK(aead_prepare(info, &ctx, &tag_len)); in aead_demo()
221 aead_info(&ctx, tag_len); in aead_demo()
223 CHK(aead_encrypt(&ctx, tag_len, in aead_demo()
[all …]
/mbedtls/library/
A Dccm.c175 if (ctx->tag_len == 0) { in ccm_calculate_first_block_if_ready()
196 ctx->y[0] |= ((ctx->tag_len - 2) / 2) << 3; in ccm_calculate_first_block_if_ready()
263 size_t tag_len) in mbedtls_ccm_set_lengths() argument
272 if (tag_len == 2 || tag_len > 16 || tag_len % 2 != 0) { in mbedtls_ccm_set_lengths()
282 ctx->tag_len = tag_len; in mbedtls_ccm_set_lengths()
473 unsigned char *tag, size_t tag_len) in mbedtls_ccm_finish() argument
502 memcpy(tag, ctx->y, tag_len); in mbedtls_ccm_finish()
573 size_t tag_len) in mbedtls_ccm_compare_tags() argument
576 int diff = mbedtls_ct_memcmp(tag1, tag2, tag_len); in mbedtls_ccm_compare_tags()
616 input, output, tag, tag_len); in mbedtls_ccm_star_auth_decrypt()
[all …]
A Dcipher.c1213 if (tag_len != 16U) { in mbedtls_cipher_write_tag()
1257 if (tag_len > sizeof(check_tag)) { in mbedtls_cipher_check_tag()
1264 check_tag, tag_len))) { in mbedtls_cipher_check_tag()
1279 if (tag_len != sizeof(check_tag)) { in mbedtls_cipher_check_tag()
1437 *olen -= tag_len; in mbedtls_cipher_aead_encrypt()
1462 (tag_len != 16U)) { in mbedtls_cipher_aead_encrypt()
1558 (tag_len != 16U)) { in mbedtls_cipher_aead_decrypt()
1616 if (output_len < ilen + tag_len) { in mbedtls_cipher_auth_encrypt_ext()
1623 *olen += tag_len; in mbedtls_cipher_auth_encrypt_ext()
1667 if (ilen < tag_len || output_len < ilen - tag_len) { in mbedtls_cipher_auth_decrypt_ext()
[all …]
A Dgcm.c653 unsigned char *tag, size_t tag_len) in mbedtls_gcm_finish() argument
675 if (tag_len > 16 || tag_len < 4) { in mbedtls_gcm_finish()
683 memcpy(tag, ctx->base_ectr, tag_len); in mbedtls_gcm_finish()
697 mbedtls_xor(tag, tag, ctx->buf, tag_len); in mbedtls_gcm_finish()
712 size_t tag_len, in mbedtls_gcm_crypt_and_tag() argument
731 if ((ret = mbedtls_gcm_finish(ctx, NULL, 0, &olen, tag, tag_len)) != 0) { in mbedtls_gcm_crypt_and_tag()
745 size_t tag_len, in mbedtls_gcm_auth_decrypt() argument
755 input, output, tag_len, check_tag)) != 0) { in mbedtls_gcm_auth_decrypt()
760 diff = mbedtls_ct_memcmp(tag, check_tag, tag_len); in mbedtls_gcm_auth_decrypt()
A Dx509.c1218 size_t tag_len; in mbedtls_x509_get_subject_alt_name_ext() local
1229 if ((ret = mbedtls_asn1_get_len(p, end, &tag_len)) != 0) { in mbedtls_x509_get_subject_alt_name_ext()
1234 tmp_san_buf.len = tag_len; in mbedtls_x509_get_subject_alt_name_ext()
A Dpsa_crypto.c4863 const uint8_t tag_len = PSA_ALG_AEAD_GET_TAG_LENGTH(alg); in psa_validate_tag_length() local
4869 if (tag_len < 4 || tag_len > 16 || tag_len % 2) { in psa_validate_tag_length()
4878 if (tag_len != 4 && tag_len != 8 && (tag_len < 12 || tag_len > 16)) { in psa_validate_tag_length()
4887 if (tag_len != 16) { in psa_validate_tag_length()
4894 (void) tag_len; in psa_validate_tag_length()
/mbedtls/include/mbedtls/
A Dccm.h74 size_t MBEDTLS_PRIVATE(tag_len); /*!< Total tag length */
177 unsigned char *tag, size_t tag_len);
226 unsigned char *tag, size_t tag_len);
263 const unsigned char *tag, size_t tag_len);
309 const unsigned char *tag, size_t tag_len);
374 size_t tag_len);
510 unsigned char *tag, size_t tag_len);
A Dgcm.h175 size_t tag_len,
218 size_t tag_len,
356 unsigned char *tag, size_t tag_len);
A Dcipher.h1004 unsigned char *tag, size_t tag_len);
1020 const unsigned char *tag, size_t tag_len);
1111 size_t *olen, size_t tag_len);
1167 size_t *olen, size_t tag_len);
/mbedtls/tests/scripts/
A Dgen_gcm_encrypt.pl55 my $tag_len = get_suite_val("Taglen");
67 print("GCM NIST Validation (AES-$key_len,$iv_len,$pt_len,$add_len,$tag_len) #$Count\n");
74 print(":$tag_len");
A Dgen_gcm_decrypt.pl72 my $tag_len = get_suite_val("Taglen");
84 print("GCM NIST Validation (AES-$key_len,$iv_len,$pt_len,$add_len,$tag_len) #$Count\n");
90 print(":$tag_len");
/mbedtls/tests/suites/
A Dtest_suite_gcm.function187 size_t tag_len = tag_len_bits / 8;
197 add_str->x, add_str->len, src_str->x, output, tag_len,
216 size_t tag_len = tag_len_bits / 8;
231 output, tag_len, tag_output) == 0);
234 TEST_MEMORY_COMPARE(tag_output, tag_len, tag->x, tag->len);
265 size_t tag_len = tag_len_bits / 8;
284 tag_len,
A Dtest_suite_ccm.function101 void ccm_lengths(int msg_len, int iv_len, int add_len, int tag_len, int res)
126 msg, out, tag, tag_len) == res);
129 msg, out, tag, tag_len);
145 void ccm_star_lengths(int msg_len, int iv_len, int add_len, int tag_len,
171 add, add_len, msg, out, tag, tag_len) == res);
174 add_len, msg, out, tag, tag_len);
176 if (res == 0 && tag_len != 0) {
A Dtest_suite_cipher.function99 int use_psa, size_t tag_len, const data_t *key, int direction)
106 (void) tag_len;
111 tag_len));
/mbedtls/programs/psa/
A Daead_demo.c175 size_t tag_len = PSA_AEAD_TAG_LENGTH(key_type, key_bits, alg); in aead_info() local
185 type_str, (unsigned) key_bits, base_str, (unsigned) tag_len); in aead_info()

Completed in 38 milliseconds