/linux/drivers/crypto/nx/ |
H A D | nx-aes-gcm.c | 28 struct nx_csbcpb *csbcpb = nx_ctx->csbcpb; in gcm_aes_nx_set_key() local 35 NX_CPB_SET_KEY_SIZE(csbcpb, NX_KS_AES_128); in gcm_aes_nx_set_key() 40 NX_CPB_SET_KEY_SIZE(csbcpb, NX_KS_AES_192); in gcm_aes_nx_set_key() 45 NX_CPB_SET_KEY_SIZE(csbcpb, NX_KS_AES_256); in gcm_aes_nx_set_key() 53 csbcpb->cpb.hdr.mode = NX_MODE_AES_GCM; in gcm_aes_nx_set_key() 54 memcpy(csbcpb->cpb.aes_gcm.key, in_key, key_len); in gcm_aes_nx_set_key() 174 struct nx_csbcpb *csbcpb = nx_ctx->csbcpb; in gmac() local 181 csbcpb->cpb.hdr.mode = NX_MODE_AES_GMAC; in gmac() 183 NX_CPB_FDM(csbcpb) &= ~NX_FDM_CONTINUATION; in gmac() 192 memcpy(csbcpb->cpb.aes_gcm.iv_or_cnt, iv, AES_BLOCK_SIZE); in gmac() [all …]
|
H A D | nx-aes-xcbc.c | 33 struct nx_csbcpb *csbcpb = nx_ctx->csbcpb; in nx_xcbc_set_key() local 43 memcpy(csbcpb->cpb.aes_xcbc.key, in_key, key_len); in nx_xcbc_set_key() 62 struct nx_csbcpb *csbcpb = nx_ctx->csbcpb; in nx_xcbc_empty() local 70 csbcpb->cpb.hdr.mode = NX_MODE_AES_ECB; in nx_xcbc_empty() 71 memcpy(key, csbcpb->cpb.aes_xcbc.key, AES_BLOCK_SIZE); in nx_xcbc_empty() 72 memcpy(csbcpb->cpb.aes_ecb.key, key, AES_BLOCK_SIZE); in nx_xcbc_empty() 73 NX_CPB_FDM(csbcpb) |= NX_FDM_ENDE_ENCRYPT; in nx_xcbc_empty() 107 memcpy(csbcpb->cpb.aes_ecb.key, keys[0], AES_BLOCK_SIZE); in nx_xcbc_empty() 131 csbcpb->cpb.hdr.mode = NX_MODE_AES_XCBC_MAC; in nx_xcbc_empty() 132 memcpy(csbcpb->cpb.aes_xcbc.key, key, AES_BLOCK_SIZE); in nx_xcbc_empty() [all …]
|
H A D | nx-aes-ccm.c | 28 struct nx_csbcpb *csbcpb = nx_ctx->csbcpb; in ccm_aes_nx_set_key() local 35 NX_CPB_SET_KEY_SIZE(csbcpb, NX_KS_AES_128); in ccm_aes_nx_set_key() 43 csbcpb->cpb.hdr.mode = NX_MODE_AES_CCM; in ccm_aes_nx_set_key() 44 memcpy(csbcpb->cpb.aes_ccm.key, in_key, key_len); in ccm_aes_nx_set_key() 186 b0 = nx_ctx->csbcpb->cpb.aes_ccm.in_pat_or_b0; in generate_pat() 191 b0 = nx_ctx->csbcpb->cpb.aes_ccm.in_pat_or_b0; in generate_pat() 254 NX_CPB_FDM(nx_ctx->csbcpb) |= NX_FDM_ENDE_ENCRYPT; in generate_pat() 255 NX_CPB_FDM(nx_ctx->csbcpb) |= NX_FDM_INTERMEDIATE; in generate_pat() 257 result = nx_ctx->csbcpb->cpb.aes_ccm.out_pat_or_mac; in generate_pat() 331 struct nx_csbcpb *csbcpb = nx_ctx->csbcpb; in ccm_nx_decrypt() local [all …]
|
H A D | nx-aes-cbc.c | 26 struct nx_csbcpb *csbcpb = nx_ctx->csbcpb; in cbc_aes_nx_set_key() local 32 NX_CPB_SET_KEY_SIZE(csbcpb, NX_KS_AES_128); in cbc_aes_nx_set_key() 36 NX_CPB_SET_KEY_SIZE(csbcpb, NX_KS_AES_192); in cbc_aes_nx_set_key() 40 NX_CPB_SET_KEY_SIZE(csbcpb, NX_KS_AES_256); in cbc_aes_nx_set_key() 47 csbcpb->cpb.hdr.mode = NX_MODE_AES_CBC; in cbc_aes_nx_set_key() 48 memcpy(csbcpb->cpb.aes_cbc.key, in_key, key_len); in cbc_aes_nx_set_key() 58 struct nx_csbcpb *csbcpb = nx_ctx->csbcpb; in cbc_aes_nx_crypt() local 66 NX_CPB_FDM(csbcpb) |= NX_FDM_ENDE_ENCRYPT; in cbc_aes_nx_crypt() 68 NX_CPB_FDM(csbcpb) &= ~NX_FDM_ENDE_ENCRYPT; in cbc_aes_nx_crypt() 75 csbcpb->cpb.aes_cbc.iv); in cbc_aes_nx_crypt() [all …]
|
H A D | nx-aes-ecb.c | 26 struct nx_csbcpb *csbcpb = (struct nx_csbcpb *)nx_ctx->csbcpb; in ecb_aes_nx_set_key() local 32 NX_CPB_SET_KEY_SIZE(csbcpb, NX_KS_AES_128); in ecb_aes_nx_set_key() 36 NX_CPB_SET_KEY_SIZE(csbcpb, NX_KS_AES_192); in ecb_aes_nx_set_key() 40 NX_CPB_SET_KEY_SIZE(csbcpb, NX_KS_AES_256); in ecb_aes_nx_set_key() 47 csbcpb->cpb.hdr.mode = NX_MODE_AES_ECB; in ecb_aes_nx_set_key() 48 memcpy(csbcpb->cpb.aes_ecb.key, in_key, key_len); in ecb_aes_nx_set_key() 58 struct nx_csbcpb *csbcpb = nx_ctx->csbcpb; in ecb_aes_nx_crypt() local 66 NX_CPB_FDM(csbcpb) |= NX_FDM_ENDE_ENCRYPT; in ecb_aes_nx_crypt() 68 NX_CPB_FDM(csbcpb) &= ~NX_FDM_ENDE_ENCRYPT; in ecb_aes_nx_crypt() 89 atomic64_add(be32_to_cpu(csbcpb->csb.processed_byte_count), in ecb_aes_nx_crypt()
|
H A D | nx-sha512.c | 37 NX_CPB_SET_DIGEST_SIZE(nx_ctx->csbcpb, NX_DS_SHA512); in nx_crypto_ctx_sha512_init() 66 struct nx_csbcpb *csbcpb = (struct nx_csbcpb *)nx_ctx->csbcpb; in nx_sha512_update() local 88 memcpy(csbcpb->cpb.sha512.message_digest, sctx->state, SHA512_DIGEST_SIZE); in nx_sha512_update() 89 NX_CPB_FDM(csbcpb) |= NX_FDM_INTERMEDIATE; in nx_sha512_update() 90 NX_CPB_FDM(csbcpb) |= NX_FDM_CONTINUATION; in nx_sha512_update() 153 memcpy(csbcpb->cpb.sha512.input_partial_digest, in nx_sha512_update() 154 csbcpb->cpb.sha512.message_digest, in nx_sha512_update() 178 memcpy(sctx->state, csbcpb->cpb.sha512.message_digest, SHA512_DIGEST_SIZE); in nx_sha512_update() 188 struct nx_csbcpb *csbcpb = (struct nx_csbcpb *)nx_ctx->csbcpb; in nx_sha512_final() local 208 memcpy(csbcpb->cpb.sha512.input_partial_digest, sctx->state, in nx_sha512_final() [all …]
|
H A D | nx-aes-ctr.c | 27 struct nx_csbcpb *csbcpb = nx_ctx->csbcpb; in ctr_aes_nx_set_key() local 33 NX_CPB_SET_KEY_SIZE(csbcpb, NX_KS_AES_128); in ctr_aes_nx_set_key() 37 NX_CPB_SET_KEY_SIZE(csbcpb, NX_KS_AES_192); in ctr_aes_nx_set_key() 41 NX_CPB_SET_KEY_SIZE(csbcpb, NX_KS_AES_256); in ctr_aes_nx_set_key() 48 csbcpb->cpb.hdr.mode = NX_MODE_AES_CTR; in ctr_aes_nx_set_key() 49 memcpy(csbcpb->cpb.aes_ctr.key, in_key, key_len); in ctr_aes_nx_set_key() 76 struct nx_csbcpb *csbcpb = nx_ctx->csbcpb; in ctr_aes_nx_crypt() local 88 csbcpb->cpb.aes_ctr.iv); in ctr_aes_nx_crypt() 102 memcpy(iv, csbcpb->cpb.aes_cbc.cv, AES_BLOCK_SIZE); in ctr_aes_nx_crypt() 105 atomic64_add(be32_to_cpu(csbcpb->csb.processed_byte_count), in ctr_aes_nx_crypt()
|
H A D | nx-sha256.c | 38 NX_CPB_SET_DIGEST_SIZE(nx_ctx->csbcpb, NX_DS_SHA256); in nx_crypto_ctx_sha256_init() 66 struct nx_csbcpb *csbcpb = (struct nx_csbcpb *)nx_ctx->csbcpb; in nx_sha256_update() local 88 memcpy(csbcpb->cpb.sha256.message_digest, sctx->state, SHA256_DIGEST_SIZE); in nx_sha256_update() 89 NX_CPB_FDM(csbcpb) |= NX_FDM_INTERMEDIATE; in nx_sha256_update() 90 NX_CPB_FDM(csbcpb) |= NX_FDM_CONTINUATION; in nx_sha256_update() 149 memcpy(csbcpb->cpb.sha256.input_partial_digest, in nx_sha256_update() 150 csbcpb->cpb.sha256.message_digest, in nx_sha256_update() 175 memcpy(sctx->state, csbcpb->cpb.sha256.message_digest, SHA256_DIGEST_SIZE); in nx_sha256_update() 185 struct nx_csbcpb *csbcpb = (struct nx_csbcpb *)nx_ctx->csbcpb; in nx_sha256_final() local 204 memcpy(csbcpb->cpb.sha256.input_partial_digest, sctx->state, SHA256_DIGEST_SIZE); in nx_sha256_final() [all …]
|
H A D | nx.c | 310 nx_ctx->csbcpb->csb.valid |= NX_CSB_VALID_BIT; in nx_ctx_init() 313 nx_ctx->op.csbcpb = __pa(nx_ctx->csbcpb); in nx_ctx_init() 321 nx_ctx->op_aead.csbcpb = __pa(nx_ctx->csbcpb_aead); in nx_ctx_init() 675 nx_ctx->csbcpb = (struct nx_csbcpb *)(round_up((u64)nx_ctx->kmem, in nx_crypto_ctx_init() 677 nx_ctx->in_sg = (struct nx_sg *)((u8 *)nx_ctx->csbcpb + NX_PAGE_SIZE); in nx_crypto_ctx_init() 751 nx_ctx->csbcpb = NULL; in nx_crypto_ctx_exit()
|
H A D | nx.h | 121 struct nx_csbcpb *csbcpb; /* aligned page given to phyp @ hcall time */ member
|
/linux/arch/powerpc/include/asm/ |
H A D | vio.h | 74 u64 csbcpb; member
|
/linux/arch/powerpc/platforms/pseries/ |
H A D | vio.c | 1110 op->outlen, op->csbcpb); in vio_h_cop_sync()
|