Home
last modified time | relevance | path

Searched refs:dupdate (Results 1 – 15 of 15) sorted by relevance

/optee_os/core/drivers/crypto/caam/cipher/
H A Dcaam_cipher_mac.c20 static TEE_Result do_update_mac(struct drvcrypt_cipher_update *dupdate);
21 static TEE_Result do_update_cmac(struct drvcrypt_cipher_update *dupdate);
141 static TEE_Result do_update_mac(struct drvcrypt_cipher_update *dupdate) in do_update_mac() argument
145 struct cipherdata *ctx = dupdate->ctx; in do_update_mac()
155 CIPHER_TRACE("Length=%zu - %s", dupdate->src.length, in do_update_mac()
159 full_size = ctx->blockbuf.filled + dupdate->src.length; in do_update_mac()
161 size_topost = dupdate->src.length; in do_update_mac()
164 size_inmade = dupdate->src.length - size_topost; in do_update_mac()
178 if (dupdate->last) in do_update_mac()
179 memcpy(dupdate->dst.data, ctx->ctx.data, in do_update_mac()
[all …]
H A Dcaam_cipher.c22 static TEE_Result do_update_streaming(struct drvcrypt_cipher_update *dupdate);
23 static TEE_Result do_update_cipher(struct drvcrypt_cipher_update *dupdate);
525 static TEE_Result do_update_streaming(struct drvcrypt_cipher_update *dupdate) in do_update_streaming() argument
529 struct cipherdata *ctx = dupdate->ctx; in do_update_streaming()
540 CIPHER_TRACE("Length=%zu - %s", dupdate->src.length, in do_update_streaming()
544 fullsize = ctx->blockbuf.filled + dupdate->src.length; in do_update_streaming()
547 size_topost = dupdate->src.length; in do_update_streaming()
560 ret = caam_dmaobj_init_input(&src, dupdate->src.data, in do_update_streaming()
561 dupdate->src.length); in do_update_streaming()
565 ret = caam_dmaobj_init_output(&dst, dupdate->dst.data, in do_update_streaming()
[all …]
H A Dcaam_cipher_xts.c77 TEE_Result caam_cipher_update_xts(struct drvcrypt_cipher_update *dupdate) in caam_cipher_update_xts() argument
81 struct cipherdata *ctx = dupdate->ctx; in caam_cipher_update_xts()
94 CIPHER_TRACE("Algo AES XTS length=%zu - %s", dupdate->src.length, in caam_cipher_update_xts()
97 psrc = virt_to_phys(dupdate->src.data); in caam_cipher_update_xts()
98 pdst = virt_to_phys(dupdate->dst.data); in caam_cipher_update_xts()
144 fullsize = dupdate->src.length; in caam_cipher_update_xts()
157 srcbuf.data = dupdate->src.data; in caam_cipher_update_xts()
161 dstbuf.data = dupdate->dst.data; in caam_cipher_update_xts()
H A Dlocal.h42 TEE_Result (*update)(struct drvcrypt_cipher_update *dupdate);
94 TEE_Result caam_cipher_update_xts(struct drvcrypt_cipher_update *dupdate);
/optee_os/core/drivers/crypto/se050/core/
H A Dcipher.c30 static TEE_Result do_update(struct drvcrypt_cipher_update *dupdate) in do_update() argument
32 struct crypto_cipher_ctx *ctx = dupdate->ctx; in do_update()
34 return ctx->ops->update(ctx, dupdate->last, dupdate->src.data, in do_update()
35 dupdate->src.length, dupdate->dst.data); in do_update()
/optee_os/core/drivers/crypto/hisilicon/
H A Dsec_cipher.c614 static TEE_Result sec_cipher_param_check(struct drvcrypt_cipher_update *dupdate) in sec_cipher_param_check() argument
618 if (!dupdate || !dupdate->src.data || !dupdate->dst.data || in sec_cipher_param_check()
619 dupdate->src.length != dupdate->dst.length || in sec_cipher_param_check()
620 dupdate->src.length > MAX_CIPHER_LENGTH || !dupdate->src.length) { in sec_cipher_param_check()
625 c_ctx = dupdate->ctx; in sec_cipher_param_check()
629 if (sec_cipher_cryptlen_check(c_ctx, dupdate->src.length)) in sec_cipher_param_check()
634 if (dupdate->src.length % TEE_DES_BLOCK_SIZE) { in sec_cipher_param_check()
680 static TEE_Result sec_cipher_update(struct drvcrypt_cipher_update *dupdate) in sec_cipher_update() argument
686 ret = sec_cipher_param_check(dupdate); in sec_cipher_update()
690 c_ctx = dupdate->ctx; in sec_cipher_update()
[all …]
H A Dsec_authenc.c522 sec_authenc_update_aad(struct drvcrypt_authenc_update_aad *dupdate) in sec_authenc_update_aad() argument
528 if (!dupdate || !dupdate->ctx) { in sec_authenc_update_aad()
533 ae_drv_ctx = dupdate->ctx; in sec_authenc_update_aad()
537 dupdate->aad.data, dupdate->aad.length); in sec_authenc_update_aad()
544 if (dupdate->aad.length + ae_drv_ctx->src_offset > in sec_authenc_update_aad()
554 dupdate->aad.data, dupdate->aad.length); in sec_authenc_update_aad()
555 ae_drv_ctx->src_offset += dupdate->aad.length; in sec_authenc_update_aad()
/optee_os/core/drivers/crypto/versal/
H A Dauthenc.c410 static TEE_Result do_update_aad(struct drvcrypt_authenc_update_aad *dupdate) in do_update_aad() argument
419 if (!context_allowed(dupdate->ctx)) in do_update_aad()
430 versal_mbox_alloc(dupdate->aad.length, dupdate->aad.data, &p); in do_update_aad()
437 dupdate->aad.length, arg.data[0]); in do_update_aad()
463 update_payload(struct drvcrypt_authenc_update_payload *dupdate, bool is_last) in update_payload() argument
475 if (!context_allowed(dupdate->ctx)) in update_payload()
478 if (!dupdate->src.length || dupdate->src.length % 4) { in update_payload()
480 dupdate->src.length); in update_payload()
484 versal_mbox_alloc(dupdate->src.length, dupdate->src.data, &p); in update_payload()
485 versal_mbox_alloc(dupdate->dst.length, NULL, &q); in update_payload()
[all …]
/optee_os/core/drivers/crypto/stm32/
H A Dauthenc.c234 stm32_ae_update_aad(struct drvcrypt_authenc_update_aad *dupdate) in stm32_ae_update_aad() argument
236 struct stm32_ae_ctx *c = to_stm32_ae_ctx(dupdate->ctx); in stm32_ae_update_aad()
238 return stm32_cryp_update_assodata(&c->cryp, dupdate->aad.data, in stm32_ae_update_aad()
239 dupdate->aad.length); in stm32_ae_update_aad()
243 stm32_ae_update_payload(struct drvcrypt_authenc_update_payload *dupdate) in stm32_ae_update_payload() argument
245 struct stm32_ae_ctx *c = to_stm32_ae_ctx(dupdate->ctx); in stm32_ae_update_payload()
246 size_t len = MIN(dupdate->src.length, dupdate->dst.length); in stm32_ae_update_payload()
248 return stm32_cryp_update_load(&c->cryp, dupdate->src.data, in stm32_ae_update_payload()
249 dupdate->dst.data, len); in stm32_ae_update_payload()
H A Dcipher.c214 static TEE_Result stm32_cipher_update(struct drvcrypt_cipher_update *dupdate) in stm32_cipher_update() argument
216 struct stm32_cipher_ctx *c = to_stm32_cipher_ctx(dupdate->ctx); in stm32_cipher_update()
217 size_t len = MIN(dupdate->src.length, dupdate->dst.length); in stm32_cipher_update()
219 return c->ops->update(&c->ip_ctx, dupdate->last, dupdate->src.data, in stm32_cipher_update()
220 dupdate->dst.data, len); in stm32_cipher_update()
/optee_os/core/drivers/crypto/caam/ae/
H A Dcaam_ae.c202 caam_ae_update_aad(struct drvcrypt_authenc_update_aad *dupdate) in caam_ae_update_aad() argument
209 assert(dupdate); in caam_ae_update_aad()
211 caam_ctx = dupdate->ctx; in caam_ae_update_aad()
215 if (dupdate->aad.data) { in caam_ae_update_aad()
216 retstatus = caam_cpy_buf(&aad, dupdate->aad.data, in caam_ae_update_aad()
217 dupdate->aad.length); in caam_ae_update_aad()
225 caam_ctx->buf_aad.max = dupdate->aad.length; in caam_ae_update_aad()
247 caam_ae_update_payload(struct drvcrypt_authenc_update_payload *dupdate) in caam_ae_update_payload() argument
251 assert(dupdate); in caam_ae_update_payload()
253 caam_ctx = dupdate->ctx; in caam_ae_update_payload()
[all …]
/optee_os/core/drivers/crypto/crypto_api/authenc/
H A Dauthenc.c130 struct drvcrypt_authenc_update_aad dupdate = { in authenc_update_aad() local
136 ret = authenc->op->update_aad(&dupdate); in authenc_update_aad()
170 struct drvcrypt_authenc_update_payload dupdate = { in authenc_update_payload() local
179 ret = authenc->op->update_payload(&dupdate); in authenc_update_payload()
/optee_os/core/drivers/crypto/crypto_api/include/
H A Ddrvcrypt_cipher.h55 TEE_Result (*update)(struct drvcrypt_cipher_update *dupdate);
H A Ddrvcrypt_authenc.h76 TEE_Result (*update_aad)(struct drvcrypt_authenc_update_aad *dupdate);
/optee_os/core/drivers/crypto/crypto_api/cipher/
H A Dcipher.c133 struct drvcrypt_cipher_update dupdate = { in cipher_update() local
142 ret = cipher->op->update(&dupdate); in cipher_update()