From nobody Fri Nov  6 17:53:07 2020
Return-Path: <d3e3e3@gmail.com>
X-Original-To: babel@ietfa.amsl.com
Delivered-To: babel@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1])
 by ietfa.amsl.com (Postfix) with ESMTP id 2A16D3A0EC6
 for <babel@ietfa.amsl.com>; Fri,  6 Nov 2020 17:53:06 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.847
X-Spam-Level: 
X-Spam-Status: No, score=-1.847 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_ENVFROM_END_DIGIT=0.25, 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 VCSILz2-oCek for <babel@ietfa.amsl.com>;
 Fri,  6 Nov 2020 17:53:04 -0800 (PST)
Received: from mail-io1-xd31.google.com (mail-io1-xd31.google.com
 [IPv6:2607:f8b0:4864:20::d31])
 (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 717DB3A0EC7
 for <babel@ietf.org>; Fri,  6 Nov 2020 17:53:04 -0800 (PST)
Received: by mail-io1-xd31.google.com with SMTP id o11so3408913ioo.11
 for <babel@ietf.org>; Fri, 06 Nov 2020 17:53:04 -0800 (PST)
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=hq03YuQLWRl1Wq/IeIE8kuyHdpbPOTDArdYRLiY9O9M=;
 b=K7Wb5knRnzNBmu8Su5X47DPdV2wHnEbaIdEDdDVLT/KBsd1WacFDJrxKh/iOjjGjmE
 MvKwDYKJ/5D7LCSYNuPjn3QeNFrjCSb9LvLq3np8eNJlSQk1Wn+nZrRmoj2UXfH14ldo
 SqDt9ft7I2wCq1Rw8+1VABFe0v6a9Fo+aY8UMJ/vNtx8qkR0Jr2Q3NHwq+N+zw0qL+Es
 z3SRSzn1S+mHOVhXiSXfAD/yOr+vOHKqpwVweDpkMvP2/7BNx5pDjsPkvNUKyEhiLYEm
 Oo6LXLVdBGV3cxyGiVW1YzYB+UVUAV1U10HlXgC6kNzzk7KagcygbA3Z8maHNTixIjCf
 EC1Q==
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=hq03YuQLWRl1Wq/IeIE8kuyHdpbPOTDArdYRLiY9O9M=;
 b=leNSFTmx+TLlkboS5eCiPBOEPjtvh+GcFMNSehlRd1sXrqHtId5HPqTushhRU+DIES
 IiMi3WJoLw191Qhwu2Gca6TpjwRqsODSdyaF197o5BioUwA278n7cddP/bC+Q0LDuL6q
 uZMJorM5sxbEMWzDAv2zYXAVvIM2jUjiqZJahgPeP4TagmiwqBe2mBPHcHTuvffpKtYp
 XHffbhhyLS/Tx2NNcuWhmLVhoBCLugOO2qfKnPQLYrST3RB9BGEScjn2/Mf6WVHlEuqW
 0cbLgdrc3wgmqPGusIp71OkM+8pfKysxEqQKCgt8HRhri9E0qmI4md4RaR/9ugRtpQTG
 W0NQ==
X-Gm-Message-State: AOAM532DUbWACkKJA5cjMo6jbUvnxEcO8QhOtpcIoaxi7/hTYGmk3W0P
 xYYPkl9xxM761u5NAlBAUcMLyB/FzFa5FHM0M5I=
X-Google-Smtp-Source: ABdhPJw2nIcORq4QCgkjnKdYRdaZDK7UUio/r+Xm8LjwZnhi2VofYEAZl2q97Up40RyAbKGTZmf/d4pse/prlCqSw0Q=
X-Received: by 2002:a02:b06:: with SMTP id 6mr4157354jad.115.1604713983458;
 Fri, 06 Nov 2020 17:53:03 -0800 (PST)
MIME-Version: 1.0
References: <87h7q2f6a2.fsf@toke.dk> <C6WJTKSPAQRR.2P5VECMV63MAQ@kobain>
 <CAPDSy+77iiHcMY5m8e_xYw6a3vrj-JAyHpGk1dqWQOdQWNwpUA@mail.gmail.com>
In-Reply-To: <CAPDSy+77iiHcMY5m8e_xYw6a3vrj-JAyHpGk1dqWQOdQWNwpUA@mail.gmail.com>
From: Donald Eastlake <d3e3e3@gmail.com>
Date: Fri, 6 Nov 2020 20:52:52 -0500
Message-ID: <CAF4+nEGDm62adUM_XJUWmETnkV7veZ5V_xpvWJ2msm4y6wUpHQ@mail.gmail.com>
To: David Schinazi <dschinazi.ietf@gmail.com>
Cc: =?UTF-8?Q?Antonin_D=C3=A9cimo?= <antonin.decimo@gmail.com>, 
 =?UTF-8?B?VG9rZSBIw7hpbGFuZC1Kw7hyZ2Vuc2Vu?= <toke=40toke.dk@dmarc.ietf.org>, 
 Juliusz Chroboczek <jch@irif.fr>, Babel at IETF <babel@ietf.org>,
 Valery Smyslov <valery@smyslov.net>, Barbara Stark <bs7652@att.com>
Content-Type: multipart/alternative; boundary="000000000000f3417305b37a96f5"
Archived-At: <https://mailarchive.ietf.org/arch/msg/babel/ScNkYTXVlQvPazuUiAVJetCywHY>
Subject: Re: [babel] Babel-MAC: Blake2s is 128-bits by default
X-BeenThere: babel@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "A list for discussion of the Babel Routing Protocol."
 <babel.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/babel>,
 <mailto:babel-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/babel/>
List-Post: <mailto:babel@ietf.org>
List-Help: <mailto:babel-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/babel>,
 <mailto:babel-request@ietf.org?subject=subscribe>
X-List-Received-Date: Sat, 07 Nov 2020 01:53:06 -0000

--000000000000f3417305b37a96f5
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

I guess AUTH48 is probably the right time to do this.

Speaking as a WG member, although my opinion is not very strong, I would
suggest
 - SHOULD implement BLAKE2s with 32-octet hashes

Thanks,
Donald
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D
 Donald E. Eastlake 3rd   +1-508-333-2270 (cell)
 2386 Panoramic Circle, Apopka, FL 32703 USA
 d3e3e3@gmail.com


On Fri, Nov 6, 2020 at 7:14 PM David Schinazi <dschinazi.ietf@gmail.com>
wrote:

> Random thought: the draft mentions that the MAC algorithm
> is configured alongside the key for it. Perhaps we should
> add an explicit sentence such as "For MAC algorithms that
> support multiple digest sizes (such as BLAKE2s), the digest
> size needs to be communicated alongside the MAC algorithm.".
>
> I agree that the "SHOULD implement BLAKE2s" should
> mention a key length, but I have no preference between:
> - SHOULD implement BLAKE2s with 16-octet hashes
> - SHOULD implement BLAKE2s with 32-octet hashes
> - SHOULD implement BLAKE2s with both 16 and 32-octet hashes
>
> David
>
> On Fri, Nov 6, 2020 at 3:09 PM Antonin D=C3=A9cimo <antonin.decimo@gmail.=
com>
> wrote:
>
>> > > As Valery Smyslov noted, BLAKE2s is able to produce hashes of any si=
ze
>> > > between 1 and 32 octets (8 and 256 bits).  However, both
>> implementations
>> > > of Babel-MAC only ever produce 16-octet BLAKE2s hashes.
>> >
>> > Okay, something seemed off about this when I read it just now, so I ju=
st
>> > double checked: And in fact both implementations use 32-byte Blake2s
>> > digest sizes...
>>
>> That also seemed off to me. To be fair regarding babeld, the "old"
>> hmac branch used 16-bytes blake2s, and my rewrite uses 32-bytes. We=E2=
=80=99re
>> using the reference blake2s implementation, and I changed 16 to the
>> provided BLAKE2S_OUTBYTES =3D 32 constant.
>>
>> > I still support making the change and specifying the size, but to
>> > correspond to current implementation practice the change would need to
>> > be "with 256-bit (32 octet) hashes".
>>
>> Me too. I an exchange earlier this year, Donald and Juliusz explained
>> to me that the size of the output hash is considered part of the
>> hashing algorithm, so yes, I support making that explicit for blake2s.
>>
>>
>> -- Antonin
>>
>> _______________________________________________
>> babel mailing list
>> babel@ietf.org
>> https://www.ietf.org/mailman/listinfo/babel
>>
>

--000000000000f3417305b37a96f5
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">I guess AUTH48 is probably the right time to do this.<div>=
<br></div><div>Speaking as a WG member, although my opinion is not very str=
ong, I would suggest</div><div>=C2=A0- SHOULD implement=C2=A0BLAKE2s with 3=
2-octet hashes</div><div><br><div><div><div dir=3D"ltr" class=3D"gmail_sign=
ature" data-smartmail=3D"gmail_signature">Thanks,<br>Donald<br>=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D<br>=C2=A0Donald E. Eastlake 3rd =C2=A0 +1-508-333-2270 (cell)<br>=C2=
=A02386 Panoramic Circle, Apopka, FL 32703 USA<br>=C2=A0<a href=3D"mailto:d=
3e3e3@gmail.com" target=3D"_blank">d3e3e3@gmail.com</a></div></div><br></di=
v></div></div><br><div class=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmai=
l_attr">On Fri, Nov 6, 2020 at 7:14 PM David Schinazi &lt;<a href=3D"mailto=
:dschinazi.ietf@gmail.com">dschinazi.ietf@gmail.com</a>&gt; wrote:<br></div=
><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border=
-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir=3D"ltr">Random =
thought: the draft mentions that the MAC algorithm<div>is configured alongs=
ide the key for it. Perhaps we should</div><div>add an explicit sentence su=
ch as &quot;For MAC algorithms that</div><div>support multiple digest sizes=
 (such as BLAKE2s), the digest</div><div>size needs to be communicated alon=
gside the MAC algorithm.&quot;.</div><div><br></div><div>I agree that the &=
quot;SHOULD implement BLAKE2s&quot; should</div><div>mention a key length, =
but I have no preference between:</div><div>- SHOULD implement=C2=A0BLAKE2s=
 with 16-octet hashes</div><div>- SHOULD implement=C2=A0BLAKE2s with 32-oct=
et hashes<br></div><div>- SHOULD implement=C2=A0BLAKE2s with both 16 and 32=
-octet hashes<br></div><div><br></div><div>David</div></div><br><div class=
=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail_attr">On Fri, Nov 6, 2020 =
at 3:09 PM Antonin D=C3=A9cimo &lt;<a href=3D"mailto:antonin.decimo@gmail.c=
om" target=3D"_blank">antonin.decimo@gmail.com</a>&gt; wrote:<br></div><blo=
ckquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left=
:1px solid rgb(204,204,204);padding-left:1ex">&gt; &gt; As Valery Smyslov n=
oted, BLAKE2s is able to produce hashes of any size<br>
&gt; &gt; between 1 and 32 octets (8 and 256 bits).=C2=A0 However, both imp=
lementations<br>
&gt; &gt; of Babel-MAC only ever produce 16-octet BLAKE2s hashes.<br>
&gt;<br>
&gt; Okay, something seemed off about this when I read it just now, so I ju=
st<br>
&gt; double checked: And in fact both implementations use 32-byte Blake2s<b=
r>
&gt; digest sizes...<br>
<br>
That also seemed off to me. To be fair regarding babeld, the &quot;old&quot=
;<br>
hmac branch used 16-bytes blake2s, and my rewrite uses 32-bytes. We=E2=80=
=99re<br>
using the reference blake2s implementation, and I changed 16 to the<br>
provided BLAKE2S_OUTBYTES =3D 32 constant.<br>
<br>
&gt; I still support making the change and specifying the size, but to<br>
&gt; correspond to current implementation practice the change would need to=
<br>
&gt; be &quot;with 256-bit (32 octet) hashes&quot;.<br>
<br>
Me too. I an exchange earlier this year, Donald and Juliusz explained<br>
to me that the size of the output hash is considered part of the<br>
hashing algorithm, so yes, I support making that explicit for blake2s.<br>
<br>
<br>
-- Antonin<br>
<br>
_______________________________________________<br>
babel mailing list<br>
<a href=3D"mailto:babel@ietf.org" target=3D"_blank">babel@ietf.org</a><br>
<a href=3D"https://www.ietf.org/mailman/listinfo/babel" rel=3D"noreferrer" =
target=3D"_blank">https://www.ietf.org/mailman/listinfo/babel</a><br>
</blockquote></div>
</blockquote></div>

--000000000000f3417305b37a96f5--

