Re: [babel] hmac info model elements

Toke Høiland-Jørgensen <toke@toke.dk> Mon, 07 January 2019 19:11 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 04884131006 for <babel@ietfa.amsl.com>; Mon, 7 Jan 2019 11:11:49 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.001
X-Spam-Level:
X-Spam-Status: No, score=-2.001 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, SPF_PASS=-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 f9-n0x4VcWNw for <babel@ietfa.amsl.com>; Mon, 7 Jan 2019 11:11:46 -0800 (PST)
Received: from mail.toke.dk (mail.toke.dk [52.28.52.200]) (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 A8F1412426E for <babel@ietf.org>; Mon, 7 Jan 2019 11:11:46 -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=1546888303; bh=phbuvLDKJ9u/1khEDECbCXGy1WjT6ExU2oxwSPRMZ7s=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=CzCs6PEfVG7EBvxZ94fsGanWWD3IXNJ5Wg1y8ouTk/WbKU1KPkFuIAi75HreM4etX ChEiz4U9IfQqFrXu3r61tHro4TZf/7RxoR+bb/RRTWmsypXKU8O/uYLhCBZP+1kyeq u39f7HbQ46XSWy0LlstqWoqs2SE/FG9a7qce6EcsaoK3qrI2w8dvuipAp2jp1tEKpl 4NcDgukZjr0RCRzwiegnlo5S8qEhxcB/QvI1/mpQPb+qWwui7q7Ll9kk6ysbmFcaq5 n4+lNm8mLAtUTdJ+fvOGK5Ht1awJfB7dgTOCMcGXcwLoKQvHScp0sp9X7oPmrQldah Vf73RdSJzEeDw==
To: Dave Taht <dave.taht@gmail.com>
Cc: "STARK, BARBARA H" <bs7652@att.com>, Juliusz Chroboczek <jch@irif.fr>, Mahesh Jethanandani <mjethanandani@gmail.com>, Babel at IETF <babel@ietf.org>
In-Reply-To: <CAA93jw6QR4_035Q7c44hg+gQaG-9riBj5uDbo=0ahxXBwVFG6g@mail.gmail.com>
References: <2D09D61DDFA73D4C884805CC7865E6114DF7EECB@GAALPA1MSGUSRBF.ITServices.sbc.com> <91CABBA9-DFC0-48C5-9A36-E2B12FC376D9@gmail.com> <2D09D61DDFA73D4C884805CC7865E6114DF8354B@GAALPA1MSGUSRBF.ITServices.sbc.com> <87tvio2i9l.wl-jch@irif.fr> <2D09D61DDFA73D4C884805CC7865E6114DF8669E@GAALPA1MSGUSRBF.ITServices.sbc.com> <87k1jgwhlz.fsf@toke.dk> <CAA93jw6QR4_035Q7c44hg+gQaG-9riBj5uDbo=0ahxXBwVFG6g@mail.gmail.com>
Date: Mon, 07 Jan 2019 20:11:39 +0100
X-Clacks-Overhead: GNU Terry Pratchett
Message-ID: <87ef9owadw.fsf@toke.dk>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
Archived-At: <https://mailarchive.ietf.org/arch/msg/babel/-pMAnL3ZfFcVjh3wW9LZYmAotWU>
Subject: Re: [babel] hmac info model elements
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, 07 Jan 2019 19:11:49 -0000

Dave Taht <dave.taht@gmail.com> writes:

> On Mon, Jan 7, 2019 at 8:35 AM Toke Høiland-Jørgensen <toke@toke.dk> wrote:
>>
>> "STARK, BARBARA H" <bs7652@att.com> writes:
>>
>> > Toke said: "Bird uses an unencoded string..."
>> > <bhs> I'm not sure what "unencoded" means here? But this sounds like
>> > maybe the entered string is a "passphrase" / PSK, like what's used for
>> > Wi-Fi, which is then used to derive the HMAC key using Unicode
>> > encoding?
>>
>> Nope, no derivation, just the raw ASCII bytes from the string used as an
>> HMAC key, zero-padded to the block size. Unless the supplied ASCII
>> string is longer than the block size, in which case it is hashed
>> first.
>
> ^^^^^^ ???? So you are saying an overlong key is transmuted into
> something else entirely, not truncated?

Yup, that would appear to be the case:

https://gitlab.labs.nic.cz/labs/bird/blob/master/lib/mac.c#L105


-Toke