RE: A New Triple-DES Key Wrap Algorithm

"Jim Schaad (Exchange)" <jimsch@EXCHANGE.MICROSOFT.com> Tue, 23 February 1999 04:05 UTC

Received: (from majordomo@localhost) by mail.proper.com (8.8.8/8.8.5) id UAA06279 for ietf-smime-bks; Mon, 22 Feb 1999 20:05:27 -0800 (PST)
Received: from dfssl.exchange.microsoft.com (dfssl.exchange.microsoft.com [131.107.88.59]) by mail.proper.com (8.8.8/8.8.5) with ESMTP id UAA06252 for <ietf-smime@imc.org>; Mon, 22 Feb 1999 20:05:22 -0800 (PST)
Received: by dfssl.exchange.microsoft.com with Internet Mail Service (5.5.2448.0) id <FPK0GMG8>; Mon, 22 Feb 1999 19:45:46 -0800
Message-ID: <2FBF98FC7852CF11912A0000000000010ECB5D20@DINO>
From: "Jim Schaad (Exchange)" <jimsch@EXCHANGE.MICROSOFT.com>
To: 'Russ Housley' <housley@spyrus.com>, ietf-smime@imc.org
Cc: burt@RSA.COM, djohnson@certicom.ca, schneier@counterpane.com, denny@tis.com, denning@cs.cosc.georgetown.edu, omura@cylink.com, mhetzel@bell-labs.com, Josh Benaloh <benaloh@microsoft.com>, brickell@certco.com, smatyas@us.ibm.com, paulv@entrust.com, merkle@parc.xerox.com, berson@anagram.com, desmedt@uwm.edu, rivest@theory.lcs.mit.edu, carlisle.adams@entrust.com, ams@terisa.com, ekr@rtfm.com, Blake.greenlee@greenlee.com, cme@ACM.ORG, "Barb Fox (Exchange)" <bfox@EXCHANGE.MICROSOFT.com>, acc@tycho.ncsc.mil, bschanni@BayNetworks.com, dickie@EMPIRE.eclipse.ncsc.mil, jhs@tycho.ncsc.mil, jis@mit.edu, pcain@bbn.com, kent@bbn.com, BSnow@radium.ncsc.mil, cjwagne@missi.ncsc.mil, balenson@tis.com, balenson@tis.com, jlinn@securitydynamics.com, smid@csmes.ncsl.nist.gov, daw@cs.berkeley.edu
Subject: RE: A New Triple-DES Key Wrap Algorithm
Date: Sat, 20 Feb 1999 18:26:11 -0800
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2448.0)
Content-Type: text/plain; charset="windows-1252"
Sender: owner-ietf-smime@imc.org
Precedence: bulk
List-Archive: <http://www.imc.org/ietf-smime/mail-archive/>
List-Unsubscribe: <mailto:ietf-smime-request@imc.org?body=unsubscribe>

I agree with the amount of time that it takes to implement with a good
library.  It took me about 1.5 hours, but I was listing to A Prairie Home
Companion rather than watching a Jimmy Stewart movie.

The most difficult part of the process was convencing my decode routines
that PKCS#1 padding was not required to exist on the object.

Before you start producing test vectors, I want to see the expansion of the
algorithm to deal with the problems of encryption key material which does
not pad out to 8 byte boundries. What are you planning to do with lengths or
known padding for doing 40-bit RC2 keys.

jim


-----Original Message-----
From: Russ Housley [mailto:housley@spyrus.com]
Sent: Saturday, February 20, 1999 1:18 PM
To: ietf-smime@imc.org

All:

Right now, I am leaning toward the double encryption wrap algorithm.  I
think it will be easy to implement, and it yeilds a shorter result that the
OAEP method.  To convince myself that it was easy to implement, I did an
implementation.  It took me about two hours while watching an old Jimmy
Stewart movie.  Of course, I already have SHA-1 and Triple-DES CBC
routines.  S/MIME v3 will require these algorithms for other capabilities
besides key wrapping.

If someone else is willing to do an implementation, I would like to compare
results.  This will allow a test vector to be included with the algorithm
description.

Does anyone have any strong objections to the double encryption wrap
algorithm being selected?

Russ


>WRAP ALOGRITHM #1:  DOUBLE ENCRYPTION
>
>Key Checksum
>
>The CMS Checksum Algorithm is used to provide an content-encryption key
>integrity check value.  The algorithm is:
>
>1.  Compute a 20 octet SHA-1 message digest on the 
>    content-encryption key.
>2.  Use the most significant (first) eight octets of the 
>    message digest value as the checksum value.
>
>Triple-DES Key Wrap
>
>1.  Set odd parity for each of the DES key octets comprising 
>    the content-encryption key, call the result CEK.
>2.  Compute a 8 octet key checksum value on CEK as described above,
>    call the result ICV.
>3.  Let CEKICV = CEK || ICV.
>4.  Encrypt CEKICV in CBC mode using the key-encryption key.  Use
>    an IV of 0xc302e3c1ad8bb738.
>5.  Reverse the order of the ciphertext octets.  That is, the most
>    significant (first) octet is swapped with the least significant
>    (last) octet, and so on.  Call the result TEMP.
>6.  Encrypt TEMP in CBC mode using the key-encryption key.  Use 
>    an IV of 0x61a197e5b132e196.  The ciphertext is 32 octets long.