From: Herbert Xu <herbert@gondor.apana.org.au>
To: meenakshi.aggarwal@nxp.com
Cc: horia.geanta@nxp.com, V.sethi@nxp.com, pankaj.gupta@nxp.com,
gaurav.jain@nxp.com, linux-crypto@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 0/3] trusted-keys: Add support for protected keys using CAAM
Date: Fri, 17 Oct 2025 16:22:55 +0800 [thread overview]
Message-ID: <aPH83_rWq8E1dYZ2@gondor.apana.org.au> (raw)
In-Reply-To: <20251006071753.3073538-1-meenakshi.aggarwal@nxp.com>
On Mon, Oct 06, 2025 at 09:17:50AM +0200, meenakshi.aggarwal@nxp.com wrote:
> From: Meenakshi Aggarwal <meenakshi.aggarwal@nxp.com>
>
> Overview:
> This patch set adds:
> - Support for creating and loading protected keys via `keyctl` interface.
> - Documentation updates to describe protected key usage and options.
> - CAAM-specific implementation for protected key encryption algorithms.
>
> User can create protected/encrypted key using keyctl interface:
>
> KEYNAME=dm_trust_key_hw
> KEY="$(keyctl add trusted $KEYNAME 'new 32 pk key_enc_algo=1' @s)"
> keyctl pipe $KEY >~/$KEYNAME.blob
> keyctl list @s
>
> dm-crypt can load the protected key buffer from the keyring and use it to
> initialize encrypted volumes, ensuring that key material is never exposed in plaintext.
>
> The Protected key buffer is passed to the CAAM driver via the kernel crypto API.
> CAAM driver will decapsulate the protected key buffer and perform cipher operation.
>
> Protected Keys are identified by a header structure:
>
> struct caam_pkey_info {
> u8 is_pkey;
> u8 key_enc_algo;
> u16 plain_key_sz;
> u8 key_buf[];
> };
>
> This information is populated based on the parameters provided during key creation such as 'new 32 pk key_enc_algo=1'
>
> Internal Workflow:
> ::
>
> +------------------------+ +-------------------------------+
> | Seal Function | | paes_skcipher_setkey() |
> | - Constructs key buffer|---->| - Parses header and key_buf[] |
> | - Adds header metadata | | - Initializes cipher context |
> +------------------------+ +-------------------------------+
>
> I welcome feedback and suggestions from the community.
>
> Thank you for your time and consideration.
>
> Best regards,
> Meenakshi Aggarwal
>
> Meenakshi Aggarwal (3):
> Doc: trusted-keys as protected keys
> KEYS: trusted: caam based protected key
> crypto:caam: Add support of paes algorithm
>
> .../security/keys/trusted-encrypted.rst | 87 +++++++++++-
> drivers/crypto/caam/blob_gen.c | 86 +++++++++---
> drivers/crypto/caam/caamalg.c | 128 ++++++++++++++++--
> drivers/crypto/caam/caamalg_desc.c | 87 +++++++++++-
> drivers/crypto/caam/caamalg_desc.h | 13 +-
> drivers/crypto/caam/desc.h | 9 +-
> drivers/crypto/caam/desc_constr.h | 8 +-
> include/soc/fsl/caam-blob.h | 26 ++++
> security/keys/trusted-keys/trusted_caam.c | 108 +++++++++++++++
> 9 files changed, 518 insertions(+), 34 deletions(-)
>
> --
> 2.25.1
All applied. Thanks.
--
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
prev parent reply other threads:[~2025-10-17 8:22 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-06 7:17 meenakshi.aggarwal
2025-10-06 7:17 ` [PATCH 1/3] Doc: trusted-keys as protected keys meenakshi.aggarwal
2025-10-06 7:17 ` [PATCH 2/3] KEYS: trusted: caam based protected key meenakshi.aggarwal
2025-10-06 7:17 ` [PATCH 3/3] crypto:caam: Add support of paes algorithm meenakshi.aggarwal
2025-10-14 8:56 ` [PATCH 0/3] trusted-keys: Add support for protected keys using CAAM Horia Geanta
2025-10-17 8:22 ` Herbert Xu [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aPH83_rWq8E1dYZ2@gondor.apana.org.au \
--to=herbert@gondor.apana.org.au \
--cc=V.sethi@nxp.com \
--cc=gaurav.jain@nxp.com \
--cc=horia.geanta@nxp.com \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=meenakshi.aggarwal@nxp.com \
--cc=pankaj.gupta@nxp.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®