/** * 🌍 THE AI TRANSPARENCY LOG — "Certificate Transparency for AI claims." Every claim publicly logged, history * un-rewritable. * * Certificate Transparency (RFC 6962) changed the security of the entire web: every TLS certificate a CA issues is * appended to public, append-only Merkle logs, so a mis-issued certificate cannot stay hidden and a log cannot * quietly rewrite history. This is that mechanism for AI claims. Every Melete certificate — a fairness verdict, a * private-audit proof, a model lineage (AIBOM), a proof-carrying answer — is appended to a tamper-evident Merkle * transparency log. Anyone can then (a) get a Signed Tree Head (the log's signed commitment to its current state), * (b) prove a specific claim is INCLUDED in the log (an inclusion proof), and (c) prove the log only ever APPENDED * and never rewrote a past claim (a consistency proof between two tree heads). A vendor can no longer show a * "fair" certificate to one auditor and bury the "biased" one — everything it logs is publicly auditable, and * rewriting the record is mathematically detectable. * * WHY IT IS THE SUBSTRATE (1000×): the individual certificates prove a property; the transparency log makes the * WHOLE ecosystem accountable — non-repudiable, monitorable, fork-detectable — exactly as CT did for HTTPS. It is * the layer the entire honesty stack sits on. * * WHO BENEFITS (a whole ecosystem, ≥4): ① SUBMITTERS (AI vendors) get a public, timestamped, non-repudiable record * their claim existed; ② AUDITORS / light clients verify inclusion + consistency offline with only tree heads and a * proof (no full log); ③ MONITORS (regulators, journalists, the public) watch the log and detect a rewrite or a * split view; ④ END USERS / downstream agents trust a claim only if it is in the public log. * * (DIAKRISIS — MEASURED, RFC 6962 Merkle math: every appended entry has a valid inclusion proof against the current * Signed Tree Head, and a wrong leaf / wrong index is rejected; for every m < n an honest append is consistency- * proven (the size-m tree is a prefix of the size-n tree); REWRITING any past entry makes the new tree inconsistent * with the old signed tree head → caught; a split view [two tree heads of the same size with different roots] is * detected; tree heads are Ed25519-signed and tamper-evident. HONEST: a transparency log proves WHAT was logged and * that history was not rewritten — it does not by itself force anyone to log [that is a policy/ecosystem incentive, * exactly as with web CT], and the leaf is the claim's hash, not a judgement that the claim is true.) */ import { type KeyObject } from "node:crypto"; export declare function leafHash(entry: string): string; export interface SignedTreeHead { standard: "melete-translog-sth/v1"; logId: string; size: number; rootHash: string; timestamp: number; payloadHash: string; signature: string; publicKeyPem: string; algo: "ed25519+sha256"; } export interface InclusionProof { leafIndex: number; treeSize: number; leaf: string; path: string[]; } export interface ConsistencyProof { firstSize: number; secondSize: number; proof: string[]; } export interface TransparencyLog { logId: string; publicKeyPem: string; leaves: string[]; append: (entry: string) => number; size: () => number; sth: () => SignedTreeHead; inclusionProof: (index: number) => InclusionProof; consistencyProof: (firstSize: number) => ConsistencyProof; } export declare function createTransparencyLog(opts?: { logId?: string; keys?: { publicKey: KeyObject; privateKey: KeyObject; }; now?: () => number; }): TransparencyLog; export declare function verifySTH(s: SignedTreeHead): { ok: boolean; reason: string; }; export declare function verifyInclusion(proof: InclusionProof, sth: SignedTreeHead): { ok: boolean; reason: string; }; export declare function verifyEntryInclusion(entry: string, proof: InclusionProof, sth: SignedTreeHead): { ok: boolean; reason: string; }; export declare function verifyConsistency(proof: ConsistencyProof, oldSTH: SignedTreeHead, newSTH: SignedTreeHead): { ok: boolean; reason: string; }; export declare function translogGauntlet(): { score: 0 | 100; checks: Array<{ name: string; pass: boolean; detail: string; }>; }; //# sourceMappingURL=translog.d.ts.map