Home
last modified time | relevance | path

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

/drivers/crypto/nx/
Dnx-sha512.c43 NX_CPB_SET_DIGEST_SIZE(nx_ctx->csbcpb, NX_DS_SHA512); in nx_sha512_init()
56 struct nx_csbcpb *csbcpb = (struct nx_csbcpb *)nx_ctx->csbcpb; in nx_sha512_update() local
61 if (NX_CPB_FDM(csbcpb) & NX_FDM_CONTINUATION) { in nx_sha512_update()
64 memcpy(csbcpb->cpb.sha512.input_partial_digest, in nx_sha512_update()
65 csbcpb->cpb.sha512.message_digest, SHA512_DIGEST_SIZE); in nx_sha512_update()
98 NX_CPB_FDM(csbcpb) |= NX_FDM_INTERMEDIATE; in nx_sha512_update()
117 spbc_bits = csbcpb->cpb.sha512.spbc * 8; in nx_sha512_update()
118 csbcpb->cpb.sha512.message_bit_length_lo += spbc_bits; in nx_sha512_update()
119 if (csbcpb->cpb.sha512.message_bit_length_lo < spbc_bits) in nx_sha512_update()
120 csbcpb->cpb.sha512.message_bit_length_hi++; in nx_sha512_update()
[all …]
Dnx-sha256.c43 NX_CPB_SET_DIGEST_SIZE(nx_ctx->csbcpb, NX_DS_SHA256); in nx_sha256_init()
56 struct nx_csbcpb *csbcpb = (struct nx_csbcpb *)nx_ctx->csbcpb; in nx_sha256_update() local
61 if (NX_CPB_FDM(csbcpb) & NX_FDM_CONTINUATION) { in nx_sha256_update()
64 memcpy(csbcpb->cpb.sha256.input_partial_digest, in nx_sha256_update()
65 csbcpb->cpb.sha256.message_digest, SHA256_DIGEST_SIZE); in nx_sha256_update()
98 NX_CPB_FDM(csbcpb) |= NX_FDM_INTERMEDIATE; in nx_sha256_update()
117 csbcpb->cpb.sha256.message_bit_length += (u64) in nx_sha256_update()
118 (csbcpb->cpb.sha256.spbc * 8); in nx_sha256_update()
121 NX_CPB_FDM(csbcpb) |= NX_FDM_CONTINUATION; in nx_sha256_update()
130 struct nx_csbcpb *csbcpb = (struct nx_csbcpb *)nx_ctx->csbcpb; in nx_sha256_final() local
[all …]
Dnx-aes-xcbc.c63 struct nx_csbcpb *csbcpb = nx_ctx->csbcpb; in nx_xcbc_init() local
70 NX_CPB_SET_KEY_SIZE(csbcpb, NX_KS_AES_128); in nx_xcbc_init()
71 csbcpb->cpb.hdr.mode = NX_MODE_AES_XCBC_MAC; in nx_xcbc_init()
73 memcpy(csbcpb->cpb.aes_xcbc.key, nx_ctx->priv.xcbc.key, AES_BLOCK_SIZE); in nx_xcbc_init()
89 struct nx_csbcpb *csbcpb = nx_ctx->csbcpb; in nx_xcbc_update() local
94 if (NX_CPB_FDM(csbcpb) & NX_FDM_CONTINUATION) { in nx_xcbc_update()
97 memcpy(csbcpb->cpb.aes_xcbc.cv, in nx_xcbc_update()
98 csbcpb->cpb.aes_xcbc.out_cv_mac, AES_BLOCK_SIZE); in nx_xcbc_update()
140 NX_CPB_FDM(csbcpb) |= NX_FDM_INTERMEDIATE; in nx_xcbc_update()
159 NX_CPB_FDM(csbcpb) |= NX_FDM_CONTINUATION; in nx_xcbc_update()
[all …]
Dnx-aes-cbc.c38 struct nx_csbcpb *csbcpb = nx_ctx->csbcpb; in cbc_aes_nx_set_key() local
44 NX_CPB_SET_KEY_SIZE(csbcpb, NX_KS_AES_128); in cbc_aes_nx_set_key()
48 NX_CPB_SET_KEY_SIZE(csbcpb, NX_KS_AES_192); in cbc_aes_nx_set_key()
52 NX_CPB_SET_KEY_SIZE(csbcpb, NX_KS_AES_256); in cbc_aes_nx_set_key()
59 csbcpb->cpb.hdr.mode = NX_MODE_AES_CBC; in cbc_aes_nx_set_key()
60 memcpy(csbcpb->cpb.aes_cbc.key, in_key, key_len); in cbc_aes_nx_set_key()
72 struct nx_csbcpb *csbcpb = nx_ctx->csbcpb; in cbc_aes_nx_crypt() local
79 NX_CPB_FDM(csbcpb) |= NX_FDM_ENDE_ENCRYPT; in cbc_aes_nx_crypt()
81 NX_CPB_FDM(csbcpb) &= ~NX_FDM_ENDE_ENCRYPT; in cbc_aes_nx_crypt()
84 csbcpb->cpb.aes_cbc.iv); in cbc_aes_nx_crypt()
[all …]
Dnx-aes-ccm.c40 struct nx_csbcpb *csbcpb = nx_ctx->csbcpb; in ccm_aes_nx_set_key() local
47 NX_CPB_SET_KEY_SIZE(csbcpb, NX_KS_AES_128); in ccm_aes_nx_set_key()
55 csbcpb->cpb.hdr.mode = NX_MODE_AES_CCM; in ccm_aes_nx_set_key()
56 memcpy(csbcpb->cpb.aes_ccm.key, in_key, key_len); in ccm_aes_nx_set_key()
190 b0 = nx_ctx->csbcpb->cpb.aes_ccm.in_pat_or_b0; in generate_pat()
195 b0 = nx_ctx->csbcpb->cpb.aes_ccm.in_pat_or_b0; in generate_pat()
210 NX_CPB_FDM(nx_ctx->csbcpb) |= NX_FDM_ENDE_ENCRYPT; in generate_pat()
211 NX_CPB_FDM(nx_ctx->csbcpb) |= NX_FDM_INTERMEDIATE; in generate_pat()
214 result = nx_ctx->csbcpb->cpb.aes_ccm.out_pat_or_mac; in generate_pat()
270 struct nx_csbcpb *csbcpb = nx_ctx->csbcpb; in ccm_nx_decrypt() local
[all …]
Dnx-aes-ecb.c38 struct nx_csbcpb *csbcpb = (struct nx_csbcpb *)nx_ctx->csbcpb; in ecb_aes_nx_set_key() local
44 NX_CPB_SET_KEY_SIZE(csbcpb, NX_KS_AES_128); in ecb_aes_nx_set_key()
48 NX_CPB_SET_KEY_SIZE(csbcpb, NX_KS_AES_192); in ecb_aes_nx_set_key()
52 NX_CPB_SET_KEY_SIZE(csbcpb, NX_KS_AES_256); in ecb_aes_nx_set_key()
59 csbcpb->cpb.hdr.mode = NX_MODE_AES_ECB; in ecb_aes_nx_set_key()
60 memcpy(csbcpb->cpb.aes_ecb.key, in_key, key_len); in ecb_aes_nx_set_key()
72 struct nx_csbcpb *csbcpb = nx_ctx->csbcpb; in ecb_aes_nx_crypt() local
79 NX_CPB_FDM(csbcpb) |= NX_FDM_ENDE_ENCRYPT; in ecb_aes_nx_crypt()
81 NX_CPB_FDM(csbcpb) &= ~NX_FDM_ENDE_ENCRYPT; in ecb_aes_nx_crypt()
98 atomic64_add(csbcpb->csb.processed_byte_count, in ecb_aes_nx_crypt()
Dnx-aes-gcm.c40 struct nx_csbcpb *csbcpb = nx_ctx->csbcpb; in gcm_aes_nx_set_key() local
47 NX_CPB_SET_KEY_SIZE(csbcpb, NX_KS_AES_128); in gcm_aes_nx_set_key()
52 NX_CPB_SET_KEY_SIZE(csbcpb, NX_KS_AES_192); in gcm_aes_nx_set_key()
57 NX_CPB_SET_KEY_SIZE(csbcpb, NX_KS_AES_256); in gcm_aes_nx_set_key()
65 csbcpb->cpb.hdr.mode = NX_MODE_AES_GCM; in gcm_aes_nx_set_key()
66 memcpy(csbcpb->cpb.aes_gcm.key, in_key, key_len); in gcm_aes_nx_set_key()
166 struct nx_csbcpb *csbcpb = nx_ctx->csbcpb; in gcm_aes_nx_crypt() local
192 crypto_blkcipher_setkey(desc.tfm, csbcpb->cpb.aes_gcm.key, in gcm_aes_nx_crypt()
193 NX_CPB_KEY_SIZE(csbcpb) == NX_KS_AES_128 ? 16 : in gcm_aes_nx_crypt()
194 NX_CPB_KEY_SIZE(csbcpb) == NX_KS_AES_192 ? 24 : 32); in gcm_aes_nx_crypt()
[all …]
Dnx-aes-ctr.c39 struct nx_csbcpb *csbcpb = nx_ctx->csbcpb; in ctr_aes_nx_set_key() local
45 NX_CPB_SET_KEY_SIZE(csbcpb, NX_KS_AES_128); in ctr_aes_nx_set_key()
49 NX_CPB_SET_KEY_SIZE(csbcpb, NX_KS_AES_192); in ctr_aes_nx_set_key()
53 NX_CPB_SET_KEY_SIZE(csbcpb, NX_KS_AES_256); in ctr_aes_nx_set_key()
60 csbcpb->cpb.hdr.mode = NX_MODE_AES_CTR; in ctr_aes_nx_set_key()
61 memcpy(csbcpb->cpb.aes_ctr.key, in_key, key_len); in ctr_aes_nx_set_key()
90 struct nx_csbcpb *csbcpb = nx_ctx->csbcpb; in ctr_aes_nx_crypt() local
97 csbcpb->cpb.aes_ctr.iv); in ctr_aes_nx_crypt()
112 atomic64_add(csbcpb->csb.processed_byte_count, in ctr_aes_nx_crypt()
Dnx-842.c223 struct nx_csbcpb csbcpb; member
327 struct nx_csbcpb *csbcpb; in nx842_compress() local
371 csbcpb = &workmem->csbcpb; in nx842_compress()
372 memset(csbcpb, 0, sizeof(*csbcpb)); in nx842_compress()
373 op.csbcpb = __pa(csbcpb); in nx842_compress()
439 ret = nx842_validate_result(dev, &csbcpb->csb); in nx842_compress()
463 size = csbcpb->csb.processed_byte_count; in nx842_compress()
527 struct nx_csbcpb *csbcpb; in nx842_decompress() local
566 csbcpb = &workmem->csbcpb; in nx842_decompress()
567 memset(csbcpb, 0, sizeof(*csbcpb)); in nx842_decompress()
[all …]
Dnx.c239 nx_ctx->csbcpb->csb.valid |= NX_CSB_VALID_BIT; in nx_ctx_init()
242 nx_ctx->op.csbcpb = __pa(nx_ctx->csbcpb); in nx_ctx_init()
250 nx_ctx->op_aead.csbcpb = __pa(nx_ctx->csbcpb_aead); in nx_ctx_init()
533 nx_ctx->csbcpb = (struct nx_csbcpb *)(round_up((u64)nx_ctx->kmem, in nx_crypto_ctx_init()
535 nx_ctx->in_sg = (struct nx_sg *)((u8 *)nx_ctx->csbcpb + NX_PAGE_SIZE); in nx_crypto_ctx_init()
607 nx_ctx->csbcpb = NULL; in nx_crypto_ctx_exit()
Dnx.h122 struct nx_csbcpb *csbcpb; /* aligned page given to phyp @ hcall time */ member