PROTOCOL SPECIFICATION v1.0 • NOVEMBER 2026

E-mail-via-HTTPS (EVH)

A Purely HTTPS-Based, Post-Quantum, Zero-Knowledge Electronic Mail Protocol replacing legacy SMTP, IMAP, POP3, DKIM, and DMARC with signed, end-to-end encrypted JSON envelopes.

Author: Brenden Dane

Port 443 Only (Reverse Proxy friendly, of course)

Eliminates legacy mail ports (25, 110, 143, 993). Zero extra daemons.

Hybrid Post-Quantum

X25519 + ML-KEM-768 key encapsulation and Ed25519 + ML-DSA-65 signatures.

Zero-Knowledge Architecture

Servers store ciphertext only. Content & display headers sealed client-side.

3-of-5 Merkle Witness

Key transparency log with witness quorum co-signatures to prevent split-view attacks.

Two-Hop Store-and-Forward Delivery Architecture

EVH mandates clean separation between sender authorization (Hop 1) and server-to-server domain authentication (Hop 2), eliminating credential leakage and enabling domain reputation tracking.

Interactive Protocol Flow Diagram Click nodes or arrows for technical details

Sender Client

E2EE Encrypt & Hybrid Sign

WebAuthn PRF
HOP 1

HTTPS + Bearer Token
POST /evh/v3/submit

SDS Server

Submission Domain Server

Queue & Outbound
HOP 2

RFC 9421 Domain Sig
POST /evh/v3/deliver

RDS & Recipient

Recipient Domain Server

Sync / SSE Push

Section 3.2: Shared Web Server Deployment

