Internet Engineering Task Force (IETF) G. Hudson Request for Comments: 6803 MIT Kerberos Consortium Category: Informational November 2012 ISSN: 2070-1721
Camellia Encryption for Kerberos 5
Abstract
This document specifies two encryption types and two corresponding checksum types for the Kerberos cryptosystem framework defined in RFC 3961. The new types use the Camellia block cipher in CBC mode with ciphertext stealing and the CMAC algorithm for integrity protection.
Status of This Memo
This document is not an Internet Standards Track specification; it is published for informational purposes.
This document is a product of the Internet Engineering Task Force (IETF). It represents the consensus of the IETF community. It has received public review and has been approved for publication by the Internet Engineering Steering Group (IESG). Not all documents approved by the IESG are a candidate for any level of Internet Standard; see Section 2 of RFC 5741.
Information about the current status of this document, any errata, and how to provide feedback on it may be obtained at http://www.rfc-editor.org/info/rfc6803.
Copyright Notice
Copyright (c) 2012 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. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. 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 Simplified BSD License.
Hudson Informational [Page 1]
RFC 6803 Camellia Encryption for Kerberos 5 November 2012
The Camellia block cipher, described in [RFC3713], has a 128-bit block size and a 128-bit, 192-bit, or 256-bit key size, similar to AES. This document specifies Kerberos encryption and checksum types for Camellia using 128-bit or 256-bit keys. The new types conform to the framework specified in [RFC3961] but do not use the simplified profile.
Like the simplified profile, the new types use key derivation to produce keys for encryption, integrity protection, and checksum operations. Instead of the key derivation function described in [RFC3961], Section 5.1, the new types use a key derivation function from the family specified in [SP800-108].
The new types use the CMAC algorithm for integrity protection and checksum operations. As a consequence, they do not rely on a hash algorithm except when generating keys from strings.
Like the AES encryption types [RFC3962], the new encryption types use CBC mode with ciphertext stealing [RFC3962] to avoid the need for padding. They also use the same PBKDF2 algorithm for key generation from strings, with a modification to the salt string to ensure that different keys are generated for Camellia and AES encryption types.
The Camellia key space is dense, so we use random octet strings directly as keys. The first bit of the Camellia bit string is the high bit of the first byte of the random octet string.
We use a key derivation function from the family specified in [SP800-108], Section 5.2, "KDF in Feedback Mode". The PRF parameter of the key derivation function is CMAC with Camellia-128 or Camellia-256 as the underlying block cipher; this PRF has an output size of 128 bits. A block counter is used with a length of 4 bytes, represented in big-endian order. The length of the output key in bits (denoted as k) is also represented as a 4-byte string in big- endian order. The label input to the KDF is the usage constant supplied to the key derivation function, and the context is unused. In the following summary, | indicates concatenation. The random-to- key function is the identity function, as defined in Section 6. The k-truncate function is defined in [RFC3961], Section 5.1.
Hudson Informational [Page 2]
RFC 6803 Camellia Encryption for Kerberos 5 November 2012
We use a variation on the key generation algorithm specified in [RFC3962], Section 4.
First, to ensure that different long-term keys are used with Camellia and AES, we prepend the enctype name to the salt string, separated by a null byte. The enctype name is "camellia128-cts-cmac" or "camellia256-cts-cmac" (without the quotes).
Second, the final key derivation step uses the algorithm described in Section 3 instead of the key derivation algorithm used by the simplified profile.
Third, if no string-to-key parameters are specified, the default number of iterations is raised to 32768.
For integrity protection and checksums, we use the CMAC function defined in [SP800-38B], with Camellia-128 or Camellia-256 as the underlying block cipher. The output length (Tlen) is 128 bits for both key sizes.
The following parameters, required by [RFC3961], Section 3, apply to the encryption types camellia128-cts-cmac, which uses a 128-bit protocol key, and camellia256-cts-cmac, which uses a 256-bit protocol key.
Key-derivation function: as indicated below, with usage represented as 4 octets in big-endian order.
String-to-key parameter format: 4 octets indicating a 32-bit iteration count in big-endian order. Implementations may limit the count as specified in [RFC3962], Section 4.
Default string-to-key parameters: 00 00 80 00.
Kc = KDF-FEEDBACK-CMAC(base-key, usage | 0x99) Ke = KDF-FEEDBACK-CMAC(base-key, usage | 0xAA) Ki = KDF-FEEDBACK-CMAC(base-key, usage | 0x55)
Cipher state: a 128-bit CBC initialization vector.
Initial cipher state: all bits zero.
Encryption function: as follows, where E() is Camellia encryption in CBC-CTS mode, with the next-to-last block used as the CBC-style ivec, or the last block if there is only one.
conf = Random string of 128 bits (C, newstate) = E(Ke, conf | plaintext, oldstate) M = CMAC(Ki, conf | plaintext) ciphertext = C | M
Decryption function: as follows, where D() is Camellia decryption in CBC-CTS mode, with the ivec treated as in E(). To separate the ciphertext into C and M components, use the final 16 bytes for M and all of the preceding bytes for C.
(C, M) = ciphertext (P, newIV) = D(Ke, C, oldstate) if (M != CMAC(Ki, P)) report error newstate = newIV
The following parameters, required by [RFC3961], Section 4, apply to the checksum types cmac-camellia128 and cmac-camellia256, which are the associated checksum for camellia128-cts-cmac and camellia256-cts- cmac, respectively.
Associated cryptosystem: Camellia-128 or Camellia-256 as appropriate for the checksum type.
Chapter 4 of [CRYPTOENG] discusses weaknesses of the CBC cipher mode. An attacker who can observe enough messages generated with the same key to encounter a collision in ciphertext blocks could recover the XOR of the plaintexts of the previous blocks. Observing such a collision becomes likely as the number of blocks observed approaches 2^64. This consideration applies to all previously standardized Kerberos encryption types and all uses of CBC encryption with 128-bit block ciphers in other protocols. Kerberos deployments can mitigate this concern by rolling over keys often enough to make observing 2^64 messages unlikely.
Because the new checksum types are deterministic, an attacker could pre-compute checksums for a known plain-text message in 2^64 randomly chosen protocol keys. The attacker could then observe checksums legitimately computed in different keys until a collision with one of the pre-computed keys is observed; this becomes likely after the number of observed checksums approaches 2^64. Observing such a collision allows the attacker to recover the protocol key. This consideration applies to most previously standardized Kerberos checksum types and most uses of 128-bit checksums in other protocols.
Kerberos deployments should not migrate to the Camellia encryption types simply because they are newer, but should use them only if business needs require the use of Camellia, or if a serious flaw is discovered in AES which does not apply to Camellia.
The security considerations described in [RFC3962], Section 8, regarding the string-to-key algorithm also apply to the Camellia encryption types.
Hudson Informational [Page 5]
RFC 6803 Camellia Encryption for Kerberos 5 November 2012
At the time of writing this document, there are no known weak keys for Camellia, and no security problem has been found on Camellia (see [NESSIE], [CRYPTREC], and [LNCS5867]).
[RFC3713] Matsui, M., Nakajima, J., and S. Moriai, "A Description of the Camellia Encryption Algorithm", RFC 3713, April 2004.
[RFC3961] Raeburn, K., "Encryption and Checksum Specifications for Kerberos 5", RFC 3961, February 2005.
[RFC3962] Raeburn, K., "Advanced Encryption Standard (AES) Encryption for Kerberos 5", RFC 3962, February 2005.
[SP800-108] Chen, L., "Recommendation for Key Derivation Using Pseudorandom Functions", NIST Special Publication 800& nhby;108, October 2009.
[SP800-38B] Dworkin, M., "Recommendation for Block Cipher Modes of Operation: The CMAC Mode for Authentication", NIST Special Publication 800-38B, October 2009.
[CRYPTOENG] Schneier, B., "Cryptography Engineering", March 2010.
[CRYPTREC] Information-technology Promotion Agency (IPA), Japan, "Cryptography Research and Evaluation Committees", <http://www.ipa.go.jp/security/enc/CRYPTREC/ index-e.html>.
[LNCS5867] Mala, H., Shakiba, M., Dakhilalian, M., and G. Bagherikaram, "New Results on Impossible Different Cryptanalysis of Reduced-Round Camellia-128", Lecture Notes in Computer Science, Vol. 5867, November 2009, <http://www.springerlink.com/content/e55783u422436g77/>.
The author would like to thank Ken Raeburn, Satoru Kanno, Jeffrey Hutzelman, Nico Williams, Sam Hartman, and Tom Yu for their help in reviewing and providing feedback on this document.