/** * The `_vdig` slot payload + crypto (stage 2, spec §2). * * A `_vdig[field]` blob is AES-256-GCM `"iv:data"` sealed under an * HKDF(CEK) slot key with AAD = ['noydb-classify-vdig', collection, * recordId, field] (C1 rollback-splice hardening). The AAD is NOT stored — * readers reconstruct it. It is deliberately `_v`-independent: C6's * carry-forward copies blob bytes verbatim across version bumps; the * same-record same-field TEMPORAL rollback residual is detected by the * ledger's conditional `_vdig` binding (envelope-body.ts). * * CEK-ONLY (I3): there is no DEK derivation and no * 'noydb-classify-vdig-dek' salt domain — every vdig slot dies with the * record's `_cek` (forget() shreds it totally; no vdig-dekResidue class). * @module */ import { type EnclaveKey } from '../crypto.js'; export declare const VDIG_SALT_DOMAIN = "noydb-classify-vdig"; export interface VdigDigestEntry { readonly salt: string; readonly hash: string; } export interface VdigPayload { readonly v: 1; readonly alg: 'PBKDF2-SHA256'; readonly iter: number; readonly cur: VdigDigestEntry & { readonly at: string; }; /** Previous digests, oldest-first, length ≤ notLastN (cap 8). */ readonly ring?: readonly VdigDigestEntry[]; } /** Injective JSON-array AAD — same collision argument as deriveSealedFieldKey. */ export declare function buildVdigAad(collection: string, recordId: string, field: string): Uint8Array; /** HKDF(CEK) → non-extractable AES-256-GCM vdig slot key. CEK-only (I3). */ export declare function deriveVdigSlotKey(cek: EnclaveKey, collection: string, field: string): Promise; export declare function sealVdigPayload(payload: VdigPayload, cek: EnclaveKey, collection: string, recordId: string, field: string): Promise; /** Throws TamperedError on any AAD / auth-tag mismatch (C1). */ export declare function openVdigPayload(blob: string, cek: EnclaveKey, collection: string, recordId: string, field: string): Promise;