Architectural Invariant Design: WebAuthn CTAP 2.2 Cross-Device Ephemeral ECDH Proximity Binding Guardrail
WebAuthn CTAP 2.2 Cross-Device Ephemeral ECDH Proximity Binding Guardrail defines an industrial-grade behavioral standard for security engineering. Enforces strict validation and cryptographic tying of WebAuthn hybrid cross-device transport (caBLE/FIDO CTAP 2.2) authentication assertions to ephemeral ECDH-derived session channels. Precludes QR-phishing, adversarial session interception, and cross-device session bleeding by mandating constant-time verification of the clientDataJSON hash, ephemeral authenticator public key derivation, and Bluetooth Low Energy (BLE) proximity routing commitments before issuing server-side user sessions. Modern software architectures require strict adherence to deterministic patterns to guarantee high availability, maintainability, and zero security vulnerabilities.
Hazard Analysis: What Breaks Without This Rule
The following failure modes have been cataloged from hundreds of hours of production code reviews where AI assistants produced non-compliant implementations:
| Failure Mode | AI Symptom (The Anti-Pattern) | Severity | Production Impact & Remedy |
|---|---|---|---|
| AI Hallucination & Deprecation Drift | Accepting Cross-Device Hybrid WebAuthn Assertions Without Enforcing Ephemeral ECDH Channel Tying and BLE Proximity Commitments | Critical | Violating this industrial standard introduces regression bugs, security risks, and unexpected runtime failures in production. Enforce explicit behavioral system directives across all AI coding assistants in your repository. |
| Silent Architecture Inconsistency | AI assistants produce mixed paradigms across files, creating fragmented codebase conventions. | Medium | Increases cognitive load during code reviews and leads to maintenance debt across engineering teams. Pin project conventions in .cursor/rules, CLAUDE.md, and AGENTS.md so all team agents follow identical guardrails. |
Step-by-Step Production Directives
Each rule constraint below is injected into the AI agent's system prompt to establish deterministic boundaries:
Engineers MUST ALWAYS cryptographically bind the WebAuthn challenge to an ephemeral ECDH keypair generated exclusively for the single-use QR hybrid session.
Engineers MUST ALWAYS cryptographically bind the WebAuthn challenge to an ephemeral ECDH keypair generated exclusively for the single-use QR hybrid session.
Engineers MUST verify that the authenticator's clientDataJSON contains the exact unhashed cross-device channel binding parameter matching the server's ephemeral public key.
Engineers MUST verify that the authenticator's clientDataJSON contains the exact unhashed cross-device channel binding parameter matching the server's ephemeral public key.
Engineers MUST NOT persist or reuse hybrid ephemeral ECDH session tokens across authentication flows, enforcing a hard TTL (strictly <= 120 seconds).
Engineers MUST NOT persist or reuse hybrid ephemeral ECDH session tokens across authentication flows, enforcing a hard TTL (strictly <= 120 seconds).
Services MUST enforce BLE proximity validation by asserting the presence and cryptographic validity of the routing secret and tunnel symmetric key negotiated during the CTAP 2.2 handshake.
Services MUST enforce BLE proximity validation by asserting the presence and cryptographic validity of the routing secret and tunnel symmetric key negotiated during the CTAP 2.2 handshake.
Services MUST immediately invalidate the ephemeral session handle upon any signature verification failure or upon first successful issuance of the primary session token to prevent replay attacks.
Services MUST immediately invalidate the ephemeral session handle upon any signature verification failure or upon first successful issuance of the primary session token to prevent replay attacks.
Components NEVER accept fallback assertions from non-BLE transports when the user initiation was flagged as cross-device hybrid authentication.
Components NEVER accept fallback assertions from non-BLE transports when the user initiation was flagged as cross-device hybrid authentication.
Frequently Asked Technical Questions
Common questions developers face when configuring AI coding assistants for this stack:
Q:Why is WebAuthn CTAP 2.2 Cross-Device Ephemeral ECDH Proximity Binding Guardrail critical for AI coding assistants?
Enforces strict validation and cryptographic tying of WebAuthn hybrid cross-device transport (caBLE/FIDO CTAP 2.2) authentication assertions to ephemeral ECDH-derived session channels. Precludes QR-phishing, adversarial session interception, and cross-device session bleeding by mandating constant-time verification of the clientDataJSON hash, ephemeral authenticator public key derivation, and Bluetooth Low Energy (BLE) proximity routing commitments before issuing server-side user sessions. Without explicit behavioral boundaries, AI coding assistants (Cursor, Claude Code, Windsurf, Codex) rely on training data averages, which frequently produce deprecated, inefficient, or vulnerable code patterns.
Q:How does adopting this rule prevent AI hallucinations?
This rule explicitly declares what the AI must avoid (Accepting Cross-Device Hybrid WebAuthn Assertions Without Enforcing Ephemeral ECDH Channel Tying and BLE Proximity Commitments) and prescribes verified positive examples. Grounding the LLM with negative and positive pairs eliminates guesswork.
Q:Which AI coding environments are supported?
This specification is multi-platform compatible: Cursor (.cursor/rules/*.mdc & .cursorrules), Anthropic Claude Code (CLAUDE.md), Windsurf (.windsurfrules), Codex / Cline (AGENTS.md), and GitHub Copilot (.github/copilot-instructions.md).
Q:Can I combine this rule with other technology stacks?
Yes. Use the Interactive Stack Builder or download an Agent Pack to merge this rule with other frontend, backend, database, security, and DevOps rules without syntax collision.