import { type Bounds } from "@bounded-authority-protocol/verifier"; import { type V3SigningInput } from "./v3.js"; import { type SignerResult } from "./handle.js"; export declare const P256_ORDER = 115792089210356248762697446949407573529996955224135760342422259061068512044369n; export declare const P256_HALF_ORDER: bigint; /** * Low-S normalization (REQ3-SIGNING-low-s): given a 64-byte raw `r || s` * signature, returns the encoding with `s` in `0 < s ≤ (n−1)/2` — replacing a * high `s` with `n − s` (equally valid for the same key and message), leaving * a low `s` untouched. It first asserts `0 < r < n` and `0 < s < n` and throws * otherwise (the signing tail maps the throw to signing_failed). Pure: no * crypto, no allocation beyond the output copy. */ export declare function normalizeLowS(signature: Uint8Array): Uint8Array; /** * The strict post-sign check: verify a 64-byte raw `r || s` ES256 signature * over the message under the 65-byte raw public key with the verifier * package's es256VerifyStrict (key on the curve, `0 < r < n`, * `0 < s ≤ (n−1)/2`, then the backend verify). A high-`s` signature, a * rejection, or an exception returns false, never throws * (REQ3-SIGNING-backend-reject). */ export declare function es256Verifies(message: Uint8Array, signature: Uint8Array, publicKey: Uint8Array): boolean; /** * The v3 shared signing tail: sign → normalize to low-S → strict verify * (wrong-key guard and low-S check) → assemble. The wrong-key guard is the same RA1 discipline as the v1 * tail: a handle whose `sign()` used a different key fails loudly as * `signing_failed`, never a silent false-success deferred to the verifier. */ export declare function signV3AndAssemble(sign: (message: Uint8Array) => Uint8Array | Promise, signingInput: V3SigningInput, publicKey: Uint8Array, bounds: Bounds | undefined): Promise>;