From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B9C07C433EF for ; Mon, 13 Dec 2021 10:41:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243235AbhLMKla (ORCPT ); Mon, 13 Dec 2021 05:41:30 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41568 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242772AbhLMKlR (ORCPT ); Mon, 13 Dec 2021 05:41:17 -0500 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B1B87C024A26 for ; Mon, 13 Dec 2021 02:34:44 -0800 (PST) Received: from gallifrey.ext.pengutronix.de ([2001:67c:670:201:5054:ff:fe8d:eefb] helo=[127.0.0.1]) by metis.ext.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1mwifJ-0007XV-Ac; Mon, 13 Dec 2021 11:34:41 +0100 From: Ahmad Fatoum Subject: Re: [PATCH v4 4/5] crypto: caam - add in-kernel interface for blob generator To: Jarkko Sakkinen Cc: =?UTF-8?Q?Horia_Geant=c4=83?= , Aymen Sghaier , Herbert Xu , "David S. Miller" , kernel@pengutronix.de, David Gstir , Tim Harvey , James Bottomley , Mimi Zohar , David Howells , James Morris , Eric Biggers , "Serge E. Hallyn" , Udit Agarwal , Jan Luebbe , Richard Weinberger , Franck LENORMAND , Sumit Garg , linux-integrity@vger.kernel.org, keyrings@vger.kernel.org, linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org, linux-security-module@vger.kernel.org References: <3ea6e5c37559eddfdc51f26c4dff0abbbc894839.1633946449.git-series.a.fatoum@pengutronix.de> Message-ID: <3e33a215-12d2-da30-d1e1-2fde753a7a0a@pengutronix.de> Date: Mon, 13 Dec 2021 11:34:39 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-SA-Exim-Connect-IP: 2001:67c:670:201:5054:ff:fe8d:eefb X-SA-Exim-Mail-From: a.fatoum@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-crypto@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org Hello Jarkko, On 05.12.21 01:18, Jarkko Sakkinen wrote: > On Mon, Oct 11, 2021 at 12:02:37PM +0200, Ahmad Fatoum wrote: >> The CAAM can be used to protect user-defined data across system reboot: >> >> - When the system is fused and boots into secure state, the master >> key is a unique never-disclosed device-specific key >> - random key is encrypted by key derived from master key >> - data is encrypted using the random key >> - encrypted data and its encrypted random key are stored alongside >> - This blob can now be safely stored in non-volatile memory >> >> On next power-on: >> - blob is loaded into CAAM >> - CAAM writes decrypted data either into memory or key register >> >> Add functions to realize encrypting and decrypting into memory alongside >> the CAAM driver. >> >> They will be used in a later commit as a source for the trusted key >> seal/unseal mechanism. >> >> Reviewed-by: David Gstir >> Tested-By: Tim Harvey >> Signed-off-by: Steffen Trumtrar >> Signed-off-by: Ahmad Fatoum > > What is CAAM? This is missing. That's Crypto Accelerator on NXP SoCs. There is a description in the cover letter and in the follow-up patch wiring this into the new trusted key source. I didn't elaborate on this here as this patch touches drivers/crypto/caam and I assumed familiarity. For v5, I can add some extra info: "The NXP Cryptographic Acceleration and Assurance Module (CAAM) can be used to protect user-defined data across system reboot..." Sounds good? Does the last patch in the series look ok to you? Cheers, Ahmad > > /Jarkko > -- Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |