Return-Path: <owner-ips@ece.cmu.edu>
X-Sieve: cmu-sieve 2.0
Return-Path: <owner-ips@ece.cmu.edu>
Received: (from majordom@localhost)
	by ece.cmu.edu (8.11.0/8.10.2) id h2DLQeJ04675
	for ips-outgoing; Thu, 13 Mar 2003 16:26:40 -0500 (EST)
X-Authentication-Warning: ece.cmu.edu: majordom set sender to owner-ips@ece.cmu.edu using -f
Received: from homer.qlogic.org ([198.70.192.130])
	by ece.cmu.edu (8.11.0/8.10.2) with ESMTP id h2DLQaM04671
	for <ips@ece.cmu.edu>; Thu, 13 Mar 2003 16:26:37 -0500 (EST)
X-MimeOLE: Produced By Microsoft Exchange V6.0.6249.0
content-class: urn:content-classes:message
Subject: CHAP secret lengths
Date: Thu, 13 Mar 2003 13:27:56 -0800
MIME-Version: 1.0
Content-Type: text/plain;
	charset="iso-8859-1"
Message-ID: <2A8D600C919D2D41A3DAA2D2FEC717143871FB@homer.qlogic.org>
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
Thread-Topic: CHAP secret lengths
Thread-Index: AcLppwlEXvOXaVSJEdeLMwBQ2thomQ==
From: "Dean Scoville" <dean.scoville@qlogic.com>
To: <Julian_Satran@il.ibm.com>
Cc: <ips@ece.cmu.edu>
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from quoted-printable to 8bit by ece.cmu.edu id h2DLQbM04672
Sender: owner-ips@ece.cmu.edu
Precedence: bulk

Julian,

The MD5 algorithm (RFC 1321) can encode messages that are
comprised of an arbitrary number of bits, and as such the 
message length need not be a multiple of 8-bits.

The CHAP RFC (RFC 1994) describes the CHAP Response 
value as being a one-way hash calculated over a stream of octets,
consisting of the Identifier, followed by (concatenated with) the 
"secret",  followed by (concatenated with) the Challenge Value.

This would lead me to believe that the CHAP secret must be an
integral number of octets, even though the MD5 algorithm is
capable of encoding messages that are not a multiple of 8-bits
and even though the iSCSI draft uses units of "bits" (96 random
bits, 128 bit random secrets, etc.) when referring to acceptable
CHAP secret lengths.

Can we assume that CHAP secrets will always be a multiple of 8-bits?
If not, do we need to pad the secret to a multiple of 8-bits (using
0's as pad bits, perhaps?) before concatenating it with the Identifier
and Challenge values and running the result through the MD5 algorithm?

thanks,
Dean Scoville


