summaryrefslogtreecommitdiff
path: root/drivers/crypto/caam/caamalg_qi2.h
diff options
context:
space:
mode:
authorRadu Alexe <radu.alexe@nxp.com>2017-06-09 11:49:17 (GMT)
committerXie Xiaobo <xiaobo.xie@nxp.com>2017-09-25 07:25:36 (GMT)
commit40c0ca3f08f9f6c6e78bd8fecae403e28f26d08b (patch)
treef45b041de93cfeab99fa81b175f5359acf875544 /drivers/crypto/caam/caamalg_qi2.h
parent7966143269747f5096e1ba47b04716c4f87ca8cb (diff)
downloadlinux-40c0ca3f08f9f6c6e78bd8fecae403e28f26d08b.tar.xz
crypto: caam/qi2 - add support for TLS 1.0 record
TLS 1.0 descriptors run on SEC 4.x or higher. For now, only tls10(hmac(sha1),cbc(aes)) algorithm is registered by the driver. Known limitations: - when src == dst - there should be no element in the src scatterlist array that contains both associated data and message data. - when src != dst - associated data is not copied from source into destination. - for decryption when src != dst the size of the destination should be large enough so that the buffer may contain the decrypted authenc and padded data. Signed-off-by: Radu Alexe <radu.alexe@nxp.com>
Diffstat (limited to 'drivers/crypto/caam/caamalg_qi2.h')
-rw-r--r--drivers/crypto/caam/caamalg_qi2.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/drivers/crypto/caam/caamalg_qi2.h b/drivers/crypto/caam/caamalg_qi2.h
index f4c9290c..0eaad0e 100644
--- a/drivers/crypto/caam/caamalg_qi2.h
+++ b/drivers/crypto/caam/caamalg_qi2.h
@@ -161,6 +161,28 @@ struct aead_edesc {
};
/*
+ * tls_edesc - s/w-extended tls descriptor
+ * @src_nents: number of segments in input scatterlist
+ * @dst_nents: number of segments in output scatterlist
+ * @iv_dma: dma address of iv for checking continuity and link table
+ * @qm_sg_bytes: length of dma mapped h/w link table
+ * @qm_sg_dma: bus physical mapped address of h/w link table
+ * @tmp: array of scatterlists used by 'scatterwalk_ffwd'
+ * @dst: pointer to output scatterlist, usefull for unmapping
+ * @sgt: the h/w link table
+ */
+struct tls_edesc {
+ int src_nents;
+ int dst_nents;
+ dma_addr_t iv_dma;
+ int qm_sg_bytes;
+ dma_addr_t qm_sg_dma;
+ struct scatterlist tmp[2];
+ struct scatterlist *dst;
+ struct dpaa2_sg_entry sgt[0];
+};
+
+/*
* ablkcipher_edesc - s/w-extended ablkcipher descriptor
* @src_nents: number of segments in input scatterlist
* @dst_nents: number of segments in output scatterlist