A single HTTPS listener on port 443 can host both a public website and an EVH service by routing distinct URL prefixes under /.well-known/evh and /evh/v3/*.

# Domain config & active keys https://example.com/.well-known/evh # Server branding logo (SRI SHA-256 verified) https://example.com/.well-known/evh/logo # Identity keys, device certs & prekeys https://example.com/.well-known/evh/keys/{alias} # Authenticated protocol endpoints https://example.com/evh/v3/*

Section 6.1: Server Branding & Logo Integrity

To allow custom GUI branding without exposing clients to tracking vectors or XSS attacks, EVH mandates strict server logo requirements:

  • Integrity Check: Must verify SHA-256 hash against logo.sha256 before rendering.
  • SVG Security: SVG files must conform to SVG Tiny PS; strictly 0 <script>, <foreignObject>, or event handlers.
  • Raster Limits: PNG/WebP limited to 256×256 px and ≤ 500 KB.
  • Sandboxing: Rendered in isolated iframe with CSP default-src 'none'; img-src data: blob:.

Normative Cryptographic Suite & Key Hierarchy

EVH combines classical high-speed algorithms with post-quantum lattice primitives (NIST FIPS 203 & 204) to assure long-term confidentiality against quantum adversaries.

Cryptographic Function Algorithm Selected Parameters & Standard Reference
Key Encapsulation (KEM) Hybrid X25519 + ML-KEM-768 Ephemeral X25519 (RFC 7748) + single-use ML-KEM-768 (NIST FIPS 203)
Key Derivation (KDF) HKDF-SHA-256 Extract-then-Expand with transcript salt (RFC 5869)
Authenticated Encryption AES-256-GCM 256-bit key, 96-bit derived nonce, 128-bit tag (NIST SP 800-38D)
Account & Device Signatures Hybrid Ed25519 + ML-DSA-65 Both signature halves required (RFC 8032; NIST FIPS 204)
Domain HTTP Signatures Hybrid Ed25519 + ML-DSA-65 RFC 9421 HTTP Message Signatures & RFC 9530 Digest Fields

Key Hierarchy & Device Isolation

EVH strictly isolates the offline 256-bit recovery seed from device-local signing keys. Hardware authenticators or Secure Enclaves execute operations without exposing seed material.

Offline 256-bit Mnemonic Seed

│

└──► Root Identity Key Pair (id_ed25519 + id_mldsa65)

├── Signs Device Certificates: (device_id, dev_pub, expires_ms)

└── Signs Prekey Batches: (kex_x25519, prekey[i]_mlkem768)

Hybrid Key Derivation Transcript

Let LP(x) denote the 4-byte length prefix of x concatenated with x. Sender encapsulates against the recipient's prekey:

transcript = LP("EVH3/kem") || LP(sender_id) || LP(recipient_alias) ||
             LP(recipient_id) || LP(prekey_id) || LP(eph_pub) ||
             LP(recipient_kex_pub) || LP(kem_ct)
th = SHA-256(transcript)
prk = HKDF-Extract(salt = th, ikm = ss_x || ss_pq)
k_enc = HKDF-Expand(prk, info = "EVH3/aead-key", L = 32)
nonce = HKDF-Expand(prk, info = "EVH3/aead-iv", L = 12)

Power-of-Two Payload Padding

Section 9.1

To defeat social-graph traffic fingerprinting, EVH applies zero-byte padding out to the nearest power-of-two bucket boundary starting at 4 KiB (4 KiB, 8 KiB, 16 KiB ... 1 MiB).

Account-Salted Client Attachment Blobs

Section 9.2

Attachments are encrypted client-side with AES-256-GCM using a random file key k_blob before uploading to POST /evh/v3/blob.

blob_id = HMAC-SHA256(account_blob_salt, ciphertext_sha256)

Zero Cross-Tenant Correlation: Because the server storage key is derived with the user's secret account_blob_salt, two users uploading the exact same document generate completely uncorrelated storage IDs.

Canonical API Endpoint Explorer

Section 3.3 Endpoint Registry. All messages carry "v": 3, enforce JCS JSON canonicalization, and execute strictly over HTTPS.

Method Endpoint Path Authentication Required Purpose & Scope

DNSSEC Discovery Records (Section 4.3)

DNSSEC validation is REQUIRED. Unsecured domains trigger a mandatory "DNS Not Secured" warning in client GUIs.

_evh._tcp.example.com. 3600 IN SRV 0 1 443 evh.example.com.
_evh.example.com.      3600 IN TXT "v=evh3; endpoint=https://evh.example.com; keylog=https://log.evhmail.com; policy=https://example.com/mail-policy"

Domain Config: GET /.well-known/evh

{
  "v": 3,
  "domain": "example.com",
  "endpoint": "https://evh.example.com",
  "logo": {
    "url": "https://evh.example.com/.well-known/evh/logo",
    "sha256": "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08",
    "format": "image/svg+xml"
  }
}

RDS Delivery Validation Pipeline

Section 10.1 Order of Execution. The RDS validates incoming envelopes in exact sequence and halts immediately at the first failure to conserve computational resources.

Click Stage to Preview Logic:
Fail-Closed Principle: Early Exit on Failure Strict Standard Order

3-of-5 Witness Quorum

Signed Tree Heads (STHs) MUST be co-signed by at least 3 out of 5 independent witness nodes to prevent split-view attacks by malicious operators.

72-Hour Offline Cap

Devices offline beyond 72 hours enter Restricted Read-Only State and display an explicit "Unverified Log State" warning before accepting new key bindings.

WAL-Snapshotted Filter

Rolling Cuckoo filter backed by memory-mapped snapshots and Write-Ahead Log (WAL) enables millisecond restarts without 503 delivery outages.

Threat Model & Defense Matrix

Section 2.1 Protected Assets & Adversary Capabilities.

Passive Network Observer Protected

TLS 1.3 transport; end-to-end encrypted payloads and attachment blobs with mandatory power-of-two padding (4 KiB to 1 MiB).

Active Network Attacker Protected

Strict TLS certificate validation; device signatures; AAD binding in AES-GCM transcript; rolling Cuckoo replay filter.

Compromised RDS Storage Protected

Zero-knowledge ciphertext storage; Merkle key transparency log with independent witness gossip verification.

Compromised SDS Relay Protected

Client-side encryption and signing; client-encrypted sent copies prevent relay tampering or header injection.

Quantum Adversary Protected

Hybrid X25519 + ML-KEM-768 (FIPS 203) KEM and hybrid Ed25519 + ML-DSA-65 (FIPS 204) device and domain signatures.

Provider Legal Compulsion Protected

Server holds ciphertext and routing metadata only; cannot surrender plaintext or user private key material.

Section 2.2: Explicit Out-of-Scope Security Boundaries

EVH explicitly does not protect against malware on compromised endpoint devices, provider-controlled webmail origins sharing an API domain, fine-grained routing metadata observed by network transit nodes, or legal compulsion directly targeted at the physical user. Users requiring defense against provider webmail origins MUST use a native client or independently hosted web client.

Appendix B. Uniform Error Code Registry

EVH returns standardized machine-readable JSON error responses across all protocol endpoints.

Error Code String HTTP Status Retryable Description & Technical Trigger