[srslte-users] srslte-users Digest, Vol 79, Issue 11

Keith E. Fleming kef762 at yahoo.com
Thu Sep 16 14:56:37 UTC 2021


 
Hello,
Recently I worked through an authentication error I was having with T-Mobile. I found this site useful: Milenage

| 
| 
|  | 
Milenage

LTE Authentication Milenage calculator
 |

 |

 |

 your case. I plugged in:
OPC: d0 c4 1e d0 7d fe 2f 9b b0 db 08 3e 5e 34 7f 5e
KI: 83 32 18 d6 15 b1 10 70 6d b6 e7 fd 69 22 2b e9
RAND: bf 3f 7c 1b 7f a6 ab 1d ef 97 50 61 98 ae a5 a9SQN: 00 00 00 00 00 a5
and I guessed at the AMF: 80 01
I got the same XRES shown in the log: (e0 28 7c ce a0 f2 01 53)  

Are you using Milenage on the UE and the MME? Also, do you know what RES the UE is calculating?

Is the OPc really an OPc or is it an Op? The Op is common to all SIM. The OPc is generated by the Op and the Ki...



    On Thursday, September 16, 2021, 08:00:14 AM EDT, srslte-users-request at lists.softwareradiosystems.com <srslte-users-request at lists.softwareradiosystems.com> wrote:  
 
 Send srslte-users mailing list submissions to
    srslte-users at lists.softwareradiosystems.com

To subscribe or unsubscribe via the World Wide Web, visit
    https://lists.softwareradiosystems.com/mailman/listinfo/srslte-users
or, via email, send a message with subject or body 'help' to
    srslte-users-request at lists.softwareradiosystems.com

You can reach the person managing the list at
    srslte-users-owner at lists.softwareradiosystems.com

When replying, please edit your Subject line so it is more specific
than "Re: Contents of srslte-users digest..."


Today's Topics:

  1. Re: UL NAS: Authentication Failure MAC code failure
      (Andrea Valori)


----------------------------------------------------------------------

Message: 1
Date: Wed, 15 Sep 2021 16:01:53 +0200
From: Andrea Valori <avalori at gmail.com>
To: srslte-users <srslte-users at lists.softwareradiosystems.com>
Subject: Re: [srslte-users] UL NAS: Authentication Failure MAC code
    failure
Message-ID:
    <CAMz+kD+xbr7Go+mv=T-DdGiC2SqccXO7GkG_vVsq2hwYetCyRg at mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

Adding some details from the log... thanks to whoever may be able to help..
I triple checked the opc and ki... I am pretty sure they are correct. Maybe
I messed with the
# AMF:      Authentication management field, stored in hexadecimal

# SQN:      UE's Sequence number for freshness of the authentication

13:25:18.461255 [NAS    ] [I] Attach request -- IMSI: 901700000044987
13:25:18.461285 [NAS    ] [I] Attach request -- eNB-UE S1AP Id: 3
13:25:18.461303 [NAS    ] [I] Attach request -- Attach type: 2
13:25:18.461320 [NAS    ] [I] Attach Request -- UE Network Capabilities
EEA: 11100000
13:25:18.461343 [NAS    ] [I] Attach Request -- UE Network Capabilities
EIA: 01100000
13:25:18.461353 [NAS    ] [I] Attach Request -- MS Network Capabilities
Present: true
13:25:18.461363 [NAS    ] [I] PDN Connectivity Request -- EPS Bearer
Identity requested: 0
13:25:18.461372 [NAS    ] [I] PDN Connectivity Request -- Procedure
Transaction Id: 2
13:25:18.461398 [NAS    ] [I] PDN Connectivity Request -- ESM Information
Transfer requested: true
13:25:18.461401 [NAS    ] [I] Attach Request -- Found previously attached
UE.
13:25:18.461416 [MME GTPC] [I] Sending GTP-C Delete Session Request
request. IMSI 901700000044987
13:25:18.461424 [MME GTPC] [E] Could not find GTP-C context to remove
13:25:18.461428 [S1AP  ] [E] UE is not ECM connected. No send context
release command. MME UE S1AP Id 1
13:25:18.461434 [S1AP  ] [I] Released UE ECM Context.
13:25:18.461441 [S1AP  ] [I] Deleted UE Context.
13:25:18.461456 [NAS    ] [D] NAS Context Initialized. MCC: 0xf001, MNC
0xff01
13:25:18.461462 [HSS    ] [D] Generating AUTH info answer
13:25:18.461483 [HSS    ] [D] User Key :
    0000: 83 32 18 d6 15 b1 10 70 6d b6 e7 fd 69 22 2b e9
