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 X-Spam-Level: X-Spam-Status: No, score=-5.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 30191C433C1 for ; Tue, 23 Mar 2021 16:38:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0CA8361993 for ; Tue, 23 Mar 2021 16:38:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233236AbhCWQhf (ORCPT ); Tue, 23 Mar 2021 12:37:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48658 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233419AbhCWQhV (ORCPT ); Tue, 23 Mar 2021 12:37:21 -0400 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 B8F44C061574 for ; Tue, 23 Mar 2021 09:37:20 -0700 (PDT) Received: from gallifrey.ext.pengutronix.de ([2001:67c:670:201:5054:ff:fe8d:eefb] helo=[IPv6:::1]) by metis.ext.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1lOk1t-0005Kn-E2; Tue, 23 Mar 2021 17:37:17 +0100 Subject: Re: [PATCH v1 0/3] KEYS: trusted: Introduce support for NXP CAAM-based trusted keys To: =?UTF-8?Q?Horia_Geant=c4=83?= , Jarkko Sakkinen , Mimi Zohar , Aymen Sghaier , Herbert Xu , "David S. Miller" , James Bottomley Cc: "kernel@pengutronix.de" , David Howells , James Morris , "Serge E. Hallyn" , Steffen Trumtrar , Udit Agarwal , Jan Luebbe , David Gstir , 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: From: Ahmad Fatoum Message-ID: Date: Tue, 23 Mar 2021 17:37:17 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit 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 Horia, On 21.03.21 21:01, Horia Geantă wrote: >> - [RFC] drivers: crypto: caam: key: Add caam_tk key type >> Franck added[3] a new "caam_tk" key type based on Udit's work. The key >> material stays within the kernel only, but can optionally be user-set >> instead of coming from RNG. James voiced the opinion that there should >> be just one user-facing generic wrap/unwrap key type with multiple >> possible handlers. David suggested trusted keys. >> > The whole point was to use caam "black blobs", with the main advantage of > keys being kept encrypted in memory after "unsealing" the blobs. > (Keys in blobs are encrypted with a persistent BKEK - blob KEK, derived from > fuse-based OTPMK. OTOH black keys are keys encrypted with an ephemeral, random > KEK that is stored in an internal caam register. When a black blob is unsealed, > the key is practically rekeyed, the random key replacing the BKEK; key is never > exposed in plaintext, rekeying happens in caam). > > Current implementation uses "red blobs", which means keys are left unprotected > in memory after blobs are unsealed. Oh. I will reread the series when sending the v2 cover letter. Thanks for spotting. (Sorry for the noise, missed this question first time) >> - Introduce TEE based Trusted Keys support >> Sumit reworked[4] trusted keys to support multiple possible backends with >> one chosen at boot time and added a new TEE backend along with TPM. >> This now sits in Jarkko's master branch to be sent out for v5.13 >> >> This patch series builds on top of Sumit's rework to have the CAAM as yet another >> trusted key backend. >> > Shouldn't the description under TRUSTED_KEYS (in security/keys/Kconfig) > be updated to reflect the availability of multiple backends? > > Thanks, > Horia > -- 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 |