/optee_os/core/lib/libtomcrypt/src/pk/asn1/der/general/ |
A D | der_decode_asn1_identifier.c | 83 id->tag = in[0] & 0x1f; in der_decode_asn1_identifier() 86 if (id->tag == 0x1f) { in der_decode_asn1_identifier() 87 id->tag = 0; in der_decode_asn1_identifier() 94 id->tag <<= 7; in der_decode_asn1_identifier() 95 id->tag |= in[tag_len] & 0x7f; in der_decode_asn1_identifier() 102 } else if (id->tag < 0x1f) { in der_decode_asn1_identifier() 110 id->tag = 0; in der_decode_asn1_identifier() 114 (id->tag < der_asn1_tag_to_type_map_sz) && in der_decode_asn1_identifier() 115 (id->tag < tag_constructed_map_sz) && in der_decode_asn1_identifier() 116 (id->pc == tag_constructed_map[id->tag])) { in der_decode_asn1_identifier() [all …]
|
A D | der_encode_asn1_identifier.c | 52 if (id->tag > (ULONG_MAX >> (8 + 7))) { in der_encode_asn1_identifier() 64 if (id->tag < 0x1f) { in der_encode_asn1_identifier() 66 out[0] |= id->tag & 0x1f; in der_encode_asn1_identifier() 71 tmp = id->tag; in der_encode_asn1_identifier() 83 out[tmp] = ((id->tag >> (7 * (tag_len - tmp))) & 0x7f) | 0x80; in der_encode_asn1_identifier()
|
/optee_os/lib/libmbedtls/mbedtls/library/ |
A D | asn1parse.c | 105 size_t *len, int tag ) in mbedtls_asn1_get_tag() argument 110 if( **p != tag ) in mbedtls_asn1_get_tag() 253 int (*cb)( void *ctx, int tag, in mbedtls_asn1_traverse_sequence_of() argument 272 unsigned char const tag = *(*p)++; in mbedtls_asn1_traverse_sequence_of() local 331 int tag; member 358 cur->buf.tag = tag; in asn1_get_sequence_of_cb() 370 int tag) in mbedtls_asn1_get_sequence_of() argument 375 p, end, 0xFF, tag, 0, 0, in mbedtls_asn1_get_sequence_of() 393 alg->tag = **p; in mbedtls_asn1_get_alg() 408 params->tag = **p; in mbedtls_asn1_get_alg() [all …]
|
A D | ccm.c | 152 unsigned char *tag, size_t tag_len ) in ccm_auth_crypt() argument 312 memcpy( tag, y, tag_len ); in ccm_auth_crypt() 324 unsigned char *tag, size_t tag_len ) in mbedtls_ccm_star_encrypt_and_tag() argument 331 CCM_VALIDATE_RET( tag_len == 0 || tag != NULL ); in mbedtls_ccm_star_encrypt_and_tag() 340 unsigned char *tag, size_t tag_len ) in mbedtls_ccm_encrypt_and_tag() argument 347 CCM_VALIDATE_RET( tag_len == 0 || tag != NULL ); in mbedtls_ccm_encrypt_and_tag() 352 add_len, input, output, tag, tag_len ) ); in mbedtls_ccm_encrypt_and_tag() 374 CCM_VALIDATE_RET( tag_len == 0 || tag != NULL ); in mbedtls_ccm_star_auth_decrypt() 385 diff |= tag[i] ^ check_tag[i]; in mbedtls_ccm_star_auth_decrypt() 407 CCM_VALIDATE_RET( tag_len == 0 || tag != NULL ); in mbedtls_ccm_auth_decrypt() [all …]
|
/optee_os/core/mm/ |
A D | file.c | 35 uint8_t tag[FILE_TAG_SIZE]; member 46 static int file_tag_cmp(const struct file *f, const uint8_t *tag, in file_tag_cmp() argument 51 return memcmp(tag, f->tag, taglen); in file_tag_cmp() 54 static struct file *file_find_tag_unlocked(const uint8_t *tag, in file_find_tag_unlocked() argument 60 if (!file_tag_cmp(f, tag, taglen)) in file_find_tag_unlocked() 117 struct file *file_get_by_tag(const uint8_t *tag, unsigned int taglen) in file_get_by_tag() argument 121 if (taglen > sizeof(f->tag)) in file_get_by_tag() 147 f = file_find_tag_unlocked(tag, taglen); in file_get_by_tag() 154 memcpy(f->tag, tag, taglen); in file_get_by_tag()
|
/optee_os/out/arm/export-ta_arm32/host_include/mbedtls/ |
A D | asn1.h | 93 #define MBEDTLS_ASN1_IS_STRING_TAG( tag ) \ argument 94 ( ( tag ) < 32u && ( \ 95 ( ( 1u << ( tag ) ) & ( ( 1u << MBEDTLS_ASN1_BMP_STRING ) | \ 151 int tag; /**< ASN1 type, e.g. MBEDTLS_ASN1_UTF8_STRING. */ member 235 size_t *len, int tag ); 390 int tag ); 504 int (*cb)( void *ctx, int tag,
|
A D | ccm.h | 162 unsigned char *tag, size_t tag_len ); 210 unsigned char *tag, size_t tag_len ); 247 const unsigned char *tag, size_t tag_len ); 292 const unsigned char *tag, size_t tag_len );
|
/optee_os/out/arm/export-ta_arm32/include/mbedtls/ |
A D | asn1.h | 93 #define MBEDTLS_ASN1_IS_STRING_TAG( tag ) \ argument 94 ( ( tag ) < 32u && ( \ 95 ( ( 1u << ( tag ) ) & ( ( 1u << MBEDTLS_ASN1_BMP_STRING ) | \ 151 int tag; /**< ASN1 type, e.g. MBEDTLS_ASN1_UTF8_STRING. */ member 235 size_t *len, int tag ); 390 int tag ); 504 int (*cb)( void *ctx, int tag,
|
A D | ccm.h | 162 unsigned char *tag, size_t tag_len ); 210 unsigned char *tag, size_t tag_len ); 247 const unsigned char *tag, size_t tag_len ); 292 const unsigned char *tag, size_t tag_len );
|
/optee_os/lib/libmbedtls/mbedtls/include/mbedtls/ |
A D | asn1.h | 93 #define MBEDTLS_ASN1_IS_STRING_TAG( tag ) \ argument 94 ( ( tag ) < 32u && ( \ 95 ( ( 1u << ( tag ) ) & ( ( 1u << MBEDTLS_ASN1_BMP_STRING ) | \ 151 int tag; /**< ASN1 type, e.g. MBEDTLS_ASN1_UTF8_STRING. */ member 235 size_t *len, int tag ); 390 int tag ); 504 int (*cb)( void *ctx, int tag,
|
A D | ccm.h | 162 unsigned char *tag, size_t tag_len ); 210 unsigned char *tag, size_t tag_len ); 247 const unsigned char *tag, size_t tag_len ); 292 const unsigned char *tag, size_t tag_len );
|
/optee_os/out/arm/export-ta_arm64/include/mbedtls/ |
A D | asn1.h | 93 #define MBEDTLS_ASN1_IS_STRING_TAG( tag ) \ argument 94 ( ( tag ) < 32u && ( \ 95 ( ( 1u << ( tag ) ) & ( ( 1u << MBEDTLS_ASN1_BMP_STRING ) | \ 151 int tag; /**< ASN1 type, e.g. MBEDTLS_ASN1_UTF8_STRING. */ member 235 size_t *len, int tag ); 390 int tag ); 504 int (*cb)( void *ctx, int tag,
|
A D | ccm.h | 162 unsigned char *tag, size_t tag_len ); 210 unsigned char *tag, size_t tag_len ); 247 const unsigned char *tag, size_t tag_len ); 292 const unsigned char *tag, size_t tag_len );
|
/optee_os/out/arm/export-ta_arm64/host_include/mbedtls/ |
A D | asn1.h | 93 #define MBEDTLS_ASN1_IS_STRING_TAG( tag ) \ argument 94 ( ( tag ) < 32u && ( \ 95 ( ( 1u << ( tag ) ) & ( ( 1u << MBEDTLS_ASN1_BMP_STRING ) | \ 151 int tag; /**< ASN1 type, e.g. MBEDTLS_ASN1_UTF8_STRING. */ member 235 size_t *len, int tag ); 390 int tag ); 504 int (*cb)( void *ctx, int tag,
|
A D | ccm.h | 162 unsigned char *tag, size_t tag_len ); 210 unsigned char *tag, size_t tag_len ); 247 const unsigned char *tag, size_t tag_len ); 292 const unsigned char *tag, size_t tag_len );
|
/optee_os/core/lib/libtomcrypt/src/mac/poly1305/ |
A D | poly1305_test.c | 27 …unsigned char tag[] = { 0xA8, 0x06, 0x1D, 0xC1, 0x30, 0x51, 0x36, 0xC6, 0xC2, 0x2B, 0x8B, 0xAF, 0x… in poly1305_test() 43 …if (compare_testvector(out, len, tag, sizeof(tag), "POLY1305-TV1", 1) != 0) return CRYPT_FAI… in poly1305_test() 48 …if (compare_testvector(out, len, tag, sizeof(tag), "POLY1305-TV2", 1) != 0) return CRYPT_FAI… in poly1305_test()
|
/optee_os/core/lib/libtomcrypt/src/encauth/ccm/ |
A D | ccm_test.c | 33 unsigned char tag[16]; in ccm_test() 116 unsigned char buf[64], buf2[64], tag[16], tag2[16], tag3[16], zero[64]; in ccm_test() 146 tag, &taglen, 0)) != CRYPT_OK) { in ccm_test() 157 tag, &taglen, 0)) != CRYPT_OK) { in ccm_test() 173 if ((err = ccm_done(&ccm, tag, &taglen)) != CRYPT_OK) { in ccm_test() 181 if (compare_testvector(tag, taglen, tests[x].tag, tests[x].taglen, "CCM encrypt tag", x)) { in ccm_test() 186 XMEMCPY(tag3, tests[x].tag, tests[x].taglen); in ccm_test() 222 XMEMCPY(tag3, tests[x].tag, tests[x].taglen); in ccm_test() 239 … if (compare_testvector(tag2, taglen, tests[x].tag, tests[x].taglen, "CCM decrypt tag", x)) { in ccm_test()
|
/optee_os/core/lib/libtomcrypt/src/headers/ |
A D | tomcrypt_mac.h | 271 unsigned char *tag, unsigned long *taglen); 279 const unsigned char *tag, unsigned long taglen, 309 unsigned char *tag, unsigned long *taglen); 321 unsigned char *tag, unsigned long *taglen); 328 const unsigned char *tag, unsigned long taglen, 383 unsigned char *tag, unsigned long *taglen); 391 const unsigned char *tag, unsigned long taglen, 439 unsigned char *tag, unsigned long *taglen); 448 unsigned char *tag, unsigned long *taglen, 518 unsigned char *tag, unsigned long *taglen); [all …]
|
/optee_os/core/lib/libfdt/ |
A D | fdt.c | 134 uint32_t tag; in fdt_next_tag() local 142 tag = fdt32_to_cpu(*tagp); in fdt_next_tag() 146 switch (tag) { in fdt_next_tag() 181 return tag; in fdt_next_tag() 205 uint32_t tag; in fdt_next_node() local 213 tag = fdt_next_tag(fdt, offset, &nextoffset); in fdt_next_node() 215 switch (tag) { in fdt_next_node() 237 } while (tag != FDT_BEGIN_NODE); in fdt_next_node()
|
/optee_os/core/drivers/ |
A D | zynqmp_csu_aes.c | 66 void *tag, const void *iv) in aes_transfer_enc() argument 129 memcpy(tag, p, ZYNQMP_GCM_TAG_SIZE); in aes_transfer_enc() 137 const void *tag, const void *iv) in aes_transfer_dec() argument 184 ret = zynqmp_csudma_transfer(ZYNQMP_CSUDMA_SRC_CHANNEL, (void *)tag, in aes_transfer_dec() 280 const void *tag, size_t tag_len, in zynqmp_csu_aes_decrypt_data() argument 306 if (!src || !dst || !tag || !iv) { in zynqmp_csu_aes_decrypt_data() 317 ret = aes_transfer_dec(src, dst, src_len, tag, iv); in zynqmp_csu_aes_decrypt_data() 332 void *tag, size_t tag_len, in zynqmp_csu_aes_encrypt_data() argument 358 if (!src || !dst || !tag || !iv) { in zynqmp_csu_aes_encrypt_data() 369 ret = aes_transfer_enc(src, dst, dst_len, tag, iv); in zynqmp_csu_aes_encrypt_data()
|
A D | zynqmp_huk.c | 28 uint8_t tag[ZYNQMP_GCM_TAG_SIZE] __aligned_csuaes = { 0 }; in tee_otp_get_hw_unique_key() local 79 tag, sizeof(tag), iv, in tee_otp_get_hw_unique_key() 97 tag, sizeof(tag), iv, in tee_otp_get_hw_unique_key()
|
/optee_os/core/crypto/ |
A D | aes-gcm.c | 293 void *tag, size_t *tag_len) in __gcm_enc_final() argument 304 memcpy(tag, state->buf_tag, state->tag_len); in __gcm_enc_final() 312 void *tag, size_t *tag_len) in internal_aes_gcm_enc_final() argument 321 const void *tag, size_t tag_len) in __gcm_dec_final() argument 332 if (consttime_memcmp(state->buf_tag, tag, tag_len)) in __gcm_dec_final() 340 const void *tag, size_t tag_len) in internal_aes_gcm_dec_final() argument 374 void *tag, size_t *tag_len) in internal_aes_gcm_enc() argument 397 const void *tag, size_t tag_len) in internal_aes_gcm_dec() argument 492 dst, tag, tag_len); in aes_gcm_enc_final() 497 uint8_t *dst, const uint8_t *tag, in aes_gcm_dec_final() argument [all …]
|
/optee_os/core/drivers/crypto/crypto_api/authenc/ |
A D | authenc.c | 199 uint8_t *dst, uint8_t *tag, in authenc_enc_final() argument 222 .tag.data = tag, in authenc_enc_final() 223 .tag.length = *tag_len in authenc_enc_final() 228 *tag_len = dfinal.tag.length; in authenc_enc_final() 247 uint8_t *dst, const uint8_t *tag, in authenc_dec_final() argument 270 .tag.data = (uint8_t *)tag, in authenc_dec_final() 271 .tag.length = tag_len in authenc_dec_final()
|
/optee_os/core/lib/libtomcrypt/src/encauth/chachapoly/ |
A D | chacha20poly1305_test.c | 33 …unsigned char tag[] = { 0x1A, 0xE1, 0x0B, 0x59, 0x4F, 0x09, 0xE2, 0x6A, 0x7E, 0x90, 0x2E, 0xCB, 0x… in chacha20poly1305_test() 58 …if (compare_testvector(emac, len, tag, sizeof(tag), "ENC-TAG", 2) != 0) return CRYPT_FAIL_TESTVECT… in chacha20poly1305_test() 70 …if (compare_testvector(dmac, len, tag, sizeof(tag), "DEC-TAG", 4) != 0) return CRYPT_FAIL_TESTVECT… in chacha20poly1305_test() 77 …if (compare_testvector(emac, len, tag, sizeof(tag), "ENC-TAG2", 2) != 0) return CRYPT_FAIL_TESTVEC… in chacha20poly1305_test() 81 XMEMCPY(dmac, tag, sizeof(tag)); in chacha20poly1305_test()
|
/optee_os/core/lib/libtomcrypt/src/encauth/ocb/ |
A D | ocb_done_encrypt.c | 30 unsigned char *ct, unsigned char *tag, unsigned long *taglen) in ocb_done_encrypt() argument 35 LTC_ARGCHK(tag != NULL); in ocb_done_encrypt() 37 return s_ocb_done(ocb, pt, ptlen, ct, tag, taglen, 0); in ocb_done_encrypt()
|