How I built an end-to-end encrypted chat system in Next.js using derived keys and SubtleCrypto’s ECDH implementation.