Skip to content

solidusnetwork/solidus-test-vectors

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Solidus test vectors

Conformance test vectors for did:solidus, BBS+ selective disclosure, and Solidus credential bundles — plus a reference runner.

If you are implementing any of these in another language, this repository is how you prove your implementation agrees with Solidus byte for byte, without trusting Solidus's own code.

git clone https://github.com/solidusnetwork/solidus-test-vectors
cd solidus-test-vectors/runner
npm install && npm run build
node dist/cli.js ../test-vectors
[PASS] hash160                          ../test-vectors/did/hash160-v1.json
[PASS] did-derivation                   ../test-vectors/did/derivation-v1.json
[PASS] did-tx-create                    ../test-vectors/did/tx-create-v1.json
[PASS] did-resolve                      ../test-vectors/did/resolve-v1.json
[PASS] did-deactivate                   ../test-vectors/did/deactivate-v1.json
[PASS] bbs-sign-verify                  ../test-vectors/bbs/sign-verify-v1.json
[PASS] bbs-selective-disclosure         ../test-vectors/bbs/selective-disclosure-v1.json
[PASS] bbs-negative-cases               ../test-vectors/bbs/negative-cases-v1.json
[PASS] bbs-selective-disclosure-negative ../test-vectors/bbs/selective-disclosure-negative-v1.json
[PASS] credential-bundle                ../test-vectors/credentials/capability-scope-v1.json
[PASS] credential-bundle                ../test-vectors/credentials/owner-binding-v1.json
[PASS] credential-bundle                ../test-vectors/credentials/spend-mandate-v1.json

12/12 vectors passed

The vectors are the interop surface — not the runner

test-vectors/**/*.json is the contract. The runner in runner/ is one implementation of it, provided so you have something to compare against and to prove the vectors are self-consistent. Your implementation does not have to look anything like it — it has to produce the same bytes.

Each vector file carries its own generatedBy field naming the exact command that produced it, so any value here can be traced back to the code that emitted it rather than taken on faith.

What is covered

Family Vectors What it pins
did/ hash160, derivation, tx-create, resolve, deactivate The identifier construction — HASH160, public key → address → did:solidus:<network>:<address>, and the create/resolve/deactivate operation shapes
bbs/ sign-verify, selective-disclosure, and two negative suites BBS+ over BLS12-381-SHA-256 per draft-irtf-cfrg-bbs-signatures: signing, proof generation with a disclosed subset, and the cases that MUST be rejected
credentials/ owner-binding, capability-scope, spend-mandate The credential-bundle shapes an agent passport is built from

The negative cases matter as much as the positive ones. An implementation that accepts a tampered proof passes every happy-path vector and is still broken. bbs/negative-cases-v1.json and bbs/selective-disclosure-negative-v1.json exist to catch exactly that, and a runner that reports them as [PASS] is asserting it rejected them.

Key material in these files is test-only, on purpose

The vectors contain private keys, because reproducing a signature requires them. They are all synthetic and say so in the clear:

  • the BBS+ secret key derives from the ASCII input keying material solidus-bbs-ts-port-test-vector-fixed-ikm-32bytes
  • the seed phrase is the canonical BIP-39 all-zeros vector (abandon abandon … about)
  • subjects are did:solidus:testnet:alice and friends

No key here controls anything. Nothing in this repository is used by, or grants access to, any Solidus deployment.

Status

Testnet-grade. These vectors pin current behaviour on the public testnet; they are versioned (-v1) so that a future change is a new file rather than a silent edit. They have not been through an external audit, and this repository makes no compliance or certification claim.

Related

License

Apache-2.0

About

Conformance test vectors for did:solidus, BBS+ selective disclosure, and Solidus credential bundles — with a reference runner

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages