Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp359333pxf; Thu, 1 Apr 2021 03:07:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyh7exAjBHOdNJbIUz/sd1ZLBBzSEASjaJVVJtsZBueuh2Q2eiMugQWFFa91OyaX57amxkh X-Received: by 2002:a17:906:5949:: with SMTP id g9mr8496761ejr.518.1617271641966; Thu, 01 Apr 2021 03:07:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617271641; cv=none; d=google.com; s=arc-20160816; b=uz9PR80saYjwIewiityQ8vADSAd52psc7fx1pV6JhSt6VuZCm8ERGEeWNY13cMvJIZ rRg7fUj+pEUsA3t9SZepSg47xGBtFF+rCpYDgxqAdO558PdVKCMoWyQllKP/616W5E1E iBpGeDzqthnDoCFDriAnsR6Q3xIVPb1gioNshA1QpnVLAgTINZVyAG5DhdJRoJCZAYik cnWBfb1KvwplsulpA2+SvsZjLSh0is+asdWPLXntyIlTYfEutFbYerET+S5mQ+Xr9EWz +Xoz38xx6NZ2j6miIZfytsKzcJAjfYXw9oFTUMsAp1Rbk8xWNmANBPgfdaZMJKg7g5Ul tBWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=MPFb3frkWqxReZF9lcoLpvObzRRRsYKI053+ljPqQPQ=; b=v4Kdft6s90y77fkyBxLlPEn/tC45r6DDYE9fENSWovYxBOtzqq7VVOc/N+FueIT07T IRe11hxq6FP/zc8mt6A2G6enYl2eQIh++HE6UO4rGT7L/SFfRzTf+UBpGs02LBUfOsJM TJDt/fsnjS2Etsk4bQkynMgjzk44u5hjj3jGql5UyHW6PSCAN06CZaDSHvg6sVBbu4nd vIhaYTN/PROUVw87X4QTzrqavrYVEtsu70gtmgErJwhJ2PunYfGAiso7OALf8RqARTtD IGNxngBniW0cXbBLUforcb4o6IaApinENX0o2ac+RQsIuRdhLkZ1FTKmXSqe9679SnDH LYxA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u10si3518965ejb.59.2021.04.01.03.06.51; Thu, 01 Apr 2021 03:07:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233553AbhDAKGT (ORCPT + 99 others); Thu, 1 Apr 2021 06:06:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46264 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233954AbhDAKGR (ORCPT ); Thu, 1 Apr 2021 06:06:17 -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 09265C0613E6 for ; Thu, 1 Apr 2021 03:06:17 -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 1lRuDN-00013V-QC; Thu, 01 Apr 2021 12:06:13 +0200 Subject: Re: [PATCH v1 0/3] KEYS: trusted: Introduce support for NXP CAAM-based trusted keys To: Richard Weinberger , James Bottomley Cc: Jarkko Sakkinen , horia geanta , Mimi Zohar , aymen sghaier , Herbert Xu , davem , kernel , David Howells , James Morris , "Serge E. Hallyn" , Steffen Trumtrar , Udit Agarwal , Jan Luebbe , david , Franck Lenormand , Sumit Garg , linux-integrity , "open list, ASYMMETRIC KEYS" , Linux Crypto Mailing List , linux-kernel , LSM References: <1777909690.136833.1617215767704.JavaMail.zimbra@nod.at> <2034693332.137003.1617219379831.JavaMail.zimbra@nod.at> From: Ahmad Fatoum Message-ID: Date: Thu, 1 Apr 2021 12:06:12 +0200 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: <2034693332.137003.1617219379831.JavaMail.zimbra@nod.at> 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 Richard, On 31.03.21 21:36, Richard Weinberger wrote: > James, > > ----- Ursprüngliche Mail ----- >> Von: "James Bottomley" >> Well, yes. For the TPM, there's a defined ASN.1 format for the keys: >> >> https://git.kernel.org/pub/scm/linux/kernel/git/jejb/openssl_tpm2_engine.git/tree/tpm2-asn.h >> >> and part of the design of the file is that it's distinguishable either >> in DER or PEM (by the guards) format so any crypto application can know >> it's dealing with a TPM key simply by inspecting the file. I think you >> need the same thing for CAAM and any other format. >> >> We're encouraging new ASN.1 formats to be of the form >> >> SEQUENCE { >> type OBJECT IDENTIFIER >> ... key specific fields ... >> } >> >> Where you choose a defined OID to represent the key and that means >> every key even in DER form begins with a unique binary signature. > > I like this idea. > Ahmad, what do you think? > > That way we could also get rid off the kernel parameter and all the fall back logic, > given that we find a way to reliable detect TEE blobs too... Sounds good to me. Sumit, your thoughts on doing this for TEE as well? > > Thanks, > //richard > -- 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 |