Problem
The spec requires DataIntegrityProof/eddsa-rdfc-2022 for Verifiable Credential proofs, which uses RDFC-1.0 (RDF Dataset Canonicalization). The current implementation uses JCS (RFC 8785) canonicalization instead.
This means:
- Self-attestation (
method: "self") works correctly
- VC attestation (
method: "vc") works when VCs are generated by this library, but will not correctly verify VCs signed by third-party issuers using proper RDFC-1.0
What RDFC-1.0 requires
- JSON-LD expansion of the VC document
- N-Quads serialization
- RDFC-1.0 canonicalization (W3C algorithm)
- Two-step hash: hash of canonical proof options + hash of canonical document
- Ed25519 signature over the combined hash
Impact
Low for current use cases — the MCP guard only uses self-attestation. This becomes important when:
- Accepting VCs from external identity providers
- Interoperating with other x428 implementations that use proper RDFC-1.0
- Supporting the full
eddsa-rdfc-2022 cryptosuite
Implementation notes
- Will need a JSON-LD processor (e.g.,
jsonld npm package)
- The
verifyVcProof function in src/core/verify.ts is the only code that needs to change
- Current JCS-based approach is documented with a comment pointing to this issue
- Consider making the canonicalization strategy pluggable so JCS remains available for testing
References
Problem
The spec requires
DataIntegrityProof/eddsa-rdfc-2022for Verifiable Credential proofs, which uses RDFC-1.0 (RDF Dataset Canonicalization). The current implementation uses JCS (RFC 8785) canonicalization instead.This means:
method: "self") works correctlymethod: "vc") works when VCs are generated by this library, but will not correctly verify VCs signed by third-party issuers using proper RDFC-1.0What RDFC-1.0 requires
Impact
Low for current use cases — the MCP guard only uses self-attestation. This becomes important when:
eddsa-rdfc-2022cryptosuiteImplementation notes
jsonldnpm package)verifyVcProoffunction insrc/core/verify.tsis the only code that needs to changeReferences
src/core/verify.ts:verifyVcProof()