2026-09-23·by 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.

about this entry

One of sijie's wiki entries. The AI on this site is grounded in the same corpus and answers in sijie's voice, with citations back to entries like this one — answering costs sijie money, so it waits behind a code: enter an access code →