Home
last modified time | relevance | path

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

12

/optee_os-3.20.0/core/lib/libtomcrypt/src/pk/asn1/der/general/
A Dder_encode_asn1_identifier.c21 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 Dder_decode_asn1_identifier.c62 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 Dccm.c23 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 Dgcm.c20 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 Daes-gcm.c81 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 Dccm.c171 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 Dcipher.c1141 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 Dgcm.c402 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 Dccm.h165 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 Dgcm.h180 size_t tag_len,
223 size_t tag_len,
299 size_t tag_len );
A Dcipher.h835 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 Dinternal_aes-gcm.h44 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 Docb3_done.c32 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 Dzynqmp_csu_aes.h28 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 Dauthenc.c78 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 Dembedded_ts.c95 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 Dree_fs_ta.c508 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 Dsecstor_ta.c53 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 Dtee_svc_cryp.h62 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 Dembedded_ts.h34 uint8_t *tag, unsigned int *tag_len);
A Dts_store.h35 uint8_t *tag, unsigned int *tag_len);
/optee_os-3.20.0/lib/libutee/include/
A Dutee_syscalls.h136 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 Dzynqmp_csu_aes.c280 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 Dstm32mp15_huk.c93 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 Ddrvcrypt_authenc.h30 size_t tag_len; /* Tag length */ member

Completed in 31 milliseconds

12