Skip to content

Sporadic IMS AKA Digest Mismatch in SIPp Despite Identical Configuration #796

@therikb31

Description

@therikb31

Description

I am encountering a sporadic digest mismatch issue when using SIPp for IMS registration with AKAv1-MD5 authentication. The problem is not deterministic — the same scenario sometimes results in a successful REGISTER, and other times fails due to an incorrect RES value being computed by SIPp.


Observed Behavior

  • SIPp sends the initial REGISTER and receives a 401 Unauthorized from the S-CSCF (Kamailio).

  • SIPp responds with a second REGISTER, including the Authorization header.

  • Kamailio logs show:

    UE said: 90152bd36e8dc72e1580cbf4c5fe3ee1, but we expect: d7ec73ce4f61683c2c7b544e9fabd2b9
    
  • However, in previous runs with the exact same scenario, SIPp produced the correct RES, and Kamailio accepted the registration.


Expected Behavior

Given the same:

  • aka_K = 0x8baf473f2f8fd09487cccbd7097c6862
  • aka_OP = 0x8E27B6AF0E692E750F32667A3B14605D
  • aka_AMF = 0x8000
  • nonce and challenge from the 401

The RES value should always be the same and match what Kamailio expects, but SIPp intermittently calculates a wrong one.


Scenario Snippet

<send retrans="500">
<![CDATA[
REGISTER sip:ims.mnc001.mcc001.3gppnetwork.org SIP/2.0
Via: SIP/2.0/[transport] [field2]:[local_port];branch=z9hG4bK-[call_number];rport;transport=[transport]
From: <sip:[field1]@ims.mnc001.mcc001.3gppnetwork.org>;tag=[call_number]
To: <sip:[field1]@ims.mnc001.mcc001.3gppnetwork.org>
Contact: <sip:[field2]:[local_port]>;
Call-ID: [call_id]
CSeq: 1 REGISTER
Expires: 60000
[authentication
  username="[field1]@ims.mnc001.mcc001.3gppnetwork.org"
  aka_K=0x8baf473f2f8fd09487cccbd7097c6862
  aka_OP=0x8E27B6AF0E692E750F32667A3B14605D
  aka_AMF=0x8000]
Content-Length: 0
]]>
</send>

Environment

  • SIPp version: v3.7 (also seen in v3.5.3)
  • OS: Ubuntu 20.04
  • Scenario: SIP REGISTER using IMS-AKA (AKAv1-MD5) Digest Auth
  • S-CSCF: Kamailio with ims_auth module

Reproducability

6 out of 100 times

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions