Skip to main content

Encryption vs Authentication: The Architecture Guardrails You Need After the Passkeys Critique

· 4 min read
Victor Jimenez
Software Engineer & AI Agent Builder

The passkeys critique surfaced a recurring architecture mistake: teams treat authentication credentials as direct data-encryption keys. That coupling is brittle and creates permanent data-loss risk for normal account lifecycle events (device loss, recovery, provider churn).

This review defines explicit guardrails for security design and architecture approvals.

The Core Problem

"Authentication proves user identity. Encryption protects data confidentiality. These controls can interact, but they must not be the same key lifecycle."

Context

When a team derives encryption keys directly from passkey credentials, losing the passkey means losing the data. This is not a theoretical risk — it is the default failure mode for normal user behavior: switching devices, resetting accounts, or changing authentication providers. Architecture reviews must reject designs that cannot handle these events without irreversible data loss.

Approved Patterns for User-Data Encryption

Use per-record or per-tenant Data Encryption Keys (DEKs), wrapped by a Key Encryption Key (KEK) in KMS/HSM.

Data path
Generate DEK for object/tenant scope
-> Encrypt plaintext with AEAD (AES-256-GCM or XChaCha20-Poly1305)
-> Wrap DEK with KEK in managed KMS/HSM
-> Store ciphertext + wrapped DEK + metadata (alg, version, aad-context)
BenefitWhy
Clean key rotationRewrap DEKs without re-encrypting data
Scoped revocationRevoke one tenant's keys without affecting others
Auditable key usageKMS/HSM provides full audit trail

Architecture Review Decision Flow

Explicit Anti-Patterns to Block

Anti-PatternWhy It Fails
Auth == Encryption keyPasskey/credential loss = permanent data loss
No recovery story"Data gone forever if credential lost" for mainstream products
Client-only key custody by accidentNo backup, no escrow, no explicit user warning
Nonce misuseAEAD nonce reuse or deterministic nonce without proven construction
Homegrown cryptoCustom primitives, unaudited constructions
Single global DEKOne compromise decrypts entire user population
Soft-delete onlyKeys remain active after deletion request
Opaque key metadataNo key IDs, algorithm IDs, or version tags
Silent downgradeFallback to weaker crypto without explicit control and alerting
Reality Check

Architecture reviews should reject any design where account recovery causes irreversible data loss, or where cryptographic compromise has a full-account blast radius. These are not edge cases — they are the normal lifecycle of user accounts.

Control Mapping for Review Boards

CategoryControls
Must-haveEnvelope encryption, key hierarchy documented, recovery and rotation runbooks, cryptographic logging and alerting
Should-havePer-tenant key segmentation, periodic key health attestations, break-glass with dual authorization
BlockersIrreversible user-data loss from normal auth lifecycle, missing incident response for key compromise, no test evidence for restore/rotation/deletion flows
Practical default baseline for most SaaS products
  • WebAuthn/passkeys for phishing-resistant authentication
  • KMS-backed envelope encryption for user data
  • Argon2id-derived user secret only where business requirements need user-side secrecy
  • Documented recovery with explicit user communication

This gives strong authentication and durable encryption without coupling product data survival to a single credential artifact.

What I Learned

  • The passkeys critique exposed a fundamental architecture mistake that is more common than it should be.
  • Authentication and encryption must have separate key lifecycles. This is not optional.
  • Every encryption design needs a tested recovery path, a tested rotation path, and versioned metadata.
  • The anti-pattern list is the most actionable artifact — use it as a checklist in architecture reviews.