@certcrypt/verifier-toolkit 0.0.0-stage → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of @certcrypt/verifier-toolkit might be problematic. Click here for more details.
- package/CHANGELOG.md +72 -0
- package/LICENSE +178 -0
- package/README.md +563 -2
- package/SECURITY.md +77 -0
- package/dist/cli/certcrypt-verify.d.ts +2 -0
- package/dist/cli/certcrypt-verify.js +174 -0
- package/dist/cli/certcrypt-verify.js.map +1 -0
- package/dist/core/config/certcrypt-foundation.d.ts +13 -0
- package/dist/core/config/certcrypt-foundation.js +123 -0
- package/dist/core/config/certcrypt-foundation.js.map +1 -0
- package/dist/core/config/default.d.ts +47 -0
- package/dist/core/config/default.js +93 -0
- package/dist/core/config/default.js.map +1 -0
- package/dist/core/config/test-keys.d.ts +40 -0
- package/dist/core/config/test-keys.js +41 -0
- package/dist/core/config/test-keys.js.map +1 -0
- package/dist/core/conformance/attestation.d.ts +4 -0
- package/dist/core/conformance/attestation.js +4 -0
- package/dist/core/conformance/attestation.js.map +1 -0
- package/dist/core/consistency/verify-consistency.d.ts +92 -0
- package/dist/core/consistency/verify-consistency.js +353 -0
- package/dist/core/consistency/verify-consistency.js.map +1 -0
- package/dist/core/crypto/canonical-json.d.ts +14 -0
- package/dist/core/crypto/canonical-json.js +13 -0
- package/dist/core/crypto/canonical-json.js.map +1 -0
- package/dist/core/crypto/canonical-subject.d.ts +76 -0
- package/dist/core/crypto/canonical-subject.js +248 -0
- package/dist/core/crypto/canonical-subject.js.map +1 -0
- package/dist/core/crypto/collection-merkle.d.ts +91 -0
- package/dist/core/crypto/collection-merkle.js +243 -0
- package/dist/core/crypto/collection-merkle.js.map +1 -0
- package/dist/core/crypto/composite.d.ts +73 -0
- package/dist/core/crypto/composite.js +206 -0
- package/dist/core/crypto/composite.js.map +1 -0
- package/dist/core/crypto/digest.d.ts +18 -0
- package/dist/core/crypto/digest.js +37 -0
- package/dist/core/crypto/digest.js.map +1 -0
- package/dist/core/crypto/ecdsa-p256.d.ts +12 -0
- package/dist/core/crypto/ecdsa-p256.js +70 -0
- package/dist/core/crypto/ecdsa-p256.js.map +1 -0
- package/dist/core/crypto/ed25519.d.ts +10 -0
- package/dist/core/crypto/ed25519.js +28 -0
- package/dist/core/crypto/ed25519.js.map +1 -0
- package/dist/core/crypto/holder-keyset.d.ts +23 -0
- package/dist/core/crypto/holder-keyset.js +64 -0
- package/dist/core/crypto/holder-keyset.js.map +1 -0
- package/dist/core/crypto/jcs.d.ts +9 -0
- package/dist/core/crypto/jcs.js +59 -0
- package/dist/core/crypto/jcs.js.map +1 -0
- package/dist/core/crypto/merkle.d.ts +34 -0
- package/dist/core/crypto/merkle.js +147 -0
- package/dist/core/crypto/merkle.js.map +1 -0
- package/dist/core/crypto/ml-dsa.d.ts +25 -0
- package/dist/core/crypto/ml-dsa.js +104 -0
- package/dist/core/crypto/ml-dsa.js.map +1 -0
- package/dist/core/crypto/provider/bytes.d.ts +31 -0
- package/dist/core/crypto/provider/bytes.js +106 -0
- package/dist/core/crypto/provider/bytes.js.map +1 -0
- package/dist/core/crypto/provider/index.d.ts +45 -0
- package/dist/core/crypto/provider/index.js +60 -0
- package/dist/core/crypto/provider/index.js.map +1 -0
- package/dist/core/crypto/provider/node.d.ts +2 -0
- package/dist/core/crypto/provider/node.js +96 -0
- package/dist/core/crypto/provider/node.js.map +1 -0
- package/dist/core/crypto/provider/register-node.d.ts +11 -0
- package/dist/core/crypto/provider/register-node.js +16 -0
- package/dist/core/crypto/provider/register-node.js.map +1 -0
- package/dist/core/crypto/provider/types.d.ts +77 -0
- package/dist/core/crypto/provider/types.js +16 -0
- package/dist/core/crypto/provider/types.js.map +1 -0
- package/dist/core/crypto/provider/web.d.ts +2 -0
- package/dist/core/crypto/provider/web.js +122 -0
- package/dist/core/crypto/provider/web.js.map +1 -0
- package/dist/core/crypto/pseudonym.d.ts +25 -0
- package/dist/core/crypto/pseudonym.js +37 -0
- package/dist/core/crypto/pseudonym.js.map +1 -0
- package/dist/core/crypto/subject-json-preconditions.d.ts +47 -0
- package/dist/core/crypto/subject-json-preconditions.js +373 -0
- package/dist/core/crypto/subject-json-preconditions.js.map +1 -0
- package/dist/core/domain/verify-domain.d.ts +13 -0
- package/dist/core/domain/verify-domain.js +39 -0
- package/dist/core/domain/verify-domain.js.map +1 -0
- package/dist/core/foundation/anti-equivocation.d.ts +87 -0
- package/dist/core/foundation/anti-equivocation.js +0 -0
- package/dist/core/foundation/anti-equivocation.js.map +1 -0
- package/dist/core/foundation/verify-foundation.d.ts +36 -0
- package/dist/core/foundation/verify-foundation.js +559 -0
- package/dist/core/foundation/verify-foundation.js.map +1 -0
- package/dist/core/independent/anti-replay.d.ts +15 -0
- package/dist/core/independent/anti-replay.js +27 -0
- package/dist/core/independent/anti-replay.js.map +1 -0
- package/dist/core/independent/anti-splicing.d.ts +16 -0
- package/dist/core/independent/anti-splicing.js +54 -0
- package/dist/core/independent/anti-splicing.js.map +1 -0
- package/dist/core/independent/capacity-binding.d.ts +26 -0
- package/dist/core/independent/capacity-binding.js +57 -0
- package/dist/core/independent/capacity-binding.js.map +1 -0
- package/dist/core/independent/capacity-evidence.d.ts +38 -0
- package/dist/core/independent/capacity-evidence.js +286 -0
- package/dist/core/independent/capacity-evidence.js.map +1 -0
- package/dist/core/independent/effective-units.d.ts +42 -0
- package/dist/core/independent/effective-units.js +147 -0
- package/dist/core/independent/effective-units.js.map +1 -0
- package/dist/core/independent/issuance-participation.d.ts +13 -0
- package/dist/core/independent/issuance-participation.js +24 -0
- package/dist/core/independent/issuance-participation.js.map +1 -0
- package/dist/core/independent/leaf-binding.d.ts +5 -0
- package/dist/core/independent/leaf-binding.js +135 -0
- package/dist/core/independent/leaf-binding.js.map +1 -0
- package/dist/core/independent/operator-recognition-registry.d.ts +33 -0
- package/dist/core/independent/operator-recognition-registry.js +116 -0
- package/dist/core/independent/operator-recognition-registry.js.map +1 -0
- package/dist/core/independent/proof-structure.d.ts +8 -0
- package/dist/core/independent/proof-structure.js +167 -0
- package/dist/core/independent/proof-structure.js.map +1 -0
- package/dist/core/independent/proof-views.d.ts +26 -0
- package/dist/core/independent/proof-views.js +58 -0
- package/dist/core/independent/proof-views.js.map +1 -0
- package/dist/core/independent/settlement.d.ts +18 -0
- package/dist/core/independent/settlement.js +548 -0
- package/dist/core/independent/settlement.js.map +1 -0
- package/dist/core/independent/verify-independent.d.ts +30 -0
- package/dist/core/independent/verify-independent.js +123 -0
- package/dist/core/independent/verify-independent.js.map +1 -0
- package/dist/core/independent/verify-operator-recognition.d.ts +26 -0
- package/dist/core/independent/verify-operator-recognition.js +60 -0
- package/dist/core/independent/verify-operator-recognition.js.map +1 -0
- package/dist/core/independent/verify-proof-signature.d.ts +20 -0
- package/dist/core/independent/verify-proof-signature.js +97 -0
- package/dist/core/independent/verify-proof-signature.js.map +1 -0
- package/dist/core/input/fs-bridge.d.ts +30 -0
- package/dist/core/input/fs-bridge.js +35 -0
- package/dist/core/input/fs-bridge.js.map +1 -0
- package/dist/core/input/load-artifacts.d.ts +2 -0
- package/dist/core/input/load-artifacts.js +80 -0
- package/dist/core/input/load-artifacts.js.map +1 -0
- package/dist/core/input/load-original-material.d.ts +11 -0
- package/dist/core/input/load-original-material.js +126 -0
- package/dist/core/input/load-original-material.js.map +1 -0
- package/dist/core/input/register-node-fs.d.ts +1 -0
- package/dist/core/input/register-node-fs.js +24 -0
- package/dist/core/input/register-node-fs.js.map +1 -0
- package/dist/core/input/resolve-target.d.ts +16 -0
- package/dist/core/input/resolve-target.js +43 -0
- package/dist/core/input/resolve-target.js.map +1 -0
- package/dist/core/input/strict-json.d.ts +25 -0
- package/dist/core/input/strict-json.js +167 -0
- package/dist/core/input/strict-json.js.map +1 -0
- package/dist/core/input/validate.d.ts +7 -0
- package/dist/core/input/validate.js +83 -0
- package/dist/core/input/validate.js.map +1 -0
- package/dist/core/issued/verify-collection-element.d.ts +66 -0
- package/dist/core/issued/verify-collection-element.js +137 -0
- package/dist/core/issued/verify-collection-element.js.map +1 -0
- package/dist/core/issued/verify-issued.d.ts +15 -0
- package/dist/core/issued/verify-issued.js +361 -0
- package/dist/core/issued/verify-issued.js.map +1 -0
- package/dist/core/issued/verify-original-material.d.ts +35 -0
- package/dist/core/issued/verify-original-material.js +418 -0
- package/dist/core/issued/verify-original-material.js.map +1 -0
- package/dist/core/package/verify-package.d.ts +34 -0
- package/dist/core/package/verify-package.js +109 -0
- package/dist/core/package/verify-package.js.map +1 -0
- package/dist/core/public-api.d.ts +178 -0
- package/dist/core/public-api.js +182 -0
- package/dist/core/public-api.js.map +1 -0
- package/dist/core/result/builder.d.ts +92 -0
- package/dist/core/result/builder.js +408 -0
- package/dist/core/result/builder.js.map +1 -0
- package/dist/core/rules/verify-corpus.d.ts +88 -0
- package/dist/core/rules/verify-corpus.js +165 -0
- package/dist/core/rules/verify-corpus.js.map +1 -0
- package/dist/core/rules/verify-rules.d.ts +14 -0
- package/dist/core/rules/verify-rules.js +62 -0
- package/dist/core/rules/verify-rules.js.map +1 -0
- package/dist/core/testing/validate-against-schema.d.ts +31 -0
- package/dist/core/testing/validate-against-schema.js +93 -0
- package/dist/core/testing/validate-against-schema.js.map +1 -0
- package/dist/core/types/artifacts.d.ts +224 -0
- package/dist/core/types/artifacts.js +2 -0
- package/dist/core/types/artifacts.js.map +1 -0
- package/dist/core/types/capacity-evidence.d.ts +85 -0
- package/dist/core/types/capacity-evidence.js +51 -0
- package/dist/core/types/capacity-evidence.js.map +1 -0
- package/dist/core/types/check.d.ts +61 -0
- package/dist/core/types/check.js +2 -0
- package/dist/core/types/check.js.map +1 -0
- package/dist/core/types/config.d.ts +97 -0
- package/dist/core/types/config.js +2 -0
- package/dist/core/types/config.js.map +1 -0
- package/dist/core/types/foundation.d.ts +121 -0
- package/dist/core/types/foundation.js +25 -0
- package/dist/core/types/foundation.js.map +1 -0
- package/dist/core/types/index.d.ts +9 -0
- package/dist/core/types/index.js +2 -0
- package/dist/core/types/index.js.map +1 -0
- package/dist/core/types/operator-recognition.d.ts +71 -0
- package/dist/core/types/operator-recognition.js +24 -0
- package/dist/core/types/operator-recognition.js.map +1 -0
- package/dist/core/types/proof.d.ts +94 -0
- package/dist/core/types/proof.js +2 -0
- package/dist/core/types/proof.js.map +1 -0
- package/dist/core/types/request.d.ts +59 -0
- package/dist/core/types/request.js +2 -0
- package/dist/core/types/request.js.map +1 -0
- package/dist/core/types/result.d.ts +164 -0
- package/dist/core/types/result.js +2 -0
- package/dist/core/types/result.js.map +1 -0
- package/dist/core/types/settlement-material.d.ts +130 -0
- package/dist/core/types/settlement-material.js +2 -0
- package/dist/core/types/settlement-material.js.map +1 -0
- package/dist/core/verify-node.d.ts +14 -0
- package/dist/core/verify-node.js +17 -0
- package/dist/core/verify-node.js.map +1 -0
- package/dist/core/verify-web.d.ts +1 -0
- package/dist/core/verify-web.js +25 -0
- package/dist/core/verify-web.js.map +1 -0
- package/dist/core/verify.d.ts +18 -0
- package/dist/core/verify.js +183 -0
- package/dist/core/verify.js.map +1 -0
- package/package.json +71 -4
package/README.md
CHANGED
|
@@ -1,3 +1,564 @@
|
|
|
1
|
-
#
|
|
1
|
+
# CERTCRYPT Verifier Toolkit for JavaScript
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Official JavaScript/TypeScript reference verifier toolkit for evaluating CERTCRYPT artifacts under public rules without relying on live issuer systems.
|
|
4
|
+
|
|
5
|
+
CERTCRYPT is infrastructure that makes certification independently verifiable under public rules. Selected artifacts can reach `Independent` through `Proof of Independence`, a structural result, so later verification no longer depends on the issuer's live systems.
|
|
6
|
+
|
|
7
|
+
This toolkit evaluates CERTCRYPT artifacts under public rules, offline and `fail-closed`, without access to the issuer's live systems.
|
|
8
|
+
|
|
9
|
+
> [!NOTE]
|
|
10
|
+
> **The verifier API is stable at 1.0, and the production profile carries the certified rules corpus commitment.**
|
|
11
|
+
>
|
|
12
|
+
> The public surface listed under [Public API](#public-api) follows semantic versioning from 1.0.0 on, so anything that breaks it requires a major release. `getCertcryptConfig()` carries the published system root, the XRPL mainnet settlement parameters and the corpus commitment of `rules/2026-01`: `17e3a74a4fd05b039da9f740a138c36d353f561d49726c00351843bb518364ff`, the `subtree_root` of the corpus proof published in certcrypt-specs under `verification/rules/rules-2026-01/`. A rules version whose corpus proof is still pending carries `<pending-corpus-proof>` instead, and every `Independent` verification under it **fails closed** as `REJECTED` under `RULES_CORPUS_COMMITMENT_PRESENT`.
|
|
13
|
+
|
|
14
|
+
## Purpose
|
|
15
|
+
|
|
16
|
+
The toolkit evaluates whether an artifact has reached the conditions associated with `Independent`.
|
|
17
|
+
|
|
18
|
+
`Independent` means that later verification no longer depends on the issuer's live systems, internal databases, vendor continuity, or institutional cooperation.
|
|
19
|
+
|
|
20
|
+
The verifier role is evaluation under public rules. It is not endorsement, semantic validation, or institutional trust.
|
|
21
|
+
|
|
22
|
+
### It verifies any deployment, not just CERTCRYPT's
|
|
23
|
+
|
|
24
|
+
`verify()` takes a `SystemDomainConfig`, and the type is exported. Point it at
|
|
25
|
+
your own issuance, your own settlement account, your own rules domain — nothing in
|
|
26
|
+
this package is privileged to CERTCRYPT. `.env.example` is the template, field by
|
|
27
|
+
field.
|
|
28
|
+
|
|
29
|
+
`getCertcryptConfig()` is the profile CERTCRYPT publishes, and it is compiled in
|
|
30
|
+
rather than configured for one reason: **a verifier must not be configurable into
|
|
31
|
+
lying.** If the root fingerprint came from the environment, anyone could
|
|
32
|
+
substitute their own and obtain `INDEPENDENT_VALID` over fabricated material.
|
|
33
|
+
Shipping the published profile is what makes a verdict independent of whoever
|
|
34
|
+
runs the verifier — the same reason browsers ship root CAs instead of reading them
|
|
35
|
+
from a file.
|
|
36
|
+
|
|
37
|
+
Any other profile you supply is equally valid; it simply reports
|
|
38
|
+
`production_verification: false`, meaning "verified, but not against the published
|
|
39
|
+
CERTCRYPT domain". That flag distinguishes systems — it does not rank them.
|
|
40
|
+
|
|
41
|
+
Where a design here looks surprising, the reason is stated rather than left to be
|
|
42
|
+
inferred. Most of these choices exist because the alternative fails **silently** —
|
|
43
|
+
and a verifier that fails silently hands someone a verdict they cannot defend
|
|
44
|
+
later, which is the one outcome this package exists to prevent.
|
|
45
|
+
|
|
46
|
+
## Requirements
|
|
47
|
+
|
|
48
|
+
- Node.js >= 20, or any modern browser (see "Runtimes" below).
|
|
49
|
+
- The post-quantum component uses `@noble/post-quantum`, declared as an `optionalDependency` so a runtime that cannot build it still installs. It is **not** optional to the verdict: ML-DSA-65 is a required half of every composite signature, and without the runtime `BASE_CERTIFICATE_AUTHENTIC` fails `UNSUPPORTED` — the verifier refuses rather than falling back to the classical half alone. Malformed post-quantum material in the certificate fails `REJECTED` instead, so the two are distinguishable.
|
|
50
|
+
|
|
51
|
+
## Runtimes
|
|
52
|
+
|
|
53
|
+
The toolkit runs on Node and in the browser, on two crypto backends behind one
|
|
54
|
+
interface:
|
|
55
|
+
|
|
56
|
+
| Runtime | Entry point | Primitives |
|
|
57
|
+
|---------|--------------------------------------------|----------------------------------|
|
|
58
|
+
| Node | `@certcrypt/verifier-toolkit` (or `/node`) | `node:crypto` |
|
|
59
|
+
| Browser | `@certcrypt/verifier-toolkit/web` | `@noble/hashes`, `@noble/curves` |
|
|
60
|
+
|
|
61
|
+
`exports` resolves this automatically — a bundler picks the browser entry, Node
|
|
62
|
+
picks the Node entry. Nothing reachable from the browser entry imports
|
|
63
|
+
`node:crypto`, `node:fs` or `node:path`, so no aliasing, polyfilling or
|
|
64
|
+
`externals` configuration is required.
|
|
65
|
+
|
|
66
|
+
**Why a browser build exists.** Computing an artifact's commitment requires the
|
|
67
|
+
**original material**. Sending that to a server would transmit exactly the
|
|
68
|
+
private content the protocol is designed never to require — so the verifier runs
|
|
69
|
+
where the material already is, and the material never leaves the machine. This
|
|
70
|
+
also removes any practical size ceiling: a large file is hashed locally rather
|
|
71
|
+
than uploaded.
|
|
72
|
+
|
|
73
|
+
WebCrypto alone cannot serve this: it has no SHA-3 at any digest length, and
|
|
74
|
+
SHA3-256 is the digest under every commitment in the spec.
|
|
75
|
+
|
|
76
|
+
In the browser, supply artifacts **in memory** (`base_certificate`,
|
|
77
|
+
`independence_proof`, `original_material`, …) rather than by `*_path`;
|
|
78
|
+
`VerifierRequest` accepts both forms and the in-memory value wins.
|
|
79
|
+
An artifact read from a path is parsed strictly: a member name repeated in any
|
|
80
|
+
object, at any depth, rejects the input. An in-memory artifact has already been
|
|
81
|
+
parsed by the caller, so parse it with the exported `strictJsonParse`; a parser
|
|
82
|
+
that keeps one of two duplicates has already discarded the evidence.
|
|
83
|
+
|
|
84
|
+
**The browser path is audited, not assumed.** Both backends run the same unit
|
|
85
|
+
suite and the same 160 conformance fixtures:
|
|
86
|
+
|
|
87
|
+
```sh
|
|
88
|
+
npm test # unit, node backend
|
|
89
|
+
npm run test:web # unit, web backend
|
|
90
|
+
npm run test:conformance # the full fixture set, node backend
|
|
91
|
+
npm run test:conformance:web # the full fixture set, web backend
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
**The verdict half is complete; the primitive half is partial.**
|
|
95
|
+
`test:conformance` runs all 160 verdict fixtures, which is what binds a verifier.
|
|
96
|
+
The suite also carries 29 families of primitive byte-contract vectors, of which
|
|
97
|
+
this toolkit reads 17 — every family a verifier consumes: the subject
|
|
98
|
+
canonicalizations, strict JSON, original material, the collection fold,
|
|
99
|
+
pseudonyms, holder key sets, capacity evidence and the level-1 binding, the
|
|
100
|
+
independence-proof signature, the composite framing and verification, and the
|
|
101
|
+
consistency vectors (`core/conformance/coverage.test.ts` names the test that
|
|
102
|
+
reads each one).
|
|
103
|
+
|
|
104
|
+
The 12 it does not read are producer-side (how an issuer assembles and signs what
|
|
105
|
+
a verifier later checks) or resolution-side. One of them, `operator-receipt`,
|
|
106
|
+
fixes bytes a transporting node signs; no verdict depends on a receipt and this
|
|
107
|
+
toolkit handles none. Another, `operator-domain-binding`, fixes the statements by
|
|
108
|
+
which a node associates its operator key with a host name; they are no part of
|
|
109
|
+
any proof, and this toolkit verifies none.
|
|
110
|
+
|
|
111
|
+
`core/crypto/provider/provider.equivalence.test.ts` additionally pins the two
|
|
112
|
+
backends against each other primitive by primitive, including the cases where
|
|
113
|
+
they could plausibly diverge (high-s ECDSA signatures, SHA3-vs-SHA2 digests, and
|
|
114
|
+
both accepted public-key encodings).
|
|
115
|
+
|
|
116
|
+
Neither backend can sign: the provider interface exposes hashing and
|
|
117
|
+
signature **verification** only. The toolkit evaluates artifacts under public
|
|
118
|
+
rules and holds no secrets.
|
|
119
|
+
|
|
120
|
+
## Public API
|
|
121
|
+
|
|
122
|
+
Both entry points expose the **same** surface, so code written against one runs
|
|
123
|
+
on the other unchanged (pinned by `core/public-api.test.ts`):
|
|
124
|
+
|
|
125
|
+
| Export | What it is |
|
|
126
|
+
|--------------------------------------------------------------------------------|----------------------------------------------------------|
|
|
127
|
+
| `verify(request, config?)` | the verdict — the main entry point |
|
|
128
|
+
| `verifyCollectionInclusion(...)` | element-level inclusion |
|
|
129
|
+
| `verifyCollectionElementFromCertificate(certificate, value, options?)` | element-level inclusion from the certificate and one leaf value alone (verifier-toolkit/1 §8.4.2) |
|
|
130
|
+
| `collectionLeafHash` / `collectionNodeHash` / `collectionMerkleRoot`, `COLLECTION_MERKLE_SCHEME` | the collection fold, to derive an inclusion proof from signed `leaves[]` |
|
|
131
|
+
| `digestHexBytes` / `digestHexText` / `digestBytes` | SHA3-256, the digest under every commitment |
|
|
132
|
+
| `digestHexStream` | SHA3-256 fed in chunks, for material too big to buffer |
|
|
133
|
+
| `isOpaqueByteProfile` / `OPAQUE_BYTE_PROFILES` | which profiles may be hashed in chunks |
|
|
134
|
+
| `canonicalBytesForSubject`, `SUBJECT_*`, `SUPPORTED_SUBJECT_PROFILES` | canonical bytes per subject profile |
|
|
135
|
+
| `jcsCanonicalizeBytes` / `jcsCanonicalizeString` | RFC 8785 canonicalization — the signed byte form |
|
|
136
|
+
| `strictJsonParse` / `StrictJsonError` | strict JSON, for artifacts passed in memory |
|
|
137
|
+
| `verifyComposite`, `compositeMPrime`, `COMPOSITE_DOMAIN_PREFIX`, `PROFILE_*`, `ALG_*` | composite signature verification (the AND of components) |
|
|
138
|
+
| `getCertcryptConfig` | the CERTCRYPT system-domain profile |
|
|
139
|
+
| `foundationPayloadDigest` / `FOUNDATION_UNSIGNED_PAYLOAD_FIELDS` | the signed payload digest of a `system-foundation/1` statement, for a deployment that configures its own |
|
|
140
|
+
| `initMlDsa65` | starts the ML-DSA-65 runtime the composite requires |
|
|
141
|
+
| `CONFORMANCE_VECTORS_VERSION` / `CONFORMANCE_FIXTURES_PASSED` | which conformance vectors this build passed, or `null` |
|
|
142
|
+
| `verifyRulesCorpus(request, documents, config)` | checks a rules text against the corpus commitment (`rules-domain/1` §13.3) |
|
|
143
|
+
| `verifyConsistency(certificate, snapshots, config?)` | CCVP/1 consistency with the declared context the certificate names — optional, reported beside the verdict, never part of it |
|
|
144
|
+
|
|
145
|
+
The surface is **complete operations, never loose primitives**. Single signature
|
|
146
|
+
components (`verifyEd25519Signature`, `verifyEcdsaP256Signature`,
|
|
147
|
+
`verifyMlDsa65Signature`) and the holder-keyset Merkle fold internals
|
|
148
|
+
(`computeMerkleRoot`, `computeLeafHash`, `generateInclusionProof`) are
|
|
149
|
+
deliberately NOT exported: a composite is valid only through `verifyComposite`,
|
|
150
|
+
so exporting a component would hand out a way to accept a signature whose
|
|
151
|
+
post-quantum half was stripped.
|
|
152
|
+
|
|
153
|
+
The collection fold (`collectionLeafHash`, `collectionNodeHash`,
|
|
154
|
+
`collectionMerkleRoot`) is the one deliberate exception: `subject.collection/1`
|
|
155
|
+
§7.4 places the per-leaf commitments inside the signed certificate, so a holder
|
|
156
|
+
can derive an inclusion proof for any element from `leaves[]` alone. The verdict
|
|
157
|
+
still comes from `verifyCollectionInclusion`, which is fail-closed, and
|
|
158
|
+
`verifyCollectionElementFromCertificate` does the whole operation for you: it
|
|
159
|
+
verifies the certificate, folds the signed leaves, tries every declared leaf
|
|
160
|
+
profile and reports every position a repeated value occupies. `exports` enforces this
|
|
161
|
+
— deep imports into `dist/` are blocked, and TypeScript rejects them at compile
|
|
162
|
+
time.
|
|
163
|
+
|
|
164
|
+
`getCertcryptConfig()` is the published CERTCRYPT profile: the system-root
|
|
165
|
+
fingerprint and the XRPL mainnet settlement parameters of `rules/2026-01`, and one
|
|
166
|
+
corpus commitment per supported `rules_version` (`rules_corpus_roots`). The
|
|
167
|
+
commitment of `rules/2026-01` is the `subtree_root` of its corpus proof. It fails
|
|
168
|
+
closed: a rules version whose corpus proof has not been emitted carries the
|
|
169
|
+
placeholder `<pending-corpus-proof>`, and the toolkit refuses that placeholder as
|
|
170
|
+
it refuses a missing value, so no artifact reaches `INDEPENDENT_VALID` under it.
|
|
171
|
+
Replacing it with a concrete value before the proof exists is a fail-OPEN bug, not
|
|
172
|
+
a fix.
|
|
173
|
+
|
|
174
|
+
### The rules text is checked against a commitment the toolkit carries
|
|
175
|
+
|
|
176
|
+
The corpus commitment is the `subtree_root` anchored by the corpus proof of a rules
|
|
177
|
+
domain: the proof that fixes which text that `rules_version` is made of (for
|
|
178
|
+
`rules/2026-01`, its registry entry). It ships inside the profile, never from the
|
|
179
|
+
environment or the ruleset under evaluation, because a commitment that could be
|
|
180
|
+
configured could be replaced (`rules-domain/1` §13.3.1).
|
|
181
|
+
|
|
182
|
+
`verifyRulesCorpus(request, documents, config)` checks a document set against it:
|
|
183
|
+
the corpus proof verifies, its `subtree_root` is the commitment `config` carries,
|
|
184
|
+
its certificate commits to one `subject.collection/1` of `subject.text/1` leaves,
|
|
185
|
+
and each document reproduces its leaf. A valid result means the text is exactly
|
|
186
|
+
the one that governs that `rules_version`; it says nothing about whether the rules
|
|
187
|
+
are right.
|
|
188
|
+
|
|
189
|
+
### Only the production profile is a CERTCRYPT verdict
|
|
190
|
+
|
|
191
|
+
This toolkit verifies any deployment of the protocol: `verify()` takes a
|
|
192
|
+
`SystemDomainConfig`, the type is public, and a caller can point it at their own
|
|
193
|
+
issuance, their own settlement account and their own rules domain. One profile is
|
|
194
|
+
different from all the others, and the distinction is the point.
|
|
195
|
+
|
|
196
|
+
- **The package ships exactly one profile: production.** The test-profile helpers
|
|
197
|
+
live in `harness/`, which npm excludes. They are not reachable from the package
|
|
198
|
+
— not through `exports`, and not through an internal path either, because the
|
|
199
|
+
files are not there.
|
|
200
|
+
- **Running under any other profile requires you to supply it.** The environment
|
|
201
|
+
helper reads every field from the environment and throws when one is missing;
|
|
202
|
+
nothing is defaulted. The conformance helper carries synthetic values only. `certcrypt-verify --test-config <path>` takes a config you own. No
|
|
203
|
+
deployment configuration ships with this repository or the package.
|
|
204
|
+
- **A verdict under a non-production profile is not a CERTCRYPT verdict.**
|
|
205
|
+
`VerifierResult.production_verification` is `false` for any configuration that
|
|
206
|
+
is not byte-for-byte the published production profile — not merely a different
|
|
207
|
+
root fingerprint, the *entire* profile. Presenting such a result as a CERTCRYPT
|
|
208
|
+
verification is a misrepresentation.
|
|
209
|
+
|
|
210
|
+
### Consistency with a declared context is optional, and never a verdict
|
|
211
|
+
|
|
212
|
+
`verifyConsistency(certificate, snapshots, config?)` answers one question under
|
|
213
|
+
CCVP/1: was this certificate issued by a key that the declared context it names
|
|
214
|
+
listed as eligible at its issuance time? A certificate names that context in its
|
|
215
|
+
signed `payload.context` — the snapshot issuer by `signer.id` **and** composite key
|
|
216
|
+
fingerprint, plus a `context_set_id` — and context snapshots are ordinary signed
|
|
217
|
+
certificates carrying `payload.snapshot`.
|
|
218
|
+
|
|
219
|
+
Pass the certificates themselves, parsed with `strictJsonParse`, never extracted
|
|
220
|
+
snapshot values. Every one is verified under the Issued route first, and a
|
|
221
|
+
snapshot's issuer is the key that signed it: a snapshot signed by another key is
|
|
222
|
+
outside the namespace even when it carries the same `signer.id` label. Timestamps
|
|
223
|
+
are compared as instants (`…00Z` and `…00.000Z` are the same moment), and the
|
|
224
|
+
outcome is `consistency-match`, `consistency-mismatch` or `consistency-unknown`.
|
|
225
|
+
|
|
226
|
+
None of them changes what `verify()` returns. A match is not endorsement, not
|
|
227
|
+
trust and not a step toward Independent; an unknown invalidates nothing.
|
|
228
|
+
|
|
229
|
+
### Hashing material in chunks
|
|
230
|
+
|
|
231
|
+
`digestHexStream()` hashes a file piece by piece — `update()` per chunk, then
|
|
232
|
+
`digestHex()` — so a multi-gigabyte input never has to exist in one buffer. The
|
|
233
|
+
result equals `digestHexBytes()` over the concatenation, and the equivalence test
|
|
234
|
+
pins that at chunk sizes straddling SHA3-256's 136-byte rate, which is where a
|
|
235
|
+
naive implementation would drift **silently** and produce a wrong commitment
|
|
236
|
+
rather than an error.
|
|
237
|
+
|
|
238
|
+
A caller that streamed a file can then pass `PrehashedMaterial` —
|
|
239
|
+
`{ prehashed: true, subject_local_digest_hex }` — in the subject-material map
|
|
240
|
+
instead of the bytes. The verdict is identical, because the commitment is computed
|
|
241
|
+
from that digest either way.
|
|
242
|
+
|
|
243
|
+
**This is valid only where `canonical_bytes` ARE the input bytes**, which today
|
|
244
|
+
means `subject.binary/1`. Ask `isOpaqueByteProfile(profile)` rather than comparing
|
|
245
|
+
the name: the rule lives next to the switch that canonicalizes, so the two cannot
|
|
246
|
+
drift apart, and a future profile version with the same property needs no change
|
|
247
|
+
here. Every other profile transforms the material before hashing — `subject.text/1`
|
|
248
|
+
normalizes line endings, `subject.email/1` unfolds headers across the whole
|
|
249
|
+
message, and the JSON-object profiles re-serialize the *parsed value* under JCS —
|
|
250
|
+
and none of those is chunk-local. A prehashed entry on one of them is `REJECTED`
|
|
251
|
+
as caller misuse, deliberately NOT compared as an `ISSUED_INVALID` material
|
|
252
|
+
mismatch: the fault is in the call, not in the material, and reporting it as a
|
|
253
|
+
material mismatch would send someone hunting for a tampered file.
|
|
254
|
+
|
|
255
|
+
## Quickstart
|
|
256
|
+
|
|
257
|
+
Build the toolkit and run the conformance suite locally.
|
|
258
|
+
|
|
259
|
+
```sh
|
|
260
|
+
git clone https://github.com/CERTCRYPT/certcrypt-verifier-toolkit-js.git
|
|
261
|
+
cd certcrypt-verifier-toolkit-js
|
|
262
|
+
npm install
|
|
263
|
+
npm run build # compiles TypeScript to dist/
|
|
264
|
+
npm test # unit tests (node --test)
|
|
265
|
+
```
|
|
266
|
+
|
|
267
|
+
To run the conformance suite you also need the conformance contract. It is not
|
|
268
|
+
vendored in this repository (see "Conformance contract" below):
|
|
269
|
+
|
|
270
|
+
```sh
|
|
271
|
+
# Check out the contract repository next to this one
|
|
272
|
+
git clone https://github.com/CERTCRYPT/certcrypt-conformance.git ../certcrypt-conformance
|
|
273
|
+
|
|
274
|
+
npm run test:conformance # runs the verifier against the full fixture set
|
|
275
|
+
# -> 160 passed, 0 failed
|
|
276
|
+
```
|
|
277
|
+
|
|
278
|
+
## Repository Layout
|
|
279
|
+
|
|
280
|
+
- `core/` — the verifier implementation: crypto primitives (SHA3-256, JCS, Merkle, and the composite signature: ECDSA-P256-SHA3-256 or Ed25519, AND ML-DSA-65), the `Issued` and `Independent` verification paths, and the result builder.
|
|
281
|
+
- `cli/` — the `certcrypt-verify` command-line entry point.
|
|
282
|
+
- `scripts/` — the conformance harness (`run-conformance.ts`), which runs the verifier against the contract in `certcrypt-conformance`.
|
|
283
|
+
- `docs/` — the verifier contract, the rule-to-check catalog, and start-here guides for auditors and developers.
|
|
284
|
+
|
|
285
|
+
## Conformance contract
|
|
286
|
+
|
|
287
|
+
The conformance fixtures are not vendored here. They are data — schemas plus
|
|
288
|
+
test vectors — and live in the [`certcrypt-conformance`](https://github.com/CERTCRYPT/certcrypt-conformance)
|
|
289
|
+
repository, produced by its canonical generator. Keeping them in one place means
|
|
290
|
+
every language verifier validates against the exact same bytes.
|
|
291
|
+
|
|
292
|
+
The conformance harness (`npm run test:conformance`) resolves the fixtures in
|
|
293
|
+
this order:
|
|
294
|
+
|
|
295
|
+
1. **`CERTCRYPT_CONFORMANCE_DIR`** — if set, it must point at the `fixtures/`
|
|
296
|
+
directory of a checked-out `certcrypt-conformance`. This takes precedence and
|
|
297
|
+
is the option to use in CI or when the contract lives elsewhere on disk:
|
|
298
|
+
|
|
299
|
+
```sh
|
|
300
|
+
export CERTCRYPT_CONFORMANCE_DIR=/path/to/certcrypt-conformance/fixtures
|
|
301
|
+
npm run test:conformance
|
|
302
|
+
```
|
|
303
|
+
|
|
304
|
+
2. **Sibling checkout** — if the variable is not set, the harness looks for
|
|
305
|
+
`certcrypt-conformance/fixtures` next to this repository (i.e.
|
|
306
|
+
`../certcrypt-conformance/fixtures`). This is the convention the Quickstart
|
|
307
|
+
uses, so no environment variable is needed for a side-by-side checkout.
|
|
308
|
+
|
|
309
|
+
If neither resolves, the harness fails with a message telling you to set
|
|
310
|
+
`CERTCRYPT_CONFORMANCE_DIR` or check out the sibling repository.
|
|
311
|
+
|
|
312
|
+
## CLI
|
|
313
|
+
|
|
314
|
+
The `certcrypt-verify` CLI is a thin wrapper around the `verify` function. It
|
|
315
|
+
prints the structured `VerifierResult` as JSON to stdout and sets the exit code
|
|
316
|
+
from the verdict: `0` when `result_code` ends in `_VALID`, `1` for any other
|
|
317
|
+
verdict (`*_INVALID`, `INCOMPLETE`, `UNSUPPORTED`, `REJECTED`), and `2` for a
|
|
318
|
+
usage error. `--help` (or `-h`) prints the usage to stdout and exits `0`.
|
|
319
|
+
|
|
320
|
+
Verify by passing artifacts directly:
|
|
321
|
+
|
|
322
|
+
```sh
|
|
323
|
+
node dist/cli/certcrypt-verify.js \
|
|
324
|
+
--certificate base-certificate.json \
|
|
325
|
+
--proof independence-proof.json \
|
|
326
|
+
--settlement-material settlement-material.json \
|
|
327
|
+
--capacity-evidence capacity-evidence.json \
|
|
328
|
+
--commitment-inclusion-proof commitment-inclusion-proof.json \
|
|
329
|
+
--target independent
|
|
330
|
+
```
|
|
331
|
+
|
|
332
|
+
Or pass a single `VerifierRequest` JSON file that names the artifact paths:
|
|
333
|
+
|
|
334
|
+
```sh
|
|
335
|
+
node dist/cli/certcrypt-verify.js --request request.json
|
|
336
|
+
```
|
|
337
|
+
|
|
338
|
+
```jsonc
|
|
339
|
+
// request.json — paths are resolved relative to the current working directory
|
|
340
|
+
{
|
|
341
|
+
"verification_target_requested": "independent", // "auto" (default) | "issued" | "independent"
|
|
342
|
+
"input_mode": "artifact_set", // "artifact_set" | "package"
|
|
343
|
+
"base_certificate_path": "base-certificate.json",
|
|
344
|
+
"independence_proof_path": "independence-proof.json",
|
|
345
|
+
"settlement_material_path": "settlement-material.json",
|
|
346
|
+
"capacity_evidence_path": "capacity-evidence.json",
|
|
347
|
+
"commitment_inclusion_proof_path": "commitment-inclusion-proof.json"
|
|
348
|
+
}
|
|
349
|
+
```
|
|
350
|
+
|
|
351
|
+
All flags (`certcrypt-verify --help`):
|
|
352
|
+
|
|
353
|
+
| flag | meaning |
|
|
354
|
+
|---|---|
|
|
355
|
+
| `--request <path>` | a `VerifierRequest` JSON file (alternative to the flags below) |
|
|
356
|
+
| `--certificate <path>` | base certificate JSON (required unless `--request` is used) |
|
|
357
|
+
| `--proof <path>` | independence proof JSON (needed for `Independent`) |
|
|
358
|
+
| `--settlement-material <path>` | settlement material JSON |
|
|
359
|
+
| `--capacity-evidence <path>` | the capacity evidence of the certificate's commitment |
|
|
360
|
+
| `--commitment-inclusion-proof <path>` | the per-commitment inclusion proof |
|
|
361
|
+
| `--package <path>` | a `verification_package` JSON; carries the certificate and the Independent artifacts, so it is not combined with the per-artifact flags |
|
|
362
|
+
| `--foundation <path>` | `system-foundation/1` statement JSON |
|
|
363
|
+
| `--original-material <path>` | subject-material manifest for complete verification against original material |
|
|
364
|
+
| `--target <auto\|issued\|independent>` | verification target; defaults to `auto` |
|
|
365
|
+
| `--test-config <path>` | TEST-ONLY: verify under a `SystemDomainConfig` JSON file you supply instead of the published production profile; every signature is still verified |
|
|
366
|
+
| `--test-root-fingerprint <hex>` | TEST-ONLY: override `system_root_fingerprint` in the `--test-config` profile; requires `--test-config` |
|
|
367
|
+
| `-h`, `--help` | print usage to stdout and exit `0` |
|
|
368
|
+
|
|
369
|
+
> [!IMPORTANT]
|
|
370
|
+
> **Without the test-only flags, the CLI runs in production mode.** It
|
|
371
|
+
> verifies against the published CERTCRYPT production profile, so running it
|
|
372
|
+
> against the conformance fixtures — which are signed with a synthetic test root —
|
|
373
|
+
> returns no `*_VALID` verdict: most fixtures carry their own test foundation
|
|
374
|
+
> statement and return `REJECTED` with `FOUNDATION_BOOTSTRAP_MATCHES_RULES` in
|
|
375
|
+
> `failed_check_ids`. That is expected. The conformance fixtures are exercised
|
|
376
|
+
> under the test configuration by `npm run test:conformance`; no test profile is
|
|
377
|
+
> built into the CLI. `--test-config` and `--test-root-fingerprint` let a test or
|
|
378
|
+
> self-hosted deployment supply its own profile as a file, and any verdict under a
|
|
379
|
+
> profile other than the published one reports `production_verification: false`,
|
|
380
|
+
> so a test verdict can never be mistaken for a real one.
|
|
381
|
+
|
|
382
|
+
## What an Independent verdict rests on
|
|
383
|
+
|
|
384
|
+
An `Independent` verdict rests on three elements — the certificate, the `Proof of
|
|
385
|
+
Independence` and the public rules. The original material adds a fourth, opt-in
|
|
386
|
+
comparison. Each enters the verifier differently, and only two are files you hand it:
|
|
387
|
+
|
|
388
|
+
1. **The certificate** — the base certificate, supplied with `--certificate`
|
|
389
|
+
(or `base_certificate_path`). This is the artifact whose subjects and claims
|
|
390
|
+
are being verified.
|
|
391
|
+
|
|
392
|
+
2. **The `Proof of Independence`** — supplied as the independence proof
|
|
393
|
+
(`--proof`) with the artifacts that bind it to this certificate: its
|
|
394
|
+
settlement material (`--settlement-material`), the capacity evidence of the
|
|
395
|
+
certificate's commitment (`--capacity-evidence`) and the per-commitment
|
|
396
|
+
inclusion proof (`--commitment-inclusion-proof`), or all of them at once in a
|
|
397
|
+
`verification_package` (`--package`). Together these carry the structural
|
|
398
|
+
proof that the certificate reached `Independent`.
|
|
399
|
+
|
|
400
|
+
3. **The public rules** — NOT a file you pass. The applicable `rules_version` is
|
|
401
|
+
embedded in, and signed as part of, the certificate and the proof. The
|
|
402
|
+
verifier reads it from there and resolves it against the rule set it
|
|
403
|
+
implements (its `supported_rules_versions`); a rules version it does not
|
|
404
|
+
support fails closed as `UNSUPPORTED`. The public rules are the normative
|
|
405
|
+
frame under which evaluation happens, not an input the holder attaches — so
|
|
406
|
+
there is no `--rules` flag.
|
|
407
|
+
|
|
408
|
+
4. **The original material** — a *separate, opt-in verification plane*.
|
|
409
|
+
The structural `Independent` baseline (elements 1–3) does **not** require it:
|
|
410
|
+
without material the verifier reports `ORIGINAL_MATERIAL_COMPARISON_VALID` as
|
|
411
|
+
*not performed* and the `Independent` verdict still stands. Supplying it with
|
|
412
|
+
`--original-material` turns on *complete verification against original
|
|
413
|
+
material*: the verifier recomputes each subject's `canonical_bytes` under its
|
|
414
|
+
declared profile, rebuilds the CCCP/1 commitment, and confirms it matches
|
|
415
|
+
what the certificate committed to. This is the distinction between
|
|
416
|
+
*verification* (the technical act, elements 1–3) and *complete evaluation
|
|
417
|
+
against the material* (element 4).
|
|
418
|
+
|
|
419
|
+
The material is delivered as a **subject-material manifest** — a JSON array,
|
|
420
|
+
one entry per subject in `anchor.subjects[]` order, that points at the byte
|
|
421
|
+
files. The manifest never declares a subject's `profile`: the profile
|
|
422
|
+
(`subject.binary/1`, `subject.text/1`, `subject.email/1`,
|
|
423
|
+
`subject.collection/1`, …) is read from the certificate, which is the sole
|
|
424
|
+
source of what each subject is. A single-blob subject points at one file; a
|
|
425
|
+
collection points at its ordered leaf files — its descriptor is NOT part of the
|
|
426
|
+
delivery, because `subject.collection/1` §7 puts it inside the signed subject:
|
|
427
|
+
|
|
428
|
+
```jsonc
|
|
429
|
+
// original-material.json — paths resolved relative to this manifest's directory
|
|
430
|
+
[
|
|
431
|
+
{ "material_file": "subject-0.bin" }, // binary/text/email/…: one blob
|
|
432
|
+
{ "leaf_files": ["leaf-0.bin", "leaf-1.bin", "leaf-2.bin"] }, // a collection's ordered leaves
|
|
433
|
+
{ "material_file": "decision.json", // an AI-decision record, and
|
|
434
|
+
"materials": [{ "id": "prompt", "material_file": "prompt.txt" },
|
|
435
|
+
{ "id": "image", "prehashed": true,
|
|
436
|
+
"subject_local_digest_hex": "..." }] }
|
|
437
|
+
]
|
|
438
|
+
```
|
|
439
|
+
|
|
440
|
+
For a `subject.ai-decision/1` subject, every nested part is optional and keyed by
|
|
441
|
+
its id in the record. Once the record has matched the certificate, each disclosed
|
|
442
|
+
part is canonicalized under the `profile` that matched record declares. The toolkit
|
|
443
|
+
derives its salted commitment from the descriptor's `material_nonce_hex` and the
|
|
444
|
+
verifier-local subject digest, then compares it with `commitment_digest_hex`. A binary
|
|
445
|
+
part may carry a verifier-local streaming digest in place of its bytes. A match
|
|
446
|
+
identifies the held material named by the committed record; it says nothing about the
|
|
447
|
+
decision's merit.
|
|
448
|
+
|
|
449
|
+
## CERTCRYPT boundary
|
|
450
|
+
|
|
451
|
+
- not a claim of factual truth
|
|
452
|
+
- not a validator of correctness
|
|
453
|
+
- not a custodian of documents
|
|
454
|
+
- not blockchain notarization
|
|
455
|
+
- not a trust badge
|
|
456
|
+
|
|
457
|
+
## Boundary of this verifier toolkit
|
|
458
|
+
|
|
459
|
+
- not a determiner of semantic truth, legal validity, or factual correctness
|
|
460
|
+
- not a substitute for the public rules under which an artifact is evaluated
|
|
461
|
+
- not an endorsement of the issuer or of the underlying material
|
|
462
|
+
- not a live dependency that later verification must rely on
|
|
463
|
+
|
|
464
|
+
It evaluates verification state under public rules.
|
|
465
|
+
|
|
466
|
+
### Trademarks
|
|
467
|
+
|
|
468
|
+
The Apache-2.0 grant covers copyright, not marks: §6 of the license grants no
|
|
469
|
+
permission to use CERTCRYPT trade names, trademarks, service marks or product
|
|
470
|
+
names beyond describing the origin of the work.
|
|
471
|
+
|
|
472
|
+
Stating that your product verifies CERTCRYPT artifacts, or that it uses this
|
|
473
|
+
toolkit, is such a use. Naming your product after CERTCRYPT is not, and neither
|
|
474
|
+
is presenting a verdict this toolkit produced as CERTCRYPT having endorsed,
|
|
475
|
+
certified or approved the artifact: the toolkit evaluates under public rules and
|
|
476
|
+
returns a result, which is not an act of the issuer or of CERTCRYPT. A verdict is
|
|
477
|
+
reproducible by anyone holding the same artifacts — that is what makes it worth
|
|
478
|
+
citing, and what it stays.
|
|
479
|
+
|
|
480
|
+
## Properties
|
|
481
|
+
|
|
482
|
+
The verifier is built around:
|
|
483
|
+
|
|
484
|
+
- deterministic verification behavior
|
|
485
|
+
- independent evaluation under public rules
|
|
486
|
+
- `fail-closed` handling of invalid or incomplete inputs
|
|
487
|
+
- no dependency on issuer live systems for later verification
|
|
488
|
+
- clear separation between `Issued` and `Independent`
|
|
489
|
+
- no semantic inflation of verification results
|
|
490
|
+
|
|
491
|
+
## Documentation
|
|
492
|
+
|
|
493
|
+
Technical documentation and the public specifications are published at
|
|
494
|
+
[docs.certcrypt.com](https://docs.certcrypt.com): the model, the terminology, the
|
|
495
|
+
claims boundary, the evaluation model this toolkit applies, and the normative
|
|
496
|
+
specifications it verifies against.
|
|
497
|
+
|
|
498
|
+
## Links
|
|
499
|
+
|
|
500
|
+
| Surface | Address |
|
|
501
|
+
| --- | --- |
|
|
502
|
+
| Website | [certcrypt.com](https://certcrypt.com) |
|
|
503
|
+
| Documentation | [docs.certcrypt.com](https://docs.certcrypt.com) |
|
|
504
|
+
| Verify an artifact | [verify.certcrypt.dev](https://verify.certcrypt.dev) |
|
|
505
|
+
| Blog | [blog.certcrypt.com](https://blog.certcrypt.com) |
|
|
506
|
+
| Support | [support.certcrypt.com](https://support.certcrypt.com) |
|
|
507
|
+
| Service status | [status.certcrypt.com](https://status.certcrypt.com) |
|
|
508
|
+
| Open source | opensource@certcrypt.com |
|
|
509
|
+
| Security | security@certcrypt.com — see [`SECURITY.md`](SECURITY.md) |
|
|
510
|
+
|
|
511
|
+
**The two repositories on either side of this one:**
|
|
512
|
+
|
|
513
|
+
| Repository | Relationship |
|
|
514
|
+
| --- | --- |
|
|
515
|
+
| [certcrypt-conformance](https://github.com/CERTCRYPT/certcrypt-conformance) | the contract this toolkit is audited against — the fixtures it runs, and the version it reports as `CONFORMANCE_VECTORS_VERSION` |
|
|
516
|
+
| [certcrypt-sdk-js](https://github.com/CERTCRYPT/certcrypt-sdk-js) | the issuer-side SDK that emits the certificates this toolkit verifies and assembles their `verification_package` |
|
|
517
|
+
|
|
518
|
+
The contract is data rather than code, so it is what keeps every language binding
|
|
519
|
+
honest: the identical fixture must produce the identical `VerifierResult`
|
|
520
|
+
everywhere. The SDK is on the other side of the same contract — it emits under
|
|
521
|
+
the rules this toolkit evaluates, and its own suite round-trips what it emits
|
|
522
|
+
through this verifier.
|
|
523
|
+
|
|
524
|
+
**This toolkit, hosted:** [verify.certcrypt.dev](https://verify.certcrypt.dev) is
|
|
525
|
+
a free, account-less verification service running *this* package in the browser —
|
|
526
|
+
the same code, the same verdict, no installation. It reports which toolkit version
|
|
527
|
+
and which conformance vectors produced each result, so a report it generates can be
|
|
528
|
+
reproduced with a pinned install of this package.
|
|
529
|
+
|
|
530
|
+
## Changelog
|
|
531
|
+
|
|
532
|
+
Release notes are in [`CHANGELOG.md`](CHANGELOG.md). From 1.0.0 this package
|
|
533
|
+
follows semantic versioning without reservation: a patch fixes behavior, a minor
|
|
534
|
+
adds surface without breaking what exists, and anything that breaks a documented
|
|
535
|
+
export waits for the next major. Deliberately NOT covered by that promise, because
|
|
536
|
+
it is not part of the API: which verdict a given artifact receives. A verifier that
|
|
537
|
+
could never tighten a check would be a worse verifier — if a release makes a
|
|
538
|
+
previously-accepted artifact fail, that is a corrected verdict and the entry says
|
|
539
|
+
so outright.
|
|
540
|
+
|
|
541
|
+
Each release section also names, in a `Conformance` line, the conformance
|
|
542
|
+
vectors that release was verified against — the value a build that ran them
|
|
543
|
+
exports as `CONFORMANCE_VECTORS_VERSION`.
|
|
544
|
+
|
|
545
|
+
`CHANGELOG.md` is one line per change and nothing else: `feature:`, `bugfix:`,
|
|
546
|
+
`breaking:`, `deprecation:`, `security:` or `docs:`, then the scope, under a
|
|
547
|
+
`## 1.0.0` heading. That keeps it greppable — `grep breaking:` answers "what has
|
|
548
|
+
ever broken?" without reading a word — and it is why the reasoning behind a design
|
|
549
|
+
stays here instead. The CHANGELOG answers *what changed*; this file answers *why it
|
|
550
|
+
is that way*.
|
|
551
|
+
|
|
552
|
+
It carries no release dates. The publish date is authoritative in the registry and
|
|
553
|
+
the git tag:
|
|
554
|
+
|
|
555
|
+
```bash
|
|
556
|
+
npm view @certcrypt/verifier-toolkit time # every version's publish date
|
|
557
|
+
git log -1 --format=%aI v1.0.0 # the tagged commit's date
|
|
558
|
+
```
|
|
559
|
+
|
|
560
|
+
## License
|
|
561
|
+
|
|
562
|
+
Copyright 2025-2026 CERTCRYPT, Inc., its affiliates or licensors. All rights reserved.
|
|
563
|
+
|
|
564
|
+
Licensed under the Apache License, Version 2.0. See [`LICENSE`](LICENSE) for the full text.
|
package/SECURITY.md
ADDED
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
# Security Policy
|
|
2
|
+
|
|
3
|
+
## Supported Versions
|
|
4
|
+
|
|
5
|
+
Security fixes land on the latest published version. Upgrading is the remediation
|
|
6
|
+
path — fixes are not backported to superseded versions.
|
|
7
|
+
|
|
8
|
+
| Version | Supported |
|
|
9
|
+
| --- | --- |
|
|
10
|
+
| Latest `1.x` release | Yes |
|
|
11
|
+
| Earlier releases | Upgrade to the latest |
|
|
12
|
+
|
|
13
|
+
## Reporting a Vulnerability
|
|
14
|
+
|
|
15
|
+
Please do not open public issues for security vulnerabilities.
|
|
16
|
+
|
|
17
|
+
Report security concerns by email to security@certcrypt.com.
|
|
18
|
+
|
|
19
|
+
Include:
|
|
20
|
+
|
|
21
|
+
- affected repository or component
|
|
22
|
+
- affected version or commit, if known
|
|
23
|
+
- a clear description of the issue
|
|
24
|
+
- reproduction steps, if available
|
|
25
|
+
- potential impact
|
|
26
|
+
|
|
27
|
+
Please avoid including customer data, production credentials, private keys, or confidential third-party material in reports.
|
|
28
|
+
|
|
29
|
+
We will acknowledge valid reports as soon as practical and coordinate remediation before public disclosure.
|
|
30
|
+
|
|
31
|
+
## Coordinated Disclosure
|
|
32
|
+
|
|
33
|
+
Please give us a reasonable opportunity to investigate and remediate security issues before public disclosure.
|
|
34
|
+
|
|
35
|
+
Do not publish exploit details, proof-of-concept code, or operational indicators before we have completed triage and remediation planning.
|
|
36
|
+
|
|
37
|
+
## Scope
|
|
38
|
+
|
|
39
|
+
This repository is intended for public verifier tooling.
|
|
40
|
+
|
|
41
|
+
Do not submit secrets, production credentials, private keys, customer data, or any other sensitive material in issues, pull requests, or discussions.
|
|
42
|
+
|
|
43
|
+
## Non-production profiles
|
|
44
|
+
|
|
45
|
+
This toolkit verifies any deployment of the protocol, so it can run under a
|
|
46
|
+
profile that is not the published production one. That is a supported capability
|
|
47
|
+
and a deliberately narrow one.
|
|
48
|
+
|
|
49
|
+
- The published package carries the production profile only. The test-profile
|
|
50
|
+
helpers live in `harness/`, which npm excludes. Running against any other
|
|
51
|
+
deployment requires the operator to supply its configuration; nothing is
|
|
52
|
+
defaulted and a missing field throws.
|
|
53
|
+
- Any verification performed under a non-production profile is reported as
|
|
54
|
+
`production_verification: false`. That flag is set by comparing the ENTIRE
|
|
55
|
+
configuration against the published production profile, so a test verdict
|
|
56
|
+
cannot be relabelled as production by substituting individual fields.
|
|
57
|
+
|
|
58
|
+
**Presenting a `production_verification: false` result as a CERTCRYPT
|
|
59
|
+
verification is a misrepresentation, not a vulnerability.**
|
|
60
|
+
|
|
61
|
+
A genuine finding in this area is the opposite: a configuration that is NOT the
|
|
62
|
+
published production profile yet still yields `production_verification: true`.
|
|
63
|
+
That is a real fail-open and we want to hear about it.
|
|
64
|
+
|
|
65
|
+
## Out of Scope
|
|
66
|
+
|
|
67
|
+
The following are not handled through this repository's security process:
|
|
68
|
+
|
|
69
|
+
- general product questions
|
|
70
|
+
- documentation corrections without security impact
|
|
71
|
+
- requests for roadmap information
|
|
72
|
+
- reports about private CERTCRYPT systems not represented in this repository
|
|
73
|
+
- claims about semantic truth, legal validity, or factual correctness of certificate content
|
|
74
|
+
|
|
75
|
+
For non-security questions, use the public contact channel:
|
|
76
|
+
|
|
77
|
+
opensource@certcrypt.com
|