- Status: Accepted
- Date: 2026-11-13
Context
QuantLayer needs one authorization layer that can require, per action, a classical signature, a post-quantum signature, both (hybrid), a credential, or a ZK eligibility proof. Each requirement must be bound to a chain, a contract, an application, a nonce and an expiry, must be versioned, and must be enforceable on-chain where that is feasible.
Decision
- One request schema with two canonical encodings.
- The canonical-JSON signing input, for QuantLayer signers.
- The EIP-712 struct digest, for EVM wallets and Solidity. The digest is the request's identity everywhere: replay key, credential nonce, ZK proof nonce, decision id.
- The request commits to key ids, key versions, algorithm identifiers, policy id and version, and mode.
- Immutable, versioned verification policies. Five modes, a minimum
version per policy id, and
active/retired/revokedstatus. The policy digest is recorded in every decision. - A deterministic engine that never throws.
- Nine fixed steps, the first failure terminal, and a full trace with stable reason codes.
- Any exception means deny (fail closed).
- Nonces and nullifiers are consumed last, atomically per store.
- Integration through ports, not copies. IdentityProvider (key registry), SignatureVerifier (classical + PQC, with an optional FIPS context), the quantlayer.credential/2 presentation verifier, the zk-engine ProofVerifier with a backend, RootRegistry, NullifierStore, RevocationRegistry.
- Rust adapters in a separate package.
@quantlayer-protocol/authorization-pqc, so the engine and the SDK stay browser-safe and need no native toolchain. - On-chain.
QuantLayerAuthorizationGateenforces the classical (EIP-712) and ZK modes, and fails closed for post-quantum, hybrid and credential modes, which are enforced off-chain.
Consequences
@quantlayer-protocol/authorizationnow depends on crypto, privacy, zk-engine and evm. The old access-rule API remains, with its request type renamed toAccessRequest.SignatureVerificationInputgainedcontext?. Classical verifiers reject a non-empty context.- Post-quantum and hybrid authorizations can't be enforced by a contract until an on-chain ML-DSA verifier exists.