Re: [6lo] Benjamin Kaduk's Discuss on draft-ietf-6lo-ap-nd-15: (with DISCUSS and COMMENT)

"Pascal Thubert (pthubert)" <pthubert@cisco.com> Tue, 04 February 2020 14:14 UTC

Return-Path: <pthubert@cisco.com>
X-Original-To: 6lo@ietfa.amsl.com
Delivered-To: 6lo@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 6EF5E12011B; Tue, 4 Feb 2020 06:14:30 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -14.5
X-Spam-Level:
X-Spam-Status: No, score=-14.5 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_HI=-5, SPF_PASS=-0.001, URIBL_BLOCKED=0.001, USER_IN_DEF_DKIM_WL=-7.5] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=cisco.com header.b=efFPYWjQ; dkim=pass (1024-bit key) header.d=cisco.onmicrosoft.com header.b=K2+2xOvz
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 ogsnnqiRXnav; Tue, 4 Feb 2020 06:14:28 -0800 (PST)
Received: from alln-iport-6.cisco.com (alln-iport-6.cisco.com [173.37.142.93]) (using TLSv1.2 with cipher DHE-RSA-SEED-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id AD2AE12011A; Tue, 4 Feb 2020 06:14:27 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=17708; q=dns/txt; s=iport; t=1580825667; x=1582035267; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=kf5CjH3eVxrR8UaBv/H0UERloNEOEZiKPPw/BMfefr8=; b=efFPYWjQ2Y8clcMvB31PPkN4y81RCaFS9BT0PrUJWmekVU8teF3CmwXW ZIROJh85X/E8h+LsFeNAX89DKfvLHeCeg4sr5doR6b0+/xMLt38TNQ+Ui jg/p4Cy8NtJiFyqvJhTYPQVI9ywliihxIwQgQFGsRNs9TBY+Ms9ImT3r2 0=;
IronPort-PHdr: 9a23:wxK4ZxRc0JqAafwcdeoed2POIdpsv++ubAcI9poqja5Pea2//pPkeVbS/uhpkESXBNfA8/wRje3QvuigQmEG7Zub+FE6OJ1XH15g640NmhA4RsuMCEn1NvnvOjQmHNlIWUV513q6KkNSXs35Yg6arw==
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: A0CHBQABezle/4kNJK1lDg4BAQEBAQcBAREBBAQBAYF7gVRQBWxYIAQLKodaA4p/gl+BAZcOglIDVAkBAQEMAQEjCgIBAYRAAoI3JDgTAgMNAQEEAQEBAgEFBG2FNwyFZgEBAQECARIoBgEBJRIBDwIBCDYQMiUCBA4NEweDBYJKAw4gAQIMoUUCgTmIYoIngn8BAQWFGRiCDAMGgTiFHoQ7gQYlgR4agUE/gRFHghc1PoJkAgIBGYFLg0CCLI1QgkyQFY82CoI7h0mBeYNOiU6CSIgOjkyBZpAshxySMwIEAgQFAg4BAQWBaSJEgRRwFTuCbFAYDY4dCQIBFxWDO4UUhQQ6AXQCgSeLIQImAQMDghQBAQ
X-IronPort-AV: E=Sophos;i="5.70,402,1574121600"; d="scan'208";a="443533368"
Received: from alln-core-4.cisco.com ([173.36.13.137]) by alln-iport-6.cisco.com with ESMTP/TLS/DHE-RSA-SEED-SHA; 04 Feb 2020 14:14:26 +0000
Received: from XCH-ALN-006.cisco.com (xch-aln-006.cisco.com [173.36.7.16]) by alln-core-4.cisco.com (8.15.2/8.15.2) with ESMTPS id 014EEQEP024479 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=FAIL); Tue, 4 Feb 2020 14:14:26 GMT
Received: from xhs-aln-001.cisco.com (173.37.135.118) by XCH-ALN-006.cisco.com (173.36.7.16) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Tue, 4 Feb 2020 08:14:25 -0600
Received: from xhs-rtp-002.cisco.com (64.101.210.229) by xhs-aln-001.cisco.com (173.37.135.118) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Tue, 4 Feb 2020 08:14:25 -0600
Received: from NAM04-BN3-obe.outbound.protection.outlook.com (64.101.32.56) by xhs-rtp-002.cisco.com (64.101.210.229) with Microsoft SMTP Server (TLS) id 15.0.1473.3 via Frontend Transport; Tue, 4 Feb 2020 09:14:25 -0500
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XY70ZzsrIrpJqX1/2VaRSI3TigGPODjUkkS42YyfuQKRfcAY8UVjG/2U6MEFHihcCUSfPpc/ofi9x2J+KPi6eDIhjzMpTSKK8/V3MpTuUzitTnEkteJnjDJfkq6IGFRtThOc9Jel1jsHCu9/p94CMOFFOVpd+GinSnC0B7yFXjbBv08i3+volCXJFotbWN/NH5lPDP9xY0KwIDSqe92hTXIxhm14puULY7aRiPxLSnwZulv/3kHCreB/SzYK7YdAWXNOIhux+h9Ra65uTJXW+5ZE+Vt7ZQxZlhMWXub+TRw/OPE3UcKiHk8pQ1MvPwcGuRz1tfrnJ39VopuKKmXTFQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=qeowpace6fJVCJSTNEoMynrWRrDIYH/AJjFCHMATb8I=; b=fA3Z5iOGXCpjE+gLUg4YZEt6LIO4VCRR/sWJl35HFRvomLl6NhXYI0aoabWwTPKUJu5J2Dk16wa+PFF7icrupB/PBWj6NXJCWvNlCMF2/wVQCx+xJ6QpIeMTF9cXXxCXQyHag3q0AxY8m3429H96tpbfk13jOVk1LqSdmJfNQ3lw9BBqyq5z2s2vDSmt4KFAMM46QiazNcs7xdsS3q3sN8gpUl5q3mhN3GQ6+izsDQ4Uj7axdjYrCSat3PdL9cLWl+he+aHPMmpw58S6Biq6CnDIEvboyyy8cgDYwKc99ZfEuZ38oLX6IH2MvT4h1v3Nni/azRfR/eVkgMP589WucA==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=cisco.com; dmarc=pass action=none header.from=cisco.com; dkim=pass header.d=cisco.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cisco.onmicrosoft.com; s=selector2-cisco-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=qeowpace6fJVCJSTNEoMynrWRrDIYH/AJjFCHMATb8I=; b=K2+2xOvzSK/vYwTFOV6NDa87phqnHkFZXE1QNvkCvDqn6vOF78UPnIr3rg47nDmUtLmX5+pH3KoEfJPGM/DfiqiT+pJh44YxPSeEtaG++JLBIz4oph7kK+lspiv729VLKyL+WAidfOYsgvEVx/Oob0CxI+cCynuPGgf30Tk9lcs=
Received: from MN2PR11MB3565.namprd11.prod.outlook.com (20.178.250.159) by MN2PR11MB3584.namprd11.prod.outlook.com (20.178.251.206) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2686.29; Tue, 4 Feb 2020 14:14:24 +0000
Received: from MN2PR11MB3565.namprd11.prod.outlook.com ([fe80::fd76:1534:4f9a:452a]) by MN2PR11MB3565.namprd11.prod.outlook.com ([fe80::fd76:1534:4f9a:452a%3]) with mapi id 15.20.2686.031; Tue, 4 Feb 2020 14:14:24 +0000
From: "Pascal Thubert (pthubert)" <pthubert@cisco.com>
To: Benjamin Kaduk <kaduk@mit.edu>
CC: The IESG <iesg@ietf.org>, "draft-ietf-6lo-ap-nd@ietf.org" <draft-ietf-6lo-ap-nd@ietf.org>, "Shwetha Bhandari (shwethab)" <shwethab@cisco.com>, "6lo-chairs@ietf.org" <6lo-chairs@ietf.org>, "6lo@ietf.org" <6lo@ietf.org>
Thread-Topic: Benjamin Kaduk's Discuss on draft-ietf-6lo-ap-nd-15: (with DISCUSS and COMMENT)
Thread-Index: AQHV2IzboswYmzjUQ0uf9MGXohRBl6gGYZDwgAP8MYCAAGiTEA==
Date: Tue, 04 Feb 2020 14:14:21 +0000
Deferred-Delivery: Tue, 4 Feb 2020 14:13:37 +0000
Message-ID: <MN2PR11MB35658E5BA1A1DF2BBA232F2DD8030@MN2PR11MB3565.namprd11.prod.outlook.com>
References: <158051274858.21121.16988738930495243847.idtracker@ietfa.amsl.com> <MN2PR11MB3565552065F2F21DD481EEC3D8000@MN2PR11MB3565.namprd11.prod.outlook.com> <20200204030143.GB53329@kduck.mit.edu>
In-Reply-To: <20200204030143.GB53329@kduck.mit.edu>
Accept-Language: fr-FR, en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
authentication-results: spf=none (sender IP is ) smtp.mailfrom=pthubert@cisco.com;
x-originating-ip: [2001:420:44f3:1300:41e7:7725:e525:b2e8]
x-ms-publictraffictype: Email
x-ms-office365-filtering-correlation-id: 3bc12bb5-4602-48df-2639-08d7a97c8956
x-ms-traffictypediagnostic: MN2PR11MB3584:
x-ms-exchange-transport-forked: True
x-microsoft-antispam-prvs: <MN2PR11MB3584830F124A773E69CD93A1D8030@MN2PR11MB3584.namprd11.prod.outlook.com>
x-ms-oob-tlc-oobclassifiers: OLM:10000;
x-forefront-prvs: 03030B9493
x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(346002)(376002)(136003)(366004)(39860400002)(396003)(189003)(199004)(6916009)(186003)(66574012)(86362001)(478600001)(6666004)(4326008)(71200400001)(966005)(66476007)(66556008)(64756008)(66446008)(8676002)(316002)(2906002)(81156014)(5660300002)(81166006)(66946007)(6506007)(52536014)(54906003)(30864003)(9686003)(8936002)(55016002)(33656002)(76116006)(7696005); DIR:OUT; SFP:1101; SCL:1; SRVR:MN2PR11MB3584; H:MN2PR11MB3565.namprd11.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1;
received-spf: None (protection.outlook.com: cisco.com does not designate permitted sender hosts)
x-ms-exchange-senderadcheck: 1
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: Elu4PnZvzDseH9w7Pf+xlPHNr81jQ+LkktI7wy+j3cWD+ZeYloHWe7fqW2PLlnI9eex6K0iXZzIKGdN5t6b4XyFZkQmwYyBU+LoS/ya70JAdDmeWyO8x7v4DOSFvGBx003i0gl77vqnNcQ+Y5DcXKPB1m7PoKN5l+rTHBOCzuixUwfmjhCv8hgz8pvZTEq1J4YFdRkyRZBnelon6jq1iZK7tUhsae3DYZ4ElZfrrPtuV98vtd5ssgrBD2OM6bFQifa93vLk+9nkVnO8Ck5iX96SD/q8vwMnf22OTQW3L6A4c7zkgPYwFMWW5vO3Ib5VGbXSEVm65DHcE0v/s3HF+xu1udXJogUVD9g6f28lTXHlUyQpL9Uz6rP6GNim//dwi12DkHK7BBbCjpK1B/ingdB1cPV6oGzR8OHGhAFCnqHuaMmVER8MPja8saBLc17pjXDQq9N/L7DX9EU/P/KLqda9I4Ffc5Mpcg7j2MkJ9xqoxELyY49PUcu+iCMl9YYB+PLt6p6xgntT25AeS8Xz8Ng==
x-ms-exchange-antispam-messagedata: NHU+JBzHqm2/ooivPqSgfYBr/oMkUHgn9oO6NGyS4xx8gfKIYBTCNW7if/GbBqwqKCm4OPMhj6sfS0WXpRX3n6wICx8tgMb8sCRV5XM4KbEVZJUfrSPyUbZOKbX6bwmltj2KqvxzhzBxRYs6nKIweXUsYuaP/n2vblVNzRyiz4U2wvTUmk/7GHc4+eekbZQfXTr1+YGm2Ox6gmdGvHVl1A==
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-MS-Exchange-CrossTenant-Network-Message-Id: 3bc12bb5-4602-48df-2639-08d7a97c8956
X-MS-Exchange-CrossTenant-originalarrivaltime: 04 Feb 2020 14:14:24.0338 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 5ae1af62-9505-4097-a69a-c1553ef7840e
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: bOlO83g3XWE05Irwf//58nOLQ1/j2QO2JwmndkyLjVld2tXo+AMydenuvwqwkYW9y9E435JAEqBCbbny9+mjyA==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR11MB3584
X-OriginatorOrg: cisco.com
X-Outbound-SMTP-Client: 173.36.7.16, xch-aln-006.cisco.com
X-Outbound-Node: alln-core-4.cisco.com
Archived-At: <https://mailarchive.ietf.org/arch/msg/6lo/tGzACLBraavyPcbKadhLy1BVrGc>
Subject: Re: [6lo] Benjamin Kaduk's Discuss on draft-ietf-6lo-ap-nd-15: (with DISCUSS and COMMENT)
X-BeenThere: 6lo@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Mailing list for the 6lo WG for Internet Area issues in IPv6 over constrained node networks." <6lo.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/6lo>, <mailto:6lo-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/6lo/>
List-Post: <mailto:6lo@ietf.org>
List-Help: <mailto:6lo-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/6lo>, <mailto:6lo-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 04 Feb 2020 14:14:30 -0000

