Searched refs:nx_ctx (Results 1 – 10 of 10) sorted by relevance
/linux/drivers/crypto/nx/ |
A D | nx-aes-xcbc.c | 37 nx_ctx->ap = &nx_ctx->props[NX_PROPS_AES_128]; in nx_xcbc_set_key() 93 nx_ctx->op.inlen = (nx_ctx->in_sg - in_sg) * sizeof(struct nx_sg); in nx_xcbc_empty() 94 nx_ctx->op.outlen = (nx_ctx->out_sg - out_sg) * sizeof(struct nx_sg); in nx_xcbc_empty() 96 rc = nx_hcall_sync(nx_ctx, &nx_ctx->op, 0); in nx_xcbc_empty() 121 nx_ctx->op.inlen = (nx_ctx->in_sg - in_sg) * sizeof(struct nx_sg); in nx_xcbc_empty() 122 nx_ctx->op.outlen = (nx_ctx->out_sg - out_sg) * sizeof(struct nx_sg); in nx_xcbc_empty() 124 rc = nx_hcall_sync(nx_ctx, &nx_ctx->op, 0); in nx_xcbc_empty() 251 nx_ctx->op.inlen = (nx_ctx->in_sg - in_sg) * in nx_xcbc_update() 263 if (!nx_ctx->op.inlen || !nx_ctx->op.outlen) { in nx_xcbc_update() 268 rc = nx_hcall_sync(nx_ctx, &nx_ctx->op, 0); in nx_xcbc_update() [all …]
|
A D | nx-aes-ccm.c | 31 nx_ctx_init(nx_ctx, HCOP_FC_AES); in ccm_aes_nx_set_key() 37 nx_ctx->ap = &nx_ctx->props[NX_PROPS_AES_128]; in ccm_aes_nx_set_key() 245 nx_ctx->ap->sglen); in generate_pat() 252 nx_ctx->op.inlen = (nx_ctx->in_sg - nx_insg) * in generate_pat() 254 nx_ctx->op.outlen = (nx_ctx->out_sg - nx_outsg) * in generate_pat() 262 rc = nx_hcall_sync(nx_ctx, &nx_ctx->op, in generate_pat() 286 nx_ctx->ap->sglen, in generate_pat() 299 nx_ctx->op_aead.inlen = (nx_ctx->in_sg - nx_insg) * in generate_pat() 304 rc = nx_hcall_sync(nx_ctx, &nx_ctx->op_aead, in generate_pat() 376 rc = nx_hcall_sync(nx_ctx, &nx_ctx->op, in ccm_nx_decrypt() [all …]
|
A D | nx-aes-gcm.c | 37 nx_ctx->ap = &nx_ctx->props[NX_PROPS_AES_128]; in gcm_aes_nx_set_key() 42 nx_ctx->ap = &nx_ctx->props[NX_PROPS_AES_192]; in gcm_aes_nx_set_key() 47 nx_ctx->ap = &nx_ctx->props[NX_PROPS_AES_256]; in gcm_aes_nx_set_key() 145 nx_ctx->op_aead.inlen = (nx_ctx->in_sg - nx_sg) in nx_gca() 148 rc = nx_hcall_sync(nx_ctx, &nx_ctx->op_aead, in nx_gca() 212 nx_ctx->op.inlen = (nx_ctx->in_sg - nx_sg) in gmac() 218 rc = nx_hcall_sync(nx_ctx, &nx_ctx->op, in gmac() 282 nx_ctx->op.inlen = (nx_ctx->in_sg - in_sg) * sizeof(struct nx_sg); in gcm_empty() 283 nx_ctx->op.outlen = (nx_ctx->out_sg - out_sg) * sizeof(struct nx_sg); in gcm_empty() 285 rc = nx_hcall_sync(nx_ctx, &nx_ctx->op, in gcm_empty() [all …]
|
A D | nx-sha256.c | 34 nx_ctx_init(nx_ctx, HCOP_FC_SHA); in nx_crypto_ctx_sha256_init() 36 nx_ctx->ap = &nx_ctx->props[NX_PROPS_SHA256]; in nx_crypto_ctx_sha256_init() 100 nx_ctx->op.outlen = (nx_ctx->out_sg - out_sg) * sizeof(struct nx_sg); in nx_sha256_update() 122 used_sgs = in_sg - nx_ctx->in_sg; in nx_sha256_update() 140 nx_ctx->op.inlen = (nx_ctx->in_sg - in_sg) * sizeof(struct nx_sg); in nx_sha256_update() 153 if (!nx_ctx->op.inlen || !nx_ctx->op.outlen) { in nx_sha256_update() 158 rc = nx_hcall_sync(nx_ctx, &nx_ctx->op, 0); in nx_sha256_update() 231 nx_ctx->op.inlen = (nx_ctx->in_sg - in_sg) * sizeof(struct nx_sg); in nx_sha256_final() 232 nx_ctx->op.outlen = (nx_ctx->out_sg - out_sg) * sizeof(struct nx_sg); in nx_sha256_final() 233 if (!nx_ctx->op.outlen) { in nx_sha256_final() [all …]
|
A D | nx-sha512.c | 33 nx_ctx_init(nx_ctx, HCOP_FC_SHA); in nx_crypto_ctx_sha512_init() 35 nx_ctx->ap = &nx_ctx->props[NX_PROPS_SHA512]; in nx_crypto_ctx_sha512_init() 100 nx_ctx->op.outlen = (nx_ctx->out_sg - out_sg) * sizeof(struct nx_sg); in nx_sha512_update() 121 used_sgs = in_sg - nx_ctx->in_sg; in nx_sha512_update() 139 nx_ctx->op.inlen = (nx_ctx->in_sg - in_sg) * sizeof(struct nx_sg); in nx_sha512_update() 157 if (!nx_ctx->op.inlen || !nx_ctx->op.outlen) { in nx_sha512_update() 162 rc = nx_hcall_sync(nx_ctx, &nx_ctx->op, 0); in nx_sha512_update() 236 nx_ctx->op.inlen = (nx_ctx->in_sg - in_sg) * sizeof(struct nx_sg); in nx_sha512_final() 237 nx_ctx->op.outlen = (nx_ctx->out_sg - out_sg) * sizeof(struct nx_sg); in nx_sha512_final() 239 if (!nx_ctx->op.outlen) { in nx_sha512_final() [all …]
|
A D | nx-aes-ctr.c | 27 struct nx_csbcpb *csbcpb = nx_ctx->csbcpb; in ctr_aes_nx_set_key() 29 nx_ctx_init(nx_ctx, HCOP_FC_AES); in ctr_aes_nx_set_key() 34 nx_ctx->ap = &nx_ctx->props[NX_PROPS_AES_128]; in ctr_aes_nx_set_key() 38 nx_ctx->ap = &nx_ctx->props[NX_PROPS_AES_192]; in ctr_aes_nx_set_key() 42 nx_ctx->ap = &nx_ctx->props[NX_PROPS_AES_256]; in ctr_aes_nx_set_key() 63 memcpy(nx_ctx->priv.ctr.nonce, in ctr3686_aes_nx_set_key() 76 struct nx_csbcpb *csbcpb = nx_ctx->csbcpb; in ctr_aes_nx_crypt() 92 if (!nx_ctx->op.inlen || !nx_ctx->op.outlen) { in ctr_aes_nx_crypt() 97 rc = nx_hcall_sync(nx_ctx, &nx_ctx->op, in ctr_aes_nx_crypt() 104 atomic_inc(&(nx_ctx->stats->aes_ops)); in ctr_aes_nx_crypt() [all …]
|
A D | nx-aes-ecb.c | 28 nx_ctx_init(nx_ctx, HCOP_FC_AES); in ecb_aes_nx_set_key() 33 nx_ctx->ap = &nx_ctx->props[NX_PROPS_AES_128]; in ecb_aes_nx_set_key() 37 nx_ctx->ap = &nx_ctx->props[NX_PROPS_AES_192]; in ecb_aes_nx_set_key() 41 nx_ctx->ap = &nx_ctx->props[NX_PROPS_AES_256]; in ecb_aes_nx_set_key() 58 struct nx_csbcpb *csbcpb = nx_ctx->csbcpb; in ecb_aes_nx_crypt() 63 spin_lock_irqsave(&nx_ctx->lock, irq_flags); in ecb_aes_nx_crypt() 78 if (!nx_ctx->op.inlen || !nx_ctx->op.outlen) { in ecb_aes_nx_crypt() 83 rc = nx_hcall_sync(nx_ctx, &nx_ctx->op, in ecb_aes_nx_crypt() 88 atomic_inc(&(nx_ctx->stats->aes_ops)); in ecb_aes_nx_crypt() 90 &(nx_ctx->stats->aes_bytes)); in ecb_aes_nx_crypt() [all …]
|
A D | nx.c | 294 nx_ctx->op.inlen = trim_sg_list(nx_ctx->in_sg, nx_insg, delta, nbytes); in nx_build_sg_lists() 309 memset(nx_ctx->kmem, 0, nx_ctx->kmem_len); in nx_ctx_init() 313 nx_ctx->op.csbcpb = __pa(nx_ctx->csbcpb); in nx_ctx_init() 314 nx_ctx->op.in = __pa(nx_ctx->in_sg); in nx_ctx_init() 315 nx_ctx->op.out = __pa(nx_ctx->out_sg); in nx_ctx_init() 321 nx_ctx->op_aead.csbcpb = __pa(nx_ctx->csbcpb_aead); in nx_ctx_init() 322 nx_ctx->op_aead.in = __pa(nx_ctx->in_sg); in nx_ctx_init() 323 nx_ctx->op_aead.out = __pa(nx_ctx->out_sg); in nx_ctx_init() 670 nx_ctx->kmem = kmalloc(nx_ctx->kmem_len, GFP_KERNEL); in nx_crypto_ctx_init() 671 if (!nx_ctx->kmem) in nx_crypto_ctx_init() [all …]
|
A D | nx-aes-cbc.c | 26 struct nx_csbcpb *csbcpb = nx_ctx->csbcpb; in cbc_aes_nx_set_key() 28 nx_ctx_init(nx_ctx, HCOP_FC_AES); in cbc_aes_nx_set_key() 33 nx_ctx->ap = &nx_ctx->props[NX_PROPS_AES_128]; in cbc_aes_nx_set_key() 37 nx_ctx->ap = &nx_ctx->props[NX_PROPS_AES_192]; in cbc_aes_nx_set_key() 41 nx_ctx->ap = &nx_ctx->props[NX_PROPS_AES_256]; in cbc_aes_nx_set_key() 58 struct nx_csbcpb *csbcpb = nx_ctx->csbcpb; in cbc_aes_nx_crypt() 63 spin_lock_irqsave(&nx_ctx->lock, irq_flags); in cbc_aes_nx_crypt() 79 if (!nx_ctx->op.inlen || !nx_ctx->op.outlen) { in cbc_aes_nx_crypt() 84 rc = nx_hcall_sync(nx_ctx, &nx_ctx->op, in cbc_aes_nx_crypt() 90 atomic_inc(&(nx_ctx->stats->aes_ops)); in cbc_aes_nx_crypt() [all …]
|
A D | nx.h | 155 void nx_ctx_init(struct nx_crypto_ctx *nx_ctx, unsigned int function); 159 int nx_build_sg_lists(struct nx_crypto_ctx *nx_ctx, const u8 *iv,
|
Completed in 20 milliseconds