Authentication Centre key management
Before a device can use a 4G network, it must prove that it belongs to a subscriber of that network. The proof relies on a secret stored separately on the SIM card and in the network. Neither side ever sends this secret over the air. If the network doesn't have a copy of that secret for a subscriber, that subscriber cannot access the network.
In TPOSS, this secret is stored by the Authentication Centre (AuC), a part of the TPOSS HSS. It consists of two values:
Ki- the secret key of the SIMOPc- an operator value derived fromKiand the operator's ownOPvalue
These two values together are called key material.
Important
This key material is the most sensitive data that TPOSS holds. Anyone who obtains it can impersonate the subscriber in the network and obtain the keys that protect its traffic. The subscriber can neither notice nor prevent it. The values are burned into the SIM, so a leak cannot be repaired by changing them. It means issuing a new card.
TPOSS treats the key material as write-only. An operator provisions it through the REST API, and nothing hands it back afterwards. Reading a subscriber's record returns metadata only, such as whether key material is present and which key encrypts it. Provisioning the data for the existing subscriber replaces the stored values, which is the way to correct a provisioning mistake or move a subscriber onto a re-issued SIM.
TPOSS keeps this key material encrypted in the database. Each subscriber's key is associated with a separate key stored only at TPOSS to encrypt the key material.
This document describes how you provision key material and manage the key that protects it.
Provisioning key material
An operator provisions the key material of a subscriber over the REST API, in the body of the request. TPOSS rejects ki, op, or opc sent as query parameters, because query strings can end up in logs, proxies, and shell history.
If you provision a subscriber with op instead of opc, TPOSS derives OPc while it handles the request and stores only the derived value.
Creating the keyring
Important
Every environment must have its own keyring, including a test one. Never share a keyring with any other deployment.
The keyring is a Kubernetes Secret with the keys that encrypt key material. Each entry represents one key, and its name is the key's name. An entry must hold either exactly 32 raw bytes or 64 hex characters, in upper or lower case, and a trailing newline is tolerated.
You can create the key using the following commands:
After you created the secret with the encryption keys, you should specify the name of the Secret using the following configuration options:
Key rotation
The keyring can hold several keys at once, and every subscriber record keeps the name of the key that encrypted it. TPOSS decrypts each record with the key that the record names, so records written under an older key keep working. A key that any record still names must stay in the keyring.
Rotation puts a new key into service for new records. Rotate keys according to the schedule defined by your key-management policy, and immediately if a key may have been exposed. To do that, you can use the following commands:
Add the new key to the Kubernetes Secret named by hss.auc.keyring.secretName, keeping the entries already in it:
bashSet hss.auc.keyring.current to the name of the new key and roll the deployment.
Any older subscriber records keep their old key regardless of the new key. To re-provision the existing subscribers is the only way to move them to the new key.