Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2debd332 authored by Harsh Jain's avatar Harsh Jain Committed by Herbert Xu
Browse files

crypto: chcr - Add AEAD algos.



Add support for following AEAD algos.
 GCM,CCM,RFC4106,RFC4309,authenc(hmac(shaXXX),cbc(aes)).

Reviewed-by: default avatarStephan Mueller <smueller@chronox.de>
Signed-off-by: default avatarHarsh Jain <harsh@chelsio.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent 5c86a8ff
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -4,6 +4,7 @@ config CRYPTO_DEV_CHELSIO
	select CRYPTO_SHA1
	select CRYPTO_SHA256
	select CRYPTO_SHA512
	select CRYPTO_AUTHENC
	---help---
	  The Chelsio Crypto Co-processor driver for T6 adapters.

+1462 −20

File changed.

Preview size limit exceeded, changes collapsed.

+9 −7
Original line number Diff line number Diff line
@@ -258,13 +258,15 @@ enum {
 * where they indicate the size of the integrity check value (ICV)
 */
enum {
	AES_CCM_ICV_4   = 4,
	AES_CCM_ICV_6   = 6,
	AES_CCM_ICV_8   = 8,
	AES_CCM_ICV_10  = 10,
	AES_CCM_ICV_12  = 12,
	AES_CCM_ICV_14  = 14,
	AES_CCM_ICV_16 = 16
	ICV_4  = 4,
	ICV_6  = 6,
	ICV_8  = 8,
	ICV_10 = 10,
	ICV_12 = 12,
	ICV_13 = 13,
	ICV_14 = 14,
	ICV_15 = 15,
	ICV_16 = 16
};

struct hash_op_params {
+3 −5
Original line number Diff line number Diff line
@@ -109,14 +109,12 @@ static int cpl_fw6_pld_handler(struct chcr_dev *dev,
	if (ack_err_status) {
		if (CHK_MAC_ERR_BIT(ack_err_status) ||
		    CHK_PAD_ERR_BIT(ack_err_status))
			error_status = -EINVAL;
			error_status = -EBADMSG;
	}
	/* call completion callback with failure status */
	if (req) {
		if (!chcr_handle_resp(req, input, error_status))
		error_status = chcr_handle_resp(req, input, error_status);
		req->complete(req, error_status);
		else
			return -EINVAL;
	} else {
		pr_err("Incorrect request address from the firmware\n");
		return -EFAULT;
+0 −2
Original line number Diff line number Diff line
@@ -72,9 +72,7 @@ struct chcr_wr {
};

struct chcr_dev {
	/* Request submited to h/w and waiting for response. */
	spinlock_t lock_chcr_dev;
	struct crypto_queue pending_queue;
	struct uld_ctx *u_ctx;
	unsigned char tx_channel_id;
};
Loading