Received: by 2002:ab2:3c46:0:b0:1f5:f2ab:c469 with SMTP id x6csp44390lqf; Thu, 25 Apr 2024 21:26:31 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWYVwGOYcfN5dQU6ixrLLkMA706487w39MN2Y+lHfCSzPcjaxbwhG4IRCI74409Zr/BDMdG9unxfhLqAeqksnXIXZVKSWsCv538fEEzLQ== X-Google-Smtp-Source: AGHT+IGjhQw4TEC6eiMSJmV3v8kuLcvnUop1D47OyKS6XLW4XWNw4EH/GgXHiypCyvL6+pucmdgN X-Received: by 2002:a05:622a:4b1b:b0:43a:e53:4060 with SMTP id et27-20020a05622a4b1b00b0043a0e534060mr1857650qtb.19.1714105591313; Thu, 25 Apr 2024 21:26:31 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714105591; cv=pass; d=google.com; s=arc-20160816; b=IN72zoiR6qgYyiyMCsu9X6pQ8H72KXCusHvubB+4NHF5f9DnQ/IZCY3HGw/E8aiwCm CubllMmZ7ZIN0bc/k0h1WwVCkj4/PAUAZ8Ana/6qc0fmIy0l1/BIanuc/EYfvOvGSlhy TdF3kA50Vb/RmdZB2p9f1W6jYjeYeY7IAzU64UdUINMlYI+H82Ndp3EvKaBPJyyZpSE6 H+dnRkJ/NUG9QAQTYJ6+SgdYTeoHk+TXBXCzDDAJz0mrR2xu5wzsJ/75DRJBGBWflTlA 0kcOEu6MxtWuYYLAzRSzbBcuPyMUQGrm1Vjyl/er5cY2JTQXttM4cFpX4mbPqiG4hI1j ewfA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=sg1IY7LIsigEpacAJYRDZDWh7gFgsDiXvFG9rkyQa1E=; fh=/sfpCHCmIA/XR7jVLKjLbgwWlAF+DJ7f7YBl46aVhns=; b=puwWGFaVuNo+rdBctcn9sS6+CIQkzmpBsc1+6N+CTzVyPfiUIM0u2RmIseaDR/WnJQ 01IdKC9fl65fp5q7nplv+jKrdE/Z+QnDbjQtbWWxiBpNZ5KTA4hiaEuCJuIFQg0QGvwJ KPJScjWzOSbJy1ynHZwDK1ZFvcOT64ywuREkmzUtqUeZV8qQkXruytPtZgkAFGJI2uCC SVylLob9huvpV8nBGEdJooxn+6vSt+Hsl89CiAlwbd8mzgjfL7dRPXY6G5II8FrOxJ5n cxCgOq6RZgiCvIhV4w0TTox0ctv5CbC1fsSGljEbTiMxli6Uvo/o9rlAZFIv1YyNHaC7 En0w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vayavyalabs.com header.s=google header.b=SbxdkkCn; arc=pass (i=1 spf=pass spfdomain=vayavyalabs.com dkim=pass dkdomain=vayavyalabs.com dmarc=pass fromdomain=vayavyalabs.com); spf=pass (google.com: domain of linux-crypto+bounces-3855-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-crypto+bounces-3855-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=vayavyalabs.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id y10-20020a05622a120a00b004370981bb6asi19430324qtx.4.2024.04.25.21.26.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Apr 2024 21:26:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto+bounces-3855-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@vayavyalabs.com header.s=google header.b=SbxdkkCn; arc=pass (i=1 spf=pass spfdomain=vayavyalabs.com dkim=pass dkdomain=vayavyalabs.com dmarc=pass fromdomain=vayavyalabs.com); spf=pass (google.com: domain of linux-crypto+bounces-3855-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-crypto+bounces-3855-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=vayavyalabs.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 0F0E11C2176B for ; Fri, 26 Apr 2024 04:26:31 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 853D18175E; Fri, 26 Apr 2024 04:26:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=vayavyalabs.com header.i=@vayavyalabs.com header.b="SbxdkkCn" X-Original-To: linux-crypto@vger.kernel.org Received: from mail-pf1-f176.google.com (mail-pf1-f176.google.com [209.85.210.176]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E6D32762FF for ; Fri, 26 Apr 2024 04:26:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.176 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714105586; cv=none; b=flpuumFhOce2T12xCBrjKnm8glhzqDivB/PBj5sJx7xgJ4CuezKcsmdb2fhaQN1XdpHjG4TfZlK/TBTdhM5/L/DfOKWHMz6cWDPoBOY0N3kyORVzWlJizMxvXS+oMe4ippd8yboVpu2zFh/NBqBNul2Y8wtZGvGUV8Jl8VPL4gc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714105586; c=relaxed/simple; bh=lutB1/wwYYMTxXZVaY+C+pIQxyYavoblmUe3HMIKxrg=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=pjEVhtaOcg8DkvZ0ytDGsTwl3QXKy7P2JEaQSqWAA2/M5Lj/mvoMut8Xzj3tvF5cbcP5rs/v1SBlaIzlLvUCUSM6Wc/4OGzjg5tYxb4gPcUOnKvYwJkkQ4Cz001RPp+hymxwXrfwWcTfKrHNqcsWK06HoEcUyvqp6yeXcLE9XMU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=vayavyalabs.com; spf=pass smtp.mailfrom=vayavyalabs.com; dkim=pass (1024-bit key) header.d=vayavyalabs.com header.i=@vayavyalabs.com header.b=SbxdkkCn; arc=none smtp.client-ip=209.85.210.176 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=vayavyalabs.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=vayavyalabs.com Received: by mail-pf1-f176.google.com with SMTP id d2e1a72fcca58-6ed9fc77bbfso1439892b3a.1 for ; Thu, 25 Apr 2024 21:26:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vayavyalabs.com; s=google; t=1714105584; x=1714710384; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=sg1IY7LIsigEpacAJYRDZDWh7gFgsDiXvFG9rkyQa1E=; b=SbxdkkCndbmlJpWjYahF0PTuCegopPTkANkVXk8B3AH/XWvteIJcl2ckUj9G6zIUy5 PBfXr3HRKmoEGhi1dNAzw1+M34aU+38dZDkKQb08K3m/xCdmMRGO8Gogxc/9smQcsy6/ Z154sHNeQd6k8D/DVsWZwnEb+CJEqdfpm+Guk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714105584; x=1714710384; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=sg1IY7LIsigEpacAJYRDZDWh7gFgsDiXvFG9rkyQa1E=; b=pT9eE8A0gXK9XN8hQcL9I0ZdEyjf89alZf7KJQTgDHWy/wWb30nVXaxilYCwwPOP7R q98fjj8I2TO+RoijkqpkU0hGLgXUFxI6l5lUHUp7O+p5XoDUYAigDeOfiVuZlMUFH959 LA9x5Mdre2ZTHIpWSN3FHS6oROSpTMSu7FbnuRdYE2tyPnookW11xrlTYLkHHdmMOOA2 3Us3bIzou1RiMOtQ7y2nCm6hGaBhcXgtiOnDnW5W64k76xaX7VgxExUVHjjRudc6dMvH 1Il2oDesyq+nIMn6/k/og5LnJj75YXA91ZnG6jHz6zVitjvNxukYt0cpUviFFgdET+R/ MP4A== X-Forwarded-Encrypted: i=1; AJvYcCVJsTNvKs2xFLNGkswK0f0jukc8R03OJTwNtXpPqEgXBJOs7MKu4lReke9rF+O6hiEL6+9e2qxa9b5fQLI0l8ROIyj3oaitcsM0o6Su X-Gm-Message-State: AOJu0YzKssN203kNR2KuhTLwxzfeOy7lPCyX+55ZYb2CVjyZ7FWvPEFL eNPIl18A71X9jYrOVdJ4UEx0mw/4DpRXqM86fVaugfF8diK/6pubCszTEnVltO8= X-Received: by 2002:a05:6a20:4c84:b0:1ac:6762:e62f with SMTP id fq4-20020a056a204c8400b001ac6762e62fmr1364516pzb.35.1714105584106; Thu, 25 Apr 2024 21:26:24 -0700 (PDT) Received: from localhost.localdomain ([103.108.57.9]) by smtp.gmail.com with ESMTPSA id t12-20020a17090a5d8c00b002a474e2d7d8sm15500291pji.15.2024.04.25.21.26.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Apr 2024 21:26:23 -0700 (PDT) From: Pavitrakumar M To: herbert@gondor.apana.org.au, linux-crypto@vger.kernel.org Cc: Ruud.Derwig@synopsys.com, manjunath.hadli@vayavyalabs.com, bhoomikak@vayavyalabs.com, Pavitrakumar M Subject: [PATCH v3 0/7] Add SPAcc crypto driver support Date: Fri, 26 Apr 2024 09:55:37 +0530 Message-Id: <20240426042544.3545690-1-pavitrakumarm@vayavyalabs.com> X-Mailer: git-send-email 2.25.1 Precedence: bulk X-Mailing-List: linux-crypto@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Add the driver for SPAcc(Security Protocol Accelerator), which is a crypto acceleration IP from Synopsys. The SPAcc supports many cipher, hash, aead algorithms and various modes.The driver currently supports below, aead: - ccm(sm4) - ccm(aes) - gcm(sm4) - gcm(aes) - rfc7539(chacha20,poly1305) cipher: - cbc(sm4) - ecb(sm4) - ctr(sm4) - xts(sm4) - cts(cbc(sm4)) - cbc(aes) - ecb(aes) - xts(aes) - cts(cbc(aes)) - ctr(aes) - chacha20 - ecb(des) - cbc(des) - ecb(des3_ede) - cbc(des3_ede) hash: - cmac(aes) - xcbc(aes) - cmac(sm4) - xcbc(sm4) - hmac(md5) - md5 - hmac(sha1) - sha1 - sha224 - sha256 - sha384 - sha512 - hmac(sha224) - hmac(sha256) - hmac(sha384) - hmac(sha512) - sha3-224 - sha3-256 - sha3-384 - sha3-512 - hmac(sm3) - sm3 - michael_mic Pavitrakumar M (7): Add SPAcc Skcipher support Enable SPAcc AUTODETECT Add SPAcc ahash support Add SPAcc aead support Add SPAcc Kconfig and Makefile Add SPAcc node zynqmp dts Enable Driver compilation in crypto Kconfig and Makefile arch/arm64/boot/dts/xilinx/zynqmp.dtsi | 10 + drivers/crypto/Kconfig | 9 +- drivers/crypto/Makefile | 2 +- drivers/crypto/dwc-spacc/Kconfig | 95 + drivers/crypto/dwc-spacc/Makefile | 16 + drivers/crypto/dwc-spacc/spacc_aead.c | 1313 ++++++++++ drivers/crypto/dwc-spacc/spacc_ahash.c | 1292 ++++++++++ drivers/crypto/dwc-spacc/spacc_core.c | 2671 ++++++++++++++++++++ drivers/crypto/dwc-spacc/spacc_core.h | 834 ++++++ drivers/crypto/dwc-spacc/spacc_device.c | 342 +++ drivers/crypto/dwc-spacc/spacc_device.h | 237 ++ drivers/crypto/dwc-spacc/spacc_hal.c | 365 +++ drivers/crypto/dwc-spacc/spacc_hal.h | 113 + drivers/crypto/dwc-spacc/spacc_interrupt.c | 324 +++ drivers/crypto/dwc-spacc/spacc_manager.c | 670 +++++ drivers/crypto/dwc-spacc/spacc_skcipher.c | 720 ++++++ 16 files changed, 9004 insertions(+), 9 deletions(-) create mode 100644 drivers/crypto/dwc-spacc/Kconfig create mode 100644 drivers/crypto/dwc-spacc/Makefile create mode 100644 drivers/crypto/dwc-spacc/spacc_aead.c create mode 100644 drivers/crypto/dwc-spacc/spacc_ahash.c create mode 100644 drivers/crypto/dwc-spacc/spacc_core.c create mode 100644 drivers/crypto/dwc-spacc/spacc_core.h create mode 100644 drivers/crypto/dwc-spacc/spacc_device.c create mode 100644 drivers/crypto/dwc-spacc/spacc_device.h create mode 100644 drivers/crypto/dwc-spacc/spacc_hal.c create mode 100644 drivers/crypto/dwc-spacc/spacc_hal.h create mode 100644 drivers/crypto/dwc-spacc/spacc_interrupt.c create mode 100644 drivers/crypto/dwc-spacc/spacc_manager.c create mode 100644 drivers/crypto/dwc-spacc/spacc_skcipher.c base-commit: 543ea178fbfadeaf79e15766ac989f3351349f02 -- 2.25.1