Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp657677pxf; Wed, 31 Mar 2021 12:37:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz6WXWdRZP3wZwJIEqSSsx4rjF2iV/tGuvhCkKhMJwWEOVg2wbYrYwY6xpBpRPS/uxYZOgh X-Received: by 2002:a17:906:26d4:: with SMTP id u20mr5570936ejc.114.1617219456291; Wed, 31 Mar 2021 12:37:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617219456; cv=none; d=google.com; s=arc-20160816; b=AcQVt/pavxVp/YGiT3xsDVKIli3/pLgXmC2nppImoAI1jpTvT3VVUFbaYLtKk8n6Lq 291KLSUo6nJVxRduy0PT+TZK/wzQJyD7KlqCW08kTeSN1mw9iaGXNAWWtqzJsrsl2uwB UJiUKofjbEbGkGah9dytLs1NE0lpyTeN/AWGOLsT7OGr9kpH+5trhos6yJrA0G+6+dWS 31EAI4lVnlZAO2Y9Z3V5WfmUs4B1hap2u8rlvItSHXowA82/9DyDwry/KUtR0xdrb7gP 7GjjFaWW+IR8s3klZK+oic5/RegbOOOUvklTBzE0DzmY0zqo1ltgjRfk7rA18ao3/BP/ woDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:thread-index:thread-topic :content-transfer-encoding:mime-version:subject:references :in-reply-to:message-id:cc:to:from:date; bh=9Nt7THitHA4BoJGVBVulGM4QbIHQ6JSI0ZPrMkqMtRI=; b=gG+OHEqY9eRZ6cTdc0cSgvmPQ3qTeWGPpSAlQct6CFxaVMxbqMus66br6FGRHDLhrX nrMcoOGCL3bmFnvG/KOc7Of9DRtdnd1LS9Oq41wuXJYFBPu22iGxB2dK8JpdV90HCjuz oC3esL3ofwkFZC7IakbQ/WhvqOwxI8wcUIvkTXwN4UWnQdFJm8XZ5mpb4kTFCsij6FM5 9rHWLHV4bP0uTrmuFFR+xcM4VNzPo4gls77IxbzwOMel7b461ThahTBobcOgqJmEVp5E 7hJ/dg2DR5gp4PwiubAUDCZpZms5/qp48iBDT2ph3EZf3hFyQZIkftOl7eayF8Qqs9st DLSA== 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 x12si2485053edd.423.2021.03.31.12.37.00; Wed, 31 Mar 2021 12:37:36 -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 S236144AbhCaTg1 convert rfc822-to-8bit (ORCPT + 99 others); Wed, 31 Mar 2021 15:36:27 -0400 Received: from lithops.sigma-star.at ([195.201.40.130]:45764 "EHLO lithops.sigma-star.at" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236030AbhCaTgX (ORCPT ); Wed, 31 Mar 2021 15:36:23 -0400 Received: from localhost (localhost [127.0.0.1]) by lithops.sigma-star.at (Postfix) with ESMTP id D0CE860FB284; Wed, 31 Mar 2021 21:36:20 +0200 (CEST) Received: from lithops.sigma-star.at ([127.0.0.1]) by localhost (lithops.sigma-star.at [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id eH0n2r8fHPTn; Wed, 31 Mar 2021 21:36:20 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by lithops.sigma-star.at (Postfix) with ESMTP id 45DA360FB282; Wed, 31 Mar 2021 21:36:20 +0200 (CEST) Received: from lithops.sigma-star.at ([127.0.0.1]) by localhost (lithops.sigma-star.at [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id nxuy-sYQlTu2; Wed, 31 Mar 2021 21:36:20 +0200 (CEST) Received: from lithops.sigma-star.at (lithops.sigma-star.at [195.201.40.130]) by lithops.sigma-star.at (Postfix) with ESMTP id 03BFF60FB281; Wed, 31 Mar 2021 21:36:20 +0200 (CEST) Date: Wed, 31 Mar 2021 21:36:19 +0200 (CEST) From: Richard Weinberger To: James Bottomley Cc: Ahmad Fatoum , 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 Message-ID: <2034693332.137003.1617219379831.JavaMail.zimbra@nod.at> In-Reply-To: References: <1777909690.136833.1617215767704.JavaMail.zimbra@nod.at> Subject: Re: [PATCH v1 0/3] KEYS: trusted: Introduce support for NXP CAAM-based trusted keys MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8BIT X-Originating-IP: [195.201.40.130] X-Mailer: Zimbra 8.8.12_GA_3807 (ZimbraWebClient - FF78 (Linux)/8.8.12_GA_3809) Thread-Topic: KEYS: trusted: Introduce support for NXP CAAM-based trusted keys Thread-Index: qVNalfbj1gU0jLT0w1bk9F+qRZwlVw== Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org 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... Thanks, //richard