<aside> 💡

Status: Proposal for discussion, not an adopted specification

Author: Natalie

Last updated: September 22, 2026

Reviewed by:

Source: Filecoin Encryption Envelope FIP. These amendments concern the FIP, not the library API or its current implementation. They retain both encryption schemes, the FEE type string, protected application metadata, and envelope ‖ ciphertext storage. Chunk count is still derived from ciphertext length; no stored count is added. For chunked objects whose length is known before encryption, amendment 4 adds an optional protected plaintext_length commitment.

The aim is to correct the FIP and state its format choices, not repeat the COSE specifications. MUST and SHOULD below describe proposed requirements.

Each amendment identifies a correction to an error, a clarification of unclear wording, or a profile decision that the FIP authors need to approve. A profile is the subset of COSE rules and options chosen for FEE. In proposed requirements, MUST means required, SHOULD or RECOMMENDED means recommended with justified exceptions, and MAY means permitted. These words do not mean the current FIP already contains those rules.

COSE terms used here

COSE defines containers for encrypted data and the information needed to use it. FEE needs only part of COSE, not every message type or algorithm.

1. Correct recipient header placement

Affects Multi-Recipient Support, lines 327–339.

The FIP currently requires alg in every recipient's protected header. That placement is wrong for A256KW, but useful for ECDH-ES+A256KW because the protected bytes are part of its key derivation. Replace the blanket rule with:

Each recipient MUST identify its key-distribution algorithm using alg. Header placement and processing MUST follow that algorithm's COSE requirements.

For A256KW (-5), the recipient protected field MUST be a zero-length byte string, and alg MUST be in the unprotected map. A key identifier kid (label 4, a byte string) is RECOMMENDED when needed to identify the wrapping key (key-encryption key).

For FEE recipients using ECDH-ES+A256KW (-31), alg MUST be in the recipient protected map and MUST NOT be in its unprotected map. The original serialized protected bytes MUST be included in COSE_KDF_Context as required by RFC 9052 §8.5.5 and RFC 9053 §5.2. The content envelope's protected bytes cannot be used in their place.

The two recipient forms look like this in readable CBOR notation: