Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1213492imu; Wed, 16 Jan 2019 14:57:58 -0800 (PST) X-Google-Smtp-Source: ALg8bN4Wp4NlLibqepkqc/iebcxwxNCoN19+T5Mv1wGArpTbZavve5MevLVTqoBfuxZDqxY3MxWf X-Received: by 2002:a17:902:2:: with SMTP id 2mr12629960pla.228.1547679478268; Wed, 16 Jan 2019 14:57:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547679478; cv=none; d=google.com; s=arc-20160816; b=SEpo/QvAFiWIIUIkXfFTbuv+XVhaneGeWzkrMuN5eai70e/xXVWBdrshbDDCnES1Cd 4Wc6mD9nASGeZZZea8o0ZD40hq6OBKqNbB6+Ec/b9YGAVMxSJUycrLGsFCnlf6h3Lpj/ M3B149R7JE5jltNNdFsF6x5pFqZQsZ96alpnaurIPkjP2ju5XQoBMpy7P/Spq+a6DARO l40UbDLxpZwUGILMf9gKW98ETS5J/pG5vu3ROYyLGP+k/Pcr8122A9RQvtcY2+Ei4rj4 K4nRKu/e0K9FCkoV/ll9/J/0ZdKMap3z5JJPJolverKFEc6u6tZMbcCgRwOCtIPTEQaS YQmA== 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=V4FzHu8dv+bYWviY9z08y1emy1epOq9lFWPYecvx68A=; b=afHfi72jPm0rDWFIX1zk8yV29aDRJNV4lZWkKKLoM/4U5l84jpiHlI9Z71+a2iiTsD K2IKnG5Owx0zIhKash2X4+PiYT1FJx5pPDZzOhFzLjX/hTAMd3fnOxQWcZwikHcKL+UE 5P0v6NAyf6tXzUdFBQOnJBEEVcj+yRKpoV2tppK1miH0hWwifongTVIPv+03DBN4VTup 7EEYHKnk7UM906V4qk2ozXKY0kIoDguOjXcQOwaz2ss7ttwbBQvBxQZeVHq9OoZ7+S0x a4wSpuYKQ7tp0ChqoEF4B8SsrSiLqY9xtIW+6KMcQwvOdNZmyqPX9LcfzQ+0REQrTzvy /75Q== 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 t20si7050711pgl.211.2019.01.16.14.57.40; Wed, 16 Jan 2019 14:57:58 -0800 (PST) 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 S1728727AbfAPQP0 convert rfc822-to-8bit (ORCPT + 99 others); Wed, 16 Jan 2019 11:15:26 -0500 Received: from mx1.redhat.com ([209.132.183.28]:37446 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728037AbfAPQPY (ORCPT ); Wed, 16 Jan 2019 11:15:24 -0500 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 A51264E937; Wed, 16 Jan 2019 16:15:23 +0000 (UTC) Received: from warthog.procyon.org.uk (ovpn-120-244.rdu2.redhat.com [10.10.120.244]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4359C5C239; Wed, 16 Jan 2019 16:15:20 +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: <20190107090449.d364ii24zervlsfq@sole.flsd.net> References: <20190107090449.d364ii24zervlsfq@sole.flsd.net> <20190106133608.820-1-vt@altlinux.org> <1893001.R2IGJoHzOM@positron.chronox.de> <20190107080710.r4bh7gkqdysxmlnn@sole.flsd.net> <1714084.mfT8VG1pOj@tauon.chronox.de> To: Vitaly Chikunov Cc: dhowells@redhat.com, Stephan Mueller , Herbert Xu , Mimi Zohar , Dmitry Kasatkin , linux-integrity@vger.kernel.org, keyrings@vger.kernel.org, linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH 4/4] crypto: Add EC-RDSA algorithm MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <21601.1547655320.1@warthog.procyon.org.uk> Content-Transfer-Encoding: 8BIT Date: Wed, 16 Jan 2019 16:15:20 +0000 Message-ID: <21602.1547655320@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.38]); Wed, 16 Jan 2019 16:15:24 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Vitaly Chikunov wrote: > > Regarding your comment (2), I am not sure I understand. Why do you say that > > the DER format cannot be parsed by the kernel's ASN.1 parser? For example, > > It can, but DER is stricter than BER. For example, in DER 'OCTET STRING' > length field should be encoded in just one byte if it's smaller than > 128, in BER it could be encoded in multiple encodings. This does not > seem like a big deal, though. With BER decoder an improperly DER-encoded > certificate could be successfully parsed. Whilst that is true, I don't think it's that big a deal. DER is a subset of BER, so a BER decoder ought to be able to parse it. Note that X.509 is supposed to be DER, but we use a BER decoder for that too. David