/optee_os-3.20.0/core/lib/libtomcrypt/src/pk/asn1/der/general/ |
A D | der_decode_asn1_identifier.c | 76 id->tag = in[0] & 0x1f; in der_decode_asn1_identifier() 79 if (id->tag == 0x1f) { in der_decode_asn1_identifier() 80 id->tag = 0; in der_decode_asn1_identifier() 87 id->tag <<= 7; in der_decode_asn1_identifier() 88 id->tag |= in[tag_len] & 0x7f; in der_decode_asn1_identifier() 95 } else if (id->tag < 0x1f) { in der_decode_asn1_identifier() 103 id->tag = 0; in der_decode_asn1_identifier() 107 (id->tag < der_asn1_tag_to_type_map_sz) && in der_decode_asn1_identifier() 108 (id->tag < tag_constructed_map_sz) && in der_decode_asn1_identifier() 109 (id->pc == tag_constructed_map[id->tag])) { in der_decode_asn1_identifier() [all …]
|
A D | der_encode_asn1_identifier.c | 45 if (id->tag > (ULONG_MAX >> (8 + 7))) { in der_encode_asn1_identifier() 57 if (id->tag < 0x1f) { in der_encode_asn1_identifier() 59 out[0] |= id->tag & 0x1f; in der_encode_asn1_identifier() 64 tmp = id->tag; in der_encode_asn1_identifier() 76 out[tmp] = ((id->tag >> (7 * (tag_len - tmp))) & 0x7f) | 0x80; in der_encode_asn1_identifier()
|
/optee_os-3.20.0/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 311 memcpy( tag, y, tag_len ); in ccm_auth_crypt() 323 unsigned char *tag, size_t tag_len ) in mbedtls_ccm_star_encrypt_and_tag() argument 330 CCM_VALIDATE_RET( tag_len == 0 || tag != NULL ); in mbedtls_ccm_star_encrypt_and_tag() 339 unsigned char *tag, size_t tag_len ) in mbedtls_ccm_encrypt_and_tag() argument 346 CCM_VALIDATE_RET( tag_len == 0 || tag != NULL ); in mbedtls_ccm_encrypt_and_tag() 351 add_len, input, output, tag, tag_len ) ); in mbedtls_ccm_encrypt_and_tag() 373 CCM_VALIDATE_RET( tag_len == 0 || tag != NULL ); in mbedtls_ccm_star_auth_decrypt() 384 diff |= tag[i] ^ check_tag[i]; in mbedtls_ccm_star_auth_decrypt() 406 CCM_VALIDATE_RET( tag_len == 0 || tag != NULL ); in mbedtls_ccm_auth_decrypt() [all …]
|
/optee_os-3.20.0/lib/libutils/ext/include/ |
A D | memtag.h | 30 void *(*set_tags)(void *addr, size_t size, uint8_t tag); 40 uint8_t tag __unused) in __memtag_disabled_set_tags() 75 static inline void *memtag_set_tags(void *addr, size_t size, uint8_t tag) in memtag_set_tags() argument 78 return __memtag_ops->set_tags(addr, size, tag); in memtag_set_tags() 80 return __memtag_disabled_set_tags(addr, size, tag); in memtag_set_tags() 163 uint8_t tag __maybe_unused) in memtag_insert_tag_vaddr() 168 va |= SHIFT_U64(tag, MEMTAG_TAG_SHIFT); in memtag_insert_tag_vaddr() 181 static inline void *memtag_insert_tag(void *addr, uint8_t tag) in memtag_insert_tag() argument 183 return (void *)memtag_insert_tag_vaddr((vaddr_t)addr, tag); in memtag_insert_tag()
|
/optee_os-3.20.0/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-3.20.0/core/lib/libtomcrypt/src/mac/poly1305/ |
A D | poly1305_test.c | 20 …unsigned char tag[] = { 0xA8, 0x06, 0x1D, 0xC1, 0x30, 0x51, 0x36, 0xC6, 0xC2, 0x2B, 0x8B, 0xAF, 0x… in poly1305_test() 36 …if (compare_testvector(out, len, tag, sizeof(tag), "POLY1305-TV1", 1) != 0) return CRYPT_FAI… in poly1305_test() 41 …if (compare_testvector(out, len, tag, sizeof(tag), "POLY1305-TV2", 1) != 0) return CRYPT_FAI… in poly1305_test()
|
/optee_os-3.20.0/lib/libmbedtls/mbedtls/include/mbedtls/ |
A D | asn1.h | 100 #define MBEDTLS_ASN1_IS_STRING_TAG( tag ) \ argument 101 ( ( tag ) < 32u && ( \ 102 ( ( 1u << ( tag ) ) & ( ( 1u << MBEDTLS_ASN1_BMP_STRING ) | \ 157 int tag; /**< ASN1 type, e.g. MBEDTLS_ASN1_UTF8_STRING. */ member 241 size_t *len, int tag ); 396 int tag ); 510 int (*cb)( void *ctx, int tag,
|
A D | ccm.h | 165 unsigned char *tag, size_t tag_len ); 213 unsigned char *tag, size_t tag_len ); 250 const unsigned char *tag, size_t tag_len ); 295 const unsigned char *tag, size_t tag_len );
|
/optee_os-3.20.0/core/lib/libtomcrypt/src/encauth/ocb/ |
A D | ocb_done_encrypt.c | 23 unsigned char *ct, unsigned char *tag, unsigned long *taglen) in ocb_done_encrypt() argument 28 LTC_ARGCHK(tag != NULL); in ocb_done_encrypt() 30 return s_ocb_done(ocb, pt, ptlen, ct, tag, taglen, 0); in ocb_done_encrypt()
|
A D | ocb_test.c | 23 unsigned char key[16], nonce[16], pt[34], ct[34], tag[16]; in ocb_test() 177 if (compare_testvector(outtag, len, tests[x].tag, sizeof(tests[x].tag), "OCB Tag", x) || in ocb_test() 183 outct, tests[x].tag, len, &res)) != CRYPT_OK) { in ocb_test()
|
A D | ocb_done_decrypt.c | 26 const unsigned char *tag, unsigned long taglen, int *stat) in ocb_done_decrypt() argument 35 LTC_ARGCHK(tag != NULL); in ocb_done_decrypt() 52 if (taglen <= tagbuflen && XMEM_NEQ(tagbuf, tag, taglen) == 0) { in ocb_done_decrypt()
|
A D | ocb_encrypt_authenticate_memory.c | 30 unsigned char *tag, unsigned long *taglen) in ocb_encrypt_authenticate_memory() argument 39 LTC_ARGCHK(tag != NULL); in ocb_encrypt_authenticate_memory() 61 err = ocb_done_encrypt(ocb, pt, ptlen, ct, tag, taglen); in ocb_encrypt_authenticate_memory()
|
A D | ocb_decrypt_verify_memory.c | 31 const unsigned char *tag, unsigned long taglen, in ocb_decrypt_verify_memory() argument 41 LTC_ARGCHK(tag != NULL); in ocb_decrypt_verify_memory() 63 err = ocb_done_decrypt(ocb, ct, ctlen, pt, tag, taglen, stat); in ocb_decrypt_verify_memory()
|
/optee_os-3.20.0/core/lib/libtomcrypt/src/mac/pmac/ |
A D | pmac_test.c | 24 unsigned char key[16], msg[34], tag[16]; in pmac_test() 133 if (compare_testvector(outtag, len, tests[x].tag, sizeof(tests[x].tag), "PMAC", x)) { in pmac_test()
|
/optee_os-3.20.0/core/lib/libtomcrypt/src/mac/omac/ |
A D | omac_test.c | 23 unsigned char key[16], msg[64], tag[16]; in omac_test() 85 if (compare_testvector(out, len, tests[x].tag, sizeof(tests[x].tag), "OMAC", x) != 0) { in omac_test()
|
/optee_os-3.20.0/core/lib/libtomcrypt/src/encauth/ccm/ |
A D | ccm_test.c | 26 unsigned char tag[16]; in ccm_test() 109 unsigned char buf[64], buf2[64], tag[16], tag2[16], tag3[16], zero[64]; in ccm_test() 139 tag, &taglen, 0)) != CRYPT_OK) { in ccm_test() 150 tag, &taglen, 0)) != CRYPT_OK) { in ccm_test() 166 if ((err = ccm_done(&ccm, tag, &taglen)) != CRYPT_OK) { in ccm_test() 174 if (compare_testvector(tag, taglen, tests[x].tag, tests[x].taglen, "CCM encrypt tag", x)) { in ccm_test() 179 XMEMCPY(tag3, tests[x].tag, tests[x].taglen); in ccm_test() 215 XMEMCPY(tag3, tests[x].tag, tests[x].taglen); in ccm_test() 232 … if (compare_testvector(tag2, taglen, tests[x].tag, tests[x].taglen, "CCM decrypt tag", x)) { in ccm_test()
|
A D | ccm_done.c | 15 unsigned char *tag, unsigned long *taglen) in ccm_done() argument 27 LTC_ARGCHK(tag != NULL); in ccm_done() 48 tag[x] = ccm->PAD[x] ^ ccm->CTRPAD[x]; in ccm_done()
|
/optee_os-3.20.0/core/lib/libtomcrypt/src/encauth/chachapoly/ |
A D | chacha20poly1305_memory.c | 29 unsigned char *tag, unsigned long *taglen, in chacha20poly1305_memory() argument 39 LTC_ARGCHK(tag != NULL); in chacha20poly1305_memory() 49 if ((err = chacha20poly1305_done(&st, tag, taglen)) != CRYPT_OK) { goto LBL_ERR; } in chacha20poly1305_memory() 56 if (buflen != *taglen || XMEM_NEQ(buf, tag, buflen) != 0) { in chacha20poly1305_memory()
|
/optee_os-3.20.0/core/drivers/ |
A D | zynqmp_huk.c | 112 uint8_t tag[ZYNQMP_GCM_TAG_SIZE] __aligned_csuaes = { 0 }; in tee_otp_get_hw_unique_key() local 179 tag, sizeof(tag), iv, sizeof(iv), in tee_otp_get_hw_unique_key() 197 tag, sizeof(tag), iv, in tee_otp_get_hw_unique_key() 228 memzero_explicit(tag, sizeof(tag)); in tee_otp_get_hw_unique_key()
|
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()
|
/optee_os-3.20.0/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-3.20.0/core/lib/libtomcrypt/src/encauth/eax/ |
A D | eax_encrypt_authenticate_memory.c | 34 unsigned char *tag, unsigned long *taglen) in eax_encrypt_authenticate_memory() argument 42 LTC_ARGCHK(tag != NULL); in eax_encrypt_authenticate_memory() 55 if ((err = eax_done(eax, tag, taglen)) != CRYPT_OK) { in eax_encrypt_authenticate_memory()
|
/optee_os-3.20.0/core/lib/libtomcrypt/src/encauth/gcm/ |
A D | gcm_memory.c | 35 unsigned char *tag, unsigned long *taglen, in gcm_memory() argument 53 tag, taglen, in gcm_memory() 91 if ((err = gcm_done(gcm, tag, taglen)) != CRYPT_OK) { in gcm_memory() 101 if (buflen != *taglen || XMEM_NEQ(buf, tag, buflen) != 0) { in gcm_memory()
|
/optee_os-3.20.0/core/lib/libtomcrypt/src/headers/ |
A D | tomcrypt_mac.h | 277 unsigned char *tag, unsigned long *taglen); 285 const unsigned char *tag, unsigned long taglen, 315 unsigned char *tag, unsigned long *taglen); 327 unsigned char *tag, unsigned long *taglen); 334 const unsigned char *tag, unsigned long taglen, 389 unsigned char *tag, unsigned long *taglen); 397 const unsigned char *tag, unsigned long taglen, 445 unsigned char *tag, unsigned long *taglen); 454 unsigned char *tag, unsigned long *taglen, 524 unsigned char *tag, unsigned long *taglen); [all …]
|