Camellia is a Japanese block cipher—Mitsubishi Electric and NTT built it in 2000—and by the time it reached the Cryptographic Message Syntax it was being asked to do three jobs under one name. RFC 3657, a Standards Track document published in January 2004, is the instruction sheet for all three. Read it as a single rule and your parser will quietly disagree with the next one, while both sides insist the cipher works perfectly.

The lesson fits in one sentence: in CMS, an algorithm identifier is not a name, it is a typed field. The OID, whether parameters are present, and the structure around it have to be read together. Camellia's three CMS roles—protecting content, wrapping a content key, and advertising support—each carry a different parameter rule, and confusing them produces a conformance bug that masquerades as a crypto bug.

The short version

  • RFC 3657 assigned Camellia distinct CMS identifiers for content encryption and key wrapping. The CBC content identifiers require a present 16-octet IV; the key-wrap identifiers require parameters to be absent.
  • A signed S/MIME capability entry uses a third form, NULL. And the key-wrap OID names the key-encryption key size, not necessarily the content key being wrapped.

Same cipher, different job

Inside a CMS envelope, “Camellia” is not enough information to decode what a sender did. The receiver needs to know whether the cipher protected the message content or wrapped the content-encryption key (CEK), and then interpret the algorithm identifier in that role. RFC 3657 supplied those conventions: one family of identifiers for CBC content encryption, another for key wrapping. RFC 3657

For id-camellia128-cbc, id-camellia192-cbc and id-camellia256-cbc, the AlgorithmIdentifier parameters MUST be present and must carry the initialization vector as a 16-octet value. The IV belongs to the content-encryption description; it is not a value to infer from the cipher name. The RFC also directs that plaintext padding follow the CMS rule. RFC 3657 RFC 5652

Key wrap: now the parameters must vanish

The three Camellia wrap identifiers carry a key-size arc, and their AlgorithmIdentifier parameters MUST be absent. There is no IV field to fill: the wrapping construction specifies how it uses its internal initial value. The identifier's size denotes the key-encryption key (KEK), not a promise that the wrapped CEK matches it. Implementations MUST support equal CEK and KEK sizes; where they support different sizes, the KEK MUST be at least as long as the CEK. RFC 3657 therefore defines an encoding and a compatibility boundary—not a rule that every envelope uses one key size throughout. RFC 3657 RFC 3394

The third costume: a signed capability

RFC 3657 also specifies how an S/MIME client announces Camellia support in SMIMECapabilities. Here the capability OID is accompanied by a NULL parameter. That does not contradict the absent parameters on the key-wrap identifier: these are different ASN.1 structures with different meanings, and NULL does not mean “no parameters” in the same wire representation. The RFC even supplies DER encodings for the three key sizes so implementations can compare the advertised form precisely. RFC 3657 RFC 2633

The capability list is signed, ordered by preference, and only a partial account of what the sender supports. It feeds a later sender decision alongside private agreements, user preferences and legal restrictions. It is not a live handshake, not a probe of the recipient's current configuration, and not proof that a message was encrypted with Camellia. To describe what actually happened, inspect the envelope's selected content algorithm and key-management fields—not a prior advertisement. RFC 3657

Where conformance actually lives

This three-way split changes what an interoperability review should compare. For CBC content encryption, check that the identifier selects the intended key size and that a 16-octet IV is present. For key wrap, check that parameters are absent and that the actual KEK and CEK lengths satisfy the implementation's supported relationship. For capability processing, compare the signed DER value—including its NULL parameter—and the order in which preferences were communicated. Conflate those contexts and you get a parse or negotiation mismatch even though every system claims to support the same cipher.

The integrity check that is not authentication

RFC 3657 says Camellia wrapping follows the RFC 3394 construction with AES replaced by Camellia, leaning on their shared 128-bit block size. Its default wrapping integrity value is the fixed A6A6A6A6A6A6A6A6; if unwrapping does not recover that value, the receiver returns an error and hands back no key data. The RFC also permits alternative initial values for application-specific integrity scope. That check covers the wrapped key data under the specified construction—it does not authenticate the sender, the CMS content, or a user's authority to act on what was decrypted. RFC 3657 RFC 3394

What the document does not claim

This is a historical reconstruction of an encoding contract, not a security endorsement or a deployment survey. The wider CMS algorithm registry and later profiles supply context but do not establish which products implemented RFC 3657, or how often. The lasting lesson is narrower and more useful: the algorithm identifier is a typed protocol field, and its OID, parameter presence and surrounding structure have to be read together. RFC 3370 RFC 8419

Sources