Commit Graph

6 Commits

Author SHA1 Message Date
Pau Espin 3be4d92cb2 mme: Add code to derive NAS token from NAS ul_count
NAS Token is derived from kasme and NAS ul_count as specified in 3GPP TS
33.401 A.9, and its LSB 16 bits passed to the network when mapping the GUTI to
RAI+PTMSI+PTIMSI_SIG.

Take the chance to move guti2rai_ptmsi() up to before the place it is
used.
Change-Id: I5e6003a2fe3e74cc93cfe4a288e6c114aa288d0b
2024-01-15 15:30:35 +01:00
Pau Espin 41f4d90829 LTE_CryptoFunctions: Fix rx_count increment
The previous logic was wrong, since it was increasing the rx_count at
the time where the msg is received and before checking it. Instead, it
should be increased after having validated and accepted it.
This fixes the case where rx_count will have to be reset (to zero) when
doing mobility GERAN->EUTRAN.

Change-Id: I712d95f7784a6a9855fe36300b0ebfcd4c6ef377
2024-01-08 20:49:42 +01:00
Pau Espin acb5b8f28d LTE_CryptoFunctions.ttcn: Increment nus.rx_count on each pkt read
Before this patch, the rx_count field was never set to anything other
than zero.

There's still a problem with counter not being incremented when a
S1AP_IntialCtxSetupReq message containing a NAS_PDU is received. This
will be fixed ina follow-up patch.

Change-Id: I1ee25fd8fde6fbce95444ee4b73918ce1f61b427
2023-12-15 19:09:42 +01:00
Pau Espin 9ad1980774 LTE_CryptoFunctions.ttcn: Log NAS_UE_State on failure
Change-Id: Ib95d496f06f07f4c28d9b08b6a8059d8453e8acd
2023-12-15 13:18:09 +00:00
Pau Espin 4976217518 LTE_CryptoFunctions.ttcn: Immediate termination upon failure
Change-Id: I09170c17c5cbb552a8aeef31b4b8fa5c89a00887
2023-12-15 13:18:09 +00:00
Harald Welte c918e4e373 TTCN-3 native function wrapper for SNOW-3G
Change-Id: I7fca69ea8b4aed48d5a64885b762ab85be71ef03
2019-08-18 17:14:20 +00:00