Description
KAMF (Key Access and Mobility Management Function) is a critical component of the 5G security architecture, defined in 3GPP specifications 31.117 and 31.127. It is a 256-bit (32-byte) key that resides in the Access and Mobility Management Function (AMF) of the 5G Core Network. KAMF is derived from the long-term subscriber key (K) and the serving network identifier (SN id) through a series of cryptographic functions during the authentication and key agreement (AKA) procedure. Specifically, KAMF is computed by the AMF after receiving the authentication vector from the Authentication Server Function (AUSF) or the Unified Data Management (UDM). The key derivation follows the 5G key hierarchy: K → KAUSF → KSEAF → KAMF. The AMF uses KAMF to derive further keys, such as KNASint and KNASenc for NAS signalling protection, and KgNB for access stratum (AS) security. This hierarchical key structure ensures that compromise of one key does not affect others, providing forward and backward security. The KAMF is stored in the AMF and is never transmitted over the air. It is generated during the primary authentication procedure and can be updated during re-authentication or key refresh procedures. The 3GPP specifications define the exact derivation functions and input parameters, ensuring interoperability between different vendors. The key's length of 32 bytes provides strong cryptographic strength, suitable for 256-bit algorithms. In Rel-17, the definition explicitly states that the value is not checked, meaning that the AMF does not validate the content of the key beyond its length; it is treated as an opaque bit string. This is typical for cryptographic keys, as their value is random and only meaningful to the algorithms that use them. The KAMF plays a vital role in securing 5G networks by anchoring the security context for a UE at the AMF, enabling secure mobility and session management.
Purpose & Motivation
The KAMF exists to provide a secure anchor for the 5G key hierarchy at the AMF, ensuring that NAS and AS security keys are derived in a standardized and secure manner. In earlier generations (e.g., 4G LTE), the equivalent key was KASME, which served a similar purpose but with different derivation and usage. The introduction of KAMF in 5G was motivated by the need for enhanced security, including improved key separation, support for new authentication methods (e.g., 5G-AKA and EAP-AKA'), and the ability to handle multiple network slices and heterogeneous access. The KAMF allows the AMF to manage security contexts independently of the authentication server, reducing signalling and enabling efficient re-authentication. It also supports the concept of key freshness, as defined in 3GPP, by allowing the derivation of new keys when needed. The 32-byte length ensures compatibility with 256-bit cryptographic algorithms, future-proofing against advances in cryptanalysis. The specification that the value is not checked emphasizes that the key is a random value and its correctness is ensured by the derivation process, not by validation. This design simplifies implementation and avoids unnecessary checks that could introduce vulnerabilities. Overall, KAMF is essential for maintaining the security and integrity of 5G communications, providing a robust foundation for both control plane and user plane protection.
What changed in its specifications
The latest release-to-release comparison of specifications that define KAMF. Each summary describes the whole specification, not only this term.
Rel-19 added roaming value-added services with remote SIM provisioning security parameters, test message coding, and new terms. It also harmonized test case definitions across RATs by updating references, versions, identifiers, and applicable test sequences.
Full comparison in TS 31.117 →Release Timeline
Evolution Across Releases
An overview written from the defining specifications, not a verified change history. For the exact text, open the specifications listed below.
Defining Specifications
3GPP specifications that define or reference KAMF, with the latest known release. Sourced from the 3GPP document catalog — see methodology.
| Specification | Title | Release |
|---|---|---|
| TS 31.117 vj30 | USAT Tests for Non-Removable UICC | Rel-19 read |
| TS 31.127 vj00 | UE Application Behavioural Tests for Non-Removable UICC | Rel-19 read |