/optee_os/core/lib/libtomcrypt/ |
A D | ccm.c | 22 size_t tag_len; /* tag length */ member 58 dst_ctx->tag_len = src_ctx->tag_len; in crypto_aes_ccm_copy_state() 77 ccm->tag_len = tag_len; in crypto_aes_ccm_init() 88 if ((tag_len < 4) || (tag_len > TEE_CCM_TAG_MAX_LENGTH) || in crypto_aes_ccm_init() 89 (tag_len % 2 != 0)) in crypto_aes_ccm_init() 93 payload_len, tag_len, aad_len); in crypto_aes_ccm_init() 163 if (*dst_tag_len < ccm->tag_len) { in crypto_aes_ccm_enc_final() 164 *dst_tag_len = ccm->tag_len; in crypto_aes_ccm_enc_final() 167 *dst_tag_len = ccm->tag_len; in crypto_aes_ccm_enc_final() 187 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/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/core/lib/libtomcrypt/src/pk/asn1/der/general/ |
A D | der_encode_asn1_identifier.c | 28 unsigned long tag_len; in der_encode_asn1_identifier() local 70 tag_len = 0; in der_encode_asn1_identifier() 73 tag_len++; in der_encode_asn1_identifier() 78 if (*outlen < tag_len + 1) { in der_encode_asn1_identifier() 82 for (tmp = 1; tmp <= tag_len; ++tmp) { in der_encode_asn1_identifier() 83 out[tmp] = ((id->tag >> (7 * (tag_len - tmp))) & 0x7f) | 0x80; in der_encode_asn1_identifier() 85 out[tag_len] &= ~0x80; in der_encode_asn1_identifier() 87 *outlen = tag_len + 1; in der_encode_asn1_identifier()
|
A D | der_decode_asn1_identifier.c | 69 unsigned long tag_len; in der_decode_asn1_identifier() local 80 tag_len = 1; in der_decode_asn1_identifier() 89 if (*inlen < tag_len) { in der_decode_asn1_identifier() 95 id->tag |= in[tag_len] & 0x7f; in der_decode_asn1_identifier() 96 tmp = in[tag_len] & 0x80; in der_decode_asn1_identifier() 97 tag_len++; in der_decode_asn1_identifier() 98 } while ((tmp != 0) && (tag_len < 10)); in der_decode_asn1_identifier() 112 *inlen = tag_len; in der_decode_asn1_identifier()
|
/optee_os/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() 312 memcpy( tag, y, tag_len ); in ccm_auth_crypt() 331 CCM_VALIDATE_RET( tag_len == 0 || tag != NULL ); in mbedtls_ccm_star_encrypt_and_tag() 347 CCM_VALIDATE_RET( tag_len == 0 || tag != NULL ); in mbedtls_ccm_encrypt_and_tag() 348 if( tag_len == 0 ) 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() 384 for( diff = 0, i = 0; i < tag_len; i++ ) in mbedtls_ccm_star_auth_decrypt() 407 CCM_VALIDATE_RET( tag_len == 0 || tag != NULL ); in mbedtls_ccm_auth_decrypt() [all …]
|
A D | cipher.c | 1150 if ( tag_len != 16U ) in mbedtls_cipher_write_tag() 1190 if( tag_len > sizeof( check_tag ) ) in mbedtls_cipher_check_tag() 1195 check_tag, tag_len ) ) ) in mbedtls_cipher_check_tag() 1212 if ( tag_len != sizeof( check_tag ) ) in mbedtls_cipher_check_tag() 1367 *olen -= tag_len; in mbedtls_cipher_aead_encrypt() 1395 ( tag_len != 16U ) ) in mbedtls_cipher_aead_encrypt() 1492 ( tag_len != 16U ) ) in mbedtls_cipher_aead_decrypt() 1604 if( output_len < ilen + tag_len ) in mbedtls_cipher_auth_encrypt_ext() 1610 *olen += tag_len; in mbedtls_cipher_auth_encrypt_ext() 1660 if( ilen < tag_len || output_len < ilen - tag_len ) in mbedtls_cipher_auth_decrypt_ext() [all …]
|
/optee_os/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/out/arm/export-ta_arm32/host_include/mbedtls/ |
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 );
|
A D | gcm.h | 177 size_t tag_len, 220 size_t tag_len, 296 size_t tag_len );
|
A D | cipher.h | 827 unsigned char *tag, size_t tag_len ); 843 const unsigned char *tag, size_t tag_len ); 942 unsigned char *tag, size_t tag_len ) 1001 const unsigned char *tag, size_t tag_len ) 1057 size_t *olen, size_t tag_len ); 1113 size_t *olen, size_t tag_len );
|
/optee_os/out/arm/export-ta_arm32/include/mbedtls/ |
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 );
|
A D | gcm.h | 177 size_t tag_len, 220 size_t tag_len, 296 size_t tag_len );
|
A D | cipher.h | 827 unsigned char *tag, size_t tag_len ); 843 const unsigned char *tag, size_t tag_len ); 942 unsigned char *tag, size_t tag_len ) 1001 const unsigned char *tag, size_t tag_len ) 1057 size_t *olen, size_t tag_len ); 1113 size_t *olen, size_t tag_len );
|
/optee_os/lib/libmbedtls/mbedtls/include/mbedtls/ |
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 );
|
A D | gcm.h | 177 size_t tag_len, 220 size_t tag_len, 296 size_t tag_len );
|
/optee_os/out/arm/export-ta_arm64/include/mbedtls/ |
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 );
|
A D | gcm.h | 177 size_t tag_len, 220 size_t tag_len, 296 size_t tag_len );
|
A D | cipher.h | 827 unsigned char *tag, size_t tag_len ); 843 const unsigned char *tag, size_t tag_len ); 942 unsigned char *tag, size_t tag_len ) 1001 const unsigned char *tag, size_t tag_len ) 1057 size_t *olen, size_t tag_len ); 1113 size_t *olen, size_t tag_len );
|
/optee_os/out/arm/export-ta_arm64/host_include/mbedtls/ |
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 );
|
A D | gcm.h | 177 size_t tag_len, 220 size_t tag_len, 296 size_t tag_len );
|
/optee_os/core/lib/libtomcrypt/src/encauth/ocb3/ |
A D | ocb3_done.c | 39 if ((int)*taglen < ocb->tag_len) { in ocb3_done() 40 *taglen = (unsigned long)ocb->tag_len; in ocb3_done() 75 for(x = 0; x < ocb->tag_len; x++) tag[x] = tmp[x]; in ocb3_done() 76 *taglen = (unsigned long)ocb->tag_len; in ocb3_done()
|
/optee_os/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/core/kernel/ |
A D | ree_fs_ta.c | 306 uint8_t *tag, unsigned int *tag_len) in ree_fs_ta_get_tag() argument 310 if (!tag || *tag_len < handle->shdr->hash_size) { in ree_fs_ta_get_tag() 311 *tag_len = handle->shdr->hash_size; in ree_fs_ta_get_tag() 314 *tag_len = handle->shdr->hash_size; in ree_fs_ta_get_tag() 561 unsigned int tag_len; member 580 res = ree_fs_ta_get_tag(handle->h, NULL, &handle->tag_len); in buf_ta_open() 585 handle->tag = malloc(handle->tag_len); in buf_ta_open() 647 uint8_t *tag, unsigned int *tag_len) in buf_ta_get_tag() argument 651 *tag_len = handle->tag_len; in buf_ta_get_tag() 652 if (!tag || *tag_len < handle->tag_len) in buf_ta_get_tag() [all …]
|
A D | embedded_ts.c | 94 uint8_t *tag, unsigned int *tag_len) in emb_ts_get_tag() argument 99 if (!tag || *tag_len < TEE_SHA256_HASH_SIZE) { in emb_ts_get_tag() 100 *tag_len = TEE_SHA256_HASH_SIZE; in emb_ts_get_tag() 103 *tag_len = TEE_SHA256_HASH_SIZE; in emb_ts_get_tag() 114 res = crypto_hash_final(ctx, tag, *tag_len); in emb_ts_get_tag()
|