Re: [tcpm] Review of draft-tcp-mtcp-auth-opt-04

Eric Rescorla <ekr@networkresonance.com> Fri, 20 March 2009 00:09 UTC

Return-Path: <ekr@networkresonance.com>
X-Original-To: tcpm@core3.amsl.com
Delivered-To: tcpm@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id 68A763A6A0B for <tcpm@core3.amsl.com>; Thu, 19 Mar 2009 17:09:01 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.529
X-Spam-Level:
X-Spam-Status: No, score=-2.529 tagged_above=-999 required=5 tests=[AWL=0.070, BAYES_00=-2.599]
Received: from mail.ietf.org ([64.170.98.32]) by localhost (core3.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id NwaoqTCBkOI7 for <tcpm@core3.amsl.com>; Thu, 19 Mar 2009 17:09:00 -0700 (PDT)
Received: from romeo.rtfm.com (romeo.rtfm.com [74.95.2.173]) by core3.amsl.com (Postfix) with ESMTP id 51E8B3A6924 for <tcpm@ietf.org>; Thu, 19 Mar 2009 17:09:00 -0700 (PDT)
Received: from romeo.rtfm.com (localhost.rtfm.com [127.0.0.1]) by romeo.rtfm.com (Postfix) with ESMTP id E345150822 for <tcpm@ietf.org>; Thu, 19 Mar 2009 17:32:41 -0700 (PDT)
Date: Thu, 19 Mar 2009 17:32:41 -0700
From: Eric Rescorla <ekr@networkresonance.com>
To: tcpm@ietf.org
In-Reply-To: <86r60tf31x.wl%ekr@networkresonance.com>
References: <86r60tf31x.wl%ekr@networkresonance.com>
User-Agent: Wanderlust/2.14.0 (Africa) Emacs/21.3 Mule/5.0 (SAKAKI)
MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka")
Content-Type: text/plain; charset="US-ASCII"
Message-Id: <20090320003241.E345150822@romeo.rtfm.com>
Subject: Re: [tcpm] Review of draft-tcp-mtcp-auth-opt-04
X-BeenThere: tcpm@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: TCP Maintenance and Minor Extensions Working Group <tcpm.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/listinfo/tcpm>, <mailto:tcpm-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/tcpm>
List-Post: <mailto:tcpm@ietf.org>
List-Help: <mailto:tcpm-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/tcpm>, <mailto:tcpm-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 20 Mar 2009 00:09:01 -0000

At Thu, 19 Mar 2009 17:31:06 -0700,
Doh. This review was of draft-lebovitz-ietf-tcpm-tcp-ao-crypto-00

A review of auth-opt is forthcoming.
-Ekr


At Thu, 19 Mar 2009 17:31:06 -0700,
Eric Rescorla wrote:
> 
> [Resent from an account that's subscribed.]
> 
> -Ekr
> 
> $Id: draft-lebovitz-ietf-tcpm-tcp-ao-crypto-00-rev.txt,v 1.1 2009/03/19 22:37:19 ekr Exp $
> 
> S 2.1.
> This whole {SHOULD,MUST}{+,-,*,?} thing is a bad idea. It's hard
> enough for developers to understand SHOULD vs. MUST, but now we have 5
> separate options for implementors to understand and us to argue
> over. I don't remember there being WG consensus on this point.
> 
> 
> S 2.2.
> The assignment of HMAC-SHA-1 to MUST- and AES-CMAC to SHOULD+ is
> basically unjustified. There's no good reason to believe that
> HMAC-SHA1 will be broken before AES-CMAC.  This is exactly the
> confusion fostered by the +/- regime.  Make HMAC-SHA1 MUST and
> AES-CMAC SHOULD.
> 
> 
> S 3.
> You repeat the phrase "Each MAC algorithm MUST..." twice.
> 
> 
> S 3.1.
> It's confusing to talk about KDFs having an interface and then
> have the function named "PRF".
> 
> I would rewrite this as:
> 
>      All KDFs used in TCP-AO have the following interface:
>      
>       Derived_Key = KDF(Master_Key, Context, Output_Length)
>      
>      Where these values are defined as.... [blah blah]
> 
> Then:
>      The KDFs defined in this document are all based on pseudorandom
>      functions (PRFs) which take a key and an input and emit a
>      fixed-length pseudorandom value.  Given PRF X, the associated
>      KDF, KDF_X, is constructed as follows:
> 
>      KDF_X(Master_Key, Context, Output_Length) =
>          X(Master_Key, Input)
> 
>      Where Input is constructed as:...
> 
> Where you say that the master key isn't random, that's not quite
> right. The point is not that it doesn't contain high entropy.
> For instance HEX(X) where X is a 128-bit random number has high
> entropy but may or may not be suitable for use keying a MAC
> function.
> 
> This section of the document is pretty confusing about the concept of
> output length. To recap:
> 
> 1. The underlying PRFs have fixed sized output lengths, 128 bits in the
>    case of AES-CMAC, 160 bits in the case of HMAC-SHA1.
> 2. It is possible to generate an arbitrary number of output bits with
>    a given PRF by operating it in a feedback or counter mode.
>    The FIPS-whatever KDFs incorporate this feature, hence the 
>    leading "0".
> 3. Each MAC needs a key of a specific length.
> 4. Not totally uncoincidentally, the KDFs we have chosen to use with
>    each MAC happen to generate the right key size for use with the
>    MAC, thus avoiding the need for the procedure in (2).
> 5. If you wanted to use these KDFs with a MAC requiring a longer key
>    (e.g., HMAC-SHA-256) you would, however need to use the procedure.
> 6. For some reason, the FIPS-whatever KDFs seem to think it's
>    a useful idea to mix the desired number of bits produced by the
>    KDF into the KDF input. I don't see the point of this, but 
>    whatever.
> 
> You'll note that the PRF does not need to be parametrized in terms
> of output length. It's fixed. 
> 
> IMO, this could be a lot clearer.
> 
> S 3.1.1.
> Is this an ASCII 0 (0x30) or a NUL (0x00)
> 
> 
> S 3.1.2.
> It's pretty unclear what problem you're trying to solve here. I would
> write:
> 
> RFC 4615 is designed to take an arbitrary length key but for any
> key length other than 128 bits, whitens it by first computing an
> AES-CMAC with key 0. Because the keys in use with TCP-AO will
> likely be arbitrary-length ASCII strings, TCP AO always performs
> this whitening step even if the key happens to be 16 bytes long.
> In other words, using the terminology of RFC 4615:
> 
>    K = AES-CMAC(0^128, MK, MKlen)
> 
> 
> S 4.
> This UI labels section should be entirely removed. As far as I know,
> there was never WG consensus to include it and it just creates
> extra confusion. In AO, the MAC completely defines the KDF, so
> the concept of suites just adds an extra name. Moreover, since
> MACs have obvious names and the suites have opaque, confusing names,
> this is doubly bad.
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
>