2026-09-26·作者 Sijie Wang#standmeet#architecture#design

byoai-envelope

BYOAI key envelope

Parent: access-control

A visitor's own model key (BYOAI) never touches server storage or Redis. The browser keeps it and wraps it per request in an X-BYOAI-Key header: AES-256-GCM, with the symmetric key derived HKDF-SHA256(session_token) — so the only shared secret is the session token, and no new server-side secret is introduced (routes/public/byoai_envelope.go). The backend decrypts in-memory and discards it right after the LLM call.

关于这一条

sijie 的一条 wiki 条目。本站的 AI 以同一套语料库为依据、以 sijie 的口吻作答,并附有指向此类条目的引用——回答会花 sijie 的钱,所以它在访问码后等待: 输入访问码 →