Skip to content

Authentication Failure / Resync

Why — Identify who failed to verify what

Reading only the successful flows in Authentication can blur the distinction between Authentication Failure from the UE and Authentication Reject from the network. This chapter follows the failed verification point and subsequent processing for 5G-AKA with normal services (TS 24.501 Clause 5.4.1.3).

  • MAC failure: The UE cannot verify the MAC in AUTN.
  • Synch failure: The UE cannot accept the received SQN and returns resynchronization information in AUTS.
  • RES verification failure*: The UE has responded, but verification fails at the SEAF or AUSF.

Radio/NGAP NAS forwarding and the full successful AV retrieval procedure are omitted. References are TS 24.501 Clause 5.4.1.3.5–Clause 5.4.1.3.7 and TS 33.501 Clause 6.1.3.2.2 / Clause 6.1.3.3.

Procedure — MAC Failure

This diagram shows the branch where the network chooses to identify the UE again to investigate an incorrect 5G-GUTI-to-SUPI mapping. MAC failure alone does not prove a K/OPc mismatch (TS 24.501 Clause 5.4.1.3.7 c).

sequenceDiagram
    participant UE
    participant RAN as NG-RAN
    participant AMF as AMF / SEAF
    AMF->>RAN: Downlink NAS Transport<br/>(NGAP#59; NAS-PDU: Authentication Request)
    RAN->>UE: DLInformationTransfer<br/>(RRC#59; NAS: Authentication Request, RAND, AUTN, ngKSI, ABBA)
    Note over UE: AUTN MAC verification fails
    UE-->>RAN: ULInformationTransfer<br/>(RRC#59; NAS: Authentication Failure, cause 20)
    RAN-->>AMF: Uplink NAS Transport<br/>(NGAP#59; NAS-PDU: Authentication Failure)
    Note over UE,AMF: UE starts T3520#59; network stops T3560
    opt Network chooses re-identification after the first failure
        AMF->>RAN: Downlink NAS Transport<br/>(NGAP#59; NAS-PDU: Identity Request)
        RAN->>UE: DLInformationTransfer<br/>(RRC#59; NAS: Identity Request, SUCI)
        UE-->>RAN: ULInformationTransfer<br/>(RRC#59; NAS: Identity Response, SUCI)
        RAN-->>AMF: Uplink NAS Transport<br/>(NGAP#59; NAS-PDU: Identity Response)
        alt Incorrect 5G-GUTI-to-SUPI mapping
            Note over AMF: Obtain authentication data for the correct identity (outline)
            AMF->>RAN: Downlink NAS Transport<br/>(NGAP#59; NAS-PDU: Authentication Request)
            RAN->>UE: DLInformationTransfer<br/>(RRC#59; NAS: Authentication Request)
        else Mapping was correct
            AMF->>RAN: Downlink NAS Transport<br/>(NGAP#59; NAS-PDU: Authentication Reject)
            RAN->>UE: DLInformationTransfer<br/>(RRC#59; NAS: Authentication Reject)
        end
    end

Step-by-step explanation

  1. The UE verifies the network: If the MAC in AUTN is invalid, the UE sends Authentication Failure with 5GMM cause 20.
  2. Switch timers: The UE starts T3520, and the network stops T3560 upon receiving the Failure. No fixed durations or retransmission counts are assumed here.
  3. The network may check the identity: An Identity procedure can retrieve SUCI again and check the 5G-GUTI mapping. This is not mandatory in every case; terminating authentication is another option.
  4. Proceed to another authentication attempt or rejection: The illustrated branch uses a new challenge if the mapping was wrong, or rejects authentication if it was correct. Subsequent failures, T3520 expiry and emergency services follow separate conditions in TS 24.501 Clause 5.4.1.3.7.

Procedure — SQN Resynchronization

This is the resynchronization branch. Sending AUTS does not guarantee recovery: home-network verification and a new authentication attempt are required (TS 33.501 Clause 6.1.3.3.1 / Clause 6.1.3.3.2). {supiOrSuci} identifies the subscriber. The HTTP responses illustrate successful variants (TS 29.509 Clause 5.2.2.2.2 / Clause 6.1.6.2.2, TS 29.503 Clause 6.3.3.2.4.2).

sequenceDiagram
    participant UE
    participant RAN as NG-RAN
    participant SEAF as AMF / SEAF
    participant AUSF
    participant UDM as UDM / ARPF
    SEAF->>RAN: Downlink NAS Transport<br/>(NGAP#59; NAS-PDU: Authentication Request)
    RAN->>UE: DLInformationTransfer<br/>(RRC#59; NAS: Authentication Request, RAND, AUTN)
    Note over UE: SQN is outside the acceptable range
    UE-->>RAN: ULInformationTransfer<br/>(RRC#59; NAS: Authentication Failure, cause 21, AUTS)
    RAN-->>SEAF: Uplink NAS Transport<br/>(NGAP#59; NAS-PDU: Authentication Failure)
    SEAF->>AUSF: Nausf_UEAuthentication_Authenticate<br/>(HTTP POST /nausf-auth/v1/ue-authentications#59; resynchronizationInfo: RAND, AUTS)
    AUSF->>UDM: Nudm_UEAuthentication_Get<br/>(HTTP POST /nudm-ueau/v1/{supiOrSuci}/security-information/generate-auth-data#59; resynchronizationInfo)
    Note over UDM: Verify AUTS and perform resynchronization
    UDM-->>AUSF: 200 OK<br/>(HTTP#59; new Authentication Vector)
    AUSF-->>SEAF: 201 Created<br/>(HTTP#59; new authentication data)
    SEAF->>RAN: Downlink NAS Transport<br/>(NGAP#59; NAS-PDU: Authentication Request)
    RAN->>UE: DLInformationTransfer<br/>(RRC#59; NAS: Authentication Request)
    UE-->>RAN: ULInformationTransfer<br/>(RRC#59; NAS: Authentication Response, RES*)
    RAN-->>SEAF: Uplink NAS Transport<br/>(NGAP#59; NAS-PDU: Authentication Response)
    Note over UE,UDM: Continue with normal SEAF / AUSF verification

Step-by-step explanation

  1. The UE returns AUTS: If the USIM detects a synchronization failure, the UE includes 5GMM cause 21 and AUTS (TS 24.501 Clause 5.4.1.3.6 d).
  2. Correlate with the preceding RAND: The SEAF sends its last RAND and the received AUTS to the AUSF, which forwards them to the UDM/ARPF. This is not a procedure for reacting to an unsolicited synchronization failure unrelated to a request.
  3. Resynchronize in the home network: The UDM/ARPF processes the resynchronization information and generates a new AV. This diagram assumes resynchronization succeeds.
  4. Send a new challenge: The SEAF waits for the AUSF response or a timeout while awaiting it. The diagram follows the response-received path, using new authentication data for the next attempt. SEAF/AUSF verification is still required after the Response; receiving AUTS alone does not establish authentication success.

Reference: TS 33.501 Clause 6.1.3.3.2. Subscriber-data investigation methods and SQN management implementations are product-dependent.

Procedure — RES* Verification Failure

Distinguish HRES/HXRES verification at the SEAF from RES/XRES verification at the AUSF. Even if the SEAF finds a mismatch, it sends RES to the AUSF and processes failure after receiving the response*. The diagram follows the AUSF-response-received path. The specification also defines proceeding to Reject or Identification when the expected response is not obtained (TS 33.501 Clause 6.1.3.2.2). The example shows failure returned by the AUSF; {authCtxId} identifies the authentication context (TS 29.509 Clause 5.2.2.2.2).

sequenceDiagram
    participant UE
    participant RAN as NG-RAN
    participant SEAF as AMF / SEAF
    participant AUSF
    UE->>RAN: ULInformationTransfer<br/>(RRC#59; NAS: Authentication Response, RES*)
    RAN->>SEAF: Uplink NAS Transport<br/>(NGAP#59; NAS-PDU: Authentication Response)
    Note over SEAF: Compare HRES* with HXRES*
    SEAF->>AUSF: Nausf_UEAuthentication_Authenticate<br/>(HTTP PUT /nausf-auth/v1/ue-authentications/{authCtxId}/5g-aka-confirmation#59; RES*)
    Note over AUSF: Compare RES* with XRES*
    AUSF-->>SEAF: 200 OK<br/>(HTTP#59; authResult: FAILURE)
    Note over SEAF: Verification failed at SEAF or AUSF
    alt Initial NAS used SUCI
        SEAF->>RAN: Downlink NAS Transport<br/>(NGAP#59; NAS-PDU: Authentication Reject)
        RAN->>UE: DLInformationTransfer<br/>(RRC#59; NAS: Authentication Reject)
    else Initial NAS used 5G-GUTI
        SEAF->>RAN: Downlink NAS Transport<br/>(NGAP#59; NAS-PDU: Identity Request)
        RAN->>UE: DLInformationTransfer<br/>(RRC#59; NAS: Identity Request, SUCI)
        UE-->>RAN: ULInformationTransfer<br/>(RRC#59; NAS: Identity Response, SUCI)
        RAN-->>SEAF: Uplink NAS Transport<br/>(NGAP#59; NAS-PDU: Identity Response)
        opt Additional authentication attempt
            SEAF->>RAN: Downlink NAS Transport<br/>(NGAP#59; NAS-PDU: Authentication Request)
            RAN->>UE: DLInformationTransfer<br/>(RRC#59; NAS: Authentication Request)
        end
    end

Step-by-step explanation

  1. Receive the UE's Response: This differs from a UE returning Authentication Failure.
  2. Check both the SEAF and AUSF: A local SEAF mismatch is not a reason to omit the AUSF verification exchange.
  3. Check which identity was used: The rejection/re-identification branch depends on whether the UE was identified by SUCI or through a 5G-GUTI.
  4. Check the post-Reject state separately: Registration state, identity handling and USIM treatment depend on conditions including NAS integrity protection. Do not assume either immediate retry or USIM invalidation in every case (TS 24.501 Clause 5.4.1.3.5).

Packet Analysis

  • For UE-to-network Failure, check the cause and whether AUTS is present. Its direction and meaning differ from network-to-UE Reject.
  • For synch failure, correlate the preceding RAND, AUTS and the new challenge after resynchronization.
  • For RES* failure, compare NAS with the SEAF verification result and AUSF response. SBI decryption availability and log formats are implementation-dependent.

Knowledge check

  • Does MAC failure always mean the subscriber key is wrong? → No. Also check for an incorrect identity mapping.
  • Is authentication successful as soon as AUTS arrives? → No. A new authentication attempt follows resynchronization.

3GPP Specification

Next Step

Successful Authentication / Registration Reject / Cause Dictionary / Callflow