Network Working Group                                            A. Kato
Internet-Draft                                                  S. Kanno
Intended status: Standards Track                NTT Software Corporation
Expires: March 13, July 8, 2010                                           M. Kanda
                                                                     NTT
                                                       September 9, 2009
                                                         January 4, 2010

The Use of Galois/Counter Mode (GCM) Modes of Operation for the Camellia and
                           Its Use Block Cipher With
                               IPsec
                    draft-kato-ipsec-camellia-gcm-02 ESP
                    draft-kato-ipsec-camellia-gcm-03

Abstract

   This document describes the use of the Camellia block ciper algorithm
   in Galois/Counter Mode (GCM) as an IPsec Encapsulating Security
   Payload (ESP) mechanism to provide confidentiality and data origin
   authentication.

Status of this Memo

   This Internet-Draft is submitted to IETF in full conformance with the
   provisions of BCP 78 and BCP 79.  This document may contain material
   from IETF Documents or IETF Contributions published or made publicly
   available before November 10, 2008.  The person(s) controlling the
   copyright in some of this material may not have granted the IETF
   Trust the right to allow modifications of such material outside the
   IETF Standards Process.  Without obtaining an adequate license from
   the person(s) controlling the copyright in such materials, this
   document may not be modified outside the IETF Standards Process, and
   derivative works of it may not be created outside the IETF Standards
   Process, except to format it for publication as an RFC or to
   translate it into languages other than English.

   Internet-Drafts are working documents of the Internet Engineering
   Task Force (IETF), its areas, and its working groups.  Note that
   other groups may also distribute working documents as Internet-
   Drafts.

   Internet-Drafts are draft documents valid for a maximum of six months
   and may be updated, replaced, or obsoleted by other documents at any
   time.  It is inappropriate to use Internet-Drafts as reference
   material or to cite them other than as "work in progress."

   The list of current Internet-Drafts can be accessed at
   http://www.ietf.org/ietf/1id-abstracts.txt.

   The list of Internet-Draft Shadow Directories can be accessed at
   http://www.ietf.org/shadow.html.

   This Internet-Draft will expire on March 13, July 8, 2010.

