/** * The enclave verify oracle (spec ยง3). Verdict-only egress: no path * distinguishes "record missing" / "no digest" / "AAD-tamper" / "mismatch" * beyond { ok: false } โ€” existence oracles are oracles too. Every path that * cannot run a real comparison runs ONE dummy PBKDF2 + ONE dummy tag-compare * first (C4), so wall-clock cannot enumerate records/fields/answers. The * text door (verifyTextField) has no real PBKDF2 of its own, so it pays the * pad UNCONDITIONALLY โ€” every outcome, including a real compare, costs the * same one PBKDF2 unit (no inverted exists-vs-absent oracle). * Elevated records (_tier > 0, with-audit tier moves) are non-comparable * through every door and pad-false exactly like missing records (#691) โ€” * the tier-aware read surface is getAtTier, never verify. * Throws are reserved for caller/config bugs (ClassifiedVerifyError / * ClassifiedConfigError) and are exempt from the pad by design (R6 note). * @module */ import { type EnclaveKey } from '../crypto.js'; import { type VerifyNormalizeMode } from './normalize.js'; import type { EncryptedEnvelope, VdigFieldPolicy, ClassifiedVerdict } from '../../types.js'; export interface VerifyEngineCtx { readonly collection: string; getEnvelope(id: string): Promise; resolveCek(env: EncryptedEnvelope): Promise; getDEK(): Promise; readonly now: () => number; } export declare function verifyDigestField(ctx: VerifyEngineCtx, id: string, field: string, candidate: string, policy: VdigFieldPolicy): Promise; export declare function verifyTextField(ctx: VerifyEngineCtx, id: string, field: string, candidate: string, normalize: VerifyNormalizeMode): Promise; export declare function matchGroupFields(ctx: VerifyEngineCtx, id: string, answers: Record, members: ReadonlyArray<{ readonly field: string; readonly policy: VdigFieldPolicy; }>, opts: { readonly min: number; }): Promise<{ readonly passed: boolean; }>;