Section: 4.4.4 Integrity protection of NAS signalling messages 4.4.4.1 General
Content: For the UE, integrity protected signalling is mandatory for the NAS messages once a valid EPS security context exists and has been taken into use. For the network, integrity protected signalling is mandatory for the NAS messages once a secure exchange of NAS messages has been established for the NAS signalling connection. Integrity protection of all NAS signalling messages is the responsibility of the NAS. It is the network which activates integrity protection. The use of "null integrity protection algorithm" EIA0 (see clause 9.9.3.23) in the current security context is only allowed for an unauthenticated UE for which establishment of emergency bearer services or access to RLOS is allowed. For setting the security header type in outbound NAS messages, the UE and the MME shall apply the same rules irrespective of whether the "null integrity protection algorithm" or any other integrity protection algorithm is indicated in the security context. If the "null integrity protection algorithm" EIA0 has been selected as an integrity protection algorithm, the receiver shall regard the NAS messages with the security header indicating integrity protection as integrity protected. Details of the integrity protection and verification of NAS signalling messages are specified in 3GPP TS 33.401[ 3GPP System Architecture Evolution (SAE); Security architecture ]  [19]. When a NAS message needs to be sent both ciphered and integrity protected, the NAS message is first ciphered and then the ciphered NAS message and the NAS sequence number are integrity protected by calculating the MAC. The same applies when an initial NAS message needs to be sent partially ciphered and integrity protected. NOTE: NAS messages that are ciphered or partially ciphered with the "null ciphering algorithm" EEA0 are regarded as ciphered or partially ciphered, respectively (see clause 4.4.5). When a NAS message needs to be sent only integrity protected and unciphered, the unciphered NAS message and the NAS sequence number are integrity protected by calculating the MAC. When during the EPS attach procedure or service request procedure an ESM message is piggybacked in an EMM message, there is only one sequence number IE and one message authentication code IE, if any, for the combined NAS message.