13:25:18.461600 [HSS    ] [D] User OPc :
    0000: d0 c4 1e d0 7d fe 2f 9b b0 db 08 3e 5e 34 7f 5e
13:25:18.461610 [HSS    ] [D] User Rand :
    0000: bf 3f 7c 1b 7f a6 ab 1d ef 97 50 61 98 ae a5 a9
13:25:18.461612 [HSS    ] [D] User XRES:
    0000: e0 28 7c ce a0 f2 01 53
13:25:18.461615 [HSS    ] [D] User CK:
    0000: 28 bd e8 b8 a2 2c f6 1c 51 27 f9 7e c7 10 c9 bb
13:25:18.461617 [HSS    ] [D] User IK:
    0000: 30 4f 7f ce fd c2 43 f4 c9 eb db 7c 84 16 14 5e
13:25:18.461618 [HSS    ] [D] User AK:
    0000: 8c 15 ee 2b 0a c3
13:25:18.461622 [HSS    ] [D] User SQN :
    0000: 00 00 00 00 00 a5
13:25:18.461624 [HSS    ] [D] User MAC :
    0000: 03 38 a6 db b5 45 59 b6
13:25:18.461643 [HSS    ] [D] User MCC : f001  MNC : ff01
13:25:18.461644 [HSS    ] [D] User k_asme :
    0000: 97 d1 48 11 b4 21 2d 28 97 df 96 d5 6a c7 e6 1b
    0010: 7b 1f 15 74 c3 3c 78 1a 74 cd 45 1c 4d a0 c3 24
13:25:18.461646 [HSS    ] [D] User AUTN:
    0000: 8c 15 ee 2b 0a 66 90 00 03 38 a6 db b5 45 59 b6
13:25:18.461649 [HSS    ] [D] Incremented SQN  -- IMSI: 901700000044987
13:25:18.461650 [HSS    ] [D] SQN:
    0000: 00 00 00 00 00 c6
