In this section: Build
Start
Reference code
- obsp (C)
- Conformance runner (reference service)
- obsp (Go)
- Plugfests (non-normative groundwork)
- Python reference pipelines (draft profiles, synthetic data)
- obsp-eo
- obsp-model-run (draft OIP-0012, MODEL-OBSERVER)
- obsp-sensing (draft OIP-0011, NETWORK-SENSING, provisional)
- obsp-space
- Rust reference workspace
- Performance bench (WP-RI-11)
- The 0.2 candidate (DRAFT)
- obsp-core (Rust reference library)
- obsp-federation
- obsp-node-embedded
- Node agent (obsp-node)
- Evidence verifier (obsp-verify)
- obsp-sdk (TypeScript / ES modules)
Tools
API reference
- All APIs
- Observatory Protocol service administration (production services)
- Observatory Protocol CloudEvents (draft OIP-0024 binding)
- Observatory Protocol correction subscriptions
- Observatory Protocol credential status (reference service)
- Observatory Protocol discovery (reference service)
- Observatory Protocol exchange API (reference)
- Observatory Protocol federation sync (draft OIP-0004)
- Observatory Protocol Field Topic Contract (MQTT 5 and Sparkplug B)
- Observatory Protocol participant gateway
- gRPC services
- Observatory Protocol implementations and conformance registry (reference service)
- Observatory Protocol transparency log (reference service)
- Observatory Protocol WIS 2.0 notifications (draft OIP-0009 binding)
Public services
Bindings and crosswalks
obsp (Go)
On this page
| Field | Value |
|---|---|
| Status | Reference code; no conformance claim |
| Toolchain | Go 1.24 (go.mod) |
A Go module for Observatory Protocol documents, written against the standard library only (no third-party modules).
Module path obsp.example/obsp; it is a reference for reading and testing, not a product. This library makes no
conformance claim.
What it covers
| File | What it does |
|---|---|
jcs.go |
RFC 8785 canonical JSON. Numbers use the ECMAScript Number-to-String rules (ESNumber), member names sort by UTF-16 code units, strings escape as JSON.stringify does. ParseJSON refuses duplicate member names, trailing data and invalid UTF-8; numbers are IEEE 754 doubles |
digest.go |
The Digest form <alg>:<hex> (specification section 4.1): ParseDigest, DigestBytes, ComputeDigest (over canonical bytes), VerifyDigest; sha256, sha384, sha512; any other well-formed algorithm parses but is not computed |
uni.go |
UNI syntax of the live specification and both scheme forms of the OIP-0016 draft: uni:<kind>:<local> and uni:<authority>:<kind>:<local> (DNS name or did:web:<host>) |
cbor.go |
A minimal deterministic CBOR codec (RFC 8949 section 4.2.1): integers, byte and text strings, arrays, maps (sorted by encoded key), tags, booleans, null. Floats and indefinite lengths are refused when decoding |
signature.go, algorithms.go |
Signature envelope verification as the OIP-0008 draft proposes: COSE_Sign1 (RFC 9052) with a detached JCS payload, protected header checks, key resolution by UNI or RFC 7638 thumbprint, failure codes OBS-SIG-0001 to OBS-SIG-0008; Ed25519 (crypto/ed25519), ES256 and ES384 (crypto/ecdsa) |
schema.go, ecmare.go |
A JSON Schema 2020-12 validator for the keywords the repository’s schemas use (same approach as reference/typescript/obsp-sdk: local $ref only, format as an annotation, an unsupported keyword is refused when the schema is compiled). Go’s RE2 has no lookahead, so ecmare.go is a small ECMA-262 pattern matcher with lookahead |
cmd/obsp-go |
obsp-go digest and obsp-go verify (run obsp-go help) |
What it does not cover
- ML-DSA, SLH-DSA, composite and RS256 signatures: there is no verifier in this module, so the result is
unavailable, nevervalid(the two ML-DSA vectors that need the signature itself are reported as skipped). - DSSE envelopes, signing, key management, key-record status checks beyond
REVOKED, and trust decisions. - Schema keywords outside the supported list (for example
unevaluatedProperties,$dynamicRef), remote$ref, andformatassertions. Lone UTF-16 surrogates written as\uD800escapes are replaced by Go’s JSON decoder before canonicalization and so are not refused. - Any claim that an implementation is conformant, certified or secure. Levels stop at SELF_TESTED.
OIP-0008 and OIP-0016 are DRAFT proposals. signature.go and algorithms.go follow the OIP-0008 proposal, not the live
specification, which defines no signature; uni.go reads the OIP-0016 forms in addition to the live syntax.
Tests
make go from the repository root (or go vet ./... && go test ./... here; Go 1.24 or later):
- every fixture of
fixtures/positivevalidates and every one offixtures/negativefails against the schema its_schemaTitlenames (skipped outside a checkout of this repository); - RFC 8785 examples and key order; 20 000 doubles formatted by
ESNumberand by Node.jsString(number)compared, and the canonical bytes of every fixture and vector compared withreference/typescript/obsp-sdk(both run only whennodeis on the path); - digest known answers, UNI forms, CBOR known answers from RFC 8949 Appendix A, the ECMA pattern matcher;
- every OIP-0008 draft vector (
testdata/oip-0008/, copied from the draft, test keys only) reproduces its published bytes and verifies or fails with the code it states; the deterministic Ed25519 vectors are reproduced by signing.
go run ./cmd/obsp-go digest ../../../fixtures/positive/observation-record.valid.json
go run ./cmd/obsp-go verify --keys testdata/oip-0008/keys.json --class receipt object.json
Exit status: 0 ok or valid, 1 invalid or mismatch, 2 usage or input error, 3 unavailable.