Copyright Notice

   Copyright (c) 2009 2010 IETF Trust and the persons identified as the
   document authors.  All rights reserved.

   This document is subject to BCP 78 and the IETF Trust's Legal
   Provisions Relating to IETF Documents
   (http://trustee.ietf.org/license-info) in effect on the date of
   publication of this document (http://trustee.ietf.org/license-info). document.  Please review these documents
   carefully, as they describe your rights and restrictions with respect
   to this document.

Abstract  Code Components extracted from this document must
   include Simplified BSD License text as described in Section 4.e of
   the Trust Legal Provisions and are provided without warranty as
   described in the BSD License.

   This document describes may contain material from IETF Documents or IETF
   Contributions published or made publicly available before November
   10, 2008.  The person(s) controlling the use copyright in some of this
   material may not have granted the Camellia block ciper algorithm IETF Trust the right to allow
   modifications of such material outside the IETF Standards Process.
   Without obtaining an adequate license from the person(s) controlling
   the copyright in Galois/Counter Mode (GCM) such materials, this document may not be modified
   outside the IETF Standards Process, and derivative works of it may
   not be created outside the IETF Standards Process, except to format
   it for publication as an IPsec Encapsulating Security
   Payload (ESP) mechanism RFC or to provide confidentiality and data origin
   authentication. translate it into languages other
   than English.

Table of Contents

   1.  Introduction . . . . . . . . . . . . . . . . . . . . . . . . .  4
     1.1.  Terminology  . . . . . . . . . . . . . . . . . . . . . . .  4
   2.  Camelllia-GCM  . . . . . . . . . . . . . . . . . . . . . . . .  5
   3.  IKE Conventions  . . . . . . . . . . . . . . . . . . . . . . .  6
     3.1.  Keying Material and Salt Values  . . . . . . . . . . . . .  6
     3.2.  Phase 1 Identifier . . . . . . . . . . . . . . . . . . . .  6
     3.3.  Phase 2 Identifier . . . . . . . . . . . . . . . . . . . .  6
     3.4.  Key Length Attribute . . . . . . . . . . . . . . . . . . .  7  6
   4.  Test Vectors Vector  . . . . . . . . . . . . . . . . . . . . . . . . .  8  7
   5.  Security Considerations  . . . . . . . . . . . . . . . . . . . 12 11
   6.  IANA Considerations  . . . . . . . . . . . . . . . . . . . . . 13 12
   7.  Acknowledgments  . . . . . . . . . . . . . . . . . . . . . . . 14 13
   8.  References . . . . . . . . . . . . . . . . . . . . . . . . . . 15 14
     8.1.  Normative  . . . . . . . . . . . . . . . . . . . . . . . . 15 14
     8.2.  Informative  . . . . . . . . . . . . . . . . . . . . . . . 15 14
   Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 16 15

1.  Introduction

   This document describes the use of the Camellia block cipher
   algorithm in the GCM Mode (Camellia-GCM) , (Galois/Counter Mode) [2], is called Camellia-
   GCM, as an IPsec ESP mechanism to provide confidentiality, confidentiality and data
   origin authentication.  We refer to this method as Camellia-GCM-ESP.

   The Camellia algorithm specification and object identifiers its properties are described in [5].

   GCM mode provides Counter mode (CTR) encryption with data origin
   authentication.  This document does not cover implementation details
   of GCM.  Those details can be found in [1]. [2].

1.1.  Terminology

   The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
   "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
   document are to be interpreted as described in [3]. [1].

2.  Camelllia-GCM

   Camellia-GCM comply complies with [2] on [3] in the following points:

         - ESP Payload Data
         - Initialization Vector
         - Cipher text
         - Nonce Format
         - AAD Construction
         - Integrity Check Value
         - Packet Expansion

3.  IKE Conventions

   This section describes the conventions used to generate keying
   material and salt values, values for use with Camellia-GCM-ESP, using the
   Internet Key Exchange (IKE) version 2 (IKEv2) [4] protocol.  The
   identifiers and attributes needed to negotiate a security association
   using Camellia-
   GCM-ESP Camellia-GCM-ESP are also defined.

   This applies to the use of any authenticated encryption algorithm
   with the IKEv2 Encrypted Payload and is unique to that usage.

   IKEv2 [4] specifies that both an encryption algorithm and an
   integrity checking algorithm are required for an IKE SA (Security
   Association).

3.1.   Keying Material and Salt Values

   IKE makes use of a pseudo-random function (PRF) to derive keying
   material.  The PRF is used iteratively to derive keying material of
   arbitrary size, called KEYMAT.  Keying material is extracted from the
   output string without regard to boundaries.

   The size of the KEYMAT for the Camellia-GCM-ESP MUST be four octets
   longer than is needed for the associated Camellia key.  The keying
   material is used as follows:

   Camellia-GCM-ESP with a 128 bit key
      The KEYMAT requested for each Camellia-GCM key is 20 octets.  The
      first 16 octets are the 128-bit Camellia key, and the remaining
      four octets are used as the salt value in the nonce.

    Camellia-GCM-ESP with a 192 bit key
      The KEYMAT requested for each Camellia-GCM key is 28 octets.  The
      first 24 octets are the 192-bit Camellia key, and the remaining
      four octets are used as the salt value in the nonce.

   Camellia-GCM-ESP with a 256 bit key
      The KEYMAT requested for each Camellia GCM key is 36 octets.  The
      first 32 octets are the 256-bit Camellia key, and the remaining
      four octets are used as the salt value in the nonce.

3.2.  Phase 1 Identifier

   This document does not specify the conventions for using Camellia-GCM
   for IKE Phase 1 negotiations.  For Camellia-GCM to be used in this
   manner, a separate specification is needed, and an Encryption
   Algorithm Identifier needs to be assigned.  Implementations SHOULD
   use an IKE Phase 1 cipher that is at least as strong as Camellia-GCM.
   The use of Camellia CBC [6] with the same key size used by Camellia-
   GCM-ESP is RECOMMENDED.

3.3.  Phase 2 Identifier

   For IKE Phase 2 negotiations, IANA has assigned three ESP Transform
   Identifiers for Camellia-GCM with an eight-byte explicit IV:

         <TBD1> for Camellia-GCM with an 8 octet ICV;
         <TBD2> for Camellia-GCM with a 12 octet ICV; and
         <TBD3> for Camellia-GCM with a 16 octet ICV.

3.4.  Key Length Attribute

   Because the Camellia supports three key lengths, the Key Length
   attribute MUST be specified in the IKE Phase 2 exchange IKEv2 [4].  The Key Length
   attribute MUST have a value of 128, 192, or 256.

4.  Test Vectors Vector

   This section contains 18 test vectors(TV), vectors, which can be used to confirm
   that an implementation has correctly implemented Camellia-
   GCM. Camellia-GCM.

  ------ Spec Test Case 1 (Camellia-128) ------
  KEY : 00000000000000000000000000000000
  IV  : 000000000000000000000000
  T   : f5574acc3148dfcb9015200631024df9

  ------ Spec Test Case 2 (Camellia-128) ------
  KEY : 00000000000000000000000000000000
  IV  : 000000000000000000000000
  P   : 00000000000000000000000000000000
  C   : defe3e0b5c54c94b4f2a0f5a46f6210d
  T   : f672b94d192266c7c8c8dbb427cc989a

  ------ Spec Test Case 3 (Camellia-128) ------
  KEY : feffe9928665731c6d6a8f9467308308
  IV  : cafebabefacedbaddecaf888
  P   : d9313225f88406e5a55909c5aff5269a86a7a9531534f7da2e4c303d8a318a72
        1c3c0c95956809532fcf0e2449a6b525b16aedf5aa0de657ba637b391aafd255
  C   : d0d94a13b632f337a0cc9955b94fa020c815f903aab12f1efaf2fe9d90f729a6
        cccbfa986ef2ff2c33de418d9a2529091cf18fe652c1cfde13f8260614bab815
  T   : 86e318012dd8329dc9dae6a170f61b24

  ------ Spec Test Case 4 (Camellia-128) ------
  KEY : feffe9928665731c6d6a8f9467308308
  IV  : cafebabefacedbaddecaf888
  AD  : feedfacedeadbeeffeedfacedeadbeefabaddad2
  P   : d9313225f88406e5a55909c5aff5269a86a7a9531534f7da2e4c303d8a318a72
        1c3c0c95956809532fcf0e2449a6b525b16aedf5aa0de657ba637b39
  C   : d0d94a13b632f337a0cc9955b94fa020c815f903aab12f1efaf2fe9d90f729a6
        cccbfa986ef2ff2c33de418d9a2529091cf18fe652c1cfde13f82606
  T   : 9f458869431576ea6a095456ec6b8101

  ------ Spec Test Case 5 (Camellia-128) ------
  KEY : feffe9928665731c6d6a8f9467308308
  IV  : cafebabefacedbad
  AD  : feedfacedeadbeeffeedfacedeadbeefabaddad2
  P   : d9313225f88406e5a55909c5aff5269a86a7a9531534f7da2e4c303d8a318a72
        1c3c0c95956809532fcf0e2449a6b525b16aedf5aa0de657ba637b39
  C   : 28fd7434d5cd424a5353818fc21a982460d20cf632eb1e6c4fbfca17d5abcf6a
        52111086162fe9570e7774c7a912aca3dfa10067ddaad40688645bdd
  T   : e86f8f2e730c49d536f00fb5225d28b1

  ------ Spec Test Case 6 (Camellia-128) ------
  KEY : feffe9928665731c6d6a8f9467308308
  IV  : 9313225df88406e555909c5aff5269aa6a7a9538534f7da1e4c303d2a318a728
        c3c0c95156809539fcf0e2429a6b525416aedbf5a0de6a57a637b39b
  AD  : feedfacedeadbeeffeedfacedeadbeefabaddad2
  P   : d9313225f88406e5a55909c5aff5269a86a7a9531534f7da2e4c303d8a318a72
        1c3c0c95956809532fcf0e2449a6b525b16aedf5aa0de657ba637b39
  C   : 2e582b8417c93f2ff4f6f7ee3c361e4496e710ee12433baa964987d02f42953e
        402e6f4af407fe08cd2f35123696014c34db19128df4056faebcd647
  T   : ceae5569b2af8641572622731aed3e53

  ------ Spec Test Case 7 (Camellia-192) ------
  KEY : 000000000000000000000000000000000000000000000000
  IV  : 000000000000000000000000
  T   : ba9ae89fddce4b51131e17c4d65ce587

  ------ Spec Test Case 8 (Camellia-192) ------
  KEY : 000000000000000000000000000000000000000000000000
  IV  : 000000000000000000000000
  P   : 00000000000000000000000000000000
  C   : 8f9c0aa2549714c88bb2665e8af86d41
  T   : 783cff5c5aca7197320658a74279ab37

  ------ Spec Test Case 9 (Camellia-192) ------
  KEY : feffe9928665731c6d6a8f9467308308feffe9928665731c
  IV  : cafebabefacedbaddecaf888
  P   : d9313225f88406e5a55909c5aff5269a86a7a9531534f7da2e4c303d8a318a72
        1c3c0c95956809532fcf0e2449a6b525b16aedf5aa0de657ba637b391aafd255
  C   : 0f009e88410d84ad93c90d55efbe20ffa855492f4dfd0fb485c4f02f536feffb
        b4d967729e5c67f1de0750255cc500716ba483eb3b0a2bf607af28f6a60bb2e9
  T   : 8d645a0b0e48d3c3b60a014157cb49b4

  ------ Spec Test Case 10 (Camellia-192) ------
  KEY : feffe9928665731c6d6a8f9467308308feffe9928665731c
  IV  : cafebabefacedbaddecaf888
  AD  : feedfacedeadbeeffeedfacedeadbeefabaddad2
  P   : d9313225f88406e5a55909c5aff5269a86a7a9531534f7da2e4c303d8a318a72
        1c3c0c95956809532fcf0e2449a6b525b16aedf5aa0de657ba637b39
  C   : 0f009e88410d84ad93c90d55efbe20ffa855492f4dfd0fb485c4f02f536feffb
        b4d967729e5c67f1de0750255cc500716ba483eb3b0a2bf607af28f6
  T   : 01b15bb5ab6fac0c422014e91eacbf2b

  ------ Spec Test Case 11 (Camellia-192) ------
  KEY : feffe9928665731c6d6a8f9467308308feffe9928665731c
  IV  : cafebabefacedbad
  AD  : feedfacedeadbeeffeedfacedeadbeefabaddad2
  P   : d9313225f88406e5a55909c5aff5269a86a7a9531534f7da2e4c303d8a318a72
        1c3c0c95956809532fcf0e2449a6b525b16aedf5aa0de657ba637b39
  C   : 678b3dcb270faa206dc5f6fbb5014996e86d6f3e35cdcdfeb03b37b9b06ff4ff
        2682248823bd3c84124dc76af7bde3dd440c228b5efbc795dd80dfb6

  T   : f876143d933214a5035ff0bb96ff650b

  ------ Spec Test Case 12 (Camellia-192) ------
  KEY : feffe9928665731c6d6a8f9467308308feffe9928665731c
  IV  : 9313225df88406e555909c5aff5269aa6a7a9538534f7da1e4c303d2a318a728
        c3c0c95156809539fcf0e2429a6b525416aedbf5a0de6a57a637b39b
  AD  : feedfacedeadbeeffeedfacedeadbeefabaddad2
  P   : d9313225f88406e5a55909c5aff5269a86a7a9531534f7da2e4c303d8a318a72
        1c3c0c95956809532fcf0e2449a6b525b16aedf5aa0de657ba637b39
  C   : 9733ea567c3bad2259ccd63ef7012f5de709e50b1fdc31f1a16db02ede1b66f1
        1dcc4d953f2d4d4671587b65882afbf9545fdb6deab22413d091b703
  T   : 4b72e520b2521e63d240ed5c903216fa

  ------ Spec Test Case 13 (Camellia-256) ------
  KEY : 0000000000000000000000000000000000000000000000000000000000000000
  IV  : 000000000000000000000000
  T   : 9cdb269b5d293bc5db9c55b057d9b591

  ------ Spec Test Case 14 (Camellia-256) ------
  KEY : 0000000000000000000000000000000000000000000000000000000000000000
  IV  : 000000000000000000000000
  P   : 00000000000000000000000000000000
  C   : 3d4b2cde666761ba5dfb305178e667fb
  T   : 284b63bb143c40ce100fb4dea6bb617b

  ------ Spec Test Case 15 (Camellia-256) ------
  KEY : feffe9928665731c6d6a8f9467308308feffe9928665731c6d6a8f9467308308
  IV  : cafebabefacedbaddecaf888
  P   : d9313225f88406e5a55909c5aff5269a86a7a9531534f7da2e4c303d8a318a72
        1c3c0c95956809532fcf0e2449a6b525b16aedf5aa0de657ba637b391aafd255
  C   : ad142c11579dd95e41f3c1f324dabc255864d920f1b65759d8f560d4948d4477
        58dfdcf77aa9f62581c7ff572a037f810cb1a9c4b3ca6ed638179b776549e092
  T   : c912686270a2b9966415fca3be75c468

  ------ Spec Test Case 16 (Camellia-256) ------
  KEY : feffe9928665731c6d6a8f9467308308feffe9928665731c6d6a8f9467308308
  IV  : cafebabefacedbaddecaf888
  AD  : feedfacedeadbeeffeedfacedeadbeefabaddad2
  P   : d9313225f88406e5a55909c5aff5269a86a7a9531534f7da2e4c303d8a318a72
        1c3c0c95956809532fcf0e2449a6b525b16aedf5aa0de657ba637b39
  C   : ad142c11579dd95e41f3c1f324dabc255864d920f1b65759d8f560d4948d4477
        58dfdcf77aa9f62581c7ff572a037f810cb1a9c4b3ca6ed638179b77
  T   : 4e4b178d8fe26fdc95e2e7246dd94bec

  ------ Spec Test Case 17 (Camellia-256) ------
  KEY : feffe9928665731c6d6a8f9467308308feffe9928665731c6d6a8f9467308308
  IV  : cafebabefacedbad
  AD  : feedfacedeadbeeffeedfacedeadbeefabaddad2
  P   : d9313225f88406e5a55909c5aff5269a86a7a9531534f7da2e4c303d8a318a72
        1c3c0c95956809532fcf0e2449a6b525b16aedf5aa0de657ba637b39
  C   : 6ca95fbb7d16577a9ef2fded94dc85b5d40c629f6bef2c649888e3cbb0ededc7
        810c04b12c2983bbbbc482e16e45c9215ae12c15c55f2f4809d06652
  T   : e6472b8ebd331bfcc7c0fa63ce094461

  ------ Spec Test Case 18 (Camellia-256) ------
  KEY : feffe9928665731c6d6a8f9467308308feffe9928665731c6d6a8f9467308308
  IV  : 9313225df88406e555909c5aff5269aa6a7a9538534f7da1e4c303d2a318a728
        c3c0c95156809539fcf0e2429a6b525416aedbf5a0de6a57a637b39b
  AD  : feedfacedeadbeeffeedfacedeadbeefabaddad2
  P   : d9313225f88406e5a55909c5aff5269a86a7a9531534f7da2e4c303d8a318a72
        1c3c0c95956809532fcf0e2449a6b525b16aedf5aa0de657ba637b39
  C   : e0cddd7564d09c4dc522dd65949262bbf9dcdb07421cf67f3032becb7253c284
        a16e5bf0f556a308043f53fab9eebb526be7f7ad33d697ac77c67862
  T   : 5791883f822013f8bd136fc36fb9946b

5.  Security Considerations

   At the time of writing of this document there are no known weak keys
   for
   Camellia.  And Camellia and no security problem has problems have been found on with Camellia
   (see [7],
   [8] [8]).

   For other security considerations, please refer to the security
   considerations of the previous documents describing the use of GMC GCM
   mode document described in
   [2]. with IPsec [3].

6.  IANA Considerations

   IANA has assigned three ESP Transform Type 1 (Encryption Algorithm)
   Identifiers for Camellia-GCM with an eight-byte explicit IV: IV in the
   "IKEv2 Parameters" registry:

      Number       Name                                     Reference
      --------     ---------------------------------------  -----------
      <TBD1> for       Camellia-GCM with an 8 octet ICV; ICV         [RFCxxxx]
      <TBD2> for       Camellia-GCM with a 12 octet ICV; and ICV         [RFCxxxx]
      <TBD3> for       Camellia-GCM with a 16 octet ICV. ICV         [RFCxxxx]
      [[ IANA and RFC Editor: please substitute the RFC number assigned
         to this document for 'xxxx' above.  ]]

7.  Acknowledgments

   Portions of this text were unabashedly borrowed from [2]. [3].

8.  References

8.1.  Normative

   [1]  Bradner, S., "Key words for use in RFCs to Indicate Requirement
        Levels", BCP 14, RFC 2119, March 1997.

   [2]  Dworkin, M., "Recommendation for Block Cipher Modes of
        Operation: Galois/Counter Mode (GCM) for Confidentiality and
        Authentication", April 2006, <http://csrc.nist.gov/publications/
        drafts/Draft-NIST_SP800-38D_Public_Comment.pdf>.

   [2] November 2007, <http://csrc.nist.gov/
        publications/nistpubs/800-38D/SP-800-38D.pdf>.

   [3]  Viega, J. and D. McGrew, "The Use of Galois/Counter Mode (GCM)
        in IPsec Encapsulating Security Payload (ESP)", RFC 4106,
        June 2005.

   [3]  Bradner, S., "Key words for use in RFCs to Indicate Requirement
        Levels", BCP 14, RFC 2119, March 1997.

   [4]  Kaufman, C., "Internet Key Exchange (IKEv2) Protocol", RFC 4306,
        December 2005.

   [5]  Matsui, M., Nakajima, J., and S. Moriai, "A Description of the
        Camellia Encryption Algorithm", RFC 3713, April 2004.

   [6]  Kato, A., Moriai, S., and M. Kanda, "The Camellia Cipher
        Algorithm and Its Use With IPsec", RFC 4312, December 2005.

8.2.  Informative

   [7]  "The NESSIE project (New European Schemes for Signatures,
        Integrity and Encryption)",
        <http://www.cosic.esat.kuleuven.ac.be/nessie/>.

   [8]  Information-technology Promotion Agency (IPA), "Cryptography
        Research and Evaluation Committees",
        <http://www.ipa.go.jp/security/enc/CRYPTREC/index-e.html>.

Authors' Addresses

   Akihiro Kato
   NTT Software Corporation

   Phone: +81-45-212-7614 +81-45-212-9803
   Fax:   +81-45-212-7528   +81-45-212-9800
   Email: kato.akihiro@po.ntts.co.jp

   Satoru Kanno
   NTT Software Corporation

   Phone: +81-45-212-7577 +81-45-212-9803
   Fax:   +81-45-212-9800
   Email: kanno.satoru@po.ntts.co.jp

   Masayuki Kanda
   NTT

   Phone: +81-46-859-2437 +81-422-59-3456
   Fax:   +81-46-859-3365   +81-422-59-4015
   Email: kanda@isl.ntt.co.jp kanda.masayuki@lab.ntt.co.jp