Re: [Ietf-krb-wg] CF2 test vectors for DES and 3DES

Tom Yu <tlyu@MIT.EDU> Mon, 04 May 2009 22:25 UTC

Return-Path: <ietf-krb-wg-bounces@lists.anl.gov>
X-Original-To: ietfarch-krb-wg-archive@core3.amsl.com
Delivered-To: ietfarch-krb-wg-archive@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id B9BF43A6822 for <ietfarch-krb-wg-archive@core3.amsl.com>; Mon, 4 May 2009 15:25:31 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.843
X-Spam-Level:
X-Spam-Status: No, score=-3.843 tagged_above=-999 required=5 tests=[AWL=-1.244, 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 4P-01Z09nh6P for <ietfarch-krb-wg-archive@core3.amsl.com>; Mon, 4 May 2009 15:25:23 -0700 (PDT)
Received: from mailhost.anl.gov (mailhost.anl.gov [130.202.113.50]) by core3.amsl.com (Postfix) with ESMTP id 628CF3A687F for <krb-wg-archive@lists.ietf.org>; Mon, 4 May 2009 15:25:23 -0700 (PDT)
Received: from mailhost.anl.gov (mailhost.anl.gov [130.202.113.50]) by localhost.ctd.anl.gov (Postfix) with ESMTP id E63305D; Mon, 4 May 2009 17:26:48 -0500 (CDT)
Received: from lists.anl.gov (katydid.it.anl.gov [146.137.96.32]) by mailhost.anl.gov (Postfix) with ESMTP id 9610A59; Mon, 4 May 2009 17:26:42 -0500 (CDT)
Received: from katydid.it.anl.gov (localhost [127.0.0.1]) by lists.anl.gov (Postfix) with ESMTP id 834FC80DFD; Mon, 4 May 2009 17:26:42 -0500 (CDT)
X-Original-To: ietf-krb-wg@lists.anl.gov
Delivered-To: ietf-krb-wg@lists.anl.gov
Received: from mailhost.anl.gov (mailhost.anl.gov [130.202.113.50]) by lists.anl.gov (Postfix) with ESMTP id C493F80DF1 for <ietf-krb-wg@lists.anl.gov>; Mon, 4 May 2009 17:26:40 -0500 (CDT)
Received: by mailhost.anl.gov (Postfix) id B5C0156; Mon, 4 May 2009 17:26:40 -0500 (CDT)
Delivered-To: ietf-krb-wg@anl.gov
Received: from mailhost.anl.gov (mailhost.anl.gov [130.202.113.50]) by localhost.ctd.anl.gov (Postfix) with ESMTP id B114259 for <ietf-krb-wg@anl.gov>; Mon, 4 May 2009 17:26:40 -0500 (CDT)
Received: from mailrelay.anl.gov (mailrelay.anl.gov [130.202.101.22]) by mailhost.anl.gov (Postfix) with ESMTP id 9327D56 for <ietf-krb-wg@anl.gov>; Mon, 4 May 2009 17:26:40 -0500 (CDT)
Received: from localhost (localhost [127.0.0.1]) by localhost.it.anl.gov (Postfix) with ESMTP id 79FC77CC0C0; Mon, 4 May 2009 17:26:40 -0500 (CDT)
Received: from mailrelay.anl.gov ([127.0.0.1]) by localhost (mailrelay.anl.gov [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 10173-08; Mon, 4 May 2009 17:26:40 -0500 (CDT)
Received: from mailgateway.anl.gov (mailgateway.anl.gov [130.202.101.28]) by mailrelay2.anl.gov (Postfix) with ESMTP id 547BF7CC084 for <ietf-krb-wg@anl.gov>; Mon, 4 May 2009 17:26:40 -0500 (CDT)
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: Aq8CAFcI/0kSBwdQkWdsb2JhbACWbAEBAQEJCwoHEQWod4YoiE6DfQWIBQ
X-IronPort-AV: E=Sophos;i="4.40,293,1238994000"; d="scan'208";a="26635480"
Received: from biscayne-one-station.mit.edu ([18.7.7.80]) by mailgateway.anl.gov with ESMTP; 04 May 2009 17:26:39 -0500
Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103]) by biscayne-one-station.mit.edu (8.13.6/8.9.2) with ESMTP id n44MQcZb010287; Mon, 4 May 2009 18:26:38 -0400 (EDT)
Received: from cathode-dark-space.mit.edu (CATHODE-DARK-SPACE.MIT.EDU [18.18.1.96]) (authenticated bits=56) (User authenticated as tlyu@ATHENA.MIT.EDU) by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id n44MQbh0020034 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Mon, 4 May 2009 18:26:37 -0400 (EDT)
Received: (from tlyu@localhost) by cathode-dark-space.mit.edu (8.12.9.20060308) id n44MQb4x017090; Mon, 4 May 2009 18:26:37 -0400 (EDT)
To: Sam Hartman <hartmans-ietf@mit.edu>
References: <tsl63gl7ujg.fsf@mit.edu> <ldvljpg8p1o.fsf@cathode-dark-space.mit.edu> <tsly6tcwu58.fsf@mit.edu>
From: Tom Yu <tlyu@MIT.EDU>
Date: Mon, 04 May 2009 18:26:37 -0400
In-Reply-To: <tsly6tcwu58.fsf@mit.edu> (Sam Hartman's message of "Mon, 04 May 2009 15:22:11 -0400")
Message-ID: <ldv8wlc4i8y.fsf@cathode-dark-space.mit.edu>
Lines: 42
MIME-Version: 1.0
X-Scanned-By: MIMEDefang 2.42
X-Virus-Scanned: Debian amavisd-new at frigga.it.anl.gov
Cc: ietf-krb-wg@anl.gov
Subject: Re: [Ietf-krb-wg] CF2 test vectors for DES and 3DES
X-BeenThere: ietf-krb-wg@lists.anl.gov
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: "This is a list for the IETF Kerberos Working Group. {WORLDPUB, EXTERNAL}" <ietf-krb-wg.lists.anl.gov>
List-Unsubscribe: <https://lists.anl.gov/mailman/options/ietf-krb-wg>, <mailto:ietf-krb-wg-request@lists.anl.gov?subject=unsubscribe>
List-Archive: <https://lists.anl.gov/pipermail/ietf-krb-wg>
List-Post: <mailto:ietf-krb-wg@lists.anl.gov>
List-Help: <mailto:ietf-krb-wg-request@lists.anl.gov?subject=help>
List-Subscribe: <https://lists.anl.gov/mailman/listinfo/ietf-krb-wg>, <mailto:ietf-krb-wg-request@lists.anl.gov?subject=subscribe>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: ietf-krb-wg-bounces@lists.anl.gov
Errors-To: ietf-krb-wg-bounces@lists.anl.gov

Sam Hartman <hartmans-ietf@MIT.EDU> writes:

>>>>>> "Tom" == Tom Yu <tlyu@MIT.EDU> writes:
>
>     Tom> Sam Hartman <hartmans-ietf@MIT.EDU> writes:
>     >> Folks, there seems to be yet another inconsistency between RFC
>     >> 3961 and MIT regarding DES and presumably 3DES random2key
>     >> operations.
>     >> 
>     >> MIT assumes that DES random bit strings are 7 byte strings that
>     >> are expanded with parity bits.  The RFC 3961 spec assumes that
>     >> you take an eight byte string and do parity fix-up.
>
>     Tom> Actually, spec assumes both.  RFC 3961 says des-cbc-md5 uses
>     Tom> des_random_to_key, but des-cbc-md4 and des-cbc-crc use
>     Tom> copy-8-bytes-and-fix-parity.  It does say that the key
>     Tom> generation seed length is 8 bytes for all three, which is
>     Tom> inconsistent with the use of des_random_to_key (which takes
>     Tom> 56 bits as input).  I suspect a copy-and-paste error.
>
> OK, but the MIT code is still inconsistent with the spec.
> We seem to do the same for all the DES enctypes.

RFC 3961 section 6.2:

   For generation of a key from a random bitstring, we start with a 56-
   bit string and, as with the string-to-key operation above, insert
   parity bits.  If the result is a weak or semi-weak key, we modify it
   by eXclusive-OR with the constant 0x00000000000000F0:

        des_random_to_key(bitstring) {
             return key_correction(add_parity_bits(bitstring));
        }

I think it is fairly clear that the intent was to use
des_random_to_key as the random-to-key function for all single-DES
enctypes, and the tables defining the individual single-DES enctypes
were not updated to be consistent with that intent.  This is also
consistent with the use of this operation as a component of the
single-DES string_to_key function.

Ken, do you remember the intent of this section?
_______________________________________________
ietf-krb-wg mailing list
ietf-krb-wg@lists.anl.gov
https://lists.anl.gov/mailman/listinfo/ietf-krb-wg