2 * caam - Freescale FSL CAAM support for Public Key Cryptography descriptors
4 * Copyright 2016 Freescale Semiconductor, Inc.
6 * There is no Shared Descriptor for PKC so that the Job Descriptor must carry
7 * all the desired key parameters, input and output pointers.
16 * caam_rsa_key - CAAM RSA key structure. Keys are allocated in DMA zone.
17 * @n : RSA modulus raw byte stream
18 * @e : RSA public exponent raw byte stream
19 * @d : RSA private exponent raw byte stream
20 * @n_sz : length in bytes of RSA modulus n
21 * @e_sz : length in bytes of RSA public exponent
22 * @d_sz : length in bytes of RSA private exponent
34 * caam_rsa_ctx - per session context.
35 * @key : RSA key in DMA zone
36 * @dev : device structure
39 struct caam_rsa_key key
;
44 * rsa_edesc - s/w-extended rsa descriptor
45 * @src_nents : number of segments in input scatterlist
46 * @dst_nents : number of segments in output scatterlist
47 * @sec4_sg_bytes : length of h/w link table
48 * @sec4_sg_dma : dma address of h/w link table
49 * @sec4_sg : pointer to h/w link table
50 * @pdb : specific RSA Protocol Data Block (PDB)
51 * @hw_desc : descriptor followed by link tables if any
57 dma_addr_t sec4_sg_dma
;
58 struct sec4_sg_entry
*sec4_sg
;
60 struct rsa_pub_pdb pub
;
61 struct rsa_priv_f1_pdb priv_f1
;
66 /* Descriptor construction primitives. */
67 void init_rsa_pub_desc(u32
*desc
, struct rsa_pub_pdb
*pdb
);
68 void init_rsa_priv_f1_desc(u32
*desc
, struct rsa_priv_f1_pdb
*pdb
);