CBOR Object Signing and Encryption (COSE): Structures and Process
Concise Binary Object Representation (CBOR) is a data format designed for small code size and small message size. There is a need to be able to define basic security services for this data format. This document defines the CBOR Object Signing and Encryption (COSE) protocol. This specification describes how to create and process signatures, message authentication codes, and encryption using CBOR for serialization. This specification additionally describes how to represent cryptographic keys using CBOR. ¶ This document, along with RFC 9053, obsoletes RFC 8152. ¶
The publisher of the pinned text is named in Sources. With this skill the agent applies that text: when signing or encrypting with COSE.
Follow the workflow below step by step. Every rule here comes from a source in Sources. Quoted requirements are sentences taken from the pinned text. When a rule and the pinned source disagree, the source wins; when the source has a newer revision than the pin, follow the refresh steps.
Inputs (fill in, or ask before starting)
- Role: producer or consumer of this specification.
- Target version: RFC 9052 CBOR Object Signing and Encryption (COSE): Structures and Process (default); RFC 9053 CBOR Object Signing and Encryption (COSE): Initial Algorithms (default); RFC 9360 CBOR Object Signing and Encryption (COSE): Header Parameters for Carrying and Referencing X.509 Certificates (default); RFC 9964 ML-DSA for JSON Object Signing and Encryption (JOSE) and CBOR Object Signing and Encryption (COSE) (default). See
references/versions.md.
- Revision: the pinned revision in Sources, unless the user names another.
- Sources: when refreshing this skill, re-read every URL in Sources and check the publisher index for a newer revision or version line.
Invariants
- RFC 9052 § 3. "When processing messages, if a label appears multiple times, the message MUST be rejected as malformed."
- RFC 9052 § 3. "If the message is not rejected as malformed, attributes MUST be obtained from the protected bucket, and only if an attribute is not found in the protected bucket can that attribute be obtained from the unprotected bucket."
- RFC 9052 § 3.1. "When present, the "crit" header parameter MUST be placed in the protected-header-parameters bucket."
- RFC 9052 § 7.1. "Implementations MUST verify that the key type is appropriate for the algorithm being processed."
- RFC 9052 § 8.3. "The message content MUST NOT be used if the decryption does not validate."
- RFC 9052 § 9. "Encoding MUST be done using definite lengths, and the length of the (encoded) argument MUST be the minimum possible length."
- RFC 9053 § 4.1.1. "The key and nonce pair MUST be unique for every message encrypted."
- RFC 9053 § 7.1. "Applications MUST check that the curve and the key type are consistent and reject a key if they are not."
- RFC 9360 § 2. "The trust mechanism MUST process any certificates in this parameter as untrusted input."
- RFC 9360 § 5. "In any event, both the signature validation and the certificate validation MUST be completed successfully before acting on any requests."
- RFC 9964 § 3. "The priv parameter contains private information and MUST NOT be present in public keys."
Workflow
- Pick the version. Use the current line unless a named consumer needs a supported one. Do not author a legacy line. Emit a preview only when its posture is build and the user asked for that draft.
->
references/versions.md
✓ The target version is recorded, and it is not a legacy line.
- Apply the pinned requirements. Walk the quotes in
references/requirements.md and implement each one that applies to the role.
-> references/requirements.md
✓ Each applicable quote is either implemented or recorded as out of scope for the role, with the section it came from.
- Upgrade (only when asked). Follow the upgrade section from the source line to the target.
->
references/versions.md
✓ The result cites the target line and no longer depends on a requirement that only the old line stated.
Verify before done
Reference index
references/versions.md: every version line, which one to use, and how to upgrade. Load for steps 1 and 3.
references/requirements.md: quotes taken from the pinned specification. Load for step 2.
Related skills
Install related spec skills by name with npx skills add ScaleDockHQ/scaledock-skills --skill <name>.
jwt, when the work also follows that specification: npx skills add ScaleDockHQ/scaledock-skills --skill jwt
Sources
Status uses the publishing body's own maturity term. Checked is the date the source was last read.
- RFC 9052 CBOR Object Signing and Encryption (COSE): Structures and Process: INTERNET STANDARD, RFC 9052 (INTERNET STANDARD, August 202), checked 2026-10-06.
- RFC 9053 CBOR Object Signing and Encryption (COSE): Initial Algorithms: INFORMATIONAL, RFC 9053 (INFORMATIONAL, August 202), checked 2026-10-06.
- RFC 9360 CBOR Object Signing and Encryption (COSE): Header Parameters for Carrying and Referencing X.509 Certificates: PROPOSED STANDARD, RFC 9360 (PROPOSED STANDARD, February 2), checked 2026-10-06.
- RFC 9964 ML-DSA for JSON Object Signing and Encryption (JOSE) and CBOR Object Signing and Encryption (COSE): PROPOSED STANDARD, RFC 9964 (PROPOSED STANDARD, May 2026), checked 2026-10-06.
1---2name: cose3description: >-4 CBOR Object Signing and Encryption (COSE): Structures and Process: Concise Binary Object Representation (CBOR) is a data format designed for small code size and small message size. Covers RFC 9052 CBOR Object Signing and Encryption (COSE): Structures and Process, RFC 9053 CBOR Object Signing and Encryption (COSE): Initial Algorithms, RFC 9360 CBOR Object Signing and Encryption (COSE): Header Parameters for Carrying and Referencing X.509 Certificates, RFC 9964 ML-DSA for JSON Object Signing and Encryption (JOSE) and CBOR Object Signing and Encryption (COSE). Use when signing or encrypting with COSE. Triggers: COSE, RFC 9052, ML-DSA.5license: MIT6metadata:7 source: https://skillmd.com/skills/scaledockhq/cose8 author: ScaleDockHQ9 version: "1.1.0"10 kind: standard11---1213# CBOR Object Signing and Encryption (COSE): Structures and Process1415Concise Binary Object Representation (CBOR) is a data format designed for small code size and small message size. There is a need to be able to define basic security services for this data format. This document defines the CBOR Object Signing and Encryption (COSE) protocol. This specification describes how to create and process signatures, message authentication codes, and encryption using CBOR for serialization. This specification additionally describes how to represent cryptographic keys using CBOR. ¶ This document, along with RFC 9053, obsoletes RFC 8152. ¶1617The publisher of the pinned text is named in [Sources](#sources). With this skill the agent applies that text: when signing or encrypting with COSE.1819**Follow the workflow below step by step.** Every rule here comes from a source in [Sources](#sources). Quoted requirements are sentences taken from the pinned text. When a rule and the pinned source disagree, the source wins; when the source has a newer revision than the pin, follow the refresh steps.2021## Inputs (fill in, or ask before starting)2223- Role: producer or consumer of this specification.24- Target version: RFC 9052 CBOR Object Signing and Encryption (COSE): Structures and Process (default); RFC 9053 CBOR Object Signing and Encryption (COSE): Initial Algorithms (default); RFC 9360 CBOR Object Signing and Encryption (COSE): Header Parameters for Carrying and Referencing X.509 Certificates (default); RFC 9964 ML-DSA for JSON Object Signing and Encryption (JOSE) and CBOR Object Signing and Encryption (COSE) (default). See [`references/versions.md`](references/versions.md).25- Revision: the pinned revision in [Sources](#sources), unless the user names another.26- Sources: when refreshing this skill, re-read every URL in [Sources](#sources) and check the publisher index for a newer revision or version line.2728## Invariants29301. **RFC 9052 § 3.** "When processing messages, if a label appears multiple times, the message MUST be rejected as malformed."312. **RFC 9052 § 3.** "If the message is not rejected as malformed, attributes MUST be obtained from the protected bucket, and only if an attribute is not found in the protected bucket can that attribute be obtained from the unprotected bucket."323. **RFC 9052 § 3.1.** "When present, the "crit" header parameter MUST be placed in the protected-header-parameters bucket."334. **RFC 9052 § 7.1.** "Implementations MUST verify that the key type is appropriate for the algorithm being processed."345. **RFC 9052 § 8.3.** "The message content MUST NOT be used if the decryption does not validate."356. **RFC 9052 § 9.** "Encoding MUST be done using definite lengths, and the length of the (encoded) argument MUST be the minimum possible length."367. **RFC 9053 § 4.1.1.** "The key and nonce pair MUST be unique for every message encrypted."378. **RFC 9053 § 7.1.** "Applications MUST check that the curve and the key type are consistent and reject a key if they are not."389. **RFC 9360 § 2.** "The trust mechanism MUST process any certificates in this parameter as untrusted input."3910. **RFC 9360 § 5.** "In any event, both the signature validation and the certificate validation MUST be completed successfully before acting on any requests."4011. **RFC 9964 § 3.** "The priv parameter contains private information and MUST NOT be present in public keys."4142## Workflow43441. **Pick the version.** Use the current line unless a named consumer needs a supported one. Do not author a legacy line. Emit a preview only when its posture is build and the user asked for that draft.45 -> [`references/versions.md`](references/versions.md)46 ✓ The target version is recorded, and it is not a legacy line.472. **Apply the pinned requirements.** Walk the quotes in [`references/requirements.md`](references/requirements.md) and implement each one that applies to the role.48 -> [`references/requirements.md`](references/requirements.md)49 ✓ Each applicable quote is either implemented or recorded as out of scope for the role, with the section it came from.503. **Upgrade** (only when asked). Follow the upgrade section from the source line to the target.51 -> [`references/versions.md`](references/versions.md)52 ✓ The result cites the target line and no longer depends on a requirement that only the old line stated.5354## Verify before done5556- [ ] The artifact cites the target line's revision from [Sources](#sources).57- [ ] Every applicable quoted requirement in [`references/requirements.md`](references/requirements.md) holds.58- [ ] Nothing from a preview line is emitted unless its posture is build and the user opted in.5960## Reference index6162- **`references/versions.md`**: every version line, which one to use, and how to upgrade. Load for steps 1 and 3.63- **`references/requirements.md`**: quotes taken from the pinned specification. Load for step 2.6465## Related skills6667Install related spec skills by name with `npx skills add ScaleDockHQ/scaledock-skills --skill <name>`.6869- `jwt`, when the work also follows that specification: `npx skills add ScaleDockHQ/scaledock-skills --skill jwt`7071## Sources7273Status uses the publishing body's own maturity term. Checked is the date the source was last read.7475- [RFC 9052 CBOR Object Signing and Encryption (COSE): Structures and Process](https://www.rfc-editor.org/rfc/rfc9052.html): INTERNET STANDARD, RFC 9052 (INTERNET STANDARD, August 202), checked 2026-10-06.76- [RFC 9053 CBOR Object Signing and Encryption (COSE): Initial Algorithms](https://www.rfc-editor.org/rfc/rfc9053.html): INFORMATIONAL, RFC 9053 (INFORMATIONAL, August 202), checked 2026-10-06.77- [RFC 9360 CBOR Object Signing and Encryption (COSE): Header Parameters for Carrying and Referencing X.509 Certificates](https://www.rfc-editor.org/rfc/rfc9360.html): PROPOSED STANDARD, RFC 9360 (PROPOSED STANDARD, February 2), checked 2026-10-06.78- [RFC 9964 ML-DSA for JSON Object Signing and Encryption (JOSE) and CBOR Object Signing and Encryption (COSE)](https://www.rfc-editor.org/rfc/rfc9964.html): PROPOSED STANDARD, RFC 9964 (PROPOSED STANDARD, May 2026), checked 2026-10-06.