Menu
Latest
12 meetings · Prague, Jeju · 12–16 Oct
Reports
RAN1#126-bis · SA2#177

Glossary term · Security

KAMF

Key Access and Mobility Management Function

Security →

KAMF is the 256-bit root key in 5G security that is derived from the long-term key and used by the AMF to generate further keys for NAS and AS security.

Introduced
Rel-15
Where
Testing
Specifications
2 specs
KAMF Description Purpose What changed Family Neighbours Detected Changes Specifications

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.

TS 31.117Rel-18 → Rel-19

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 →

Technology family

Key hierarchies · Security

  1. Phase 1 Kc
  2. R97 GPRS-Kc
  3. R99 CK, IK
  4. Rel-8 KASME, KeNB, KNASenc, KNASint, KRRCenc, KRRCint, KUPenc, NH
  5. Rel-9 GPRS-Kc128, Kc128
  6. Rel-10 KUPint
  7. Rel-15 KAMF, KAUSF, KgNB, KSEAF
  8. Rel-16 A-KID, KAF, KAKMA
  • KAMF builds on KSEAF
    “The SEAF shall then derive the KAMF from the KSEAF, the ABBA parameter and the SUPI according to Annex A.7 and send it to the AMF.” TS 33.501
  • KAMF extended by KgNB
    “The KgNB and the NH are derived from the KAMF.” TS 33.501
  • KAMF extended by NH
    “The KgNB and the NH are derived from the KAMF.” TS 33.501
  • KAMF extended by KNASenc
    “KNASenc and KNASint in the key hierarchy specified in clause 6.2.1, which are derived from KAMF” TS 33.501
  • KAMF extended by KNASint
    “KNASenc and KNASint in the key hierarchy specified in clause 6.2.1, which are derived from KAMF” TS 33.501
  • KAMF counterpart in another generation: KASME
    “The KAMF' key, taken as the KAMF, shall be derived from the KASME using the EPS NAS Uplink COUNT of the TAU message” TS 33.501

Members and relations were proposed independently by several models and kept only where at least two agree; quotes are verified verbatim against the specifications. Release = first approved version of the defining specification.

Release Timeline

Detected Changes Across Releases

verified against 3GPP sources

Documented changes in 5 releases, each verified against the text of 3GPP specifications or approved change requests and shown with the exact wording. The release timeline above shows the same releases. A release without an entry has no documented change for this term.

Rel-15 introduced

KAMF is specified for the first time as the 5G root key derived from KSEAF, ABBA and SUPI, stored in the UE and AMF, and identified by ngKSI.

  • “The SEAF shall then derive the KAMF from the KSEAF, the ABBA parameter and the SUPI according to Annex A.7 and send it to the AMF.” TS 33.501 v15.20.0
  • “The key KAMF shall be identified by the key set identifier ngKSI.” TS 33.501 v15.20.0
  • “5G NAS security context: The key KAMF with the associated key set identifier, the UE security capabilities, the uplink and downlink NAS COUNT values.” TS 33.501 v15.20.0
Rel-16 specification text

In Rel-16 KAMF gained new derivations and handling: KASME_SRVCC derived from KAMF for SRVCC to UTRAN CS, KTWIF/KTNGF/KWAGF derived from KAMF, and KAMF must not be revealed outside an AMF.

  • “A.21 KAMF to KASME_SRVCC derivation for interworking” TS 33.501 v16.20.0
  • “The AMF shall derive a new KASME_SRVCC key using the KAMF key and the current downlink 5G NAS COUNT” TS 33.501 v16.20.0
  • “When deriving the keys KgNB, KWAGF, KTNGF, KTWIF and KN3IWF from KAMF and the uplink NAS COUNT” TS 33.501 v16.20.0
Rel-17 specification text

KAMF handling was extended in Rel-17: the SEAF derives it with SUPI from the NSSAAF/AAA, the ME and AMF can create a locally generated KAMF for null-algorithm security mode, and KAMF is stored on the USIM.

  • “The SUPI received from the AAA shall be used when deriving 5G keys (e.g., KAMF) that requires SUPI as an input for the key derivation.” TS 33.501 v17.16.0
  • “The AMF shall create a locally generated KAMF and send the SECURITY MODE COMMAND message including an ngKSI value in the ngKSI IE set to "000"” TS 24.501 v17.18.1
  • “If service n°122 is "available", when entering state 5GMM-DEREGISTERED, the ME shall store the KAMF with the associated key set identifier” TS 31.127 v17.3.0
Rel-18 1 CR

KAMF derivation was specified for new cases: the 5G-RG EAP case where the AMF shall not generate KAMF, and the missing clause for KAMF derivation for SNPN (PLMN/SNPN identity used in the calculation).

  • “Based on the received MSK, the AMF shall not generate the KAMF.” TS 33.501 v18.12.0
  • “the UE shall determine the PLMN identity in case of PLMN or the SNPN identity in case of SNPN to be used for the calculation of the new KAMF” TS 24.501 v18.14.0
  • Missing clause for KAMF derivation for SNPN TS 24.501CR6048
Rel-19 specification text

The condition for resetting NAS COUNT on non-3GPP access now depends on the AMF's indication in the Intra N1 mode NAS transparent container IE over 3GPP access that the context derives from a new KAMF.

  • “If the AMF indicated in the Intra N1 mode NAS transparent container IE over the 3GPP access that the new 5G NAS security context is created from a new KAMF” TS 24.501 v19.8.0

Defining Specifications

3GPP specifications that define or reference KAMF, with the latest known release. Sourced from the 3GPP document catalog — see methodology.

SpecificationTitleRelease
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