Home
last modified time | relevance | path

Searched refs:hash_ctx (Results 1 – 11 of 11) sorted by relevance

/optee_os/core/drivers/crypto/hisilicon/
H A Dsec_hash.c62 return container_of(ctx, struct crypto_hash, hash_ctx); in to_hash_ctx()
272 TEE_Result hisi_sec_digest_ctx_init(struct hashctx *hash_ctx, in hisi_sec_digest_ctx_init() argument
275 if (!hash_ctx) { in hisi_sec_digest_ctx_init()
280 hash_ctx->in_len = 0; in hisi_sec_digest_ctx_init()
281 hash_ctx->iv_len = 0; in hisi_sec_digest_ctx_init()
282 hash_ctx->has_next = false; in hisi_sec_digest_ctx_init()
283 hash_ctx->long_data_len = 0; in hisi_sec_digest_ctx_init()
284 hash_ctx->scene = SCENE_NOTHING; in hisi_sec_digest_ctx_init()
291 free(hash_ctx->in); in hisi_sec_digest_ctx_init()
292 hash_ctx->in = NULL; in hisi_sec_digest_ctx_init()
[all …]
H A Dsec_hmac.c22 struct hashctx *hash_ctx = NULL; in sec_hmac_initialize() local
30 hash_ctx = hash->ctx; in sec_hmac_initialize()
32 return hisi_sec_digest_ctx_init(hash_ctx, key, len); in sec_hmac_initialize()
61 struct hashctx *hash_ctx = hash->ctx; in sec_hmac_do_final() local
63 return hisi_sec_digest_do_final(hash_ctx, digest, len); in sec_hmac_do_final()
69 struct hashctx *hash_ctx = NULL; in sec_hmac_ctx_free() local
75 hash_ctx = hash->ctx; in sec_hmac_ctx_free()
76 if (!hash_ctx) in sec_hmac_ctx_free()
79 memzero_explicit(hash_ctx->key, hash_ctx->key_len); in sec_hmac_ctx_free()
80 hisi_sec_digest_ctx_free(hash_ctx); in sec_hmac_ctx_free()
[all …]
H A Dsec_hash.h52 struct crypto_hash_ctx hash_ctx; /* Crypto Hash API context */ member
103 TEE_Result hisi_sec_hash_ctx_init(struct hashctx *hash_ctx, uint32_t algo);
104 TEE_Result hisi_sec_digest_ctx_init(struct hashctx *hash_ctx,
110 void hisi_sec_digest_ctx_free(struct hashctx *hash_ctx);
/optee_os/core/pta/
H A Dsecstor_ta_mgmt.c45 void *hash_ctx = NULL; in install_ta() local
69 res = crypto_hash_alloc_ctx(&hash_ctx, in install_ta()
73 res = crypto_hash_init(hash_ctx); in install_ta()
76 res = crypto_hash_update(hash_ctx, (uint8_t *)shdr, sizeof(*shdr)); in install_ta()
88 res = crypto_hash_update(hash_ctx, (uint8_t *)&bs_ta, sizeof(bs_ta)); in install_ta()
109 res = crypto_hash_update(hash_ctx, buf, l); in install_ta()
118 res = crypto_hash_final(hash_ctx, buf, shdr->hash_size); in install_ta()
126 crypto_hash_free_ctx(hash_ctx); in install_ta()
133 crypto_hash_free_ctx(hash_ctx); in install_ta()
/optee_os/core/drivers/crypto/aspeed/
H A Dhace_ast2600.c43 struct crypto_hash_ctx hash_ctx; member
95 hctx = container_of(ctx, struct ast2600_hace_ctx, hash_ctx); in ast2600_hace_process()
139 hctx = container_of(ctx, struct ast2600_hace_ctx, hash_ctx); in ast2600_hace_init()
178 hctx = container_of(ctx, struct ast2600_hace_ctx, hash_ctx); in ast2600_hace_update()
228 hctx = container_of(ctx, struct ast2600_hace_ctx, hash_ctx); in ast2600_hace_final()
295 hctx = container_of(ctx, struct ast2600_hace_ctx, hash_ctx); in ast2600_hace_free()
308 src_hctx = container_of(src_ctx, struct ast2600_hace_ctx, hash_ctx); in ast2600_hace_copy_state()
309 dst_hctx = container_of(dst_ctx, struct ast2600_hace_ctx, hash_ctx); in ast2600_hace_copy_state()
311 dst_hctx->hash_ctx = src_hctx->hash_ctx; in ast2600_hace_copy_state()
351 hctx->hash_ctx.ops = &ast2600_hace_ops; in ast2600_hace_alloc()
[all …]
/optee_os/core/crypto/
H A Dsm3-hash.c22 struct crypto_hash_ctx hash_ctx; member
32 return container_of(ctx, struct sm3_hash_ctx, hash_ctx); in to_hash_ctx()
108 hc->hash_ctx.ops = &sm3_hash_ops; in crypto_sm3_alloc_ctx()
110 *ctx = &hc->hash_ctx; in crypto_sm3_alloc_ctx()
/optee_os/lib/libmbedtls/mbedtls/library/
H A Dpsa_crypto_mac.c28 return psa_hash_abort(&hmac->hash_ctx); in psa_hmac_abort_internal()
90 status = psa_hash_setup(&hmac->hash_ctx, hash_alg); in psa_hmac_setup_internal()
95 status = psa_hash_update(&hmac->hash_ctx, ipad, block_size); in psa_hmac_setup_internal()
108 return psa_hash_update(&hmac->hash_ctx, data, data_length); in psa_hmac_update_internal()
122 status = psa_hash_finish(&hmac->hash_ctx, tmp, sizeof(tmp), &hash_size); in psa_hmac_finish_internal()
128 status = psa_hash_setup(&hmac->hash_ctx, hash_alg); in psa_hmac_finish_internal()
133 status = psa_hash_update(&hmac->hash_ctx, hmac->opad, block_size); in psa_hmac_finish_internal()
138 status = psa_hash_update(&hmac->hash_ctx, tmp, hash_size); in psa_hmac_finish_internal()
143 status = psa_hash_finish(&hmac->hash_ctx, tmp, sizeof(tmp), &hash_size); in psa_hmac_finish_internal()
/optee_os/core/drivers/crypto/caam/hash/
H A Dcaam_hash.c89 struct crypto_hash_ctx hash_ctx; /* Crypto Hash API context */ member
109 return container_of(ctx, struct crypto_hash, hash_ctx); in to_hash_ctx()
248 struct hashctx *hash_ctx = NULL; in caam_hash_allocate() local
264 hash_ctx = caam_calloc(sizeof(*hash_ctx)); in caam_hash_allocate()
265 if (!hash_ctx) { in caam_hash_allocate()
270 hash_ctx->alg = alg; in caam_hash_allocate()
271 hash->hash_ctx.ops = &hash_ops; in caam_hash_allocate()
272 hash->ctx = hash_ctx; in caam_hash_allocate()
274 *ctx = &hash->hash_ctx; in caam_hash_allocate()
276 ret = caam_hash_hmac_allocate(hash_ctx); in caam_hash_allocate()
[all …]
/optee_os/lib/libmbedtls/core/
H A Dhash.c26 struct crypto_hash_ctx hash_ctx; member
36 return container_of(ctx, struct mbed_hash_ctx, hash_ctx); in to_hash_ctx()
125 hc->hash_ctx.ops = &mbed_hash_ops; in mbed_hash_alloc_ctx()
134 *ctx_ret = &hc->hash_ctx; in mbed_hash_alloc_ctx()
/optee_os/core/kernel/
H A Dree_fs_ta.c66 void *hash_ctx; member
249 void *hash_ctx = NULL; in ree_fs_ta_open() local
372 res = crypto_hash_alloc_ctx(&hash_ctx, in ree_fs_ta_open()
376 res = crypto_hash_init(hash_ctx); in ree_fs_ta_open()
379 res = crypto_hash_update(hash_ctx, (uint8_t *)shdr, sizeof(*shdr)); in ree_fs_ta_open()
413 res = crypto_hash_update(hash_ctx, (uint8_t *)bs_hdr, in ree_fs_ta_open()
462 res = crypto_hash_update(hash_ctx, (uint8_t *)ehdr, ehdr_sz); in ree_fs_ta_open()
483 handle->hash_ctx = hash_ctx; in ree_fs_ta_open()
492 crypto_hash_free_ctx(hash_ctx); in ree_fs_ta_open()
539 res = crypto_hash_final(h->hash_ctx, digest, h->shdr->hash_size); in check_digest()
[all …]
/optee_os/lib/libmbedtls/mbedtls/include/psa/
H A Dcrypto_builtin_composites.h49 struct psa_hash_operation_s hash_ctx; member