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

Toke Høiland-Jørgensen <toke@toke.dk> Mon, 30 November 2020 23: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 8B7623A125F for <babel@ietfa.amsl.com>; Mon, 30 Nov 2020 15:26:18 -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 FVyLI8SRfCDz for <babel@ietfa.amsl.com>; Mon, 30 Nov 2020 15:26:16 -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 B5F3D3A1263 for <babel@ietf.org>; Mon, 30 Nov 2020 15:26:15 -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=1606778769; bh=Qx8wfA4v4zv+HpPdoppchHbXK18ywhOXiK19ybpdGaY=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=O/bzJR1oGxhDcytbqyPeSELb0zEpnyxhg9FaPX9TKjYF5BxsqBHN+A3lWgpRxVEsv X/dzSULRZ9onDRkvaq6O8L33ISEKpBBQs8kT/+9XgeP2a8Y02s6yXfahX3H9rhX10a ipbiTfxyxplaIrB191jF0WAJOqt+T6fndHp7Tfq3H7A1GVdpxOnEl4gQ0aJ7WJzg1U A0RXgDcw0BYSswqU4w1P8xU5EPqNwM8NMLam0AoQsJPSJzw6CiHFvowAbog6hig5jo o9mql0keO3D3USjv5g7xT9rScEodpQN10BhIzSNNf8N/ydnJfhUGTLv9ACihGUPe58 fP4zBnmS3B5RQ==
To: "STARK, BARBARA H" <bs7652@att.com>, 'Juliusz Chroboczek' <jch@irif.fr>
Cc: 'Valery Smyslov' <valery@smyslov.net>, "'babel@ietf.org'" <babel@ietf.org>
In-Reply-To: <SN6PR02MB4512897B1B29744C68D02A46C3F50@SN6PR02MB4512.namprd02.prod.outlook.com>
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> <87ft4wl8h6.fsf@toke.dk> <SN6PR02MB4512897B1B29744C68D02A46C3F50@SN6PR02MB4512.namprd02.prod.outlook.com>
Date: Tue, 01 Dec 2020 00:26:09 +0100
X-Clacks-Overhead: GNU Terry Pratchett
Message-ID: <87k0u2whny.fsf@toke.dk>
MIME-Version: 1.0
Content-Type: text/plain
Archived-At: <https://mailarchive.ietf.org/arch/msg/babel/K1zfci1TWXh6d1sqUYp4eqyiIDQ>
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: Mon, 30 Nov 2020 23:26:26 -0000

"STARK, BARBARA H" <bs7652@att.com> writes:

> Just to confirm (because assuming is bad)...
>
>> >> 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 :)
>
> ... this means that other than changing "BLAKE2s" to "BLAKE2s-128" (consistent
> with the list of "possible values" change), no other change is needed to the text 
> in info model re BLAKE2s key length:
>
>       If the algorithm is "BLAKE2s-128",
>       the length MUST be between 0 and 32 bytes inclusive, as described
>       in [RFC7693].

AFAICT, you are quite right! :)

-Toke