13:25:18.461653 [S1AP  ] [D] Saved UE context corresponding to IMSI
901700000044987
13:25:18.461655 [S1AP  ] [D] Saved UE context corresponding to MME UE S1AP
Id 2
13:25:18.461657 [S1AP  ] [D] Added UE with MME-UE S1AP Id 2 to eNB with
association 12
13:25:18.461658 [NAS    ] [I] Packing Authentication Request
13:25:18.461662 [S1AP  ] [D] Sending message to eNB with SCTP association
12. MME UE S1AP ID 2, eNB UE S1AP ID 3
13:25:18.461678 [S1AP  ] [D] Transmitting S1AP PDU. eNB SCTP association
Id: 12
13:25:18.461777 [NAS    ] [I] Downlink NAS: Sending Authentication Request
13:25:18.461804 [S1AP  ] [D] Waiting for S1-MME or S11 Message
13:25:18.501129 [S1AP  ] [I] Received S1AP msg. Size: 49
13:25:18.501251 [S1AP  ] [I] Received Initiating PDU
13:25:18.501267 [S1AP  ] [I] Received Uplink NAS Transport Message.
13:25:18.501271 [S1AP  ] [D] Received uplink NAS and found UE NAS context.
MME-UE S1AP id: 2
13:25:18.501278 [S1AP  ] [I] UL NAS: sec_hdr_type:
LIBLTE_MME_SECURITY_HDR_TYPE_PLAIN_NAS, mac_vaild: no, msg_encrypted: no
13:25:18.501279 [S1AP  ] [I] UL NAS: Authentication Failure
13:25:18.501312 [NAS    ] [I] Received Authentication Failure
13:25:18.501327 [NAS    ] [I] MAC code failure
13:25:18.501333 [S1AP  ] [D] Waiting for S1-MME or S11 Message
13:25:38.154173 [SPGW  ] [D] Message received at SPGW: SGi Message
13:25:38.154199 [GTPU  ] [D] Received SGi PDU. Bytes 48
13:25:38.154202 [GTPU  ] [I] IPv6 not supported yet.
13:25:48.460306 [S1AP  ] [I] Received S1AP msg. Size: 25
13:25:48.460359 [S1AP  ] [I] Received Initiating PDU
13:25:48.460362 [S1AP  ] [I] Received UE Context Release Request Message.
13:25:48.460364 [S1AP  ] [I] Received UE Context Release Request. MME-UE
S1AP Id: 2
13:25:48.460462 [S1AP  ] [I] UE is not ECM connected. No need to release
S1-U. MME UE S1AP Id 2
13:25:48.460472 [S1AP  ] [D] Waiting for S1-MME or S11 Message
13:26:58.026194 [SPGW  ] [D] Message received at SPGW: SGi Message
13:26:58.026227 [GTPU  ] [D] Received SGi PDU. Bytes 48
13:26:58.026230 [GTPU  ] [I] IPv6 not supported yet.
13:27:13.257931 [S1AP  ] [D] SCTP Notification 32773
13:27:13.257950 [S1AP  ] [I] SCTP Association Shutdown. Association: 12
13:27:13.257992 [S1AP  ] [I] Deleting eNB context. eNB Id: 0x19b
13:27:13.258012 [S1AP  ] [I] Releasing UE context. IMSI: 901700000044987,
UE-MME S1AP Id: 2
13:27:13.258053 [S1AP  ] [D] Waiting for S1-MME or S11 Message
13:27:15.683096 [S1AP  ] [I] Deleting UE EMM context. IMSI: 901700000044987




On Tue, 14 Sept 2021 at 16:15, Andrea Valori <avalori at gmail.com> wrote:

> Hello everyone,
> I am puzzled by the issue below, where the SIM seems not authenticated.
> I successfully authenticated some Sysmocom SIMs in the past, but now,
> doing apparently exactly the same thing (although with a newer version of
> both pysim and SRS) no.
> The older programmed SIMs still work?
> Any help? I checked 100s of time Ki and Op in the users_db? Thanks.
>
> Initial UE message: LIBLTE_MME_MSG_TYPE_ATTACH_REQUEST
>
> Received Initial UE message -- Attach Request
>
> Attach request -- IMSI: 901700000044986
>
> Attach request -- eNB-UE S1AP Id: 1
>
> Attach request -- Attach type: 2
>
> Attach Request -- UE Network Capabilities EEA: 11100000
>
> Attach Request -- UE Network Capabilities EIA: 01100000
>
> Attach Request -- MS Network Capabilities Present: true
>
> PDN Connectivity Request -- EPS Bearer Identity requested: 0
>
> PDN Connectivity Request -- Procedure Transaction Id: 1
>
> PDN Connectivity Request -- ESM Information Transfer requested: true
>
> Downlink NAS: Sending Authentication Request
>
> UL NAS: Authentication Failure
>
> MAC code failure
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.softwareradiosystems.com/pipermail/srslte-users/attachments/20210915/96dd21eb/attachment-0001.htm>

------------------------------

Subject: Digest Footer

_______________________________________________
srslte-users mailing list
srslte-users at lists.softwareradiosystems.com
https://lists.softwareradiosystems.com/mailman/listinfo/srslte-users


------------------------------

End of srslte-users Digest, Vol 79, Issue 11
********************************************
  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.srsran.com/pipermail/srsran-users/attachments/20210916/eb648745/attachment.htm>


More information about the srsran-users mailing list