5G核心网学习平台
精华帖 #26

Q:为什么注册请求会发两次?什么叫cleartext IE?哪些NAS参数属于cleartext IE?

来自知识星球

Q:为什么注册请求会发两次?什么叫cleartext IE?哪些NAS参数属于cleartext IE?

Q1:为什么注册请求会发两次?什么叫cleartext IE?哪些NAS参数属于cleartext IE?

发现在5G注册流程中,注册请求会发两次,一次是封装在InitialUEMessage这个N2消息里,

一次是封装在UplinkNASTransport这个N2消息里。如下图:

A1:因为第1次发送的注册请求,UE和网络侧还没有建立安全上下文(也就是NAS消息没有加密)。因

此需要保护某些敏感参数不被空口抓到。在33.501的6.4.6 Protection of initial NAS message有专门的说

规范规定,在最开始的(截图中的#110号包)注册请求消息里只能携带有限的参数,也就是不敏感的参

数,这些参数可以在建立安全上下文之前明文传送。这些不敏感的参数就叫做cleartext IE。

规范原文是这么说的:

“The initial NAS message is the first NAS message that is sent after the UE transitions from the idle

state. The UE shall send a limited set of IEs (called the cleartext IEs) including those needed to

establish security in the initial message when it has no NAS security context. ”

当安全上下文建立完成之后,UE可以发送完整的注册请求消息。

规范原文是:

“When the UE has a NAS security context, the UE shall send a message that has the complete initial

NAS message ciphered in a NAS Container along with the cleartext IEs with whole message integrity

protected. ”

规范同时指出完整的注册请求(registration request)消息是包含在SMC(Security Mode Complete)消

息中的。

规范原文是:

“The complete initial message is included in the NAS Security Mode Complete message in a NAS

Container when needed (e.g. AMF cannot find the used security context) in the latter case and always in

the former case as described below.”

这就是为什么注册请求为什么会发两遍的原因。

另外,关于cleartext IE的定义在24501中可以找到。

规范原文是:

“Cleartext IEs: Information elements that can be sent without confidentiality protection in initial NAS

messages as specified in subclause 4.4.6.”

也就是在24501的4.4.6节所定义的,允许在初始NAS消息中以明文方式发送的参数。

Q2:那哪些NAS参数属于cleartext IE?

A2:这个在24501的4.4.6节里有明确定义。这些cleartext IE包括以下。

规范原文是:

When the initial NAS message is a REGISTRATION REQUEST message, the cleartext IEs are:

- Extended protocol discriminator;

- Security header type;

- Spare half octet;

- Registration request message identity;

- 5GS registration type;

- ngKSI;

- 5GS mobile identity;

- UE security capability;

- Additional GUTI;

- UE status; and

- EPS NAS message container.

除此以外的都叫做non-cleartext IE。均属于敏感参数。

需要加以保护,需要在SMC流程完成之后才能传送。

例如UE请求的S-NSSAI等。

返回精华帖列表