summaryrefslogtreecommitdiff
path: root/drivers/crypto/caam/pkc_desc.h
diff options
context:
space:
mode:
authorYashpal Dutta <yashpal.dutta@freescale.com>2014-03-22 22:59:34 (GMT)
committerJose Rivera <German.Rivera@freescale.com>2014-03-24 16:09:35 (GMT)
commitfc281aa59e4c6f2e1574d4a6812438a6e06be0a9 (patch)
treefa46b059eae0492f4a78bf3d65bc04560f9397c2 /drivers/crypto/caam/pkc_desc.h
parent67659d841becfc172216df76f058db25588f87cf (diff)
downloadlinux-fsl-qoriq-fc281aa59e4c6f2e1574d4a6812438a6e06be0a9.tar.xz
added support for PKC keygen
As a part of PKC support, RSA, DSA DH, ECDH, ECDSA requires key generation. The patch adds support for key generation support for DSA, ECDSA, DH, ECDH. The patch adds DH operation support too Signed-off-by: Yashpal Dutta <yashpal.dutta@freescale.com> Change-Id: I0dc9c144a23e2248bf8974a1615363341dc4886e Reviewed-on: http://git.am.freescale.net:8181/5867 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Geanta Neag Horia Ioan-B05471 <horia.geanta@freescale.com> Reviewed-by: Rivera Jose-B46482 <German.Rivera@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/9551 Reviewed-by: Ruchika Gupta <ruchika.gupta@freescale.com> Reviewed-by: Jose Rivera <German.Rivera@freescale.com>
Diffstat (limited to 'drivers/crypto/caam/pkc_desc.h')
-rw-r--r--drivers/crypto/caam/pkc_desc.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/drivers/crypto/caam/pkc_desc.h b/drivers/crypto/caam/pkc_desc.h
index 56fc2ee..f73ad07 100644
--- a/drivers/crypto/caam/pkc_desc.h
+++ b/drivers/crypto/caam/pkc_desc.h
@@ -176,9 +176,11 @@ struct rsa_edesc {
*/
struct dsa_edesc_s {
enum pkc_req_type req_type;
+ enum curve_t curve_type;
uint32_t l_len;
uint32_t n_len;
dma_addr_t key_dma;
+ dma_addr_t s_dma;
dma_addr_t f_dma;
dma_addr_t q_dma;
dma_addr_t r_dma;
@@ -191,11 +193,30 @@ struct dsa_edesc_s {
u32 hw_desc[];
};
+/*
+ * dh_edesc - s/w-extended for dh and ecdh descriptors
+ * @hw_desc: the h/w job descriptor
+ */
+struct dh_edesc_s {
+ enum pkc_req_type req_type;
+ enum curve_t curve_type;
+ uint32_t l_len;
+ uint32_t n_len;
+ dma_addr_t q_dma;
+ dma_addr_t ab_dma;
+ dma_addr_t w_dma;
+ dma_addr_t s_dma;
+ dma_addr_t z_dma;
+ u32 hw_desc[];
+};
+
void *caam_rsa_pub_desc(struct rsa_edesc *);
void *caam_rsa_priv_f1_desc(struct rsa_edesc *);
void *caam_rsa_priv_f2_desc(struct rsa_edesc *);
void *caam_rsa_priv_f3_desc(struct rsa_edesc *);
void *caam_dsa_sign_desc(struct dsa_edesc_s *);
void *caam_dsa_verify_desc(struct dsa_edesc_s *);
+void *caam_keygen_desc(struct dsa_edesc_s *);
+void *caam_dh_key_desc(struct dh_edesc_s *);
#endif