3.1 · Credential formatsWorking
Securing a credential: enveloping and embedded proofs
There are two ways to sign a credential. Enveloping wraps the whole thing in a signed container, so the signature covers the bytes exactly as they were sent. Embedding adds a proof object inside the data itself, so the data can be read without opening anything, and the signature covers a canonical form of it. The same credential data can be secured either way, so which data model and which signature are separate choices.
A letter in a sealed envelope, against a letter with the signature written on the page.
Where it breaks:
- An embedded proof survives the data being moved between systems only if both sides put it into exactly the same canonical form.
- An envelope must be opened before the data can be read, but its bytes are signed exactly as they are.
The data model names its securing mechanisms and requires a credential to be secured by one W3C-VC-DATA-MODEL-2.0 §4.12: an envelope in JSON Web Signature or CBOR Object Signing W3C-VC-JOSE-COSE-1.0 §3, or an embedded Data Integrity proof W3C-VC-DATA-INTEGRITY-1.0 §2.1.
- The securing mechanism changes nothing about who sees the claims: whoever receives the credential reads them.
- Choosing a securing mechanism does not choose selective disclosure or unlinkability; those come from the format built on it (3.6 Choosing a format).
- W3C-VC-DATA-INTEGRITY-1.0 Verifiable Credential Data Integrity 1.0
- W3C-VC-DATA-MODEL-2.0 Verifiable Credentials Data Model v2.0
- W3C-VC-JOSE-COSE-1.0 Securing Verifiable Credentials using JOSE and COSE