Network Working Group C. Adams
Request for Comments: 2984 Entrust Technologies
Category: Standards Track October 2000
Use of the CAST-128 Encryption Algorithm in CMS
1. Motivation
S/MIME (Secure/Multipurpose Internet Mail Extensions) [SMIME2, SMIME3] is a set of specifications for the secure transport of MIME objects. In the current (S/MIME v3) specifications the mandatory- to-implement symmetric algorithm for content encryption and key encryption is triple-DES (3DES). While this is perfectly acceptable in many cases because the security of 3DES is generally considered to be high, for some environments 3DES may be seen to be too slow. In part to help alleviate such performance concerns, S/MIME has allowed any number of (optional) additional algorithms to be used for symmetric content and key encryption.
Adams Standards Track [Page 1]
RFC 2984 CAST-128 in CMS October 2000
This document describes how to use CAST-128 within the S/MIME CMS specification.
2. Specification
This section provides the OIDs and processing information necessary for CAST-128 to be used for content and key encryption in CMS.
2.1 OIDs for Content and Key Encryption
CAST-128 is added to the set of optional symmetric encryption algorithms in CMS by providing two unique object identifiers (OIDs). One OID defines the content encryption algorithm and the other defines the key encryption algorithm. Thus a CMS agent can apply CAST-128 either for content or key encryption by selecting the corresponding object identifier, supplying the required parameter, and starting the program code.
Adams Standards Track [Page 2]
RFC 2984 CAST-128 in CMS October 2000
cast5CMSkeywrap OBJECT IDENTIFIER ::= { iso(1)
2.2 Key Wrapping and Unwrapping
CAST-128 key wrapping and unwrapping is done in conformance with CMS [RFC2630].
2.2.1 CAST-128 Key Wrap
Key wrapping with CAST-128 is identical to [RFC2630], Sections 12.6.1 and 12.6.4, with "RC2" replaced by "CAST-128" in the introduction to 12.6.4. Only 128-bit CAST-128 keys may be used as key-encryption keys, and they MUST be used with the cast5CMSkeywrapParameter set to 128. It is RECOMMENDED that the size of the content-encryption key and the size of the key-encryption key be equal (since the security of the content will be at most the smaller of these two values).
2.2.2 CAST-128 Key Unwrap
Key unwrapping with CAST-128 is identical to [RFC2630], Sections 12.6.1 and 12.6.5, with "RC2" replaced by "CAST-128" in the introduction to 12.6.5.
3. Using CAST-128 in S/MIME Clients
An S/MIME client SHOULD announce the set of cryptographic functions it supports by using the S/MIME capabilities attribute. This attribute provides a partial list of OIDs of cryptographic functions and MUST be signed by the client. The functions' OIDs SHOULD be logically separated in functional categories and MUST be ordered with respect to their preference. If an S/MIME client is required to support symmetric encryption with CAST-128, the capabilities attribute MUST contain the cast5CBC OID specified above in the category of symmetric algorithms. The parameter associated with this OID (see above) MUST be used to indicate supported key length. For example, when the supported key length is 128 bits, the SMIMECapability SEQUENCE representing CAST-128 MUST be DER-encoded as the following hexadecimal string:
Adams Standards Track [Page 3]
RFC 2984 CAST-128 in CMS October 2000
301106092A864886F67D07420A300402020080.
4. Security Considerations
This document specifies the use of the CAST-128 symmetric cipher for encrypting the content of a CMS message and for encrypting the symmetric key used to encrypt the content of a CMS message. Although CAST-128 allows keys of variable length to be used, it must be recognized that smaller key sizes (e.g., 40, 56, or 64 bits) may be unacceptably weak for some environments. The use of larger key sizes (e.g., 128 bits) is always RECOMMENDED (when relevant import, export, or other laws permit). It is also RECOMMENDED that the size of the content-encryption key and the size of the key-encryption key be equal (since the security of the content will be at most the smaller of these two values).
Adams Standards Track [Page 4]
RFC 2984 CAST-128 in CMS October 2000
[SMIME2] Dusse, S., Hoffman, P., Ramsdell, B., Lundblade, L. and L.
Adams Standards Track [Page 5]
RFC 2984 CAST-128 in CMS October 2000
Full Copyright Statement