← attestto.com  ·  VCP v0.1  ·  All Specs

Implementation Report

VCP v0.1 Working Draft — @attestto/vcp Reference Implementation

8 tests passed · 0 failed · 3 carriers + tamper detection + idempotency + keygen
FieldValue
SpecificationVCP v0.1 Working Draft
ImplementerAttestto
Implementation@attestto/vcp (Node.js CLI, MIT/Apache-2.0)
LanguageJavaScript (Node.js ≥ 20)
Cryptography@noble/curves (Ed25519), @noble/hashes (SHA-256), canonicalize (JCS RFC 8785)
Report Date2026-07-01
Implementation Count1 (additional implementations invited)

Test Suite Overview

TestPurposeResult
1. sidecar sign+verify roundtripBase envelope + sidecar carrier + did:key resolverPASS
2. pdf sign+verify roundtripPDF trailer carrier + content canonicalizationPASS
3. jpeg sign+verify roundtripJPEG XMP APP1 carrier + segment iterationPASS
4. tampered sidecar host file fails verifyContent-hash mismatch detection (sidecar)PASS
5. tampered pdf host file fails verifyContent-hash mismatch detection (embed carrier)PASS
6. re-sign is idempotentRe-signing replaces prior envelope; no compounded embed blocksPASS
7. help output includes spec URLCLI advertises the specification namespacePASS
8. keygen produces resolvable did:keyMandatory did:key support (§5.1)PASS

Section-by-Section Coverage

§2 Envelope structure

RequirementCovered by testStatus
§2.1 required metadata fields (spec, spec_version, issuer, content_type, content_hash, hash_scope, timestamp)1, 2, 3 (all roundtrips construct and validate the full metadata object)PASS
§2.1 optional fields (subject, profile, ieal) acceptedManual verification via vcp sign --subject / --profilePASS
§2.2 signature block alg = EdDSA, value base64url1, 2, 3 (produced envelopes conform to shape)PASS

§3 Canonicalization

RequirementCovered by testStatus
§3.1 metadata canonicalized via JCS (RFC 8785)Implementation uses canonicalize package on every sign and verify path (see src/envelope.js)PASS
§3.2 host-file-minus-vcp-block for embed carriers2 (PDF), 3 (JPEG); tamper detection tests 4, 5 exercise the rulePASS
§3.2 host-file-unmodified for sidecar1 (sidecar roundtrip), 4 (tamper detection)PASS

§4 Carriers

CarrierCovered by testStatus
§4.1 Sidecar1, 4PASS
§4.2 PDF trailer2, 5, 6 (idempotency uses JPEG but same replacement rule applies to PDF via stripVcpTrailer)PASS
§4.3 JPEG XMP3, 6PASS

§5 DID methods

MethodCovered by testStatus
§5.1 did:key (mandatory for verifiers)1, 2, 3, 8PASS
§5.2 did:pki (optional; signer accepts, verifier requires --public-key until resolver publishes)Documented in README + CLI error text; not covered by v0.1 testsPARTIAL

§7 Conformance

RequirementCovered by testStatus
§7.1.1 signer produces required fields1, 2, 3PASS
§7.1.2 signer canonicalizes before signingImplementation invariant; every sign path uses canonicalize()PASS
§7.1.3 signer uses registered algorithm1, 2, 3 (only Ed25519 emitted)PASS
§7.1.4 signer embeds via a defined carrier1, 2, 3PASS
§7.1.5 SHOULD re-signing replaces, not compounds6PASS
§7.2.1 verifier rejects unknown top-level fieldsNot tested in v0.1; behavior specified but only enforced by strict JSON schema addition planned for v0.2GAP
§7.2.2 verifier rejects unknown spec_versionNot tested in v0.1; behavior specifiedGAP
§7.2.3 verifier recomputes content hash and rejects on mismatch4, 5PASS
§7.2.4 verifier supports did:key1, 2, 3PASS
§7.2.5 distinguishes DID-resolution failure from signature failureDistinct error paths implemented in src/did.js; not asserted by test suite in v0.1PARTIAL
§7.2.6 MAY warn on sidecar-separation riskNot implemented; documented in README as user-facing riskDEFERRED

Known Gaps

The gaps below are recognized limitations of the v0.1 implementation. They do not affect correctness on well-formed input but reduce robustness on adversarial or malformed input.

How to Reproduce

All tests are runnable with:

git clone https://github.com/Attestto-com/vcp-cli
cd vcp-cli
pnpm install
pnpm test

Test source: test/roundtrip.test.js. Each test spawns the CLI as a subprocess, exercising the same public surface an external implementer would use.

Invitation to External Implementers

VCP is an open specification. Additional reference implementations in other languages (Rust, Go, Python, Swift) are invited. Implementers who publish a conformance report following the shape of this document are invited to open a PR on did-sns-spec to have their report linked from the specification page.