Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp5490397imm; Tue, 18 Sep 2018 10:19:06 -0700 (PDT) X-Google-Smtp-Source: ANB0VdaPb/1Q3wZzksJsK/KcfjQfX1Oj4d7uYJ8wPJGI7me41EzrsXO//RNJmOwYoExY7M9zLx58 X-Received: by 2002:a63:7003:: with SMTP id l3-v6mr6844729pgc.359.1537291146091; Tue, 18 Sep 2018 10:19:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537291146; cv=none; d=google.com; s=arc-20160816; b=Vu0wJeQQLBGvHqI995zCxRDq3+OD4V4Kj9wpb3sYKJjYX1ljS/yDUIs8Ju6n+i4ENJ SFaRMc4JP0UAOwb1VQ/uvGpZDz9rcVtkLIi7lsPSuzntpOU15koHvQUMQAe2WdQQ6bsJ T3t6CQ/aLTOfjWOzomnuSstmDxNxlCVt18Km0mUQXsgc+3ekA39ZQzIkntOQ2Wr5uoPj x1vdEOumD39wqsUxtcCBqwzw/0Ta9gO/2Gk2szU9AEKi458Sv4+zufmmcXLYXNkw3l+E FFIFVL2ERh4C+2NO2JvanRKZ8K07EglmnolftMU/iEEbgffCzCGWDRpVaPtidKnuDPpB fS+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:content-transfer-encoding :content-id:mime-version:subject:cc:to:references:in-reply-to:from :organization; bh=UImQoHkcMaGBL+/9XiO/12H6kBBUCIqeTkyHI9Pmdwk=; b=Kk6cb1thFyU7/NMYzXnX26v5tA4s5mnODY5RqbOla0FjnXmaNZkfPh+dToUr3rSSXf GONLxb5FGYeewlBJnhYkpYrZmgFefb3VHDyfnOmnnOSWXpphS87cYSr5FWwSNqG/PKVx N4G2yqYVNj5cienPMWOsgHwPAG5nKfTzg8zJEHB17lZZ+uiHwNVlVqKyhLtAJ3Gs+bIV 1vbOqsunb1lZU0PRnzXSpiLOuG9akCr6wX7ZdR+Hxd0kQMEpe8QnANUaKG74zJgVL5Ot BcRpVnHIXAXWZDZEc6GzOP8uB5EvA2qDIDQTTyWStyL7dGi4tJIt9v/yaYEsEpL+m2Zd KNVg== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u7-v6si18200707plz.353.2018.09.18.10.18.50; Tue, 18 Sep 2018 10:19:06 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730498AbeIRWwN convert rfc822-to-8bit (ORCPT + 99 others); Tue, 18 Sep 2018 18:52:13 -0400 Received: from mx1.redhat.com ([209.132.183.28]:42020 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729037AbeIRWwN (ORCPT ); Tue, 18 Sep 2018 18:52:13 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id C7E34308ED56; Tue, 18 Sep 2018 17:18:39 +0000 (UTC) Received: from warthog.procyon.org.uk (ovpn-123-84.rdu2.redhat.com [10.10.123.84]) by smtp.corp.redhat.com (Postfix) with ESMTP id 72F995C6C1; Tue, 18 Sep 2018 17:18:38 +0000 (UTC) Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 From: David Howells In-Reply-To: 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> To: Denis Kenzior Cc: dhowells@redhat.com, David Woodhouse , jmorris@namei.org, keyrings@vger.kernel.org, linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 00/22] KEYS: Support TPM-wrapped key and crypto ops MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <20621.1537291117.1@warthog.procyon.org.uk> Content-Transfer-Encoding: 8BIT Date: Tue, 18 Sep 2018 18:18:37 +0100 Message-ID: <20622.1537291117@warthog.procyon.org.uk> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.44]); Tue, 18 Sep 2018 17:18:40 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Denis Kenzior wrote: > > 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. David