Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1012593imm; Fri, 28 Sep 2018 10:22:05 -0700 (PDT) X-Google-Smtp-Source: ACcGV63NV4P40gpdfeHQkUo8g6l6xMRVLb7BRfKg5xHPhWI59h5S6A7bOsI7YPotv+EyQArL6G/l X-Received: by 2002:a65:5245:: with SMTP id q5-v6mr15746887pgp.67.1538155325138; Fri, 28 Sep 2018 10:22:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538155325; cv=none; d=google.com; s=arc-20160816; b=aUXm4Q5XWY78gqdMNYW07F3nz5SS/rA71ZVSIwTTKMPhnSp7P3xO+u/y75Os6BJkhe LPUBKqmRaH+PN7n3o2UAaxxHT3x2Jzc5APV3x7kGw9evjBADjPkNH51eG0lBztuMhCOp 8ftFG7khuo8bjWlm14zrxQ+dpddvjmB9OF0EBdmZsildgCWZyAy1vTMHtPUp6yp4d3H1 l8TXMwlqdvuMVTq706FeFKIuxLQll724tXFtNHSuWkR6LJNsGkzfuDDmlkqF8ykLfkaF I211CaUma6tvyR3fgvU2G9TjCZnxIHxKRl/XoZb5PdaI5ic/ooXl+il0YAtsvZnbLloU XlPw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:references:message-id :content-transfer-encoding:cc:date:in-reply-to:from:subject :mime-version; bh=Kvp7VGzlqWfo5K/fq6DJmV7TA4GNQMIc4Vpyc99xWv4=; b=Xqep75IeBRNtj+tzt0TlzCm+xTmezZsjp7265i1ASwB6ZHnGsLzCRFRZdCbaWKYBb0 aIwPXgLHtkTMDopDqF+LwtQEx1Gf6qjeHoWzhupT/n6MoKKHcXoEjM6svxMPGm6kIvou LtFjD5RF5uNnyYDuTu6XvXPBHdPHA1ykRNgXZU+Fmhf2m2jgXsR0zROPGJ1xqs7tIVQf nEIcqCS5fIIJUpc29g3w8jLCjUZo64H3QxivCHoApG0epkUBoZh9jvALcTCW5JL4qZQA ufTqMH877xt/z6vjuHZCtoaoiACV8ddz9J/+w69QTbkYZotJDQTQsZroV8kpWmCBBFa5 najw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f6-v6si4946521pgk.623.2018.09.28.10.21.50; Fri, 28 Sep 2018 10:22:05 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729568AbeI1Xpl convert rfc822-to-8bit (ORCPT + 99 others); Fri, 28 Sep 2018 19:45:41 -0400 Received: from coyote.holtmann.net ([212.227.132.17]:40484 "EHLO mail.holtmann.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726121AbeI1Xpk (ORCPT ); Fri, 28 Sep 2018 19:45:40 -0400 Received: from marcel-macbook.fritz.box (p4FEFC9BB.dip0.t-ipconnect.de [79.239.201.187]) by mail.holtmann.org (Postfix) with ESMTPSA id A9649CF29E; Fri, 28 Sep 2018 19:28:11 +0200 (CEST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 12.0 \(3445.100.39\)) Subject: Re: [PATCH 00/22] KEYS: Support TPM-wrapped key and crypto ops From: Marcel Holtmann In-Reply-To: <219367882d33fda9705485aa4a40b2ef55f3992f.camel@infradead.org> Date: Fri, 28 Sep 2018 19:20:54 +0200 Cc: David Howells , Denis Kenzior , keyrings@vger.kernel.org, linux-security-module@vger.kernel.org, Linux Kernel Mailing List Content-Transfer-Encoding: 8BIT Message-Id: <209ABD17-A499-468D-B8F5-427F3F37028D@holtmann.org> References: <14f91823-474e-1b46-d305-12229dac8967@gmail.com> <0d51fca9a29458a40121df0c5380af91e3429c08.camel@infradead.org> <153618445730.7946.10001472635835806478.stgit@warthog.procyon.org.uk> <1537253993.20009.62.camel@infradead.org> <14067.1537285833@warthog.procyon.org.uk> <745318a0-51bd-be8f-2251-44701ad75830@gmail.com> <19247.1537288419@warthog.procyon.org.uk> <23698.1537289705@warthog.procyon.org.uk> <20622.1537291117@warthog.procyon.org.uk> <58F37819-78E2-45C8-8F04-4F21DDFB640E@holtmann.org> <219367882d33fda9705485aa4a40b2ef55f3992f.camel@infradead.org> To: David Woodhouse , James Bottemley , James Morris X-Mailer: Apple Mail (2.3445.100.39) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi David, >>>>> Yes. It shouldn't be much code, either. You still have to check for X.509 >>>>> DER since the kernel currently supports that. >>>> >>>> For reasons of backward compatibility, correct? The kernel also has >>>> mscode.asn1 which we would need to support as well. Since we can't break >>>> compatibility then perhaps this doesn't buy us a whole lot in the end. >>> >>> Don't worry about mscode - that's not an asymmetric key parser. That's only >>> ever used directly from verify_pefile_signature(). >>> >>> Currently, we have to retain support for DER-encoded X.509. >>> >>> But there's no reason we can't have a PEM parser that decodes the PEM and >>> selects X.509, PKCS#8 or TPM based on the ascii header in that. PKCS#8 and >>> TPM don't need to take DER directly. >> >> since we have to support DER-encoded anyway, can we get the current >> patches merged (with fixes to the commit messages for the openssl >> examples if needed) and then work on PEM support inside the kernel. >> For me these seems to be two independent features. And in the current >> form the patches have been tested and used. >> >> Or let me ask this differently, are there any objections to merging >> these patches with just DER support? > > Let me rephrase that question slightly: Are we happy to have to make > inferences from the ASN.1 structure, and in particular that a bare > OCTET-STRING is a TPMv1 blob? I believe James ended up doing something > somewhat more sensible for the TPMv2 blob so that might end up being > OK...? similar to Denis’ comment, I don’t see an issue here with using DER encoding. James, can you take this series into your -next tree? Regards Marcel