@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.
Files changed (221) hide show
  1. package/CHANGELOG.md +72 -0
  2. package/LICENSE +178 -0
  3. package/README.md +563 -2
  4. package/SECURITY.md +77 -0
  5. package/dist/cli/certcrypt-verify.d.ts +2 -0
  6. package/dist/cli/certcrypt-verify.js +174 -0
  7. package/dist/cli/certcrypt-verify.js.map +1 -0
  8. package/dist/core/config/certcrypt-foundation.d.ts +13 -0
  9. package/dist/core/config/certcrypt-foundation.js +123 -0
  10. package/dist/core/config/certcrypt-foundation.js.map +1 -0
  11. package/dist/core/config/default.d.ts +47 -0
  12. package/dist/core/config/default.js +93 -0
  13. package/dist/core/config/default.js.map +1 -0
  14. package/dist/core/config/test-keys.d.ts +40 -0
  15. package/dist/core/config/test-keys.js +41 -0
  16. package/dist/core/config/test-keys.js.map +1 -0
  17. package/dist/core/conformance/attestation.d.ts +4 -0
  18. package/dist/core/conformance/attestation.js +4 -0
  19. package/dist/core/conformance/attestation.js.map +1 -0
  20. package/dist/core/consistency/verify-consistency.d.ts +92 -0
  21. package/dist/core/consistency/verify-consistency.js +353 -0
  22. package/dist/core/consistency/verify-consistency.js.map +1 -0
  23. package/dist/core/crypto/canonical-json.d.ts +14 -0
  24. package/dist/core/crypto/canonical-json.js +13 -0
  25. package/dist/core/crypto/canonical-json.js.map +1 -0
  26. package/dist/core/crypto/canonical-subject.d.ts +76 -0
  27. package/dist/core/crypto/canonical-subject.js +248 -0
  28. package/dist/core/crypto/canonical-subject.js.map +1 -0
  29. package/dist/core/crypto/collection-merkle.d.ts +91 -0
  30. package/dist/core/crypto/collection-merkle.js +243 -0
  31. package/dist/core/crypto/collection-merkle.js.map +1 -0
  32. package/dist/core/crypto/composite.d.ts +73 -0
  33. package/dist/core/crypto/composite.js +206 -0
  34. package/dist/core/crypto/composite.js.map +1 -0
  35. package/dist/core/crypto/digest.d.ts +18 -0
  36. package/dist/core/crypto/digest.js +37 -0
  37. package/dist/core/crypto/digest.js.map +1 -0
  38. package/dist/core/crypto/ecdsa-p256.d.ts +12 -0
  39. package/dist/core/crypto/ecdsa-p256.js +70 -0
  40. package/dist/core/crypto/ecdsa-p256.js.map +1 -0
  41. package/dist/core/crypto/ed25519.d.ts +10 -0
  42. package/dist/core/crypto/ed25519.js +28 -0
  43. package/dist/core/crypto/ed25519.js.map +1 -0
  44. package/dist/core/crypto/holder-keyset.d.ts +23 -0
  45. package/dist/core/crypto/holder-keyset.js +64 -0
  46. package/dist/core/crypto/holder-keyset.js.map +1 -0
  47. package/dist/core/crypto/jcs.d.ts +9 -0
  48. package/dist/core/crypto/jcs.js +59 -0
  49. package/dist/core/crypto/jcs.js.map +1 -0
  50. package/dist/core/crypto/merkle.d.ts +34 -0
  51. package/dist/core/crypto/merkle.js +147 -0
  52. package/dist/core/crypto/merkle.js.map +1 -0
  53. package/dist/core/crypto/ml-dsa.d.ts +25 -0
  54. package/dist/core/crypto/ml-dsa.js +104 -0
  55. package/dist/core/crypto/ml-dsa.js.map +1 -0
  56. package/dist/core/crypto/provider/bytes.d.ts +31 -0
  57. package/dist/core/crypto/provider/bytes.js +106 -0
  58. package/dist/core/crypto/provider/bytes.js.map +1 -0
  59. package/dist/core/crypto/provider/index.d.ts +45 -0
  60. package/dist/core/crypto/provider/index.js +60 -0
  61. package/dist/core/crypto/provider/index.js.map +1 -0
  62. package/dist/core/crypto/provider/node.d.ts +2 -0
  63. package/dist/core/crypto/provider/node.js +96 -0
  64. package/dist/core/crypto/provider/node.js.map +1 -0
  65. package/dist/core/crypto/provider/register-node.d.ts +11 -0
  66. package/dist/core/crypto/provider/register-node.js +16 -0
  67. package/dist/core/crypto/provider/register-node.js.map +1 -0
  68. package/dist/core/crypto/provider/types.d.ts +77 -0
  69. package/dist/core/crypto/provider/types.js +16 -0
  70. package/dist/core/crypto/provider/types.js.map +1 -0
  71. package/dist/core/crypto/provider/web.d.ts +2 -0
  72. package/dist/core/crypto/provider/web.js +122 -0
  73. package/dist/core/crypto/provider/web.js.map +1 -0
  74. package/dist/core/crypto/pseudonym.d.ts +25 -0
  75. package/dist/core/crypto/pseudonym.js +37 -0
  76. package/dist/core/crypto/pseudonym.js.map +1 -0
  77. package/dist/core/crypto/subject-json-preconditions.d.ts +47 -0
  78. package/dist/core/crypto/subject-json-preconditions.js +373 -0
  79. package/dist/core/crypto/subject-json-preconditions.js.map +1 -0
  80. package/dist/core/domain/verify-domain.d.ts +13 -0
  81. package/dist/core/domain/verify-domain.js +39 -0
  82. package/dist/core/domain/verify-domain.js.map +1 -0
  83. package/dist/core/foundation/anti-equivocation.d.ts +87 -0
  84. package/dist/core/foundation/anti-equivocation.js +0 -0
  85. package/dist/core/foundation/anti-equivocation.js.map +1 -0
  86. package/dist/core/foundation/verify-foundation.d.ts +36 -0
  87. package/dist/core/foundation/verify-foundation.js +559 -0
  88. package/dist/core/foundation/verify-foundation.js.map +1 -0
  89. package/dist/core/independent/anti-replay.d.ts +15 -0
  90. package/dist/core/independent/anti-replay.js +27 -0
  91. package/dist/core/independent/anti-replay.js.map +1 -0
  92. package/dist/core/independent/anti-splicing.d.ts +16 -0
  93. package/dist/core/independent/anti-splicing.js +54 -0
  94. package/dist/core/independent/anti-splicing.js.map +1 -0
  95. package/dist/core/independent/capacity-binding.d.ts +26 -0
  96. package/dist/core/independent/capacity-binding.js +57 -0
  97. package/dist/core/independent/capacity-binding.js.map +1 -0
  98. package/dist/core/independent/capacity-evidence.d.ts +38 -0
  99. package/dist/core/independent/capacity-evidence.js +286 -0
  100. package/dist/core/independent/capacity-evidence.js.map +1 -0
  101. package/dist/core/independent/effective-units.d.ts +42 -0
  102. package/dist/core/independent/effective-units.js +147 -0
  103. package/dist/core/independent/effective-units.js.map +1 -0
  104. package/dist/core/independent/issuance-participation.d.ts +13 -0
  105. package/dist/core/independent/issuance-participation.js +24 -0
  106. package/dist/core/independent/issuance-participation.js.map +1 -0
  107. package/dist/core/independent/leaf-binding.d.ts +5 -0
  108. package/dist/core/independent/leaf-binding.js +135 -0
  109. package/dist/core/independent/leaf-binding.js.map +1 -0
  110. package/dist/core/independent/operator-recognition-registry.d.ts +33 -0
  111. package/dist/core/independent/operator-recognition-registry.js +116 -0
  112. package/dist/core/independent/operator-recognition-registry.js.map +1 -0
  113. package/dist/core/independent/proof-structure.d.ts +8 -0
  114. package/dist/core/independent/proof-structure.js +167 -0
  115. package/dist/core/independent/proof-structure.js.map +1 -0
  116. package/dist/core/independent/proof-views.d.ts +26 -0
  117. package/dist/core/independent/proof-views.js +58 -0
  118. package/dist/core/independent/proof-views.js.map +1 -0
  119. package/dist/core/independent/settlement.d.ts +18 -0
  120. package/dist/core/independent/settlement.js +548 -0
  121. package/dist/core/independent/settlement.js.map +1 -0
  122. package/dist/core/independent/verify-independent.d.ts +30 -0
  123. package/dist/core/independent/verify-independent.js +123 -0
  124. package/dist/core/independent/verify-independent.js.map +1 -0
  125. package/dist/core/independent/verify-operator-recognition.d.ts +26 -0
  126. package/dist/core/independent/verify-operator-recognition.js +60 -0
  127. package/dist/core/independent/verify-operator-recognition.js.map +1 -0
  128. package/dist/core/independent/verify-proof-signature.d.ts +20 -0
  129. package/dist/core/independent/verify-proof-signature.js +97 -0
  130. package/dist/core/independent/verify-proof-signature.js.map +1 -0
  131. package/dist/core/input/fs-bridge.d.ts +30 -0
  132. package/dist/core/input/fs-bridge.js +35 -0
  133. package/dist/core/input/fs-bridge.js.map +1 -0
  134. package/dist/core/input/load-artifacts.d.ts +2 -0
  135. package/dist/core/input/load-artifacts.js +80 -0
  136. package/dist/core/input/load-artifacts.js.map +1 -0
  137. package/dist/core/input/load-original-material.d.ts +11 -0
  138. package/dist/core/input/load-original-material.js +126 -0
  139. package/dist/core/input/load-original-material.js.map +1 -0
  140. package/dist/core/input/register-node-fs.d.ts +1 -0
  141. package/dist/core/input/register-node-fs.js +24 -0
  142. package/dist/core/input/register-node-fs.js.map +1 -0
  143. package/dist/core/input/resolve-target.d.ts +16 -0
  144. package/dist/core/input/resolve-target.js +43 -0
  145. package/dist/core/input/resolve-target.js.map +1 -0
  146. package/dist/core/input/strict-json.d.ts +25 -0
  147. package/dist/core/input/strict-json.js +167 -0
  148. package/dist/core/input/strict-json.js.map +1 -0
  149. package/dist/core/input/validate.d.ts +7 -0
  150. package/dist/core/input/validate.js +83 -0
  151. package/dist/core/input/validate.js.map +1 -0
  152. package/dist/core/issued/verify-collection-element.d.ts +66 -0
  153. package/dist/core/issued/verify-collection-element.js +137 -0
  154. package/dist/core/issued/verify-collection-element.js.map +1 -0
  155. package/dist/core/issued/verify-issued.d.ts +15 -0
  156. package/dist/core/issued/verify-issued.js +361 -0
  157. package/dist/core/issued/verify-issued.js.map +1 -0
  158. package/dist/core/issued/verify-original-material.d.ts +35 -0
  159. package/dist/core/issued/verify-original-material.js +418 -0
  160. package/dist/core/issued/verify-original-material.js.map +1 -0
  161. package/dist/core/package/verify-package.d.ts +34 -0
  162. package/dist/core/package/verify-package.js +109 -0
  163. package/dist/core/package/verify-package.js.map +1 -0
  164. package/dist/core/public-api.d.ts +178 -0
  165. package/dist/core/public-api.js +182 -0
  166. package/dist/core/public-api.js.map +1 -0
  167. package/dist/core/result/builder.d.ts +92 -0
  168. package/dist/core/result/builder.js +408 -0
  169. package/dist/core/result/builder.js.map +1 -0
  170. package/dist/core/rules/verify-corpus.d.ts +88 -0
  171. package/dist/core/rules/verify-corpus.js +165 -0
  172. package/dist/core/rules/verify-corpus.js.map +1 -0
  173. package/dist/core/rules/verify-rules.d.ts +14 -0
  174. package/dist/core/rules/verify-rules.js +62 -0
  175. package/dist/core/rules/verify-rules.js.map +1 -0
  176. package/dist/core/testing/validate-against-schema.d.ts +31 -0
  177. package/dist/core/testing/validate-against-schema.js +93 -0
  178. package/dist/core/testing/validate-against-schema.js.map +1 -0
  179. package/dist/core/types/artifacts.d.ts +224 -0
  180. package/dist/core/types/artifacts.js +2 -0
  181. package/dist/core/types/artifacts.js.map +1 -0
  182. package/dist/core/types/capacity-evidence.d.ts +85 -0
  183. package/dist/core/types/capacity-evidence.js +51 -0
  184. package/dist/core/types/capacity-evidence.js.map +1 -0
  185. package/dist/core/types/check.d.ts +61 -0
  186. package/dist/core/types/check.js +2 -0
  187. package/dist/core/types/check.js.map +1 -0
  188. package/dist/core/types/config.d.ts +97 -0
  189. package/dist/core/types/config.js +2 -0
  190. package/dist/core/types/config.js.map +1 -0
  191. package/dist/core/types/foundation.d.ts +121 -0
  192. package/dist/core/types/foundation.js +25 -0
  193. package/dist/core/types/foundation.js.map +1 -0
  194. package/dist/core/types/index.d.ts +9 -0
  195. package/dist/core/types/index.js +2 -0
  196. package/dist/core/types/index.js.map +1 -0
  197. package/dist/core/types/operator-recognition.d.ts +71 -0
  198. package/dist/core/types/operator-recognition.js +24 -0
  199. package/dist/core/types/operator-recognition.js.map +1 -0
  200. package/dist/core/types/proof.d.ts +94 -0
  201. package/dist/core/types/proof.js +2 -0
  202. package/dist/core/types/proof.js.map +1 -0
  203. package/dist/core/types/request.d.ts +59 -0
  204. package/dist/core/types/request.js +2 -0
  205. package/dist/core/types/request.js.map +1 -0
  206. package/dist/core/types/result.d.ts +164 -0
  207. package/dist/core/types/result.js +2 -0
  208. package/dist/core/types/result.js.map +1 -0
  209. package/dist/core/types/settlement-material.d.ts +130 -0
  210. package/dist/core/types/settlement-material.js +2 -0
  211. package/dist/core/types/settlement-material.js.map +1 -0
  212. package/dist/core/verify-node.d.ts +14 -0
  213. package/dist/core/verify-node.js +17 -0
  214. package/dist/core/verify-node.js.map +1 -0
  215. package/dist/core/verify-web.d.ts +1 -0
  216. package/dist/core/verify-web.js +25 -0
  217. package/dist/core/verify-web.js.map +1 -0
  218. package/dist/core/verify.d.ts +18 -0
  219. package/dist/core/verify.js +183 -0
  220. package/dist/core/verify.js.map +1 -0
  221. package/package.json +71 -4
