Re: [babel] babel-hmac: key requirements

"STARK, BARBARA H" <bs7652@att.com> Tue, 15 January 2019 21:17 UTC

Return-Path: <bs7652@att.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 79AA9130F13 for <babel@ietfa.amsl.com>; Tue, 15 Jan 2019 13:17:48 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -0.601
X-Spam-Level:
X-Spam-Status: No, score=-0.601 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, KHOP_DYNAMIC=2, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001] autolearn=no autolearn_force=no
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 LGCncuvysPRy for <babel@ietfa.amsl.com>; Tue, 15 Jan 2019 13:17:47 -0800 (PST)
Received: from mx0a-00191d01.pphosted.com (mx0b-00191d01.pphosted.com [67.231.157.136]) (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 2DF97129AA0 for <babel@ietf.org>; Tue, 15 Jan 2019 13:17:47 -0800 (PST)
Received: from pps.filterd (m0049462.ppops.net [127.0.0.1]) by m0049462.ppops.net-00191d01. (8.16.0.22/8.16.0.22) with SMTP id x0FLH4H0033950; Tue, 15 Jan 2019 16:17:46 -0500
Received: from alpi154.enaf.aldc.att.com (sbcsmtp6.sbc.com [144.160.229.23]) by m0049462.ppops.net-00191d01. with ESMTP id 2q1pqnj27r-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 15 Jan 2019 16:17:45 -0500
Received: from enaf.aldc.att.com (localhost [127.0.0.1]) by alpi154.enaf.aldc.att.com (8.14.5/8.14.5) with ESMTP id x0FLHi9w024640; Tue, 15 Jan 2019 16:17:44 -0500
Received: from zlp30488.vci.att.com (zlp30488.vci.att.com [135.47.91.93]) by alpi154.enaf.aldc.att.com (8.14.5/8.14.5) with ESMTP id x0FLHbum024416; Tue, 15 Jan 2019 16:17:37 -0500
Received: from zlp30488.vci.att.com (zlp30488.vci.att.com [127.0.0.1]) by zlp30488.vci.att.com (Service) with ESMTP id 6FC2C4048C37; Tue, 15 Jan 2019 21:17:37 +0000 (GMT)
Received: from GAALPA1MSGHUBAE.ITServices.sbc.com (unknown [130.8.218.154]) by zlp30488.vci.att.com (Service) with ESMTPS id 5DE43405C9AB; Tue, 15 Jan 2019 21:17:37 +0000 (GMT)
Received: from GAALPA1MSGUSRBF.ITServices.sbc.com ([169.254.5.203]) by GAALPA1MSGHUBAE.ITServices.sbc.com ([130.8.218.154]) with mapi id 14.03.0415.000; Tue, 15 Jan 2019 16:17:36 -0500
From: "STARK, BARBARA H" <bs7652@att.com>
To: 'Juliusz Chroboczek' <jch@irif.fr>
CC: Babel at IETF <babel@ietf.org>
Thread-Topic: [babel] babel-hmac: key requirements
Thread-Index: AdSpKuuhWh3uIPf3TSyfFq2fmw6nrABcdjuAAFt168AASoEFAAAIqZ0A
Date: Tue, 15 Jan 2019 21:17:36 +0000
Message-ID: <2D09D61DDFA73D4C884805CC7865E6114DF9E3B4@GAALPA1MSGUSRBF.ITServices.sbc.com>
References: <2D09D61DDFA73D4C884805CC7865E6114DF96321@GAALPA1MSGUSRBF.ITServices.sbc.com> <874laevyy4.wl-jch@irif.fr> <2D09D61DDFA73D4C884805CC7865E6114DF9BFAF@GAALPA1MSGUSRBF.ITServices.sbc.com> <87o98hbt9j.wl-jch@irif.fr>
In-Reply-To: <87o98hbt9j.wl-jch@irif.fr>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-originating-ip: [130.10.215.225]
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-01-15_08:, , signatures=0
X-Proofpoint-Spam-Details: rule=outbound_policy_notspam policy=outbound_policy score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1901150169
Archived-At: <https://mailarchive.ietf.org/arch/msg/babel/d4_EnWijQdPZzCcoaNeMcdbwqlA>
Subject: Re: [babel] babel-hmac: key requirements
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: Tue, 15 Jan 2019 21:17:49 -0000

> > The provided HMAC Key MUST NOT be modified in any way prior to use
> > with the hash algorithm.
> 
> Which draft are we speaking about?  The management draft or the HMAC
> draft?

The HMAC draft. 

>From your comments, it seems that the "HMAC Key" referenced throughout babel-hmac is the exact set of bits used to compute the HMAC. If this is true, then this is an important fact that is not currently obvious from reading the draft. So the HMAC Key that is an input to an implementation of this spec must not be modified by the implementation prior to use.

An implementation of babel-hmac that hashes a provided HMAC Key value longer than the length of the hash must be considered in violation of the babel-hmac spec. Any user interface that accepts input of ASCII characters to generate an HMAC Key must be separate from the babel-hmac implementation. The existence of OSPF key "preparation" rules and the base HMAC RFC rules key preparation rules means the babel-hmac text needs to unambiguously state that such preparation is *not* done to an "HMAC Key" prior to its use in babel-hmac.

This will impose a requirement on the info-model to treat the HMAC Key as a binary field (like the router-id).

BTW, I'm fine with the text you proposed for the security section. But it doesn't solve the problem of ensuring there is no ambiguity regarding non-"preparation" of the key.
Barbara