Re: [Netconf] PKCS7 --> CMS

Russ Housley <housley@vigilsec.com> Tue, 06 February 2018 17:45 UTC

Return-Path: <housley@vigilsec.com>
X-Original-To: netconf@ietfa.amsl.com
Delivered-To: netconf@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 449631276AF for <netconf@ietfa.amsl.com>; Tue, 6 Feb 2018 09:45:39 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -0.393
X-Spam-Level:
X-Spam-Status: No, score=-0.393 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, SUBJ_ALL_CAPS=1.506, URIBL_BLOCKED=0.001] autolearn=no autolearn_force=no
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id DmC-EQyWvZBj for <netconf@ietfa.amsl.com>; Tue, 6 Feb 2018 09:45:37 -0800 (PST)
Received: from mail.smeinc.net (mail.smeinc.net [209.135.209.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 69D6F126CF6 for <netconf@ietf.org>; Tue, 6 Feb 2018 09:45:37 -0800 (PST)
Received: from localhost (localhost [127.0.0.1]) by mail.smeinc.net (Postfix) with ESMTP id 08B61300681 for <netconf@ietf.org>; Tue, 6 Feb 2018 12:45:35 -0500 (EST)
X-Virus-Scanned: amavisd-new at mail.smeinc.net
Received: from mail.smeinc.net ([127.0.0.1]) by localhost (mail.smeinc.net [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 0x9JbBilAGLv for <netconf@ietf.org>; Tue, 6 Feb 2018 12:45:33 -0500 (EST)
Received: from a860b60074bd.home (pool-108-45-101-150.washdc.fios.verizon.net [108.45.101.150]) by mail.smeinc.net (Postfix) with ESMTPSA id 792233004B7; Tue, 6 Feb 2018 12:45:33 -0500 (EST)
Content-Type: text/plain; charset="us-ascii"
Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\))
From: Russ Housley <housley@vigilsec.com>
In-Reply-To: <8616F4BC-65CE-4187-8135-C5DF4C83D924@juniper.net>
Date: Tue, 06 Feb 2018 12:45:33 -0500
Cc: "netconf@ietf.org" <netconf@ietf.org>
Content-Transfer-Encoding: 7bit
Message-Id: <DD343969-332F-46AF-8637-3D5B757B5EB1@vigilsec.com>
References: <8616F4BC-65CE-4187-8135-C5DF4C83D924@juniper.net>
To: Kent Watsen <kwatsen@juniper.net>
X-Mailer: Apple Mail (2.3273)
Archived-At: <https://mailarchive.ietf.org/arch/msg/netconf/xKxzdm7YtntVQem5tUCiqCFsvgA>
Subject: Re: [Netconf] PKCS7 --> CMS
X-BeenThere: netconf@ietf.org
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: Network Configuration WG mailing list <netconf.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/netconf>, <mailto:netconf-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/netconf/>
List-Post: <mailto:netconf@ietf.org>
List-Help: <mailto:netconf-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/netconf>, <mailto:netconf-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 06 Feb 2018 17:45:39 -0000

I suggest that ContentInfo is always present, then for the signed case:

      ContentInfo {
        contentType          id-signedData, -- (1.2.840.113549.1.7.2)
        content              SignedData
      }

      SignedData {
        version              CMSVersion, -- always set to 3
        digestAlgorithms     DigestAlgorithmIdentifiers, -- Only one
        encapContentInfo     EncapsulatedContentInfo,
        certificates         CertificateSet, -- Signer cert. path
        crls                 CertificateRevocationLists, -- Optional
        signerInfos          SET OF SignerInfo -- Only one
      }

      SignerInfo {
        version              CMSVersion, -- always set to 3
        sid                  SignerIdentifier,
        digestAlgorithm      DigestAlgorithmIdentifier,
        signedAttrs          SignedAttributes, -- Required
        signatureAlgorithm   SignatureAlgorithmIdentifier,
        signature            SignatureValue,
        unsignedAttrs        UnsignedAttributes -- Optional
      }

      EncapsulatedContentInfo {
        eContentType         <your-netconf-content-type>
        eContent             OCTET STRING
      }                            -- Contains the content

The unsigned case:

      ContentInfo {
        contentType          <your-netconf-content-type>
        content              -- Contains the content
      }

Russ


> On Feb 6, 2018, at 11:53 AM, Kent Watsen <kwatsen@juniper.net> wrote:
> 
> Hi Russ,
> 
> I'm looking into switching from PKCS7 to CMS change in the NETCONF
> zerotouch draft.  This update would be similar to the change to the
> ANIMA voucher draft.  However, I noticed that RFC 5652 says in 
> Section 5.2:
> 
>   "In the degenerate case where there are no signers, the
>   EncapsulatedContentInfo value being "signed" is irrelevant.  In this
>   case, the content type within the EncapsulatedContentInfo value being
>   "signed" MUST be id-data (as defined in Section 4), and the content
>   field of the EncapsulatedContentInfo value MUST be omitted."
> 
>   Note, this text is similar to the last paragraph in RFC 2315 Section 
>   9.1, though there it is just a "recommendation" that the value be
>   omitted.
> 
> This is a problem for the NETCONF zerotouch draft, where we currently
> have a PKCS7 object that is sometimes signed.  We choose this approach
> because then, in all cases, a PKCS7 object is being communicated.  But
> it's no longer allowed in CMS?
> 
> Questions:
> 
> 1) Can the zerotouch draft explicitly allow the "eContent" field 
>   again for the degenerate case?
> 
> 2) If having a eContent value for the degenerate case is no longer
>   allowed, can we use it as grounds for not migrating to CMS?
> 
> 3) Are there any other generic "envelop" structure that can be 
>   "sometimes signed"?
> 
> 
> Thanks,
> Kent
> 
> 
>