Home
last modified time | relevance | path

Searched refs:alg (Results 1 – 25 of 27) sorted by relevance

12

/optee_os-3.20.0/core/drivers/crypto/caam/cipher/
A Dcaam_cipher_xts.c145 lastblk = fullsize % ctx->alg->size_block; in caam_cipher_update_xts()
155 fullsize -= ctx->alg->size_block; in caam_cipher_update_xts()
158 srcbuf.length = ctx->alg->size_block; in caam_cipher_update_xts()
162 dstbuf.length = ctx->alg->size_block; in caam_cipher_update_xts()
178 srcbuf.data += ctx->alg->size_block; in caam_cipher_update_xts()
179 srcbuf.paddr += ctx->alg->size_block; in caam_cipher_update_xts()
181 dstbuf.data += ctx->alg->size_block; in caam_cipher_update_xts()
182 dstbuf.paddr += ctx->alg->size_block; in caam_cipher_update_xts()
222 srcbuf.data[ctx->alg->size_block + idx]; in caam_cipher_update_xts()
223 dstbuf.data[ctx->alg->size_block + idx] = in caam_cipher_update_xts()
[all …]
A Dcaam_cipher_mac.c219 size_done = ctx->alg->size_block; in do_update_mac()
226 ctx->alg->size_block); in do_update_mac()
249 ctx->alg->size_block); in do_update_mac()
321 ctx->alg->ctx_offset)); in run_cmac_desc()
340 ctx->alg->size_ctx); in run_cmac_desc()
388 ctx->alg->ctx_offset)); in run_cmac_desc()
502 ctx->alg->size_block); in do_update_cmac()
524 ctx->alg->size_block); in do_update_cmac()
754 alg = get_macalgo(algo); in caam_cmac_allocate()
755 if (!alg) { in caam_cmac_allocate()
[all …]
A Dcaam_cipher.c189 ctx->alg->ctx_offset)); in caam_cipher_block()
217 ctx->alg->ctx_offset)); in caam_cipher_block()
292 alg = get_cipheralgo(algo); in do_allocate()
293 if (!alg) { in do_allocate()
313 cipherdata->alg = alg; in do_allocate()
376 dst->alg = src->alg; in caam_cipher_copy_state()
433 alg = cipherdata->alg; in caam_cipher_initialize()
488 alg->size_ctx); in caam_cipher_initialize()
526 alg->size_block); in caam_cipher_initialize()
643 ctx->alg->size_block); in do_update_streaming()
[all …]
A Dlocal.h56 const struct cipheralg *alg; /* Reference to the algo constants */ member
/optee_os-3.20.0/core/drivers/crypto/caam/hash/
A Dcaam_hash.c249 const struct hashalg *alg = NULL; in caam_hash_allocate() local
256 alg = caam_hash_get_alg(algo); in caam_hash_allocate()
257 if (!alg) in caam_hash_allocate()
270 hash_ctx->alg = alg; in caam_hash_allocate()
396 const struct hashalg *alg = ctx->alg; in do_update_hash() local
425 ctx->ctx.length = alg->size_ctx; in do_update_hash()
472 const struct hashalg *alg = NULL; in caam_hash_hmac_update() local
486 alg = ctx->alg; in caam_hash_hmac_update()
528 alg->size_block); in caam_hash_hmac_update()
586 alg = ctx->alg; in caam_hash_hmac_final()
[all …]
A Dcaam_hash_mac.c67 const struct hashalg *alg, in do_reduce_key() argument
87 caam_desc_add_word(desc, HASH_INITFINAL(alg->type)); in do_reduce_key()
130 const struct hashalg *alg = hmac_ctx->alg; in do_hmac_init() local
149 hmac_ctx->key.length = alg->size_key; in do_hmac_init()
151 if (len > alg->size_block) { in do_hmac_init()
155 alg->size_digest); in do_hmac_init()
176 caam_desc_add_word(desc, HMAC_INIT_DECRYPT(alg->type)); in do_hmac_init()
292 const struct hashalg *alg = NULL; in caam_hmac_allocate() local
299 alg = caam_hash_get_alg(algo); in caam_hmac_allocate()
300 if (!alg) in caam_hmac_allocate()
[all …]
A Dlocal.h19 const struct hashalg *alg; /* Reference to the algo constants */ member
/optee_os-3.20.0/lib/libutee/
A Dtee_api_operations.c1910 if (alg == TEE_ALG_MD5) in TEE_IsAlgorithmSupported()
1914 if (alg == TEE_ALG_SHA1) in TEE_IsAlgorithmSupported()
1918 if (alg == TEE_ALG_SHA224) in TEE_IsAlgorithmSupported()
1922 if (alg == TEE_ALG_SHA256) in TEE_IsAlgorithmSupported()
1926 if (alg == TEE_ALG_SHA384) in TEE_IsAlgorithmSupported()
1968 if (alg == TEE_ALG_SM3) in TEE_IsAlgorithmSupported()
2054 if ((alg == TEE_ALG_ECDH_P192 || alg == TEE_ALG_ECDSA_P192) && in TEE_IsAlgorithmSupported()
2057 if ((alg == TEE_ALG_ECDH_P224 || alg == TEE_ALG_ECDSA_P224) && in TEE_IsAlgorithmSupported()
2060 if ((alg == TEE_ALG_ECDH_P256 || alg == TEE_ALG_ECDSA_P256) && in TEE_IsAlgorithmSupported()
2063 if ((alg == TEE_ALG_ECDH_P384 || alg == TEE_ALG_ECDSA_P384) && in TEE_IsAlgorithmSupported()
[all …]
/optee_os-3.20.0/core/include/
A Dtpm2.h204 enum tpm2_result tpm2_pcr_read(uint8_t pcr_idx, uint16_t alg, void *digest,
217 enum tpm2_result tpm2_pcr_extend(uint8_t pcr_idx, uint16_t alg, void *digest,
227 static inline uint32_t tpm2_get_alg_len(uint16_t alg) in tpm2_get_alg_len() argument
229 switch (alg) { in tpm2_get_alg_len()
250 static inline uint32_t tpm2_alg_to_tcg_mask(uint16_t alg) in tpm2_alg_to_tcg_mask() argument
252 switch (alg) { in tpm2_alg_to_tcg_mask()
/optee_os-3.20.0/core/drivers/tpm2/
A Dtpm2_tcg.c28 static TEE_Result tpm2_tcg_pcr_extend(uint8_t pcr_idx, uint16_t alg, in tpm2_tcg_pcr_extend() argument
31 if (tpm2_pcr_extend(pcr_idx, alg, digest, digest_len)) in tpm2_tcg_pcr_extend()
A Dtpm2_cmd.c205 enum tpm2_result tpm2_pcr_read(uint8_t pcr_idx, uint16_t alg, void *digest, in tpm2_pcr_read() argument
230 if (pcr_idx >= caps.num_pcrs || !tpm2_chip_is_active_bank(alg)) in tpm2_pcr_read()
233 alg_len = tpm2_get_alg_len(alg); in tpm2_pcr_read()
265 tpm2_cmd_add_u16(buf, buf_len, alg); in tpm2_pcr_read()
356 enum tpm2_result tpm2_pcr_extend(uint8_t pcr_idx, uint16_t alg, void *digest, in tpm2_pcr_extend() argument
375 if (pcr_idx >= caps.num_pcrs || !tpm2_chip_is_active_bank(alg)) in tpm2_pcr_extend()
378 alg_len = tpm2_get_alg_len(alg); in tpm2_pcr_extend()
408 tpm2_cmd_add_u16(buf, buf_len, alg); in tpm2_pcr_extend()
A Dtpm2_chip.c44 bool tpm2_chip_is_active_bank(uint16_t alg) in tpm2_chip_is_active_bank() argument
46 uint32_t alg_mask = tpm2_alg_to_tcg_mask(alg); in tpm2_chip_is_active_bank()
133 uint16_t alg = get_be16(&tmp->hash); in tpm2_get_bank_info() local
134 uint32_t alg_mask = tpm2_alg_to_tcg_mask(alg); in tpm2_get_bank_info()
/optee_os-3.20.0/lib/libmbedtls/mbedtls/library/
A Dasn1parse.c381 mbedtls_asn1_buf *alg, mbedtls_asn1_buf *params ) in mbedtls_asn1_get_alg() argument
393 alg->tag = **p; in mbedtls_asn1_get_alg()
396 if( ( ret = mbedtls_asn1_get_tag( p, end, &alg->len, MBEDTLS_ASN1_OID ) ) != 0 ) in mbedtls_asn1_get_alg()
399 alg->p = *p; in mbedtls_asn1_get_alg()
400 *p += alg->len; in mbedtls_asn1_get_alg()
425 mbedtls_asn1_buf *alg ) in mbedtls_asn1_get_alg_null() argument
432 if( ( ret = mbedtls_asn1_get_alg( p, end, alg, &params ) ) != 0 ) in mbedtls_asn1_get_alg_null()
A Dx509.c110 mbedtls_x509_buf *alg ) in mbedtls_x509_get_alg_null() argument
114 if( ( ret = mbedtls_asn1_get_alg_null( p, end, alg ) ) != 0 ) in mbedtls_x509_get_alg_null()
124 mbedtls_x509_buf *alg, mbedtls_x509_buf *params ) in mbedtls_x509_get_alg() argument
128 if( ( ret = mbedtls_asn1_get_alg( p, end, alg, params ) ) != 0 ) in mbedtls_x509_get_alg()
144 static int x509_get_hash_alg( const mbedtls_x509_buf *alg, mbedtls_md_type_t *md_alg ) in x509_get_hash_alg() argument
153 if( alg->tag != ( MBEDTLS_ASN1_CONSTRUCTED | MBEDTLS_ASN1_SEQUENCE ) ) in x509_get_hash_alg()
157 p = alg->p; in x509_get_hash_alg()
158 end = p + alg->len; in x509_get_hash_alg()
A Dcipher.c256 psa_algorithm_t alg; in mbedtls_cipher_setup_psa() local
264 alg = mbedtls_psa_translate_cipher_mode( cipher_info->mode, taglen ); in mbedtls_cipher_setup_psa()
265 if( alg == 0 ) in mbedtls_cipher_setup_psa()
275 cipher_psa->alg = alg; in mbedtls_cipher_setup_psa()
337 psa_set_key_algorithm( &attributes, cipher_psa->alg ); in mbedtls_cipher_setkey()
1271 cipher_psa->alg ); in mbedtls_cipher_crypt()
1277 cipher_psa->alg ); in mbedtls_cipher_crypt()
1363 cipher_psa->alg, in mbedtls_cipher_aead_encrypt()
1443 cipher_psa->alg, in mbedtls_cipher_aead_decrypt()
A Dssl_tls.c560 psa_algorithm_t alg, in setup_psa_key_derivation() argument
567 status = psa_key_derivation_setup( derivation, alg ); in setup_psa_key_derivation()
571 if( PSA_ALG_IS_TLS12_PRF( alg ) || PSA_ALG_IS_TLS12_PSK_TO_MS( alg ) ) in setup_psa_key_derivation()
619 psa_algorithm_t alg; in tls_prf_generic() local
625 alg = PSA_ALG_TLS12_PRF(PSA_ALG_SHA_384); in tls_prf_generic()
627 alg = PSA_ALG_TLS12_PRF(PSA_ALG_SHA_256); in tls_prf_generic()
640 psa_set_key_algorithm( &key_attributes, alg ); in tls_prf_generic()
649 master_key, alg, in tls_prf_generic()
1659 psa_algorithm_t alg; in ssl_compute_master() local
1670 alg = PSA_ALG_TLS12_PSK_TO_MS(PSA_ALG_SHA_384); in ssl_compute_master()
[all …]
/optee_os-3.20.0/core/kernel/
A Dtcg.c37 uint32_t alg = digest_list->digests[i].hash_alg; in tcg_pcr_extend() local
40 if (pcr_provider->pcr_extend(pcr_index, alg, digest, in tcg_pcr_extend()
41 tpm2_get_alg_len(alg))) { in tcg_pcr_extend()
266 uint16_t alg = 0; in tcg_parse_event() local
271 alg = get_unaligned_le16((void *)((uintptr_t)event + pos)); in tcg_parse_event()
277 if (alg != hash_alg) in tcg_parse_event()
/optee_os-3.20.0/core/drivers/
A Dhi16xx_rng.c42 vaddr_t alg = (vaddr_t)phys_to_virt(ALG_SC_BASE, MEM_AREA_IO_SEC, in hi16xx_rng_init() local
49 io_write32(alg + ALG_SC_RNG_RESET_DREQ, ALG_SC_SRST_DREQ_RNG); in hi16xx_rng_init()
/optee_os-3.20.0/lib/libmbedtls/mbedtls/include/mbedtls/
A Dasn1.h556 mbedtls_asn1_buf *alg, mbedtls_asn1_buf *params );
575 mbedtls_asn1_buf *alg );
A Dx509.h333 mbedtls_x509_buf *alg );
335 mbedtls_x509_buf *alg, mbedtls_x509_buf *params );
A Dcipher_internal.h139 psa_algorithm_t alg; member
/optee_os-3.20.0/core/include/kernel/
A Dtcg.h124 TEE_Result (*pcr_extend)(uint8_t pcr_idx, uint16_t alg, void *digest,
/optee_os-3.20.0/core/drivers/imx/dcp/
A Ddcp.c498 desc->ctrl1 = hash_alg[hashdata->alg].type; in dcp_sha_do_init()
600 if (digest_size < hash_alg[hashdata->alg].size) { in dcp_sha_do_final()
602 hash_alg[hashdata->alg].size); in dcp_sha_do_final()
607 payload_size = hash_alg[hashdata->alg].size; in dcp_sha_do_final()
611 if (hashdata->alg == DCP_SHA1) in dcp_sha_do_final()
613 if (hashdata->alg == DCP_SHA256) in dcp_sha_do_final()
/optee_os-3.20.0/core/include/drivers/imx/
A Ddcp.h79 enum dcp_hash_config alg; member
/optee_os-3.20.0/core/include/drivers/
A Dtpm2_chip.h110 bool tpm2_chip_is_active_bank(uint16_t alg);

Completed in 41 milliseconds

12