@tillstack/notary-core
v0.1.0
Published
TillNotary core — RFC 6962 Merkle transparency-log algebra (inclusion + consistency proofs over an insert-only node store), pure RFC 9162 proof verifiers, crypto-agility suites with hybrid Ed25519 + ML-DSA signatures (FIPS 204), signed checkpoint notes an
Maintainers
Readme
@tillstack/notary-core
The math behind TillNotary, as pure functions with no I/O. It runs on Node and Cloudflare Workers.
- RFC 6962 Merkle tree: leaf/node hashing, inclusion and consistency paths
- RFC 9162 proof verifiers that return
falseon anything malformed and never throw on hostile input - Hybrid signatures: Ed25519 and ML-DSA (FIPS 204). A forgery has to break both.
- Signed checkpoint notes, witness cosignatures and refusals
- Crypto-agility suites:
sig-ed25519-mldsa65-sha256.v1(default) andsig-ed25519-mldsa87-sha384.v1(CNSA 2.0 floor)
Every primitive comes from the audited @noble/* libraries. Results are validated against an independent cross-implementation test-vector suite.
Most apps want @tillstack/sdk-notary-node, which uses this package to verify every server response. Use this package directly to verify proofs in your own code.
Install
npm install @tillstack/notary-coreVerify an inclusion proof
import { SHA256, hashLeaf, verifyInclusion } from '@tillstack/notary-core'
const ok = verifyInclusion(SHA256, hashLeaf(SHA256, leafBytes), leafIndex, treeSize, pathBytes, rootHashBytes)Verify a log only grew
import { SHA256, verifyConsistency } from '@tillstack/notary-core'
const ok = verifyConsistency(SHA256, oldSize, oldRoot, newSize, newRoot, proofBytes)Docs
https://tilldev.dev/docs/tillnotary/proofs
License
Apache-2.0