Hello Benjamin

Whao, that was quick. Many thanks again!

I got a comment on the change to BCP201 and looked it up. Seems there was a confusion, BCP 201 is RFC 7696 not RFC 7748. So I rolled back the overload. Did you expect something else?

I'm publishing 17 for the delta below, we still have the 3 open points. Please check the diffs at 
https://tools.ietf.org/rfcdiff?url2=draft-ietf-6lo-ap-nd-17.txt

More below:

> > Why do we need to allow ambiguity/flexibility as to the point
> representation
> > > within a given Crypto-Type value (as opposed to fixing the representation
> as a
> > > parameter of the Crypto-Type)?  Alternately, what does
> "(un)compressed"
> > > mean, as it's not really clarified directly?  Furthermore, Table 2 lists an
> > > "(un)compressed" representation for type 0 (over P-256), but RFC 7518
> notes
> > > that the compressed representation is not supported for P-256 (Section
> > > 6.2.1.1).  I also am not finding the needed codepoints registered in the
> JOSE
> > > registries to use ECDSA25519 (crypto-type 2) -- do we need to register
> > > anything there?
> >
> > Let us take this one separately in a thread with the co authors

I keep this item in the thread, to track that it's progressing separately


> > Clarifying questions:
> > - This spec is authoritative for listing the elliptic curves and the hash
> functions that it supports, correct?
> > - The registry is authoritative for the setting of values, which may change if
> this draft is obsoleted, is that your point?
> 
> I think we have different interpretations.
> I was assuming (based more on general practices than the specific text in
> this document, to be clear) that the idea is that new Crypto-Types could be
> specified and added to the registry, and implementations incorporate them,
> without needing to revise or update this specification: the registered
> Crypto-Type would contain all the information needed to integrate with the
> mechanisms specified here.  In that mindset, any list of algorithms in this
> document becomes out of date once the first additional Crypto-Type is
> registered, and the question of what algorithms the specification supports
> is more open-ended than just the literal words on the page.

