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

Toke Høiland-Jørgensen <toke@toke.dk> Thu, 26 November 2020 10:26 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 1B6533A1057 for <babel@ietfa.amsl.com>; Thu, 26 Nov 2020 02:26:38 -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 iAmgJTW-9O-Y for <babel@ietfa.amsl.com>; Thu, 26 Nov 2020 02:26:35 -0800 (PST)
Received: from mail.toke.dk (mail.toke.dk [IPv6:2a0c:4d80:42:2001::664]) (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 75ECB3A1056 for <babel@ietf.org>; Thu, 26 Nov 2020 02:26:34 -0800 (PST)
From: Toke Høiland-Jørgensen <toke@toke.dk>
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=toke.dk; s=20161023; t=1606386390; bh=FMR9ggIpLibq0s3Sga0I2Az8QyJlRKczWdR5lFkXKaI=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=W+O9zbR/sZF8vrrLz1weat3Izc3pBnnDnp0OSRpwO4407BoK+/PJj1Mal6Mbi7ecT 2mLh4TXowefKlefoHaAHm+EfW7864KKgPIgBkP57d+5AHzHG9UTcwjXVbHdGaxe9Dt acchUJkyHxpdARQxcLXqIUGXgD5UVv5oboJqgrGubhdQAwp9UX87HKN3iC1EwY/gQI nASyR+gi5sn6m5XzJJIUb9DDj5+cq/eqm3wkvdHMxOieLTLOUS8/umYXGMuH6NwBbB 6F2XWfvGeyhLH/XY0XEQga0ZjH48vPi2WUK8gkVPbiHkoycyO1OzsAdnuiEkIMQFHw YI0oejeXNvGOg==
To: Juliusz Chroboczek <jch@irif.fr>
Cc: babel@ietf.org, Valery Smyslov <valery@smyslov.net>
In-Reply-To: <87360xz3yk.wl-jch@irif.fr>
References: <87d00qungk.wl-jch@irif.fr> <87h7q2f6a2.fsf@toke.dk> <87o8jya4jz.wl-jch@irif.fr> <87wnyl4dgi.fsf@toke.dk> <878sazh7ge.wl-jch@irif.fr> <87o8jvylta.fsf@toke.dk> <87o8jomjfb.fsf@toke.dk> <87360xz3yk.wl-jch@irif.fr>
Date: Thu, 26 Nov 2020 11:26:29 +0100
X-Clacks-Overhead: GNU Terry Pratchett
Message-ID: <87ft4wl8h6.fsf@toke.dk>
MIME-Version: 1.0
Content-Type: text/plain
Archived-At: <https://mailarchive.ietf.org/arch/msg/babel/eVizTacvFNqLozLQdBdKqiIzj6o>
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: Thu, 26 Nov 2020 10:26:38 -0000

Juliusz Chroboczek <jch@irif.fr> writes:

>> This does raise one question, though (as I just found out while
>> implementing the option for a 128-bit version): How does this impact the
>> recommendations for key size?
>
> I suggest that they remain the same (SHOULD be 32 bytes).
>
> The digest size impacts the overhead carried by every packet.  Not so the
> key size: increasing the key size is essentially free.  As a matter of
> fact, Blake2s will pad the key with zeroes before it is used.
>
> Thus:
>
>   - allowing shorter keys gains no generality (the user may achieve the
>     same result by padding with zeroes before passing the key to Blake2s);
>
>   - disallowing shorter keys causes confusion (by using a value different
>     from both HMAC-SHA-256 and the Blake2s maximum), and has no measurable
>     benefits.
>
> I do not believe that it impacts the security in any way (2^128 ns is
> roughly 10^12 times the age of the universe), but I could be wrong.

Yeah, makes sense, let's keep it at 32 bytes :)

-Toke