package/CHANGELOG.md ADDED
@@ -0,0 +1,72 @@
1
+ # CHANGELOG
2
+
3
+ This package follows [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
4
+
5
+ Entries are one line per change: `type:scope: what changed`, where `type` is
6
+ `feature`, `bugfix`, `breaking`, `deprecation`, `security` or `docs`.
7
+
8
+ ## 1.0.1
9
+
10
+ * bugfix:Tests: `npm test` and `npm run test:web` list the compiled tests and pass them to the Node.js test runner by name (`scripts/run-tests.mjs`), so the suite runs on Node.js 20, the floor declared in `engines`, as on later versions
11
+ * bugfix:Packaging: `package-lock.json` carries the package name, version and license of `package.json`
12
+
13
+ ## 1.0.0
14
+
15
+ * feature:Verdict: an artifact set without a base certificate is `INCOMPLETE` under `BASE_CERTIFICATE_PRESENT` and lists `base_certificate` in `required_artifacts_missing`; the target is the one resolved from the supplied artifacts, so Independent-route material with `auto` reports `Independent`. `INPUT_COMBINATION_VALID` covers contradictory sources and strict JSON only
16
+ * feature:Verdict: each check fails only with the classifications verifier-toolkit/1 Section 9.7 allows for it, enforced at compile time
17
+ * feature:Corpus: `verifyCertifiedFiles(request, files, config)` establishes that a set of files is exactly what a repository publication certificate certifies — the proof verifies as `INDEPENDENT_VALID`, its certificate commits to one `subject.collection/1` of `subject.binary/1` leaves, and the files, byte for byte and in order, reproduce the leaves and the signed root
18
+ * feature:Consistency: `verifyConsistency(certificate, snapshots, config?)` evaluates CCVP/1 over the target and snapshot certificates themselves — each verified under the Issued route, each snapshot issuer derived from its signature (`signer.id` plus composite key fingerprint), the namespace named in the target's `payload.context`, timestamps compared as instants, `scope.subject_profiles`, roles and optional `kid` applied. An optional plane: its outcome never changes `verify()`. Held to the `ccvp-consistency` vectors
19
+ * security:Subjects: the `subject.ai-decision/1` precondition enforces its closed bounded record, part ids and material nonces unique across one record's input and output, exact salted-commitment part shape, admitted profiles, lowercase MIME essences, valid Gregorian UTC millisecond timestamps, and flat bounded `parameters` and `context` maps
20
+ * feature:Independent: capacity evidence is verified before settlement (independence.proof/1 §9, §12.5)
21
+ * feature:Material: a `subject.ai-decision/1` subject may deliver disclosed parts in `AiDecisionMaterial.materials`, keyed by the id in the matched record; byte material is canonicalized under the record's profile and matched through its per-part salted commitment, while large binary material may use the verifier-local prehashed path. Unknown ids and prehashed non-binary parts fail closed. Held to `P011` and `V057`
22
+ * feature:Verdict: `verify(request, config?)` returns a `VerifierResult` — the verdict, the checks that failed, and the regime that produced it — evaluating whether an artifact reached the conditions associated with `Independent`
23
+ * feature:Verdict: Fail-closed throughout; a check that cannot be evaluated never counts as passed, and the 40 checks of verifier-toolkit/1 §9.7 report individually in `failed_check_ids`; the code is chosen as §9.5 fixes it (REJECTED > INCOMPLETE > UNSUPPORTED > ISSUED_INVALID > INDEPENDENT_INVALID), and an Issued verification never reports INDEPENDENT_INVALID
24
+ * feature:Issued: `BASE_CERTIFICATE_STRUCTURE_VALID` and `BASE_CERTIFICATE_AUTHENTIC` — structure under the rules and the composite signature, whose post-quantum outcome is also reported in `additional_verifications`; a certificate that fails either is not taken through the Independent route
25
+ * feature:Issued: the CCSP/1 envelope is checked in full — closed top level, anchor, issuer signature, signer and composite components; the reserved names; `issued_at` as a real UTC instant with `Z`; `root_id` and digest formats; exactly one issuer signature; `payload.system_id` and `payload.rules_version` against the domain under evaluation (an unknown rules version is UNSUPPORTED); published digests recomputed, a mismatch is REJECTED; `signer.pub_p256_b64` only as SEC1 uncompressed
26
+ * feature:Input: strict JSON for every artifact read from a path and for the material of the JSON subject profiles — a member name repeated in any object, at any depth and after escape decoding, rejects the input; repeated array elements are data. `strictJsonParse` is exported for artifacts passed in memory
27
+ * feature:Independent: `PROOF_STRUCTURE_VALID` and `PROOF_SIGNATURE_VALID` for the `Proof of Independence` — `proof_id` and `proof_digest` are recomputed, `closure_time` and `consumed_commitment_ids` are mandatory, `independence_result` is exactly `independent`, and the composite signature by the system-domain Level-1 capacity key over the signed view is mandatory under every rules domain
28
+ * feature:Independent: the node attestation of a proof (independence.proof/1 §10.15) is authenticated by the proof signature, with no register of nodes, and reported as `attested_node` on `INDEPENDENT_VALID`
29
+ * feature:Verdict: no configuration accepts a signature without verifying it; test profiles change which keys and roots are trusted, never whether signatures are verified
30
+ * feature:Settlement: `SETTLEMENT_REF_VALID`, `FINALITY_SUFFICIENT` and `COMMITMENT_TTL_VALID` — the settlement reference resolves, the reached finality satisfies the rules (every finality witness of the proof names the profile's substrate and equals the settlement material), and settlement did not occur after the commitment expired
31
+ * feature:Capacity: `CAPACITY_EVIDENCE_VALID`, `CAPACITY_BINDING_VALID` and `EFFECTIVE_UNITS_BINDING_VALID` — consumed capacity is evidenced and bound to a `capacity_ref` committed at issuance; the evidence's holder authorization grants exactly the `capacity_commitment_holder` role
32
+ * feature:Domain: `SYSTEM_DOMAIN_EXACT` and `CLONE_OR_FORK_REJECTED` — a proof is attributable to this domain or it is not, and a proof that names no `system_id` at all is reported as the foreign context it is rather than as a structural error
33
+ * feature:Binding: `LEAF_BINDING_VALID`, `SYSTEM_ROOT_BINDING_VALID` and `ANTI_SPLICING_VALID` — the leaf/subtree hybrid binding, and artifacts from different operations cannot be spliced into one verdict
34
+ * feature:Replay: `NON_REPLAY_VALID` — `anti_replay` is recomputed from `settlement_ref` and `subtree_root`; a value bound to another settlement container or leaf fails even when signed
35
+ * feature:Foundation: `FOUNDATION_PROFILE_VALID`, `FOUNDATION_SIGNATURE_VALID`, `FOUNDATION_SYSTEM_ID_VALID` and `FOUNDATION_BOOTSTRAP_MATCHES_RULES` — the system foundation the system root is verified against
36
+ * feature:Issuer: `ISSUANCE_PARTICIPATION_VALID`
37
+ * feature:Material: `ORIGINAL_MATERIAL_COMPARISON_VALID` — an opt-in plane; material not supplied is reported as not performed, never as a failure; material that does not match is ISSUED_INVALID, and material keyed to an index the certificate does not declare is REJECTED
38
+ * feature:Presence: `BASE_CERTIFICATE_PRESENT` and `PROOF_PRESENT` — a missing artifact is reported as missing, never inferred from a downstream check that had nothing to evaluate
39
+ * feature:Versions: `PROOF_VERSION_SUPPORTED`, `INPUT_MODE_SUPPORTED` and `INPUT_TARGET_SUPPORTED` — an unsupported version or mode is UNSUPPORTED, distinct from REJECTED: the toolkit says "I cannot judge this" rather than "this is invalid"
40
+ * feature:Rules: `RULES_DOMAIN_EXACT` — the rules the artifact was issued under must be this domain's
41
+ * feature:Foundation: `FOUNDATION_FINGERPRINT_RECOMPUTED` and `FOUNDATION_EQUIVOCATION_DETECTED` — the root is recomputed rather than read, and a foundation signing two different states for the same version is caught. `published_rules_versions` is metadata and gates nothing (system-foundation/1 §6)
42
+ * feature:Foundation: the statement and its embedded bootstrap manifest are checked as closed shapes — statement, manifest, entry, quorum, members and `statement_signatures` elements carry exactly their members; `foundation_statement_id`, `statement_issued_at`, `kid`, `member_kid` and `valid_from` have their one format; every P-256 key, the Level-1 key included, is a 65-byte SEC1 uncompressed point
43
+ * feature:Foundation: `FOUNDATION_BOOTSTRAP_MATCHES_RULES` also compares the statement's payload digest with `foundation_payload_digest`, so a second statement over the registered root and id is refused even when the quorum signed it; the published profile ships the bootstrap statement and uses it when a request supplies none
44
+ * security:Composite: `verifyComposite` enforces the profile's exact layout — `{alg, mode, signatures}`, exactly its two components in order, each with exactly its members, `encoding: "raw-rs-64"` and `low_s: true` — and one encoding per key (P-256 SEC1 uncompressed, Ed25519 raw, ML-DSA-65 1952 bytes), and reports malformed material as such; the required profile is the caller's, never the signature's
45
+ * feature:Foundation: `FOUNDATION_SUCCESSOR_QUORUM_VALID` — a successor-binding observation counts only when at least `k` distinct members of its predecessor entry sign its system-manifest/1 §9 payload with verifying composite signatures; non-members, failing signatures and repeated signers never count, and equivocation is established only between observations that passed this check
46
+ * security:Capacity: `CAPACITY_BINDING_VALID` compares the burned quantity with `batch_binding_preimage.total_quantity`, the total the batch binding memo anchors, and requires any `batch_manifest.total_quantity` to repeat it. Comparing against the unanchored manifest would let material anchor one total, burn less, and restate the manifest to match the burn
47
+ * security:Capacity: `CAPACITY_BINDING_VALID` requires every member `batch_manifest` shares with `batch_binding_preimage` to repeat the anchored value (settlement.aggregated.xrpl/1 §10.1; settlement.binding/1 §6): `total_quantity`, `leaf_count`, `batch_id`, `window_id`, `system_id`, `rules_version` and `settlement_profile_id`. The signed `settlement_ref` binds only the preimage's `batch_id` and `window_id`, so without this a manifest describing a different batch would pass. The shared members are derived from the two types, so a field added to both is compared without being listed by hand
48
+ * feature:Settlement: material without `batch_manifest` fails closed as `INCOMPLETE` (`AGGREGATED_INTERPRETATION_UNIQUE`, `batch_manifest` reported missing) before any coherence check reads it
49
+ * feature:Settlement: `SETTLEMENT_NOT_RETROACTIVE` — a settlement dated before the commitment it extinguishes is refused
50
+ * feature:Capacity: `CAPACITY_NOT_RECONSTRUCTED` — the verifier refuses to reconstruct capacity it was not given, instead of assuming a value that would make the path pass
51
+ * feature:Aggregation: `AGGREGATED_INTERPRETATION_UNIQUE` — a batch that admits two readings fails closed instead of picking one
52
+ * feature:Input: `INPUT_COMBINATION_VALID` and `TARGET_AUTO_RESOLUTION_VALID` — one source per artifact (a package and separately supplied artifacts are never combined), and `auto` resolves to Independent whenever any Independent artifact is supplied, so evidence without its proof is INCOMPLETE rather than an Issued answer
53
+ * feature:Package: `PACKAGE_STRUCTURE_VALID` and `PACKAGE_CONTEXT_COHERENT` — a `verification_package` has the closed member set of verification-package/1 §9.4 (no original material, no foundation, no version or target member) and its `verification_context` and `settlement_reference` agree with the certificate and the proof; both REJECTED otherwise
54
+ * feature:Binding: the per-commitment inclusion proof is a closed object of five members with canonical forms, checked before it is folded
55
+ * feature:`verifyCollectionElementFromCertificate`: element inclusion from the certificate and one leaf value alone (verifier-toolkit/1 §8.4.2) — the certificate verified under the Issued route, the signed leaves folded to the declared root, every declared leaf profile tried, every position of a repeated value reported
56
+ * feature:CLI: `--capacity-evidence`, `--commitment-inclusion-proof` and `--package` beside the per-artifact flags; `--request` is parsed as strict JSON
57
+ * feature:CLI: exit codes — `0` for a `*_VALID` verdict, `1` for any other verdict, `2` for a usage error; `--help` / `-h` prints the usage to stdout and exits `0`
58
+ * feature:`verifyCollectionInclusion`: Element-level inclusion (`INCLUSION_PROOF_VALID`) against a committed collection root
59
+ * feature:`collectionMerkleRoot`: Merkle fold over collection leaves under `COLLECTION_MERKLE_SCHEME`, with `collectionLeafHash` and `collectionNodeHash`
60
+ * feature:`digestHexBytes` / `digestHexText` / `digestBytes`: SHA3-256, the digest under every commitment
61
+ * feature:Runtimes: Same public surface from `@certcrypt/verifier-toolkit/web` and `/node` (the package root resolves to one or the other by runtime), pinned by `core/public-api.test.ts`, so code written against one runs on the other unchanged
62
+ * feature:Cryptography: Composite PQ/T signature verification — ECDSA-P-256 or Ed25519 AND ML-DSA-65 (FIPS 204) over the same domain-separated message, valid only if every declared component verifies
63
+ * feature:`initMlDsa65`: Explicit startup initialization for the ML-DSA-65 runtime the composite requires, shipped as an `optionalDependency` so a host that cannot build it still installs; when the runtime is absent the composite fails `UNSUPPORTED` rather than falling back to the classical half alone
64
+ * feature:`digestHexStream`: Incremental SHA3-256 for material too large to hold in one buffer; a chunked digest equals a whole-buffer digest, pinned at chunk sizes straddling the 136-byte rate
65
+ * feature:`subject.binary/1`: Accept `PrehashedMaterial` — a caller that streamed a file supplies `subject_local_digest_hex` instead of the bytes, for an identical verdict
66
+ * feature:`isOpaqueByteProfile`: Decides which profiles may be hashed in chunks, next to the switch that canonicalizes, so a prehashed entry on a canonicalizing profile is `REJECTED` as caller misuse
67
+ * feature:`canonicalBytesForSubject`: Canonical bytes per subject profile — binary, text, email, collection, ai-decision and context-snapshot
68
+ * feature:`jcsCanonicalizeBytes`: RFC 8785 canonicalization, the signed byte form
69
+ * feature:Rules: the production profile carries the corpus commitment of `rules/2026-01`, `17e3a74a4fd05b039da9f740a138c36d353f561d49726c00351843bb518364ff`, the `subtree_root` of its corpus proof (certcrypt-specs `verification/rules/rules-2026-01/`), so `Independent` verification under `rules/2026-01` passes `RULES_CORPUS_COMMITMENT_PRESENT`
70
+ * feature:Config: `getCertcryptConfig`, the only exported profile; test profiles stay in the unpublished harness, and the CLI accepts a caller-supplied profile only through the test-only `--test-config` flag; `VerifierResult.production_verification` reports which regime produced a result
71
+ * feature:Conformance: the 160 fixtures of `certcrypt-conformance` `1.0.0` run via `npm run test:conformance`, compared with exact equality of `result_code`, `verification_target`, the set of `failed_check_ids` and every further member a fixture declares, gating publication through `prepublishOnly`; `CONFORMANCE_VECTORS_VERSION` is `null` on a build that did not run them, so a report can only name a contract that was actually verified
72
+ * feature:Packaging: ESM-only, Node >= 20, `exports` blocking deep imports into `dist/` so a signature component cannot be reached around `verifyComposite`
package/LICENSE ADDED
@@ -0,0 +1,178 @@
1
+ Copyright 2025-2026 CERTCRYPT, Inc., its affiliates or licensors. All rights reserved.
2
+
3
+ Apache License
4
+ Version 2.0, January 2004
5
+ http://www.apache.org/licenses/
6
+
7
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
8
+
9
+ 1. Definitions.
10
+
11
+ "License" shall mean the terms and conditions for use, reproduction,
12
+ and distribution as defined by Sections 1 through 9 of this document.
13
+
14
+ "Licensor" shall mean the copyright owner or entity authorized by
15
+ the copyright owner that is granting the License.
16
+
17
+ "Legal Entity" shall mean the union of the acting entity and all
18
+ other entities that control, are controlled by, or are under common
19
+ control with that entity. For the purposes of this definition,
20
+ "control" means (i) the power, direct or indirect, to cause the
21
+ direction or management of such entity, whether by contract or
22
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
23
+ outstanding shares, or (iii) beneficial ownership of such entity.
24
+
25
+ "You" (or "Your") shall mean an individual or Legal Entity
26
+ exercising permissions granted by this License.
27
+
28
+ "Source" form shall mean the preferred form for making modifications,
29
+ including but not limited to software source code, documentation
30
+ source, and configuration files.
31
+
32
+ "Object" form shall mean any form resulting from mechanical
33
+ transformation or translation of a Source form, including but
34
+ not limited to compiled object code, generated documentation,
35
+ and conversions to other media types.
36
+
37
+ "Work" shall mean the work of authorship, whether in Source or
38
+ Object form, made available under the License, as indicated by a
39
+ copyright notice that is included in or attached to the work
40
+ (an example is provided in the Appendix below).
41
+
42
+ "Derivative Works" shall mean any work, whether in Source or Object
43
+ form, that is based on (or derived from) the Work and for which the
44
+ editorial revisions, annotations, elaborations, or other modifications
45
+ represent, as a whole, an original work of authorship. For the purposes
46
+ of this License, Derivative Works shall not include works that remain
47
+ separable from, or merely link (or bind by name) to the interfaces of,
48
+ the Work and Derivative Works thereof.
49
+
50
+ "Contribution" shall mean any work of authorship, including
51
+ the original version of the Work and any modifications or additions
52
+ to that Work or Derivative Works thereof, that is intentionally
53
+ submitted to Licensor for inclusion in the Work by the copyright owner
54
+ or by an individual or Legal Entity authorized to submit on behalf of
55
+ the copyright owner. For the purposes of this definition, "submitted"
56
+ means any form of electronic, verbal, or written communication sent
57
+ to the Licensor or its representatives, including but not limited to
58
+ communication on electronic mailing lists, source code control systems,
59
+ and issue tracking systems that are managed by, or on behalf of, the
60
+ Licensor for the purpose of discussing and improving the Work, but
61
+ excluding communication that is conspicuously marked or otherwise
62
+ designated in writing by the copyright owner as "Not a Contribution."
63
+
64
+ "Contributor" shall mean Licensor and any individual or Legal Entity
65
+ on behalf of whom a Contribution has been received by Licensor and
66
+ subsequently incorporated within the Work.
67
+
68
+ 2. Grant of Copyright License. Subject to the terms and conditions of
69
+ this License, each Contributor hereby grants to You a perpetual,
70
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
71
+ copyright license to reproduce, prepare Derivative Works of,
72
+ publicly display, publicly perform, sublicense, and distribute the
73
+ Work and such Derivative Works in Source or Object form.
74
+
75
+ 3. Grant of Patent License. Subject to the terms and conditions of
76
+ this License, each Contributor hereby grants to You a perpetual,
77
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
78
+ (except as stated in this section) patent license to make, have made,
79
+ use, offer to sell, sell, import, and otherwise transfer the Work,
80
+ where such license applies only to those patent claims licensable
81
+ by such Contributor that are necessarily infringed by their
82
+ Contribution(s) alone or by combination of their Contribution(s)
83
+ with the Work to which such Contribution(s) was submitted. If You
84
+ institute patent litigation against any entity (including a
85
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
86
+ or a Contribution incorporated within the Work constitutes direct
87
+ or contributory patent infringement, then any patent licenses
88
+ granted to You under this License for that Work shall terminate
89
+ as of the date such litigation is filed.
90
+
91
+ 4. Redistribution. You may reproduce and distribute copies of the
92
+ Work or Derivative Works thereof in any medium, with or without
93
+ modifications, and in Source or Object form, provided that You
94
+ meet the following conditions:
95
+
96
+ (a) You must give any other recipients of the Work or Derivative
97
+ Works a copy of this License; and
98
+
99
+ (b) You must cause any modified files to carry prominent notices
100
+ stating that You changed the files; and
101
+
102
+ (c) You must retain, in the Source form of any Derivative Works
103
+ that You distribute, all copyright, patent, trademark, and
104
+ attribution notices from the Source form of the Work,
105
+ excluding those notices that do not pertain to any part of
106
+ the Derivative Works; and
107
+
108
+ (d) If the Work includes a "NOTICE" text file as part of its
109
+ distribution, then any Derivative Works that You distribute must
110
+ include a readable copy of the attribution notices contained
111
+ within such NOTICE file, excluding those notices that do not
112
+ pertain to any part of the Derivative Works, in at least one
113
+ of the following places: within a NOTICE text file distributed
114
+ as part of the Derivative Works; within the Source form or
115
+ documentation, if provided along with the Derivative Works; or,
116
+ within a display generated by the Derivative Works, if and
117
+ wherever such third-party notices normally appear. The contents
118
+ of the NOTICE file are for informational purposes only and
119
+ do not modify the License. You may add Your own attribution
120
+ notices within Derivative Works that You distribute, alongside
121
+ or as an addendum to the NOTICE text from the Work, provided
122
+ that such additional attribution notices cannot be construed
123
+ as modifying the License.
124
+
125
+ You may add Your own copyright statement to Your modifications and
126
+ may provide additional or different license terms and conditions
127
+ for use, reproduction, or distribution of Your modifications, or
128
+ for any such Derivative Works as a whole, provided Your use,
129
+ reproduction, and distribution of the Work otherwise complies with
130
+ the conditions stated in this License.
131
+
132
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
133
+ any Contribution intentionally submitted for inclusion in the Work
134
+ by You to the Licensor shall be under the terms and conditions of
135
+ this License, without any additional terms or conditions.
136
+ Notwithstanding the above, nothing herein shall supersede or modify
137
+ the terms of any separate license agreement you may have executed
138
+ with Licensor regarding such Contributions.
139
+
140
+ 6. Trademarks. This License does not grant permission to use the trade
141
+ names, trademarks, service marks, or product names of the Licensor,
142
+ except as required for reasonable and customary use in describing the
143
+ origin of the Work and reproducing the content of the NOTICE file.
144
+
145
+ 7. Disclaimer of Warranty. Unless required by applicable law or
146
+ agreed to in writing, Licensor provides the Work (and each
147
+ Contributor provides its Contributions) on an "AS IS" BASIS,
148
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
149
+ implied, including, without limitation, any warranties or conditions
150
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
151
+ PARTICULAR PURPOSE. You are solely responsible for determining the
152
+ appropriateness of using or redistributing the Work and assume any
153
+ risks associated with Your exercise of permissions under this License.
154
+
155
+ 8. Limitation of Liability. In no event and under no legal theory,
156
+ whether in tort (including negligence), contract, or otherwise,
157
+ unless required by applicable law (such as deliberate and grossly
158
+ negligent acts) or agreed to in writing, shall any Contributor be
159
+ liable to You for damages, including any direct, indirect, special,
160
+ incidental, or consequential damages of any character arising as a
161
+ result of this License or out of the use or inability to use the
162
+ Work (including but not limited to damages for loss of goodwill,
163
+ work stoppage, computer failure or malfunction, or any and all
164
+ other commercial damages or losses), even if such Contributor
165
+ has been advised of the possibility of such damages.
166
+
167
+ 9. Accepting Warranty or Additional Liability. While redistributing
168
+ the Work or Derivative Works thereof, You may choose to offer,
169
+ and charge a fee for, acceptance of support, warranty, indemnity,
170
+ or other liability obligations and/or rights consistent with this
171
+ License. However, in accepting such obligations, You may act only
172
+ on Your own behalf and on Your sole responsibility, not on behalf
173
+ of any other Contributor, and only if You agree to indemnify,
174
+ defend, and hold each Contributor harmless for any liability
175
+ incurred by, or claims asserted against, such Contributor by reason
176
+ of your accepting any such warranty or additional liability.
177
+
178
+ END OF TERMS AND CONDITIONS