Makes sense to me

 
> > From there I'm unsure what to do. The goal is to keep the focus on the bill
> of material of what needs to be implemented.
> > If that helps I can add (values to be confirmed by IANA) as follows?
> >
> > "   The elliptic curves and the hash functions that can be used with this
> >    specification are listed in Table 2 in Section 8.3.  The signature
> >    scheme that specifies which combination is used is signaled by a
> >    Crypto-Type (values to be confirmed by IANA) in a new IPv6 ND Crypto-
> >    ID Parameters Option (CIPO, see Section 4.3) that contains the
> >    parameters that are necessary for the proof, a Nonce option
> >    ([RFC3971]) and a NDP Signature option (Section 4.4).
> > "
> 
> To make a more concrete question: suppose I wanted to use SHAKE256/256
> as a
> hash function paired with ECDSA on curve25519.  What would need to
> happen
> to enable that?  The text above implies that, since SHAKE256/256 is not
> listed in the table, it's not allowed for use with this specification, and
> thus that I'd need to Update this specification in order to allow its use.

The registry has "Specification Required" or "IESG Approval". The "IESG Approval" path is for the case where the IES approves using the new hash with the draft as is. 
So yes, the spirit is that if the IESG determines that your case can happen without a change in the spec, the registry could be extended and the spec applied.
In that context, how does the following work:

