Re: [tram] [Technical Errata Reported] RFC8489 (6268)

RenThraysk <renthraysk@gmail.com> Wed, 30 September 2020 12:58 UTC

Return-Path: <renthraysk@gmail.com>
X-Original-To: tram@ietfa.amsl.com
Delivered-To: tram@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id A8A4D3A0EE3 for <tram@ietfa.amsl.com>; Wed, 30 Sep 2020 05:58:25 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.097
X-Spam-Level:
X-Spam-Status: No, score=-2.097 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com
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 MX60Nhj5x5eW for <tram@ietfa.amsl.com>; Wed, 30 Sep 2020 05:58:23 -0700 (PDT)
Received: from mail-wm1-x329.google.com (mail-wm1-x329.google.com [IPv6:2a00:1450:4864:20::329]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 658BD3A0EE1 for <tram@ietf.org>; Wed, 30 Sep 2020 05:58:23 -0700 (PDT)
Received: by mail-wm1-x329.google.com with SMTP id e2so1668676wme.1 for <tram@ietf.org>; Wed, 30 Sep 2020 05:58:23 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=SWyS1WdbJekU6/TOcfJYx8ALX3cYTxGhQ8RNzwgySO8=; b=Evx6fZ2iDbn0Ajt3pyP6lJsyCVw5rbYqqv/obeSJQ8zj+/DzWB2Z/aYZfbfjH6wJ/4 7L8EiKuY/Ggi5ECbBx7xxhrc4R79V+l+lwYr7ZAQxKdsNLz8Lt4VGa+w+70R/et4u/xp Efi8r7T7kwz8VHTk7MxLcR0OrT5tIY5St4beJubY32YzcZVRw+AsVuhTXxwv9R0F4MDE 9PYRD1vLlZjuk+ohjjecng9p7VNJr78uAZKsvZm3LwbH3abJukM8F1n412CvmRr2rM/T nNWs5/T/UwUaQm7B5pCLPStC3YgK5Cojp4lDrxgz5xCeHRRqvLQNunOiI4KEpBDZ8kdO dwPw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=SWyS1WdbJekU6/TOcfJYx8ALX3cYTxGhQ8RNzwgySO8=; b=rjP+Q6pzxtunTyOGUpwCG+DcQG5JjWJPvoqOuyANkZ0vp8Pc73eczqAcYcxbDYCKUR BGRFj7wZcF15wd5ZngVbKz3QpxqAtjISwcA0HkCXF4FlkXDiGndSOY9dLIb+MzLwzOO9 O/EdSoNle72Qx60XJno+ON+Z8bFN68Cj6ueyPRMkNv16/gIxXlse34k7vD59ufLK5pmd 4KR6VH2L95sK87pAi9J595tDVKLqX4DjmTP20v7IIhUQyCcGwksf1du5ke5R1aJnNzgJ fk53m7KC1rHReLIHYYidCk/MnIpg/KeHZnaIxO3mB6gpA2riO26MhYko5RHkSBBEH6Ez eArw==
X-Gm-Message-State: AOAM532XbRY3I51oSDwgAxiZvdve0NdxAGk/3Q5erQgNORL5LDCsG8A/ U/tFtAcIUhiOktf26V4Jr2ByYFxlxByIZGNonz0=
X-Google-Smtp-Source: ABdhPJyHMXkYYPenj1E0O3MEf/Loe4lZTy8bAxb2PdBj2MXFDajgyftXDcDviOvlBoExLhwAMqO/JqePzgZuNP3iYSM=
X-Received: by 2002:a1c:e256:: with SMTP id z83mr2991170wmg.33.1601470701812; Wed, 30 Sep 2020 05:58:21 -0700 (PDT)
MIME-Version: 1.0
References: <20200830152251.37CA9F4076B@rfc-editor.org> <B09AFC19-A790-46C5-A97B-69572411A229@cisco.com> <7bbe51fd9a5a226752597825f276f6baad70add7.camel@ericsson.com> <f48eb512-5c17-20bd-dfd6-2d368e9fd4b9@petit-huguenin.org> <CABNgG1g3Tx1QroP+eo+WeQXxD2XPvf+n67pekBqRi8+QzgX8_Q@mail.gmail.com> <65838ad3-7ee9-3339-1326-8c2d212f6fa6@petit-huguenin.org> <HE1PR0702MB3772F26F7B3E91B8DC6982D695280@HE1PR0702MB3772.eurprd07.prod.outlook.com> <d0498051-d762-855d-bf74-d65a8bdf88da@petit-huguenin.org> <b3cae3bd-2b7f-d8c5-fcb4-55be9f11a3ce@petit-huguenin.org> <CABNgG1hzNyM-qqCpprXBUJ4y-X7OOMZHK72wpPL_rJ+TLXrz-g@mail.gmail.com> <4803aae689ab3839beb9f2a65762001495bc31f8.camel@ericsson.com> <4fb78f8080c69a727fb392d1c4462ffa63fe45c2.camel@ericsson.com> <CABNgG1gXeekROCX4_aHo4RYX8fZg6b967AZEPRRhxTH9PxQdGA@mail.gmail.com> <78fdd4cae92837f303b13e5d9412467fdecca870.camel@ericsson.com> <1b3ee8eb-1d0b-4991-e6c1-f65dd2d4154a@acm.org> <404d19bd2192de644dbc61c64e82605c96446450.camel@ericsson.com> <8786ffe9-d8aa-d112-05fb-b39ac92e27dd@acm.org> <917e9acb845dde2468c7201a846e70c67f527952.camel@ericsson.com>
In-Reply-To: <917e9acb845dde2468c7201a846e70c67f527952.camel@ericsson.com>
From: RenThraysk <renthraysk@gmail.com>
Date: Wed, 30 Sep 2020 13:58:10 +0100
Message-ID: <CABNgG1jU6GXtGe+fV9a6dRVqQbBMSz-Sk3bBYFAvajcyuxu71w@mail.gmail.com>
To: Magnus Westerlund <magnus.westerlund@ericsson.com>
Cc: "petithug@acm.org" <petithug@acm.org>, "jdrosen@jdrosen.net" <jdrosen@jdrosen.net>, "tram@ietf.org" <tram@ietf.org>, "martin.h.duke@gmail.com" <martin.h.duke@gmail.com>, "dwing-ietf@fuggles.com" <dwing-ietf@fuggles.com>, "philip_matthews@magma.ca" <philip_matthews@magma.ca>, "rohan.ietf@gmail.com" <rohan.ietf@gmail.com>
Content-Type: multipart/alternative; boundary="0000000000004cc1b205b0877415"
Archived-At: <https://mailarchive.ietf.org/arch/msg/tram/h0bBBksp1OQmpZiV_C7iyAFLA9k>
Subject: Re: [tram] [Technical Errata Reported] RFC8489 (6268)
X-BeenThere: tram@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Discussing the creation of a Turn Revised And Modernized \(TRAM\) WG, which goal is to consolidate the various initiatives to update TURN and STUN." <tram.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/tram>, <mailto:tram-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/tram/>
List-Post: <mailto:tram@ietf.org>
List-Help: <mailto:tram-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/tram>, <mailto:tram-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 30 Sep 2020 12:58:26 -0000

Here is the test vector generated from my code,
https://github.com/renthraysk/stun/blob/master/rfc8489_test.go (rest of
package is still a work in progress)

