eSIM Security Considerations¶
This page covers the security properties of Fairwave's eSIM surface (lab SM-DP+ server, software eUICC, profile registry) so operators can make informed decisions before exposing it beyond the lab.
Threat model (lab server)¶
The embedded SM-DP+ (fairwave esim serve and the control-plane
/es9plus/ mount) is a lab implementation:
- Wire transport is JSON over HTTPS by default; pass
--tls-cert/--tls-keytofairwave esim serveto serve HTTPS directly. When the control plane fronts it, terminate TLS there. - Cryptographic operations use real primitives (P-256 ECDH, AES-128-CMAC, AES-128-CBC) but the byte-level layout is lab-defined pending GSMA conformance. Do not assume interoperability with production LPAs.
- Profile payloads carry Milenage KI/OPc. The registry file is 0600 and
can be encrypted at rest with AES-GCM via
registry.OpenWithKey/KeyFromPassphrase. Treat the passphrase like a SIM vault KEK.
Credential source¶
By default, fairwave esim issue resolves credentials from the three
dummy lab vectors (simprov.LoadTestVector). The control plane exposes a
ProfileSource hook (ESIMOptions.ProfileSource) so an operator can
inject a production/HSM-backed resolver. Never wire a production
credential source without first enabling registry encryption and a
persistent session store.
Registry and sessions¶
- Registry entries can be encrypted at rest with AES-GCM (AES-256 key via
KeyFromPassphraseor raw 16/24/32-byte key). Metadata (tokens, timestamps) stays readable; only the profile payload is encrypted. - SM-DP+ sessions are in-memory by default. Enable the file-backed store
(
ESIMOptions.SessionStorePath) so a reboot does not abort an in-flight download exchange. Session files are written with 0600 and contain ephemeral ECDH private keys — protect them accordingly.
Lab vs. production boundaries¶
- The
profile.NewLabProfilegate refuses non-lab profile classes. A production path must use a different constructor and a credential source that does not depend onLoadTestVector. - Activation codes are single-use by default and carry a configurable TTL.
- The software eUICC is a reference implementation; it does not replace a physical eUICC in a phone. Physical-phone download requires ASN.1/DER ES9+ transport conformance (GSMA SGP.22), which is an open item.
Operational guidance¶
- Run the SM-DP+ behind the control plane or a reverse proxy; do not
expose
/es9plus/directly to the internet in the lab. - Use
--tls-cert/--tls-keyonfairwave esim servefor any external LPA testing. - Enable registry encryption (
OpenWithKey) before issuing any profile that carries real credentials. - Enable the file-backed session store if the server restarts during business hours.
- Audit the
docs/sim-lifecycle/esim.mdalternatives if you need a production eSIM path today (certified SM-DP+ partner, bureau factory-injection, or licensed MVNO/MVNE).