"
   The elliptic curves and the hash functions listed in Table 2 in
   Section 8.3 can be used with this specification; more may be added in
   the future to the IANA registry.  The signature scheme that specifies
   which combination is used (including the curve and the representation
   conventions) is signaled by a Crypto-Type in a new IPv6 ND Crypto-ID
   Parameters Option (CIPO, see Section 4.3) that contains the
   parameters that are necessary for the proof, a Nonce option
   ([RFC3971]) and a NDP Signature option (Section 4.4).  The NA(EARO)
   is modified to enable a challenge and transport a Nonce option.
"

Note that this incorporate text to cover the discussion between Rene and Jim that different representation conventions imply different crypto-ids and cannot reuse the same keypair


> > >
> > > Section 4.1
> > >
> > >    The Crypto-ID is derived from the public key and a modifier as
> > >    follows:
> > >
> > >    1.  The hash function indicated by the Crypto-Type is applied to the
> > >        CIPO.  Note that all the reserved and padding bits MUST be set to
> > >        zero.
> > >    2.  The leftmost bits of the resulting hash, up to the size of the
> > >        ROVR field, are used as the Crypto-ID.
> > >
> > > This construction seems to allow for some malleability, in that an
> attacker who
> > > observes a given Crypto-ID and CIPO could produce a related, valid,
> Crypto-ID
> > > by reducing the ROVR length and truncating what was received.  I haven't
> > > attempted to explore what (if any) potential consequences there are of
> such
> > > malleability, and would like to know if anyone else has already done so.
> It
> > > looks like the NDPSO construction includes the length of the Crypto-ID,
> so it
> > > would be hard for an attacker to do much with such a truncated Crypto-
> ID, but
> > > attacks only get better...
> >
> > The point is that the Crypto-ID remains in the 6LBR is its original form, size
> and value. A shorted Crypto-ID is a different Crypto-ID even if bits match.
> Truncated per se does not help vs. any other change.
> > Also, the attacker would have to be on path of the initial registration. If
> that is so, and it wants to update the ROVR, it can do that a lot more.
> > Now, the crypto-ID dictates the size of the ROVR not the other way
> around, so I fixed:
> > "
> > The leftmost bits of the resulting hash, up to the desired size, are used as
> the Crypto-ID.
> > "
> > Anything else I should consider doing?
> 
> The only other thing I would *consider* doing (which is not to say that
> it's clear it should be done) is to include the desired size as input to
> the hash.  But I don't have any specific reason to do that or attack that
> would be stymied by doing so.
> 

With RFC 8505 the 6LN decides the parameters of the registration without an indication from the router. So at the moment I cannot figure how to do that apart from config. We  are missing a mechanism to signal the expected format of the ROVR and other parameters such as recommended lifetimes for types of addresses, etc..., in the RA messages. That's also in the long term plan and I'm considering whether to do that at 6lo or 6MAN. 6MAN would be better but it is slow/reluctant to adopt RFC 8505 for general purpose.

> > >    The implementation of multiple hash functions in a constrained
> > >    devices may consume excessive amounts of program memory.
> > >
> > > But multiple signature algorithm implementations will not?
> >
> > draft-ietf-lwig-curve-representations discussed in the next section enables
> to factorize code, if I understand well.
> > But to your point, what about the following clarification:
> >
> > "
> >    The implementation of multiple hash functions in a constrained
> >    devices may consume excessive amounts of program memory.  This
> >    specification enables the use of SHA-256 [RFC6234] for all the
> >    supported ECC curves.
> 
> Hmm, but Table 2 lists SHA-512 (not SHA-256) for crypto-type 1 (though I
> guess type 2 is SHA-256 on the same curve).
 
Yes, I understand that type 2 is less classical but enables the reuse of the SHA 256 hash.
I defer to Rene on this.

> > Per your comment we recommend 128 bits minimum. Keeping it at 64 bits
> was not the intention.
> > Not sure why you meant by sibling; the text would become
> >
> > "
> >    As opposed to the RSA Signature Option (RSAO) defined in section 5.2.
> >    of SEND [RFC3971], the NDPSO does not have a key hash field.
> >    Instead, the leftmost 128 bits of the ROVR field in the EARO are used
> >    to retrieve the CIPO that contains the key material used for signature
> >    verification, left-padded if needed.
> >
> > "
> 
> I think "sibling" was intended to be the case when the EARO and the CIPO
> appear in the same NS as "sibling options" within the NS.  (Though as you
> note the CIPO could have been previously received in a different message.)
> This text is probably okay, though I guess the reader has to know that
> there's an EARO associated with the NDPSO.
> 

You right, does not hurt to be more specific. In section 4.4:

"
   An ND message that carries an NDPSO MUST have one and only one EARO.
   The EARO MUST contain a Crypto-ID in the ROVR field, and the Crypto-
   ID MUST be associated with the keypair used for the Digital Signature
   in the NDPSO.

"


> > >
> > >    The 6LR on receiving the NDPSO and CIPO options first regenerates the
> > >    Crypto-ID based on the CIPO option to make sure that the leftmost
> > >    bits up to the size of the ROVR match.  If and only if the check is
> > >
> > > In the vein of my previous questions about where the Crypto-ID appears
> and
> > > truncation/malleability, this text seems to leave some room for
> confusion
> > > about how many bits of output are being compared, and compared to
> what.
> >
> > I'm unsure what you mean here. Based on my response above, can you
> please reopen is needed, with some clarification?
> 
> I was trying to get at how the NDPSO includes the Crypto-ID length in the
> signed data, but the 6LR has to determine what length to use from the
> length of the ROVR in the NS.  This is in general not terribly interesting
> since an on-path attacker could change "anything" that would be input to the
> signature validation, but seemed a little more interesting to me because of
> the way that an attacker could truncate the Crypto-ID, and the truncation
> would not be directly detectable in the EARO/ROVR but would only be
> detected during signature validation.  That is, the 6LR would replicate the
> Crypto-ID calculation from the CIPO, and the Crypto-ID would *appear* to
> match up, but the signature in the NDPSO would fail to validate.  I have in
> general a preference to make the reason for failure apparent closer to the
> error, if possible, but in this specific case the system as a whole seems
> to work okay even though the error is detected "one step later" than it
> could be.  (Adding the target output length into the hash input for
> Crypto-ID calculation as I mentioned above as an option would make this
> error detected at the first possible point, when validating the Crypto-ID
> calculation.)

This could be achieved by placing the length of the ROVR in the CIPO. Making this change.
We already had the ROVR size in the signature. Note that in the signature the format of that size is not given. Would need 2 bytes if expressed in bytes.
I'd reword to use the option length of the EARO, which is expressed in units of 8 bytes and is stored in one octet. 
Works?

This leads to sparse changes, but mostly:




"


The signature generated by the 6LN to provide proof-of-ownership of
   the private-key is carried in the NDP Signature Option (NDPSO).  It
   is generated by the 6LN in a fashion that depends on the Crypto-Type
   (see Table 2 in Section 8.3) chosen by the 6LN as follows:

   *  Concatenate the following in the order listed:

   1.  The 128-bit Message Type tag [RFC3972] (in network byte order).
       For this specification the tag is 0x8701 55c8 0cca dd32 6ab7 e415
       f148 84d0.  (The tag value has been generated by the editor of
       this specification on random.org).

<snip>

  6.  1-byte Option Length of the EARO containing the Crypto-ID.
  7.  1-byte Crypto-Type value sent in the CIPO.

<snap>

   The 6LR on receiving the NDPSO and CIPO options first checks that the
   EARO Length in the CIPO matches the length of the EARO.  If so it
   regenerates the Crypto-ID based on the CIPO to make sure that the
   leftmost bits up to the size of the ROVR match.

   If and only if the check is successful, it tries to verify the
   signature in the NDPSO option using the following:

   *  Concatenate the following in the order listed:

   1.  128-bit type tag (in network byte order)

<snoop>

  6.  1-byte EARO Length received in the CIPO.
  7.  1-byte Crypto-Type value received in the CIPO.

"



> 
> Perhaps it goes without saying (as part of DAD), but the 6LBR has to
> consult its database of ROVR/IP address to determine what response to give
> in the DAC.  Part of my question above was about what state the 6LBR needs
> and what verification the 6LBR does as part of the process -- am I correct
> that it's just checking whether (1) the requested address is already
> registered and (if so) (2) that the ROVR in the EARO matches the one
> registered with the requested address?

Yes, per RFC 8505, inherited from RFC 6775. I'd say that DAD expressed as you did is the core function of RFC 6775.
This draft does not really change the 6LBR, just adds the capability to stimulate a revalidation by the 6LR.


> >
> > All together we get:
> > "
> >    Replay Attacks  Using Nonces (NonceLR and NonceLN) generated by both
> >       the 6LR and 6LN ensure a contributory behavior that provides an
> >       efficient protection against replay attacks of the challenge/
> >       response flow.  A nonce should never repeat for a same key.  The
> >       protection depends on the quality of the Nonce computation, e.g.,
> >       of a random number generator when used to compute the Nonce.
> > "
> 
> I'd consider "A nonce should never repeat for a single key, but nonces do
> not need to be unpredictable for secure operation".
> 
Which leads to:
"

   Replay Attacks  A nonce should never repeat for a single key, but
      nonces do not need to be unpredictable for secure operation.
      Using nonces (NonceLR and NonceLN) generated by both the 6LR and
      6LN ensure a contributory behavior that provides an efficient
      protection against replay attacks of the challenge/response flow.
      The quality of the protection by a random nonce depends on the
      random number generator and its parameters (e.g., sense of time).
"


> >
> > Twisted the text to
> > "
> >    With this specification the 6LN can freely form its IPv6 address(es)
> >    in any fashion, thereby enabling either 6LoWPAN compression for IPv6
> >    addresses that are derived from Layer-2 addresses, or temporary
> >    addresses, e.g., formed pseudo-randomly and released in relatively
> >    short cycles for privacy reasons [RFC8064][RFC8065], that cannot be
> >    compressed.
> >
> > "
> 
> This text is good.  I would suggest changing the Section-1 text, though, as
> the current "requires a device [...] to enable a better compression" reads
> as if the requirement is always present, and that the reason for the
> requirement is to get the compression; instead, the situation is (IIUC)
> that in order to get that compression, the node is required to choose its
> address based on the L2 address.
> 
Which  gives

"
   With the 6lo adaptation layer in [RFC4944] and [RFC6282], a 6LN can
   obtain a better compression for an IPv6 address with an Interface ID
   (IID) that is derived from a Layer-2 address.  As a side note, this
   is incompatible with Secure Neighbor Discovery (SeND) [RFC3971] and
   Cryptographically Generated Addresses (CGAs) [RFC3972], since they
   derive the IID from cryptographic keys, whereas this specification
   separates the IID and the key material. 
"


> >
> > Text in the main spec has
> > "
> >   The assumption is that the 6LR and the 6LBR maintain a security
> association, so there is no need to propagate the proof of ownership to the
> 6LBR.
> > "
> > But I'm not aware of people using anything beyond Layer-2 security. The
> EDAR/EDAC are unicast ICMPv6 messages; what would be your
> recommendation to protect them at L3?
> 
> At L3?  I don't know of much other than IPsec (or some tunneling solution).
> But by "details" I meant more about whether confidentiality protection is
> required or "merely" integrity protection and source-authentication.

In this case the merely is enough. The EDAR has the ROVR and the registered address. Those will appear later in ND flows anyway.
In the main text, :

"
   The assumption is that the 6LR and the 6LBR maintain a security
   association to authenticate and protect the integrity of the EDAR and
   EDAC messages, so there is no need to propagate the proof of
   ownership to the 6LBR.  The 6LBR implicitly trusts that the 6LR
   performs the verification when the 6LBR requires it, and if there is
   no further exchange from the 6LR to remove the state, that the
   verification succeeded.
"

Many more thanks!

Pascal