00 01 00 90     Request type and message length
21 12 a4 42     Magic cookie
78 ad 34 33  }
c6 ad 72 c0  }  Transaction ID
29 da 41 2e  }
00 1e 00 20     USERHASH attribute header
4a 3c f3 8f  }
ef 69 92 bd  }
a9 52 c6 78  }
04 17 da 0f  }  Userhash value (32  bytes)
24 81 94 15  }
56 9e 60 b2  }
05 c4 6e 41  }
40 7f 17 04  }
00 15 00 29     NONCE attribute header
6f 62 4d 61  }
74 4a 6f 73  }
32 41 41 41  }
43 66 2f 2f  }
34 39 39 6b  }  Nonce value and padding (3 bytes)
39 35 34 64  }
36 4f 4c 33  }
34 6f 4c 39  }
46 53 54 76  }
79 36 34 73  }
41 00 00 00  }
00 14 00 0b     REALM attribute header
65 78 61 6d  }
70 6c 65 2e  }  Realm value (11  bytes) and padding (1 byte)
6f 72 67 00  }
00 1d 00 04     PASSWORD-ALGORITHM attribute header
00 02 00 00     PASSWORD-ALGORITHM value, SHA-256 (0x0002), and parameters
length, 0.
00 1c 00 20     MESSAGE-INTEGRITY-SHA256 attribute header
b5 c7 bf 00  }
5b 6c 52 a2  }
1c 51 c5 e8  }
92 f8 19 24  }  HMAC-SHA256 value
13 62 96 cb  }
92 7c 43 14  }
93 09 27 8c  }
c6 51 8e 65  }

Jared

On Wed, Sep 30, 2020 at 9:45 AM Magnus Westerlund <
magnus.westerlund@ericsson.com> wrote:

> On Mon, 2020-09-28 at 07:54 -0700, Marc Petit-Huguenin wrote:
> > On 9/28/20 7:36 AM, Magnus Westerlund wrote:
> > > Hi,
> > >
> > > A question here. Is the key used in the MESSAGE-INTEGRITY-SHA256 the
> MD5
> > > derived
> > > one, or one derived using SHA256? If it is the former, then fine the
> lets
> > > just
> > > add a sentence of clarification as the option exist. But, Jared's
> previous
> > > comments appear to indicate the the key for the HMAC-SHA256 used in the
> > > intergrity was derived using SHA256. If it is the later, then I don't
> see
> > > any
> > > option than to include the password algorithm attribute and its
> algorithm
> > > indicator as it is a necessary component to correctly derive the key
> and
> > > thus
> > > being able to verify the MESSAGE-INTEGRITY.
> >
> > SHA256.
>
> So in this case then the PASSWORD-ALGORITM attribute is required unless I
> missinterpret the RFC. I understand that there is some work in preparing
> the
> message and calculate the integrity. However, in this case it is necessary
> information and a mandated value so can you please prepare a new message
> with
> the attribute include indicating the correct value?
>
>
> Cheers
>
> Magnus Westerlund
>
>
> ----------------------------------------------------------------------
> Networks, Ericsson Research
> ----------------------------------------------------------------------
> Ericsson AB                 | Mobile +46 73 0949079
> Torshamnsgatan 23           |
> SE-164 80 Stockholm, Sweden | mailto: magnus.westerlund@ericsson.com
> ----------------------------------------------------------------------
>
>
>