Skip to main content
Founding Partner + 7-Day Trial
Back to docs
PQC-COOKIE-4KPQC-SCHEMA-TRUNCPQC-HEADER-431HIGHFIPS 203 (ML-KEM-768) · FIPS 204 (ML-DSA-65) · RFC 6265 · NIST IR 8547

PQC Wire-Size Rollout Cliffs: 4KB Cookies, SQL VARCHAR(255) & HTTP 431 Headers

Severity: HIGH

Upgrading from 64-byte ECDSA P-256 signatures to FIPS 204 ML-DSA-65 (3,309-byte raw signature; ~4,412+ bytes Base64URL inside a JWT/session cookie) and FIPS 203 ML-KEM-768 (1,184-byte public key; 1,088-byte ciphertext) expands wire artifacts by 15x–50x. Free ciphermap preflight detects three silent production outages before rollout: browser RFC 6265 4,096-byte Set-Cookie drops (PQC-COOKIE-4K), SQL/Prisma/SQLAlchemy/GORM VARCHAR(255)/VARCHAR(512) column truncations on public_key/signature/jwt columns (PQC-SCHEMA-TRUNC), and NGINX large_client_header_buffers / Envoy max_request_headers_kb 4KB–8KB HTTP 431 Request Header Fields Too Large cliffs (PQC-HEADER-431).

Remediation checklist

  • PQC-COOKIE-4K: store an opaque 32-byte session ID in the browser cookie backed by server-side Redis/DB state, or split/chunk session tokens below RFC 6265's 4,096-byte per-cookie ceiling before enabling ML-DSA-65.
  • PQC-SCHEMA-TRUNC: widen SQL and ORM columns storing public keys, ciphertexts, certificates, or signed tokens from VARCHAR(255)/VARCHAR(512) to TEXT or BYTEA prior to dual-algorithm migration.
  • PQC-HEADER-431: raise NGINX large_client_header_buffers (e.g., 4 32k), Envoy max_request_headers_kb (>= 32), and ALB/API-gateway header limits before deploying composite ML-DSA-65 Bearer JWTs or mTLS client-cert headers.

Illustrative Code Examples

These fragments explain migration direction. They are not complete applications or compiler-verified patches for your project.

Flagged by ciphermap preflight — classical-sized cookie, SQL column & NGINX buffer

terminal · zsh
-- schema.sql (PQC-SCHEMA-TRUNC)
CREATE TABLE api_sessions (
  jwt_signature VARCHAR(255) NOT NULL,
  kem_public_key VARCHAR(512) NOT NULL
);
# nginx.conf (PQC-HEADER-431)
large_client_header_buffers 4 8k;

PQC-safe — unbounded TEXT/BYTEA storage + 32KB ingress header buffers

terminal · zsh
-- schema.sql: accommodates 3,309B ML-DSA-65 & composite signatures
CREATE TABLE api_sessions (
  session_id CHAR(43) PRIMARY KEY,
  jwt_signature TEXT NOT NULL,
  kem_public_key BYTEA NOT NULL
);
# nginx.conf: prevents HTTP 431 on composite PQC Authorization headers
large_client_header_buffers 4 32k;

Scan your own repository for PQC-COOKIE-4K locally (0 code egress)

Preview proposed changes free with ciphermap fix . --dry-run --offline --no-telemetry. Eligibility depends on the installed build, call shape, module format, and migration context. The bundled RSA fixture has a classical key-size candidate; that does not make it post-quantum secure. Persisted digests and unsupported contexts may be declined. Applying supported candidates requires an entitlement, explicit verifier consent, and the required project tools. Review the actual verification result before adopting a change.

Other rule families