/optee_os-3.20.0/core/lib/libtomcrypt/src/pk/asn1/der/general/ |
A D | der_encode_asn1_identifier.c | 21 unsigned long tag_len; in der_encode_asn1_identifier() local 63 tag_len = 0; in der_encode_asn1_identifier() 66 tag_len++; in der_encode_asn1_identifier() 71 if (*outlen < tag_len + 1) { in der_encode_asn1_identifier() 75 for (tmp = 1; tmp <= tag_len; ++tmp) { in der_encode_asn1_identifier() 76 out[tmp] = ((id->tag >> (7 * (tag_len - tmp))) & 0x7f) | 0x80; in der_encode_asn1_identifier() 78 out[tag_len] &= ~0x80; in der_encode_asn1_identifier() 80 *outlen = tag_len + 1; in der_encode_asn1_identifier()
|
A D | der_decode_asn1_identifier.c | 62 unsigned long tag_len; in der_decode_asn1_identifier() local 73 tag_len = 1; in der_decode_asn1_identifier() 82 if (*inlen < tag_len) { in der_decode_asn1_identifier() 88 id->tag |= in[tag_len] & 0x7f; in der_decode_asn1_identifier() 89 tmp = in[tag_len] & 0x80; in der_decode_asn1_identifier() 90 tag_len++; in der_decode_asn1_identifier() 91 } while ((tmp != 0) && (tag_len < 10)); in der_decode_asn1_identifier() 105 *inlen = tag_len; in der_decode_asn1_identifier()
|
/optee_os-3.20.0/core/lib/libtomcrypt/ |
A D | ccm.c | 23 size_t tag_len; /* tag length */ member 59 dst_ctx->tag_len = src_ctx->tag_len; in crypto_aes_ccm_copy_state() 78 ccm->tag_len = tag_len; in crypto_aes_ccm_init() 93 if ((tag_len < 4) || (tag_len > TEE_CCM_TAG_MAX_LENGTH) || in crypto_aes_ccm_init() 94 (tag_len % 2 != 0)) in crypto_aes_ccm_init() 98 payload_len, tag_len, aad_len); in crypto_aes_ccm_init() 168 if (*dst_tag_len < ccm->tag_len) { in crypto_aes_ccm_enc_final() 169 *dst_tag_len = ccm->tag_len; in crypto_aes_ccm_enc_final() 172 *dst_tag_len = ccm->tag_len; in crypto_aes_ccm_enc_final() 192 unsigned long ltc_tag_len = tag_len; in crypto_aes_ccm_dec_final() [all …]
|
A D | gcm.c | 20 size_t tag_len; /* tag length */ member 57 dst_ctx->tag_len = src_ctx->tag_len; in crypto_aes_gcm_copy_state() 64 size_t tag_len, size_t aad_len __unused, in crypto_aes_gcm_init() argument 76 gcm->tag_len = tag_len; in crypto_aes_gcm_init() 157 if (*dst_tag_len < gcm->tag_len) { in crypto_aes_gcm_enc_final() 158 *dst_tag_len = gcm->tag_len; in crypto_aes_gcm_enc_final() 161 *dst_tag_len = gcm->tag_len; in crypto_aes_gcm_enc_final() 174 const uint8_t *tag, size_t tag_len) in crypto_aes_gcm_dec_final() argument 180 unsigned long ltc_tag_len = tag_len; in crypto_aes_gcm_dec_final() 182 if (tag_len == 0) in crypto_aes_gcm_dec_final() [all …]
|
/optee_os-3.20.0/core/crypto/ |
A D | aes-gcm.c | 81 state->tag_len = tag_len; in __gcm_init() 297 if (*tag_len < state->tag_len) in __gcm_enc_final() 305 *tag_len = state->tag_len; in __gcm_enc_final() 315 tag_len); in internal_aes_gcm_enc_final() 325 if (tag_len != state->tag_len) in __gcm_dec_final() 343 tag_len); in internal_aes_gcm_dec_final() 380 *tag_len); in internal_aes_gcm_enc() 403 tag_len); in internal_aes_gcm_dec() 492 dst, tag, tag_len); in aes_gcm_enc_final() 498 size_t tag_len) in aes_gcm_dec_final() argument [all …]
|
/optee_os-3.20.0/lib/libmbedtls/mbedtls/library/ |
A D | ccm.c | 171 if( tag_len == 2 || tag_len > 16 || tag_len % 2 != 0 ) in ccm_auth_crypt() 197 b[0] |= ( ( tag_len - 2 ) / 2 ) << 3; in ccm_auth_crypt() 311 memcpy( tag, y, tag_len ); in ccm_auth_crypt() 330 CCM_VALIDATE_RET( tag_len == 0 || tag != NULL ); in mbedtls_ccm_star_encrypt_and_tag() 346 CCM_VALIDATE_RET( tag_len == 0 || tag != NULL ); in mbedtls_ccm_encrypt_and_tag() 347 if( tag_len == 0 ) 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() 383 for( diff = 0, i = 0; i < tag_len; i++ ) in mbedtls_ccm_star_auth_decrypt() 406 CCM_VALIDATE_RET( tag_len == 0 || tag != NULL ); in mbedtls_ccm_auth_decrypt() [all …]
|
A D | cipher.c | 1141 if ( tag_len != 16U ) in mbedtls_cipher_write_tag() 1187 if( tag_len > sizeof( check_tag ) ) in mbedtls_cipher_check_tag() 1192 check_tag, tag_len ) ) ) in mbedtls_cipher_check_tag() 1210 if ( tag_len != sizeof( check_tag ) ) in mbedtls_cipher_check_tag() 1371 *olen -= tag_len; in mbedtls_cipher_aead_encrypt() 1399 ( tag_len != 16U ) ) in mbedtls_cipher_aead_encrypt() 1496 ( tag_len != 16U ) ) in mbedtls_cipher_aead_decrypt() 1608 if( output_len < ilen + tag_len ) in mbedtls_cipher_auth_encrypt_ext() 1614 *olen += tag_len; in mbedtls_cipher_auth_encrypt_ext() 1664 if( ilen < tag_len || output_len < ilen - tag_len ) in mbedtls_cipher_auth_decrypt_ext() [all …]
|
A D | gcm.c | 402 size_t tag_len ) in mbedtls_gcm_finish() argument 415 if( tag_len > 16 || tag_len < 4 ) in mbedtls_gcm_finish() 418 memcpy( tag, ctx->base_ectr, tag_len ); in mbedtls_gcm_finish() 434 for( i = 0; i < tag_len; i++ ) in mbedtls_gcm_finish() 450 size_t tag_len, in mbedtls_gcm_crypt_and_tag() argument 468 if( ( ret = mbedtls_gcm_finish( ctx, tag, tag_len ) ) != 0 ) in mbedtls_gcm_crypt_and_tag() 481 size_t tag_len, in mbedtls_gcm_auth_decrypt() argument 499 input, output, tag_len, check_tag ) ) != 0 ) in mbedtls_gcm_auth_decrypt() 505 for( diff = 0, i = 0; i < tag_len; i++ ) in mbedtls_gcm_auth_decrypt()
|
/optee_os-3.20.0/lib/libmbedtls/mbedtls/include/mbedtls/ |
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 );
|
A D | gcm.h | 180 size_t tag_len, 223 size_t tag_len, 299 size_t tag_len );
|
A D | cipher.h | 835 unsigned char *tag, size_t tag_len ); 851 const unsigned char *tag, size_t tag_len ); 950 unsigned char *tag, size_t tag_len ) 1009 const unsigned char *tag, size_t tag_len ) 1065 size_t *olen, size_t tag_len ); 1121 size_t *olen, size_t tag_len );
|
/optee_os-3.20.0/core/include/crypto/ |
A D | internal_aes-gcm.h | 44 unsigned int tag_len; member 58 size_t nonce_len, size_t tag_len); 67 void *tag, size_t *tag_len); 70 const void *tag, size_t tag_len); 79 void *tag, size_t *tag_len); 85 const void *tag, size_t tag_len);
|
/optee_os-3.20.0/core/lib/libtomcrypt/src/encauth/ocb3/ |
A D | ocb3_done.c | 32 if ((int)*taglen < ocb->tag_len) { in ocb3_done() 33 *taglen = (unsigned long)ocb->tag_len; in ocb3_done() 68 for(x = 0; x < ocb->tag_len; x++) tag[x] = tmp[x]; in ocb3_done() 69 *taglen = (unsigned long)ocb->tag_len; in ocb3_done()
|
/optee_os-3.20.0/core/include/drivers/ |
A D | zynqmp_csu_aes.h | 28 void *tag, size_t tag_len, 34 const void *tag, size_t tag_len,
|
/optee_os-3.20.0/core/drivers/crypto/crypto_api/authenc/ |
A D | authenc.c | 78 size_t nonce_len, size_t tag_len, size_t aad_len, in authenc_init() argument 99 .tag_len = tag_len, in authenc_init() 200 size_t *tag_len) in authenc_enc_final() argument 223 .tag.length = *tag_len in authenc_enc_final() 228 *tag_len = dfinal.tag.length; in authenc_enc_final() 248 size_t tag_len) in authenc_dec_final() argument 271 .tag.length = tag_len in authenc_dec_final()
|
/optee_os-3.20.0/core/kernel/ |
A D | embedded_ts.c | 95 uint8_t *tag, unsigned int *tag_len) in emb_ts_get_tag() argument 100 if (!tag || *tag_len < TEE_SHA256_HASH_SIZE) { in emb_ts_get_tag() 101 *tag_len = TEE_SHA256_HASH_SIZE; in emb_ts_get_tag() 104 *tag_len = TEE_SHA256_HASH_SIZE; in emb_ts_get_tag() 115 res = crypto_hash_final(ctx, tag, *tag_len); in emb_ts_get_tag()
|
A D | ree_fs_ta.c | 508 uint8_t *tag, unsigned int *tag_len) in ree_fs_ta_get_tag() argument 512 if (!tag || *tag_len < handle->shdr->hash_size) { in ree_fs_ta_get_tag() 513 *tag_len = handle->shdr->hash_size; in ree_fs_ta_get_tag() 516 *tag_len = handle->shdr->hash_size; in ree_fs_ta_get_tag() 673 unsigned int tag_len; member 699 res = ree_fs_ta_get_tag(handle->h, NULL, &handle->tag_len); in buf_ta_open() 704 handle->tag = malloc(handle->tag_len); in buf_ta_open() 774 uint8_t *tag, unsigned int *tag_len) in buf_ta_get_tag() argument 778 *tag_len = handle->tag_len; in buf_ta_get_tag() 779 if (!tag || *tag_len < handle->tag_len) in buf_ta_get_tag() [all …]
|
A D | secstor_ta.c | 53 uint8_t *tag, unsigned int *tag_len) in secstor_ta_get_tag() argument 55 return tee_tadb_get_tag((struct tee_tadb_ta_read *)h, tag, tag_len); in secstor_ta_get_tag()
|
/optee_os-3.20.0/core/include/tee/ |
A D | tee_svc_cryp.h | 62 size_t nonce_len, size_t tag_len, 71 uint64_t *dest_len, void *tag, uint64_t *tag_len); 74 uint64_t *dest_len, const void *tag, size_t tag_len);
|
/optee_os-3.20.0/core/include/kernel/ |
A D | embedded_ts.h | 34 uint8_t *tag, unsigned int *tag_len);
|
A D | ts_store.h | 35 uint8_t *tag, unsigned int *tag_len);
|
/optee_os-3.20.0/lib/libutee/include/ |
A D | utee_syscalls.h | 136 size_t nonce_len, size_t tag_len, size_t aad_len, 146 uint64_t *tag_len); 150 size_t tag_len);
|
/optee_os-3.20.0/core/drivers/ |
A D | zynqmp_csu_aes.c | 280 const void *tag, size_t tag_len, in zynqmp_csu_aes_decrypt_data() argument 301 if (tag_len != ZYNQMP_GCM_TAG_SIZE) { in zynqmp_csu_aes_decrypt_data() 332 void *tag, size_t tag_len, in zynqmp_csu_aes_encrypt_data() argument 353 if (tag_len != ZYNQMP_GCM_TAG_SIZE) { in zynqmp_csu_aes_encrypt_data()
|
A D | stm32mp15_huk.c | 93 size_t tag_len = sizeof(tag); in aes_gcm_encrypt_uid() local 111 out, out_len, tag, &tag_len); in aes_gcm_encrypt_uid()
|
/optee_os-3.20.0/core/drivers/crypto/crypto_api/include/ |
A D | drvcrypt_authenc.h | 30 size_t tag_len; /* Tag length */ member
|