import type { SlhDsaExports } from './types.js'; import type { SlhDsaParams } from './params.js'; import { type PreHashAlgorithm } from './prehash.js'; /** * Drive slhVerifyInternal with caller-built M' bytes. * * Layout written into INPUT (per src/asm/slhdsa/slh.ts §slhVerifyInternal): * INPUT = pk (2n) ‖ M' (msgLen) ‖ sig (sigBytes) * * The caller has already filtered wrong-length pk and sig (the public * verify*() surface returns false for those before calling this driver). * Inside this function, length-mismatch only manifests if pk / sig were * truncated post-validation; we defensively re-check to keep the WASM * call within its declared INPUT bounds. * * Returns true iff slhVerifyInternal returns 1 (the §9.3 constant-time * PK.root comparison succeeded plus all FORS / hypertree path checks). */ export declare function slhVerifyInternalTs(x: SlhDsaExports, params: SlhDsaParams, pk: Uint8Array, MPrime: Uint8Array, sig: Uint8Array): boolean; /** * HashSLH-DSA verify, post-prehash. FIPS 205 §10.3 Algorithm 25 lines * 16-19. Builds M' = 0x01 ‖ |ctx| ‖ ctx ‖ OID(algo) ‖ prehash and drives * Verify_internal. * * Same return / throw posture as `slhVerifyInternalTs`: returns a pure * boolean for every signature outcome. Caller (in index.ts) is expected * to have already filtered wrong-length vk / sig / digest with the * appropriate verdict (false) before calling this helper. * * The caller owns `prehash`; this helper never wipes it. */ export declare function verifyWithPrehash(x: SlhDsaExports, params: SlhDsaParams, pk: Uint8Array, prehash: Uint8Array, sig: Uint8Array, algo: PreHashAlgorithm, ctx: Uint8Array): boolean;