Re: [babel] Babel-MAC: Blake2s is 128-bits by default

Toke Høiland-Jørgensen <toke@toke.dk> Fri, 06 November 2020 22:51 UTC

Return-Path: <toke@toke.dk>
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 25F7E3A0DEF for <babel@ietfa.amsl.com>; Fri, 6 Nov 2020 14:51:41 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.099
X-Spam-Level:
X-Spam-Status: No, score=-2.099 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, 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=toke.dk
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 JTfCVY4GfObe for <babel@ietfa.amsl.com>; Fri, 6 Nov 2020 14:51:39 -0800 (PST)
Received: from mail.toke.dk (mail.toke.dk [45.145.95.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 45E543A0DE9 for <babel@ietf.org>; Fri, 6 Nov 2020 14:51:38 -0800 (PST)
From: Toke =?utf-8?Q?H=C3=B8iland-J=C3=B8rgensen?= <toke@toke.dk>
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=toke.dk; s=20161023; t=1604703096; bh=UoX6MYh59JTlgR/krRl9uSBVXXpiasjShNWNrWNQtMk=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=QRo8sjiY2QvMO+2Iyiww7RZ3JCpV6YFqNnfaY5fvuqMWZwlvliA5vTf1TsnIx+zkM F8/12FKbo0N5IAVDCK28zfOfkmlmQpzjFQAeaJ8ZpnhoBNrRwXv7UvJ5dn5wRi/9Qe bl+EQMMUgwJaWYxHZe3+YrwHwBTsNksIc2QYAZIQ4bIV7pc6jymfsD4UZH2at89dpP pol4WlpuKOmnG4pLASKd+VAeI4EoRXExHt+LqnuftBewAVNkPLKmk4Cv8NndFm/uLC 1MlTBh+RcTLbU8b0nz3GnOteeUT98bOJi9C9C/EO5NXkwRX2V9CRahQvspjnTmCOIm 2wFyT9Pfyvd4A==
To: Juliusz Chroboczek <jch@irif.fr>, babel@ietf.org
Cc: Valery Smyslov <valery@smyslov.net>, Donald Eastlake <d3e3e3@gmail.com>, Barbara Stark <bs7652@att.com>
In-Reply-To: <87d00qungk.wl-jch@irif.fr>
References: <87d00qungk.wl-jch@irif.fr>
Date: Fri, 06 Nov 2020 23:51:33 +0100
X-Clacks-Overhead: GNU Terry Pratchett
Message-ID: <87h7q2f6a2.fsf@toke.dk>
MIME-Version: 1.0
Content-Type: text/plain
Archived-At: <https://mailarchive.ietf.org/arch/msg/babel/S-LHc3mGEZ3FDdwRrSLsZaI0HcI>
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: Fri, 06 Nov 2020 22:51:41 -0000

Juliusz Chroboczek <jch@irif.fr> writes:

> Dear all,
>
> We've had a discussion with Barbara and Toke today, and we've come to the
> conclusion that there is an oversight in draft-ietf-babel-hmac-12.  In
> Section 4.1, we say
>
>    Every implementation MUST implement HMAC-SHA256 as defined in [RFC6234]
>    and Section 2 of [RFC2104], SHOULD implement keyed BLAKE2s [RFC7693],
>    and MAY implement other MAC algorithms.
>
> As Valery Smyslov noted, BLAKE2s is able to produce hashes of any size
> 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 just
double checked: And in fact both implementations use 32-byte Blake2s
digest sizes...

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".

-Toke