WO2015196415A1 - Data secure transmission method and device - Google Patents

Data secure transmission method and device Download PDF

Info

Publication number
WO2015196415A1
WO2015196415A1 PCT/CN2014/080840 CN2014080840W WO2015196415A1 WO 2015196415 A1 WO2015196415 A1 WO 2015196415A1 CN 2014080840 W CN2014080840 W CN 2014080840W WO 2015196415 A1 WO2015196415 A1 WO 2015196415A1
Authority
WO
WIPO (PCT)
Prior art keywords
server
data packet
sdt
iwf
key
Prior art date
Application number
PCT/CN2014/080840
Other languages
French (fr)
Chinese (zh)
Inventor
应江威
许怡娴
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Priority to PCT/CN2014/080840 priority Critical patent/WO2015196415A1/en
Priority to CN201480017033.5A priority patent/CN105393567B/en
Publication of WO2015196415A1 publication Critical patent/WO2015196415A1/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/03Protecting confidentiality, e.g. by encryption
    • H04W12/033Protecting confidentiality, e.g. by encryption of the user plane, e.g. user's traffic
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/04Key management, e.g. using generic bootstrapping architecture [GBA]
    • H04W12/041Key generation or derivation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/10Integrity
    • H04W12/106Packet or message integrity
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/60Context-dependent security
    • H04W12/69Identity-dependent
    • H04W12/72Subscriber identity

Abstract

Provided are a data secure transmission method and device. The method comprises: receiving, by a user equipment (UE), a first data packet sent by a server via an interworking facility (IWF) and a mobility management entity (MME), the first data packet carrying the ID of the server or the ID of the IWF; acquiring, by the UE, a public key and/or SDT security context of the server according to the ID of the server or the ID of the IWF in the first data packet, wherein the public key of the server contracted with the UE or the SDT security context generated by means of negotiation with a home subscriber server (HSS) is stored in the UE and identified by means of the ID of the server or the ID of the IWF; verifying and deciphering, by the UE, the first data packet according to the public key of the server and a private key of the UE or SDT security context or the public key and SDT security context of the server to obtain a deciphered first data packet, so as to protect the security of data between the UE and IWF or between the UE and server.

Description

数据的安全传输方法和设备  Data transmission method and device
技术领域 Technical field
本发明实施例涉及信息技术领域, 尤其涉及一种数据的安全传输方法和 设备。 背景技术  The embodiments of the present invention relate to the field of information technology, and in particular, to a data transmission method and device. Background technique
随着智能终端和机器到机器通信 (Machine To Machine, 简称 M2M) 的 广泛应用, 小数据包的传输越来越多, 用户设备(User Equipment , 简称 UE) 和应用服务器 (Application Server, 简称 AS ) 之间可能需要不时地进行数据 交互, 例如: 智能终端所支持的邮件、 微软网络服务 (Microsoft Service Network, 简称 MSN) 、 虚拟专用网络 (Virtual Private Network, 简称 VPN) 等业务, 现有技术中为了更好地控制管理 M2M通信的安全, 在机器类通信 (Machine Type Communications, 简称 MTC) 设备及 MTC相关业务过程中, 引入了一个服务于 MTC的网络实体 (MTC-Inter Working Function , 简称 MTC-IWF) 。 现有安全机制中, UE在连接状态时, 若有小数据需要传输时, UE通过控制面非接入层(Non Access Stratum, 简称 NAS )消息将小数据包传 递给网络, 在 UE初始附着到网络时, 会与网络侧进行相互认证和密钥协商 (Authentication and Key Agreement, 简称 AKA)过程, 建立好 UE和移动性管 理实体(Mobility Management Entity, 简称 MME) 之间的 NAS安全, 和 UE和 演进型基站 (evolved Node B, 简称 eNB ) 之间的 AS安全。 当 UE从连接状态 转换为空闲状态时, UE与 MME之间只有 NAS安全上下文或者甚至没有同歩 的安全上下文, 因此, 现有 NAS安全至多只能保证 UE和 MME之间的安全。  With the widespread application of intelligent terminal and Machine to Machine (M2M), small data packets are transmitted more and more, User Equipment (UE) and Application Server (AS). Data exchange may be performed from time to time, for example, emails supported by smart terminals, Microsoft Service Network (MSN), and Virtual Private Network (VPN). To better control the security of M2M communication, a MTC-Inter Working Function (MTC-IWF) is introduced in the Machine Type Communications (MTC) device and the MTC-related service process. ). In the existing security mechanism, when the UE is in the connection state, if small data needs to be transmitted, the UE transmits the small data packet to the network through the Non-Access Stratum (NAS) message of the control plane, and the UE initially attaches to the UE. In the network, the mutual authentication and key agreement (AKA) process is performed with the network side, and NAS security between the UE and the Mobility Management Entity (MME) is established, and the UE and the UE are AS security between evolved Node Bs (eNBs). When the UE transitions from the connected state to the idle state, there is only a NAS security context between the UE and the MME or even no peer security context. Therefore, the existing NAS security can only guarantee the security between the UE and the MME at most.
现有技术中, LTE网络中没有 MTC-IWF实体来控制管理 MTC设备及开展 In the prior art, there is no MTC-IWF entity in the LTE network to control and manage the MTC device and
MTC相关业务, MME和 IWF之间也没有 T5接口, 另外, IWF作为直接控制管 理 UE和 MTC业务的实体, 两者之间可能会交互一些重要的信令和用户数据, 如果 UE没有能够和 IWF之间进行认证和密钥协商, 从安全角度考虑, 现有技 术无法保证 UE与服务器或 IWF之间的端到端安全, 导致系统安全性低。 发明内容 There is no T5 interface between the MME and the IWF. In addition, the IWF acts as an entity that directly controls the UE and the MTC service. The two devices may exchange some important signaling and user data. If the UE does not have the IWF and the IWF. Authentication and key negotiation are performed. From the perspective of security, the prior art cannot guarantee end-to-end security between the UE and the server or the IWF, resulting in low system security. Summary of the invention
本发明实施例提供一种数据的安全传输方法和设备, 解决了在 UE和服 务器之间的小数据通过 MME和 MTC-IWF之间的 T5接口传输的场景下, 没 有相应的安全机制来保护 UE与签约服务器之间的数据传输的问题, 提高系 统数据传输的安全性。  The embodiment of the present invention provides a method and a device for securely transmitting data. In the scenario where small data between the UE and the server is transmitted through the T5 interface between the MME and the MTC-IWF, there is no corresponding security mechanism to protect the UE. The problem of data transmission between the contract server and the security of the system data transmission.
本发明实施例第一方面提供一种数据的安全传输方法, 包括:  A first aspect of the embodiments of the present invention provides a data security transmission method, including:
用户设备 UE接收所述服务器通过互通设备 IWF和移动性管理实体 MME 发送的第一数据包,所述第一数据包携带所述服务器的 ID或所述 IWF的 ID; 所述 UE根据所述第一数据包中的所述服务器的 ID或所述 IWF的 ID, 获得所述服务器的公钥和 /或所述 SDT安全上下文, 其中, 所述 UE签约的服 务器的公钥或者与归属用户服务器 HSS协商生成 SDT安全上下文存储在所 述 UE上, 且通过所述服务器的 ID或所述 IWF的 ID来标识;  Receiving, by the user equipment, the first data packet sent by the server by the interworking device IWF and the mobility management entity MME, where the first data packet carries an ID of the server or an ID of the IWF; Obtaining, by the ID of the server or the ID of the IWF in a data packet, the public key of the server and/or the SDT security context, where the public key of the server subscribed by the UE or the home subscriber server HSS Negotiating to generate an SDT security context is stored on the UE, and is identified by an ID of the server or an ID of the IWF;
所述 UE根据所述服务器的公钥和所述 UE的私钥, 或者所述 SDT安全 上下文, 或者所述服务器的公钥和所述 SDT安全上下文, 对所述第一数据包 进行验证和解密处理, 得到解密后的第一数据包。  The UE performs verification and decryption on the first data packet according to the public key of the server and the private key of the UE, or the SDT security context, or the public key of the server and the SDT security context. Processing, obtaining the decrypted first data packet.
结合第一方面, 在第一方面的第一种可能的实施方式中, 还包括: 所述 UE与归属用户服务器 HSS协商生成所述 SDT安全上下文, 具体歩骤包括: 接收所述 HSS发送的密钥生成参数;  With reference to the first aspect, in a first possible implementation manner of the first aspect, the method further includes: the UE, in the negotiation with the home subscriber server, the HSS, to generate the SDT security context, and the specific steps include: receiving the secret sent by the HSS Key generation parameter
根据所述密钥生成参数, 生成所述 SDT密钥;  Generating the SDT key according to the key generation parameter;
在非接入安全模式命令 NAS SMC过程中协商所述 SDT安全保护算法, 或者, 在非接入安全模式命令 NAS SMC过程中协商的非接入层安全算法作 为所述 SDT安全保护算法。  The SDT security protection algorithm is negotiated in the non-access security mode command NAS SMC process, or the non-access stratum security algorithm negotiated in the non-access security mode command NAS SMC process is used as the SDT security protection algorithm.
结合第一方面或第一方面的第一种可能的实施方式, 在第一方面的第二 种可能的实施方式中,所述 UE根据所述服务器的公钥和所述 UE的私钥,或 者所述 SDT安全上下文, 或者所述服务器的公钥和所述 SDT安全上下文, 对所述第一数据包进行验证和解密处理, 得到解密后的第一数据包, 包括: 所述 UE根据所述服务器的公钥验证所述第一数据包中的签名是否有效; 所述 UE若验证所述第一数据包中的签名有效,则根据所述 UE的私钥对 所述第一数据包进行解密处理, 得到解密后的所述第一数据包。  With reference to the first aspect or the first possible implementation manner of the first aspect, in a second possible implementation manner of the first aspect, the UE is based on a public key of the server and a private key of the UE, or The SDT security context, or the public key of the server and the SDT security context, performing verification and decryption processing on the first data packet to obtain the decrypted first data packet, including: Verifying, by the public key of the server, whether the signature in the first data packet is valid; if the UE verifies that the signature in the first data packet is valid, decrypting the first data packet according to the private key of the UE Processing, obtaining the decrypted first data packet.
结合第一方面的第一种可能的实施方式, 在第一方面的第三种可能的实 施方式中,所述 UE根据所述服务器的公钥和所述 UE的私钥,或者所述 SDT 安全上下文, 或者所述服务器的公钥和所述 SDT安全上下文, 对所述第一数 据包进行验证和解密处理, 得到解密后的第一数据包, 包括: In conjunction with the first possible implementation of the first aspect, the third possible implementation in the first aspect In the implementation manner, the UE compares the first data packet according to the public key of the server and the private key of the UE, or the SDT security context, or the public key of the server and the SDT security context. Performing verification and decryption processing to obtain the decrypted first data packet, including:
所述 UE根据所述 SDT安全上下文验证所述第一数据包中的消息认证码 MAC-I; 若验证成功, 则对所述第一数据包进行解密处理, 得到解密后的所 述第一数据包。  Determining, by the UE, the message authentication code MAC-I in the first data packet according to the SDT security context; if the verification is successful, performing decryption processing on the first data packet to obtain the decrypted first data package.
结合第一方面的第一种可能的实施方式, 在第一方面的第四种可能的实 施方式中,所述 UE根据所述服务器的公钥和所述 UE的私钥,或者所述 SDT 安全上下文, 或者所述服务器的公钥和所述 SDT安全上下文, 对所述第一数 据包进行验证和解密处理, 得到解密后的第一数据包, 包括:  With reference to the first possible implementation manner of the first aspect, in a fourth possible implementation manner of the first aspect, the UE is based on a public key of the server and a private key of the UE, or the SDT security Context, or the public key of the server and the SDT security context, performing verification and decryption processing on the first data packet to obtain the decrypted first data packet, including:
所述 UE根据所述服务器的公钥验证所述第一数据包中的签名是否有效; 若验证所述第一数据包的签名有效, 则根据所述 SDT安全上下文对所述第一 数据包进行解密处理, 或者根据所述 SDT安全上下文对所述第一数据包进行 完整性验证和解密处理, 得到解密后的所述第一数据包。  The UE verifies whether the signature in the first data packet is valid according to the public key of the server; if the signature of the first data packet is valid, the first data packet is performed according to the SDT security context. Decrypting processing, or performing integrity verification and decryption processing on the first data packet according to the SDT security context, to obtain the decrypted first data packet.
结合第一方面的第三种或第四种可能的实施方式, 在第一方面的第五种 可能的实施方式中, 还包括:  In conjunction with the third or fourth possible implementation of the first aspect, in a fifth possible implementation of the first aspect, the method further includes:
所述 UE从所述 HSS接收的参数包括所述 IWF的 ID、 所述 APP的 ID、 随机数 RAND、 临时数据中的至少一项;  The parameter that the UE receives from the HSS includes at least one of an ID of the IWF, an ID of the APP, a random number RAND, and temporary data;
所述密钥生成参数包括所述 SDT密钥的生成参数; 其中, 所述 SDT密 钥的生成参数包括接入安全管理实体密钥、 完整性保护密钥 IK、 加密密钥 CK、 所述 IWF的 ID、 所述 UE的 ID或国际移动用户标识 IMSI、 所述 APP 的 ID、 所述 RAND、 所述临时数据、 SDT密钥标签中的至少一项。  The key generation parameter includes a generation parameter of the SDT key, where the generation parameter of the SDT key includes an access security management entity key, an integrity protection key IK, an encryption key CK, and the IWF. At least one of an ID, an ID of the UE or an International Mobile Subscriber Identity (IMSI), an ID of the APP, the RAND, the temporary data, and an SDT key label.
本发明实施例第二方面提供一种数据的安全传输方法, 包括:  A second aspect of the embodiments of the present invention provides a data security transmission method, including:
服务器根据所述服务器的私钥和与所述服务器签约的用户设备 UE的公 钥对等待发送的第一数据包进行签名和加密处理, 或者根据 SDT安全上下文 对所述第一数据包进行加密处理或加密和完整性保护处理, 其中, 所述服务 器的私钥和与所述服务器签约的所述 UE公钥存储在所述服务器上,所述 SDT 安全上下文为互通设备 IWF发送的;  The server signs and encrypts the first data packet waiting to be sent according to the private key of the server and the public key of the user equipment UE that is contracted with the server, or encrypts the first data packet according to the SDT security context. Or the encryption and integrity protection process, wherein the private key of the server and the public key of the UE that is contracted with the server are stored on the server, and the SDT security context is sent by the interworking device IWF;
所述服务器将加密后的所述第一数据包通过互通设备 IWF和移动性管理 实体 MME发送给所述 UE; 以供所述 UE根据所述第一数据包中的服务器的 ID, 获取所述服务器的公钥和 /或所述 SDT 安全上下文, 并根据所述服务器 的公钥和所述 UE的私钥, 或者所述 SDT安全上下文, 或者与所述服务器的 公钥和所述 SDT安全上下文, 对所述第一数据包进行验证和解密处理, 得到 解密后的所述第一数据包。 Transmitting, by the server, the encrypted first data packet to the UE by using the interworking device IWF and the mobility management entity MME, where the UE is configured according to the server in the first data packet ID, obtaining the public key of the server and/or the SDT security context, and according to the public key of the server and the private key of the UE, or the SDT security context, or the public key of the server The SDT security context performs verification and decryption processing on the first data packet to obtain the decrypted first data packet.
本发明实施例第三方面提供一种数据的安全传输方法,  A third aspect of the embodiments of the present invention provides a method for securely transmitting data.
包括:  Includes:
互通设备 IWF接收服务器发送的第一数据包, 所述第一数据包包括所述 服务器的 ID和签名, 或者所述服务器的 ID和 MAC-I;  The interworking device IWF receives the first data packet sent by the server, the first data packet includes an ID and a signature of the server, or an ID of the server and a MAC-I;
所述 IWF根据所述服务器的公钥对所述签名进行验证, 或根据 SDT安 全上下文对所述 MAC-I进行验证,并在验证通过后将所述第一数据包通过移 动性管理实体 MME发送给 UE; 或者, 所述 IWF根据所述 SDT安全上下文 对所述第一数据包进行加密和 /或完整性保护处理, 将所述第一数据包通过移 动性管理实体 MME发送给 UE;  The IWF verifies the signature according to the public key of the server, or validates the MAC-I according to an SDT security context, and sends the first data packet through the mobility management entity MME after the verification is passed Or the IWF performs encryption and/or integrity protection processing on the first data packet according to the SDT security context, and sends the first data packet to the UE through the mobility management entity MME;
其中, 所述服务器的公钥和与所述服务器签约的所述 UE的公钥存储在 所述 IWF上, 所述 SDT安全上下文为预先从归属用户服务器 HSS获取的。  The public key of the server and the public key of the UE that is contracted with the server are stored on the IWF, and the SDT security context is obtained in advance from the home subscriber server HSS.
结合第三方面, 在第三方面的第一种可能的实施方式中, 预先从归属用 户服务器 HSS获取 SDT安全上下文, 包括:  With reference to the third aspect, in a first possible implementation manner of the third aspect, the SDT security context is obtained from the home subscriber server HSS in advance, including:
接收所述 HSS发送的 SDT密钥;  Receiving an SDT key sent by the HSS;
接收所述 UE通过所述 MME发送的 SDT安全保护算法;  Receiving an SDT security protection algorithm sent by the UE by using the MME;
其中, 所述 SDT安全上下文包括所述 SDT密钥和所述 SDT安全保护算 法。  The SDT security context includes the SDT key and the SDT security protection algorithm.
结合第三方面或第三方面的第一种可能的实施方式, 在第三方面的第二 种可能的实施方式中,所述 IWF根据所述服务器的公钥对所述签名进行验证, 或根据所述 SDT安全上下文对所述 MAC-I进行验证, 并在验证通过后将所 述第一数据包通过移动性管理实体 MME发送给 UE; 或者, 所述 IWF根据 所述 SDT安全上下文对所述第一数据包进行加密和 /或完整性保护处理,将所 述第一数据包通过移动性管理实体 MME发送给 UE, 包括:  With reference to the third aspect, or the first possible implementation manner of the third aspect, in a second possible implementation manner of the third aspect, the IWF is to verify the signature according to the public key of the server, or according to the The SDT security context verifies the MAC-I, and sends the first data packet to the UE by using the mobility management entity MME after the verification is passed; or the IWF is configured according to the SDT security context. The first data packet is subjected to an encryption and/or integrity protection process, and the first data packet is sent to the UE by using the mobility management entity MME, including:
所述 IWF根据所述服务器的 ID査询并获取所述服务器的公钥, 并根据 所述服务器的公钥, 验证所述第一数据包签名是否有效; 若验证所述第一数 据包签名有效, 则将所述第一数据包通过所述 MME发送给所述 UE; 或者, The IWF queries and acquires the public key of the server according to the ID of the server, and verifies whether the first data packet signature is valid according to the public key of the server; if the first data packet signature is valid, Transmitting, by the MME, the first data packet to the UE; or,
在所述第一数据包还包括: UE的 ID时, 所述 IWF根据所述 UE的 ID 获取所述 SDT安全上下文, 对所述 MAC-I进行验证;  When the first data packet further includes: an ID of the UE, the IWF acquires the SDT security context according to the ID of the UE, and performs verification on the MAC-I;
若验证所述 MAC-I有效, 则将所述第一数据包通过所述 MME发送给所 述 UE; If the MAC-I is valid, the first data packet is sent to the UE by using the MME ;
或者,  Or,
在所述第一数据包还包括: APP的 ID时, 所述 IWF根据所述 UE的 ID 和 APP的 ID获取所述 SDT安全上下文, 对所述 MAC-I进行验证;  When the first data packet further includes: an ID of the APP, the IWF acquires the SDT security context according to the ID of the UE and the ID of the APP, and performs verification on the MAC-I;
若验证所述第一数据包 MAC-I有效,则将所述第一数据包通过所述 MME 发送给所述 UE;  If the first data packet MAC-I is valid, the first data packet is sent to the UE through the MME;
或者,  Or,
在所述第一数据包还包括: UE的 ID和 /或 APP的 ID时,所述 IWF根据 所述 UE的 ID和 /或 APP的 ID获取所述 SDT安全上下文, 对所述第一数据 进行加密和完整性保护处理; 并将所述处理后的第一数据包通过所述 MME 发送给所述 UE;  When the first data packet further includes: an ID of the UE and/or an ID of the APP, the IWF acquires the SDT security context according to the ID of the UE and/or the ID of the APP, and performs the first data. Encryption and integrity protection processing; and sending the processed first data packet to the UE by using the MME;
或者,  Or,
在所述第一数据包还包括: UE的 ID和 /或 APP的 ID时,所述 IWF根据 所述服务器的 ID获取所述服务器的公钥, 并根据所述服务器的公钥, 验证所 述签名;若验证所述第一数据包的签名有效,则根据用户 UE的 ID和 /或 APP 的 ID获取所述 SDT安全上下文, 对所述第一数据进行加密处理, 或者加密 和完整性保护处理, 并将所述处理后的第一数据包通过所述 MME发送给所 述 UE。  When the first data packet further includes: an ID of the UE and/or an ID of the APP, the IWF acquires the public key of the server according to the ID of the server, and verifies the according to the public key of the server. Signing; if the signature of the first data packet is valid, obtaining the SDT security context according to the ID of the user UE and/or the ID of the APP, performing encryption processing, or encryption and integrity protection processing on the first data And sending the processed first data packet to the UE by using the MME.
结合第三方面的第二种可能的实施方式, 在第三方面的第三种可能的实 施方式中, 所述方法还包括:  In conjunction with the second possible implementation of the third aspect, in a third possible implementation manner of the third aspect, the method further includes:
若所述第一数据包中包括所述服务器的 ID和所述 UE的 ID, 所述 IWF 根据预先配置的授权列表中保存的服务器与 UE的对应关系, 对所述第一数 据包中的所述服务器的 ID和所述 UE的 ID进行匹配检査, 在检査所述服务 器与所述 UE的对应关系正确后, 将所述第一数据包通过所述 MME发送给 所述 UE;  If the first data packet includes the ID of the server and the ID of the UE, the IWF, according to the correspondence between the server and the UE saved in the pre-configured authorization list, is in the first data packet. Performing a matching check on the ID of the server and the ID of the UE, and after checking that the correspondence between the server and the UE is correct, sending the first data packet to the UE by using the MME;
或者, 若所述第一数据包中包括所述服务器的 ID、 所述 UE的 ID和所述 APP 的 ID, 所述 IWF根据预先配置的授权列表中保存的服务器、 UE以及 APP的 对应关系, 对所述第一数据包中的所述服务器的 ID、 所述 UE的 ID和所述 APP的 ID进行匹配检査, 在检査所述服务器、 所述 UE和所述 APP的对应 关系正确后, 将所述第一数据包通过所述 MME发送给所述 UE; or, If the first data packet includes the ID of the server, the ID of the UE, and the ID of the APP, the IWF is configured according to the correspondence between the server, the UE, and the APP saved in the pre-configured authorization list. Performing a matching check on the ID of the server, the ID of the UE, and the ID of the APP in the first data packet, and after checking that the correspondence between the server, the UE, and the APP is correct, Sending, by the MME, the first data packet to the UE;
或者,  Or,
若所述第一数据包中包括所述服务器的 ID和所述 UE的 ID,则所述 IWF 将所述服务器的 ID和所述 UE的 ID发送给所述 HSS , 以供所述 HSS根据预 先配置的授权列表中保存的服务器与 UE的对应关系, 对所述第一数据包中 的所述服务器的 ID和所述 UE的 ID进行匹配检査, 在检査所述服务器与所 述 UE的对应关系正确后, 向所述 IWF返回确认结果, 以使所述 IWF将所述 第一数据包通过所述 MME发送给所述 UE;  If the ID of the server and the ID of the UE are included in the first data packet, the IWF sends the ID of the server and the ID of the UE to the HSS, so that the HSS is based on the advance Corresponding relationship between the server and the UE saved in the configured authorization list, performing matching check on the ID of the server in the first data packet and the ID of the UE, and checking the server and the UE After the corresponding relationship is correct, the acknowledgment result is returned to the IWF, so that the IWF sends the first data packet to the UE by using the MME;
或者,  Or,
若所述第一数据包中包括所述服务器的 ID、 所述 UE的 ID和所述 APP 的 ID, 则所述 IWF将所述服务器的 ID、 所述 UE的 ID和所述 APP的 ID发 送给所述 HSS , 以供所述 HSS根据预先配置的授权列表中保存的服务器、 UE 以及 APP的对应关系, 对所述第一数据包中的所述服务器的 ID、所述 UE的 ID和所 APP的 ID进行匹配检査, 在检査所述服务器、 所述 UE和所述 APP 的对应关系正确后, 向所述 IWF返回确认结果, 以使所述 IWF将所述第一数 据包通过所述 MME发送给所述 UE。  If the first data packet includes the ID of the server, the ID of the UE, and the ID of the APP, the IWF sends the ID of the server, the ID of the UE, and the ID of the APP. Giving the HSS, for the HSS, according to the correspondence between the server, the UE, and the APP stored in the pre-configured authorization list, the ID of the server in the first data packet, the ID of the UE, and the Performing a matching check on the ID of the APP, and after checking that the correspondence between the server, the UE, and the APP is correct, returning an acknowledgement result to the IWF, so that the IWF passes the first data packet. The MME sends the MME to the UE.
本发明实施例第四方面提供一种数据的安全传输方法, 包括:  A fourth aspect of the embodiments of the present invention provides a data security transmission method, including:
移动性管理实体 MME接收互通设备 IWF发送的第一数据包, 所述第一 数据包包括: 用户设备 UE的 ID、 服务器的 ID和签名;  The mobility management entity MME receives the first data packet sent by the interworking device IWF, where the first data packet includes: an ID of the user equipment UE, an ID of the server, and a signature;
所述 MME根据所述服务器的公钥, 对所述签名进行验证; 其中, 所述 服务器的公钥存储在所述 MME上;  The MME verifies the signature according to the public key of the server, where the public key of the server is stored on the MME;
所述 MME在验证签名有效后, 将所述第一数据包发送给所述 UE的 ID 对应的所述 UE。  After the verification signature is valid, the MME sends the first data packet to the UE corresponding to the ID of the UE.
移动性管理实体 MME预先配置每个用户设备 UE对应的 UE的公钥和与 所述 UE签约的服务器的公钥;  The mobility management entity MME pre-configures the public key of the UE corresponding to each user equipment UE and the public key of the server that is contracted with the UE;
所述 MME接收互通设备 IWF发送的第一数据包,所述第一数据包包括: 所述 UE的 ID、 所述服务器的 ID和签名; Receiving, by the MME, the first data packet sent by the interworking device IWF, where the first data packet includes: The ID of the UE, the ID and signature of the server;
所述 MME根据所述服务器的 ID获取所述服务器的公钥,对所述签名进 行验证;  Obtaining, by the MME, the public key of the server according to the ID of the server, and verifying the signature;
所述 MME在验证签名有效后, 将所述第一数据包发送给所述 UE的 ID 对应的所述 UE。  After the verification signature is valid, the MME sends the first data packet to the UE corresponding to the ID of the UE.
本发明实施例第五方面提供一种数据的安全传输方法, 包括:  A fifth aspect of the embodiments of the present invention provides a data security transmission method, including:
归属用户服务器 HSS接收移动管理实体 MME发送的用户设备 UE的标 识和 /或所述 MME为所述 UE选择的互通设备 IWF的 ID;所述标识包括国际 移动用户标识 IMSI或临时移动用户标识 TMSI;  The home subscriber server HSS receives the identifier of the user equipment UE sent by the mobility management entity MME and/or the ID of the interworking device IWF selected by the MME for the UE; the identifier includes an international mobile subscriber identity IMSI or a temporary mobile subscriber identity TMSI;
所述 HSS根据所述标识获取所述 UE的签约数据, 判断所述 UE具有小 数据业务的特性时, 则根据预先获取的密钥生成参数生成 SDT密钥;  And obtaining, by the HSS, the subscription data of the UE according to the identifier, and determining that the UE has the characteristics of the small data service, generating an SDT key according to the previously generated key generation parameter;
所述 HSS将所述密钥生成参数和所述 SDT密钥发送给所述 IWF的 ID对 应的 IWF, 并通过所述 MME向所述 UE发送所述密钥生成参数, 以供所述 UE根据所述密钥生成参数生成 SDT安全上下文, 其中, 所述 SDT安全上下 文包括所述 SDT密钥和 SDT安全保护算法。  The HSS sends the key generation parameter and the SDT key to the IWF corresponding to the ID of the IWF, and sends the key generation parameter to the UE by using the MME, for the UE to The key generation parameter generates an SDT security context, where the SDT security context includes the SDT key and an SDT security protection algorithm.
结合第五方面, 在第五方面的第一种可能的实施方式中, 还包括: 所述 HSS接收所述 IWF发送的第一数据包;  With reference to the fifth aspect, in a first possible implementation manner of the fifth aspect, the method further includes: the HSS receiving the first data packet sent by the IWF;
若所述第一数据包中包括所述服务器的 ID和所述 UE的 ID,则所述 HSS 根据预先配置的授权列表中保存的服务器与 UE的对应关系, 对所述第一数 据包中的所述服务器的 ID和所述 UE的 ID进行匹配检査, 在检査所述服务 器与所述 UE的对应关系正确后, 向所述 IWF返回确认结果, 以使所述 IWF 将所述第一数据包通过所述 MME发送给所述 UE;  If the ID of the server and the ID of the UE are included in the first data packet, the HSS is in the first data packet according to the correspondence between the server and the UE saved in the pre-configured authorization list. Performing a matching check on the ID of the server and the ID of the UE, and after checking that the correspondence between the server and the UE is correct, returning a confirmation result to the IWF, so that the IWF will be the first Transmitting a data packet to the UE by using the MME;
或者,  Or,
若所述第一数据包中包括所述服务器的 ID、 所述 UE的 ID和所述 APP 的 ID, 则所述 HSS根据预先配置的授权列表中保存的服务器、 UE以及 APP 的对应关系, 对所述第一数据包中的所述服务器的 ID、 所述 UE的 ID和所 APP的 ID进行匹配检査, 在检査所述服务器、 所述 UE和所述 APP的对应 关系正确后, 向所述 IWF返回确认结果, 以使所述 IWF将所述第一数据包通 过所述 MME发送给所述 UE。  If the first data packet includes the ID of the server, the ID of the UE, and the ID of the APP, the HSS is configured according to the correspondence between the server, the UE, and the APP saved in the pre-configured authorization list. Performing a matching check on the ID of the server, the ID of the UE, and the ID of the APP in the first data packet, and after checking that the correspondence between the server, the UE, and the APP is correct, The IWF returns an acknowledgement result, so that the IWF sends the first data packet to the UE by using the MME.
结合第五方面的第一种可能的实施方式, 在第五方面的第二种可能的实 施方式中, 还包括: In conjunction with the first possible implementation of the fifth aspect, the second possible implementation in the fifth aspect In the manner of implementation, it also includes:
在所述 HSS将所述 SDT密钥发送给所述 IWF的 ID对应的 IWF之后, 所述 HSS将所述 IWF的 ID通过所述 MME发送给所述 UE,以使所述 UE根 据所述 IWF的 ID生成 SDT密钥并通过 MME将 SDT安全保护算法发送给所 述 IWF, 其中, 所述 UE与所述 IWF的对应关系存储在所述 HSS中。  After the HSS sends the SDT key to the IWF corresponding to the ID of the IWF, the HSS sends the ID of the IWF to the UE by using the MME, so that the UE is based on the IWF. The ID generates an SDT key and sends an SDT security protection algorithm to the IWF through the MME, where the correspondence between the UE and the IWF is stored in the HSS.
结合第五方面、第五方面的第一种和第二种可能的实施方式中的任一种, 在第三方面的第三种可能的实施方式中, 还包括:  With reference to the fifth aspect, any one of the first and second possible implementation manners of the fifth aspect, in a third possible implementation manner of the third aspect, the method further includes:
所述 HSS发送给所述 UE的参数包括所述 IWF的 ID、 应用 APP的 ID、 随机数 RAND、 临时数据中的至少一项, 其中, 所述临时数据是在所述 HSS 判断所述 UE具有小数据业务的特性之后,所述 HSS生成的用于生成 SDT密 钥的参数;  The parameter that the HSS sends to the UE includes at least one of an ID of the IWF, an ID of an application APP, a random number RAND, and temporary data, where the temporary data is determined by the HSS to have the UE After the characteristics of the small data service, the parameters generated by the HSS for generating the SDT key;
所述密钥生成参数包括所述 SDT密钥的生成参数; 其中,  The key generation parameter includes a generation parameter of the SDT key;
所述 SDT 密钥的生成参数为接入安全管理实体密钥、 完整性保护密钥 The SDT key generation parameter is an access security management entity key and an integrity protection key.
IK、加密密钥 CK、所述 IWF的 ID、所述 UE的 ID或国际移动用户标识 IMSI、 所述 APP的 ID、 所述 RAND、 所述临时数据、 SDT密钥标签中的至少一项。 IK, an encryption key CK, an ID of the IWF, an ID of the UE or an international mobile subscriber identity IMSI, an ID of the APP, the RAND, the temporary data, and an SDT key label.
本发明实施例第六方面提供一种数据的安全传输方法, 包括:  A sixth aspect of the embodiments of the present invention provides a data security transmission method, including:
用户设备 UE根据所述 UE的私钥和服务器的公钥对第二数据包进行加密 和 /或签名处理, 或者根据 SDT安全上下文对所述第二数据包进行加密和 /或 完整性保护处理, 并将处理后的第二数据包通过移动性管理实体 MME和互 通设备 IWF发送给所述服务器; 其中, 所述 UE的私钥和与所述 UE签约的 所述服务器的公钥或者与归属用户服务器 HSS协商生成 SDT安全上下文存 储在所述 UE上。  The user equipment UE performs encryption and/or signature processing on the second data packet according to the private key of the UE and the public key of the server, or performs encryption and/or integrity protection processing on the second data packet according to the SDT security context. Transmitting the processed second data packet to the server by using the mobility management entity MME and the interworking device IWF; wherein the private key of the UE and the public key of the server or the home subscriber that is contracted with the UE The server HSS negotiation generates an SDT security context stored on the UE.
结合第六方面, 在第六方面的第一种可能的实施方式中, 还包括: 与归 属用户服务器 HSS协商生成所述 SDT安全上下文, 具体歩骤包括:  With reference to the sixth aspect, in a first possible implementation manner of the sixth aspect, the method further includes: generating the SDT security context by negotiating with the home user server HSS, where the specific steps include:
所述 UE接收所述 HSS发送的密钥生成参数;  Receiving, by the UE, a key generation parameter sent by the HSS;
所述 UE根据所述密钥生成参数, 生成 SDT密钥;  The UE generates an SDT key according to the key generation parameter;
所述 UE在非接入安全模式命令 NAS SMC过程中协商 SDT安全保护算 法, 或者, 在非接入安全模式命令 NAS SMC过程中协商的非接入层安全算 法作为 SDT安全保护算法。  The UE negotiates the SDT security protection algorithm in the non-access security mode command NAS SMC process, or the non-access layer security algorithm negotiated in the non-access security mode command NAS SMC process as the SDT security protection algorithm.
结合第六方面或第六方面的第一种可能的实施方式, 在第六方面的第二 种可能的实施方式中,所述 UE根据所述 UE的私钥和服务器的公钥对第二数 据包进行加密和 /或签名处理,或者根据 SDT安全上下文对所述第二数据包进 行加密和 /或完整性保护处理, 并将处理后的第二数据包通过移动性管理实体 MME和互通设备 IWF发送给所述服务器, 包括: In combination with the sixth aspect or the first possible implementation of the sixth aspect, the second aspect of the sixth aspect In a possible implementation manner, the UE encrypts and/or performs a second data packet according to the private key of the UE and a public key of the server, or encrypts the second data packet according to an SDT security context. And the integrity protection process, and the processed second data packet is sent to the server by the mobility management entity MME and the interworking device IWF, including:
所述 UE根据所述 UE的私钥签名所述第二数据包,并根据所述服务器的 公钥对第二数据包进行加密处理;  The UE signs the second data packet according to the private key of the UE, and performs encryption processing on the second data packet according to the public key of the server;
所述 UE将处理后的第二数据包通过所述 MME和所述 IWF发送给所述 服务器, 以供所述服务器根据所述第二数据包中的 UE的 ID获取所述 UE的 公钥, 并根据所述 UE的公钥验证所述处理后的第二数据包中的签名是否有 效, 若验证有效, 则根据所述服务器的私钥对所述处理后的第二数据包进行 解密处理, 得到解密后的所述第二数据包。  Sending, by the UE, the processed second data packet to the server by using the MME and the IWF, so that the server acquires the public key of the UE according to the ID of the UE in the second data packet, And verifying, according to the public key of the UE, whether the signature in the processed second data packet is valid, and if the verification is valid, decrypting the processed second data packet according to the private key of the server, The decrypted second data packet is obtained.
结合第六方面的第一种可能的实施方式, 在第六方面的第三种可能的实 施方式中, UE根据所述 UE的私钥和服务器的公钥对第二数据包进行加密和 /或签名处理, 或者根据 SDT安全上下文对所述第二数据包进行加密和 /或完 整性保护处理, 并将处理后的第二数据包通过移动性管理实体 MME和互通 设备 IWF发送给所述服务器, 包括:  With reference to the first possible implementation manner of the sixth aspect, in a third possible implementation manner of the sixth aspect, the UE encrypts the second data packet according to the private key of the UE and the public key of the server, and/or And performing the encryption and/or integrity protection processing on the second data packet according to the SDT security context, and sending the processed second data packet to the server by using the mobility management entity MME and the interworking device IWF. Includes:
所述 UE根据所述 SDT安全上下文对所述第二数据包进行加密或加密和 完整性保护处理;  The UE performs encryption or encryption and integrity protection processing on the second data packet according to the SDT security context;
所述 UE将携带 MAC-I的所述处理后的第二数据包发送给 IWF或者服务 器, 以供所述 IWF或者服务器根据所述处理后的第二数据包中的所述 UE的 ID获取所述 SDT安全上下文, 并根据所述 SDT安全上下文, 验证所述安全 保护后的第二数据包中的所述 MAC-I, 若验证有效, 则对所述处理后的第二 数据包进行解密处理, 得到解密后的所述第二数据包。  Transmitting, by the UE, the processed second data packet that carries the MAC-I to the IWF or the server, where the IWF or the server obtains the identifier according to the ID of the UE in the processed second data packet. Determining the SDT security context, and verifying the MAC-I in the second packet after the security protection according to the SDT security context, and if the verification is valid, decrypting the processed second data packet And obtaining the decrypted second data packet.
结合第六方面的第三种可能的实施方式, 在第六方面的第四种可能的实 施方式中, 所述密钥生成参数包括:  With reference to the third possible implementation manner of the sixth aspect, in a fourth possible implementation manner of the sixth aspect, the key generation parameter includes:
所述 UE接收的所述 HSS发送的参数包括所述 IWF的 ID、 应用 APP的 ID、 随机数 RAND、 临时数据中的至少一项;  The parameter sent by the HSS received by the UE includes at least one of an ID of the IWF, an ID of an application APP, a random number RAND, and temporary data;
所述密钥生成参数包括所述 SDT密钥的生成参数; 其中,  The key generation parameter includes a generation parameter of the SDT key;
所述 SDT 密钥的生成参数为接入安全管理实体密钥、 完整性保护密钥 IK、加密密钥 CK、所述 IWF的 ID、所述 UE的 ID或国际移动用户标识 IMSI、 所述 APP的 ID、 所述 RAND、 所述临时数据、 SDT密钥标签中的至少一项。 本发明实施例第七方面提供一种数据的安全传输方法, 包括: The generation parameter of the SDT key is an access security management entity key, an integrity protection key IK, an encryption key CK, an ID of the IWF, an ID of the UE, or an international mobile subscriber identity IMSI, At least one of an ID of the APP, the RAND, the temporary data, and an SDT key label. A seventh aspect of the embodiments of the present invention provides a data security transmission method, including:
服务器接收互通设备 IWF发送的处理后的第二数据包;  Receiving, by the server, the processed second data packet sent by the interworking device IWF;
根据用户设备 UE的公钥和所述服务器的私钥对所述第二数据包进行签 名验证和解密, 或者根据所述 UE的 ID和 /或 IWF的 ID査找 SDT安全上下 文, 对所述处理后的第二数据包进行完整性验证和解密;  Performing signature verification and decryption on the second data packet according to the public key of the user equipment UE and the private key of the server, or searching for an SDT security context according to the ID of the UE and/or the ID of the IWF, after the processing The second data packet is integrity verified and decrypted;
其中, 所述服务器的私钥和与所述服务器签约的所述 UE的公钥存储在 所述服务器上, 所述 SDT安全上下文为互通设备 IWF发送的。  The private key of the server and the public key of the UE that is contracted with the server are stored on the server, and the SDT security context is sent by the interworking device IWF.
本发明实施例第八方面提供一种数据的安全传输方法, 包括:  An eighth aspect of the embodiments of the present invention provides a data security transmission method, including:
互通设备 IWF接收用户设备 UE通过移动性管理实体 MME发送的处理 后的第二数据包, 所述处理后的第二数据包包括所述 UE的 ID和签名, 或者 所述 UE的 ID和 MAC-I;  The interworking device IWF receives the processed second data packet sent by the user equipment UE through the mobility management entity MME, where the processed second data packet includes the ID and signature of the UE, or the ID and MAC of the UE. I;
所述 IWF根据所述 UE 的公钥或 SDT 安全上下文, 对所述签名或者 The IWF, according to the public key or SDT security context of the UE, the signature or
MAC-I进行验证; 并在验证通过后, 将所述处理后的第二数据包发送给所述 服务器; The MAC-I performs verification; and after the verification is passed, the processed second data packet is sent to the server;
其中, 所述 UE的公钥存储在所述 IWF上, 所述 SDT安全上下文为预先 从归属用户服务器 HSS获取的。  The public key of the UE is stored on the IWF, and the SDT security context is obtained in advance from the home subscriber server HSS.
结合第八方面, 在第八方面的第一种可能的实施方式中, 预先从归属用 户服务器 HSS获取 SDT安全上下文, 包括:  With reference to the eighth aspect, in a first possible implementation manner of the eighth aspect, the SDT security context is obtained from the home user server HSS in advance, including:
接收所述 HSS发送的 SDT密钥;  Receiving an SDT key sent by the HSS;
接收所述 UE通过所述 MME发送的 SDT安全保护算法;  Receiving an SDT security protection algorithm sent by the UE by using the MME;
其中, 所述 SDT安全上下文包括所述 SDT密钥和所述 SDT安全保护算 法。  The SDT security context includes the SDT key and the SDT security protection algorithm.
结合第八方面的第一种可能的实施方式, 在第八方面的第二种可能的实 施方式中, 所述 IWF根据所述 UE的公钥或 SDT安全上下文, 对所述签名或 者 MAC-I进行验证; 并在验证通过后, 将所述处理后的第二数据包发送给所 述服务器, 包括:  With reference to the first possible implementation manner of the eighth aspect, in a second possible implementation manner of the eighth aspect, the IWF, according to the public key or the SDT security context of the UE, the signature or MAC-I Performing verification; and after the verification is passed, sending the processed second data packet to the server, including:
所述 IWF根据所述 UE的公钥, 验证所述处理后的第二数据包的所述签 名是否有效;  Determining, by the IWF, whether the signature of the processed second data packet is valid according to the public key of the UE;
若验证所述处理后的第二数据包签名有效, 则将所述处理后的第二数据 包发送给服务器; If the processed second data packet signature is valid, the processed second data is The package is sent to the server;
或者,  Or,
所述 IWF根据所述 SDT安全上下文对所述处理后的第二数据包的所述 MAC-I进行验证;  The IWF verifies the MAC-I of the processed second data packet according to the SDT security context;
若验证所述处理后的第二数据包的所述 MAC-I有效,则将所述处理后的 第二数据包进行解密处理后发送给服务器。  If it is verified that the MAC-I of the processed second data packet is valid, the processed second data packet is decrypted and sent to the server.
结合第八方面的第二种可能的实施方式, 在第八方面的第三种可能的实 施方式中, 所述将所述第二数据包发送给所述服务器之前, 所述方法还包括: 若所述第一数据包中包括所述服务器的 ID和所述 UE的 ID, 所述 IWF 根据预先配置的授权列表中保存的服务器与 UE的对应关系, 对所述第一数 据包中的所述服务器的 ID和所述 UE的 ID进行匹配检査, 在检査所述服务 器与所述 UE的对应关系正确后, 将所述第二数据包发送给所述服务器; 或者,  With the second possible implementation of the eighth aspect, in a third possible implementation manner of the eighth aspect, before the sending the second data packet to the server, the method further includes: The first data packet includes an ID of the server and an ID of the UE, where the IWF is configured according to a correspondence between a server and a UE saved in a pre-configured authorization list, and the first data packet. Performing a matching check on the ID of the server and the ID of the UE, and after checking that the correspondence between the server and the UE is correct, sending the second data packet to the server; or
若所述第一数据包中包括所述服务器的 ID、 所述 UE的 ID和所述 APP 的 ID, 所述 IWF根据预先配置的授权列表中保存的服务器、 UE以及 APP的 对应关系, 对所述第一数据包中的所述服务器的 ID、 所述 UE的 ID和所述 APP的 ID进行匹配检査, 在检査所述服务器、 所述 UE和所述 APP的对应 关系正确后, 将所述第二数据包发送给所述服务器;  If the first data packet includes the ID of the server, the ID of the UE, and the ID of the APP, the IWF is configured according to the correspondence between the server, the UE, and the APP saved in the pre-configured authorization list. Performing a matching check on the ID of the server, the ID of the UE, and the ID of the APP in the first data packet, and after checking that the correspondence between the server, the UE, and the APP is correct, Sending the second data packet to the server;
或者,  Or,
若所述第二数据包中包括所述服务器的 ID和所述 UE的 ID,则所述 IWF 将所述服务器的 ID和所述 UE的 ID发送给 HSS , 以供所述 HSS根据预先配 置的授权列表中保存的服务器与 UE的对应关系, 对所述第二数据包中的所 述服务器的 ID和所述 UE的 ID进行匹配检査,在检査所述服务器与所述 UE 的对应关系正确后, 将所述第二数据包发送给所述服务器;  If the second data packet includes the ID of the server and the ID of the UE, the IWF sends the ID of the server and the ID of the UE to the HSS, so that the HSS is configured according to the pre-configured Corresponding relationship between the server and the UE saved in the authorization list, performing matching check on the ID of the server in the second data packet and the ID of the UE, and checking the correspondence between the server and the UE After being correct, the second data packet is sent to the server;
或者,  Or,
若所述第二数据包中包括所述服务器的 ID、所述 UE的 ID以及应用 APP 的 ID, 则所述 IWF将所述服务器的 ID、 所述 UE的 ID以及所述 APP的 ID 发送给 HSS , 以供所述 HSS根据预先配置的授权列表中保存的服务器、 UE 以及 APP的对应关系, 对所述第二数据包中的所述服务器的 ID、所述 UE的 ID和所 APP的 ID进行匹配检査,在检査所述服务器、所述 UE以及所述 APP 的对应关系正确后, 将所述第二数据包发送给所述服务器。 If the second data packet includes the ID of the server, the ID of the UE, and the ID of the application APP, the IWF sends the ID of the server, the ID of the UE, and the ID of the APP to An HSS, for the HSS, according to the correspondence between the server, the UE, and the APP saved in the pre-configured authorization list, the ID of the server, the ID of the UE, and the ID of the APP in the second data packet. Performing a matching check, checking the server, the UE, and the APP After the correspondence is correct, the second data packet is sent to the server.
本发明实施例第九方面提供一种数据的安全传输方法, 包括:  A ninth aspect of the embodiments of the present invention provides a data security transmission method, including:
移动性管理实体 MME接收用户设备 UE发送的处理后的第二数据包, 所述第二数据包包括: 所述 UE的 ID、 所述服务器的 ID和签名;  The mobility management entity MME receives the processed second data packet sent by the user equipment UE, where the second data packet includes: an ID of the UE, an ID of the server, and a signature;
所述 MME根据所述 UE的公钥对所述签名进行验证; 其中, 所述 UE的 公钥存储在所述 MME上;  The MME verifies the signature according to the public key of the UE, where the public key of the UE is stored on the MME;
所述 MME在验证所述签名有效后, 将所述第二数据包发送给互通设备 结合第九方面, 在第九方面的第一种可能的实施方式中, 所述将所述第 二数据包发送给互通设备 IWF, 包括:  After the MME is validated, the MME sends the second data packet to the interworking device in combination with the ninth aspect. In a first possible implementation manner of the ninth aspect, the second data packet is Send to the interworking device IWF, including:
若所述第二数据包中包括所述服务器的 ID和所述 UE的 ID,则所述 MME 根据预先配置的授权列表、 所述第二数据包中的所述服务器的 ID和所述 UE 的 ID, 根据所述授权列表中保存的服务器和 UE的对应关系, 对所述第二数 据包中的所述服务器的 ID和所述 UE的 ID进行匹配检査, 在检査所述服务 器和所述 UE的对应关系正确后, 将所述第二数据包通过 IWF发送给所述服 务器;  If the second data packet includes an ID of the server and an ID of the UE, the MME is configured according to a pre-configured authorization list, an ID of the server in the second data packet, and the UE ID, according to the correspondence between the server and the UE saved in the authorization list, performing matching check on the ID of the server in the second data packet and the ID of the UE, and checking the server and the After the correspondence between the UEs is correct, the second data packet is sent to the server through the IWF;
或者,  Or,
若所述第二数据包中包括所述服务器的 ID、 所述 UE的 ID和应用 APP 的 ID, 则所述 MME根据预先配置的授权列表、 所述第二数据包中的所述服 务器的 ID、 所述 UE的 ID以及所述 APP的 ID, 根据所述授权列表中保存的 服务器、 UE以及 APP的对应关系,对所述第二数据包中的所述服务器的 ID、 所述 UE的 ID和所述 APP的 ID进行匹配检査, 在检査所述服务器、 所述 UE以及所述 APP的对应关系正确后, 将所述第二数据包通过 IWF发送给所 述服务器。  If the second data packet includes the ID of the server, the ID of the UE, and the ID of the application APP, the MME, according to the pre-configured authorization list, the ID of the server in the second data packet The ID of the UE and the ID of the APP, according to the correspondence between the server, the UE, and the APP stored in the authorization list, the ID of the server in the second data packet, and the ID of the UE And performing matching check with the ID of the APP, and after checking that the correspondence between the server, the UE, and the APP is correct, sending the second data packet to the server by using an IWF.
本发明实施例第十方面提供一种 UE, 包括:  A tenth aspect of the embodiments of the present invention provides a UE, including:
收发模块, 用于接收所述服务器通过互通设备 IWF 和移动性管理实体 MME发送的第一数据包, 所述第一数据包携带所述服务器的 ID或所述 IWF 的 ID;  a transceiver module, configured to receive a first data packet sent by the server by using the interworking device IWF and the mobility management entity MME, where the first data packet carries an ID of the server or an ID of the IWF;
处理模块, 用于根据所述第一数据包中的所述服务器的 ID或所述 IWF 的 ID, 获得所述服务器的公钥和 /或所述 SDT安全上下文, 其中, 所述 UE 签约的服务器的公钥或者与归属用户服务器 HSS协商生成 SDT安全上下文 存储在所述 UE上, 且通过所述服务器的 ID或所述 IWF的 ID来标识; a processing module, configured to obtain, according to an ID of the server in the first data packet or an ID of the IWF, a public key of the server and/or the SDT security context, where the UE is The public key of the contracted server is negotiated with the home subscriber server HSS to generate an SDT security context, which is stored on the UE, and is identified by the ID of the server or the ID of the IWF;
所述处理模块还用于根据所述服务器的公钥和所述 UE的私钥, 或者所 述 SDT安全上下文, 或者所述服务器的公钥和所述 SDT安全上下文, 对所 述第一数据包进行验证和解密处理, 得到解密后的第一数据包。  The processing module is further configured to: according to the public key of the server and the private key of the UE, or the SDT security context, or the public key of the server and the SDT security context, the first data packet The verification and decryption processing is performed to obtain the decrypted first data packet.
结合第十方面, 在第十方面的第一种可能的实施方式中, 所述收发模块 还用于接收所述 HSS发送的密钥生成参数;  With the tenth aspect, in a first possible implementation manner of the tenth aspect, the transceiver module is further configured to receive a key generation parameter that is sent by the HSS;
所述处理模块还用于根据所述密钥生成参数, 生成 SDT密钥;  The processing module is further configured to generate an SDT key according to the key generation parameter;
所述处理模块还用于在非接入安全模式命令 NAS SMC过程中协商 SDT 安全保护算法, 或者, 在非接入安全模式命令 NAS SMC过程中协商的非接 入层安全算法作为 SDT安全保护算法。  The processing module is further configured to negotiate an SDT security protection algorithm in a non-access security mode command NAS SMC process, or a non-access layer security algorithm negotiated in a non-access security mode command NAS SMC process as an SDT security protection algorithm .
结合第十方面或第十方面的第一种可能的实施方式, 在第十方面的第二 种可能的实施方式中, 所述处理模块具体用于:  With reference to the tenth aspect, or the first possible implementation manner of the tenth aspect, in the second possible implementation manner of the tenth aspect, the processing module is specifically configured to:
根据所述服务器的公钥验证所述第一数据包中的签名是否有效; 若验证所述第一数据包中的签名有效, 则根据所述 UE的私钥对所述第 一数据包进行解密处理, 得到解密后的所述第一数据包。  Verifying whether the signature in the first data packet is valid according to the public key of the server; if the signature in the first data packet is valid, decrypting the first data packet according to the private key of the UE Processing, obtaining the decrypted first data packet.
结合第十方面的第一种可能的实施方式, 在第十方面的第三种可能的实 施方式中, 所述处理模块具体用于:  In conjunction with the first possible implementation of the tenth aspect, in a third possible implementation manner of the tenth aspect, the processing module is specifically configured to:
根据所述 SDT安全上下文验证所述第一数据包中的消息认证码 MAC-I; 若验证成功, 则对所述第一数据包进行解密处理, 得到解密后的所述第一数 据包。  And verifying, by the SDT security context, the message authentication code MAC-I in the first data packet; if the verification is successful, decrypting the first data packet to obtain the decrypted first data packet.
结合第十方面的第一种可能的实施方式, 在第十方面的第四种可能的实 施方式中, 所述处理模块具体用于:  In conjunction with the first possible implementation of the tenth aspect, in a fourth possible implementation manner of the tenth aspect, the processing module is specifically configured to:
根据所述服务器的公钥验证所述第一数据包中的签名是否有效; 若验证 所述第一数据包的签名有效, 则根据所述 SDT安全上下文对所述第一数据包 进行解密处理, 或者根据所述 SDT安全上下文对所述第一数据包进行完整性 验证和解密处理, 得到解密后的所述第一数据包。  Verifying whether the signature in the first data packet is valid according to the public key of the server; if the signature of the first data packet is valid, decrypting the first data packet according to the SDT security context, Or performing integrity verification and decryption processing on the first data packet according to the SDT security context to obtain the decrypted first data packet.
结合第十方面的第三种或第四种可能的实施方式, 在第十方面的第五种 可能的实施方式中, 还包括:  With reference to the third or fourth possible implementation manner of the tenth aspect, in a fifth possible implementation manner of the tenth aspect, the method further includes:
所述收发模块还用于接收所述 HSS发送的参数,所述 HSS发送的参数包 括所述 IWF的 ID、所述 APP的 ID、随机数 RAND、临时数据中的至少一项。 本发明实施例第十一方面提供一种服务器, 包括: The transceiver module is further configured to receive a parameter sent by the HSS, and a parameter packet sent by the HSS At least one of an ID of the IWF, an ID of the APP, a random number RAND, and temporary data is included. An eleventh embodiment of the present invention provides a server, including:
处理模块, 用于根据所述服务器的私钥和与所述服务器签约的用户设备 UE的公钥对等待发送的第一数据包进行签名和加密处理, 或者根据 SDT安 全上下文对所述第一数据包进行加密处理或加密和完整性保护处理, 其中, 所述服务器的私钥和与所述服务器签约的所述 UE公钥存储在所述服务器上, 所述 SDT安全上下文为互通设备 IWF发送的;  a processing module, configured to perform signature and encryption processing on the first data packet to be sent according to the private key of the server and the public key of the user equipment UE that is contracted with the server, or to use the first data according to the SDT security context The packet is subjected to an encryption process or an encryption and integrity protection process, wherein the private key of the server and the UE public key subscribed to the server are stored on the server, and the SDT security context is sent by the interworking device IWF. ;
收发模块, 用于将加密后的第一数据包通过所述 IWF和移动性管理实体 MME发送给所述 UE; 以供所述 UE根据所述第一数据包中的服务器的 ID, 获取所述服务器的公钥和 /或所述 SDT安全上下文,并根据所述服务器的公钥 和所述 UE的私钥, 或者所述 SDT安全上下文, 或者与所述服务器的公钥和 所述 SDT安全上下文, 对所述第一数据包进行验证和解密处理, 得到解密后 的所述第一数据包。  a transceiver module, configured to send the encrypted first data packet to the UE by using the IWF and the mobility management entity MME, where the UE obtains the identifier according to an ID of a server in the first data packet. a public key of the server and/or the SDT security context, and based on the public key of the server and the private key of the UE, or the SDT security context, or with the public key of the server and the SDT security context And performing the verification and decryption processing on the first data packet to obtain the decrypted first data packet.
本发明实施例第十二方面提供一种互通设备 IWF, 包括:  A twelfth aspect of the embodiment of the present invention provides an interworking device IWF, including:
收发模块, 用于接收服务器发送的第一数据包, 所述第一数据包包括所 述服务器的 ID和签名, 或者所述服务器的 ID和 MAC-I;  The transceiver module is configured to receive a first data packet sent by the server, where the first data packet includes an ID and a signature of the server, or an ID of the server and a MAC-I;
处理模块, 用于根据所述服务器的公钥对所述签名进行验证, 或用于根 据 SDT安全上下文对所述 MAC-I进行验证, 并在验证通过后将所述第一数 据包通过移动性管理实体 MME发送给 UE; 或者, 所述处理模块还用于根据 所述 SDT安全上下文对所述第一数据包进行加密和 /或完整性保护处理,将所 述第一数据包通过移动性管理实体 MME发送给 UE;  a processing module, configured to verify the signature according to the public key of the server, or to verify the MAC-I according to an SDT security context, and pass the first data packet after the verification is passed The management entity is sent to the UE by the MME; or the processing module is further configured to perform encryption and/or integrity protection processing on the first data packet according to the SDT security context, and adopt the mobility management by using the first data packet. The entity MME sends to the UE;
其中, 所述服务器的公钥和与所述服务器签约的所述 UE的公钥存储在 所述 IWF上, 所述 SDT安全上下文为预先从归属用户服务器 HSS获取的。  The public key of the server and the public key of the UE that is contracted with the server are stored on the IWF, and the SDT security context is obtained in advance from the home subscriber server HSS.
结合第十二方面, 在第十二方面的第一种可能的实施方式中, 所述收发 模块还用于:  In conjunction with the twelfth aspect, in a first possible implementation of the twelfth aspect, the transceiver module is further configured to:
接收所述 HSS发送的 SDT密钥;  Receiving an SDT key sent by the HSS;
接收所述 UE通过所述 MME发送的 SDT安全保护算法;  Receiving an SDT security protection algorithm sent by the UE by using the MME;
其中, 所述 SDT安全上下文包括所述 SDT密钥和所述 SDT安全保护算 法。  The SDT security context includes the SDT key and the SDT security protection algorithm.
结合第十二方面或第十二方面的第一种可能的实施方式, 在第十二方面 的第二种可能的实施方式中, 还包括: In combination with the twelfth aspect or the first possible embodiment of the twelfth aspect, in the twelfth aspect In a second possible implementation manner, the method further includes:
所述处理模块用于根据所述服务器的 ID査询并获取所述服务器的公钥, 并根据所述服务器的公钥, 验证所述第一数据包签名是否有效; 若所述处理 模块验证所述第一数据包签名有效, 所述收发模块将所述第一数据包通过所 述 MME发送给所述 UE;  The processing module is configured to query and acquire the public key of the server according to the ID of the server, and verify whether the first data packet signature is valid according to the public key of the server; The first data packet signature is valid, and the transceiver module sends the first data packet to the UE by using the MME;
或者,  Or,
在所述第一数据包还包括: UE的 ID时,所述处理模块用于根据所述 UE 的 ID获取所述 SDT安全上下文, 对所述 MAC-I进行验证;  When the first data packet further includes: an ID of the UE, the processing module is configured to acquire the SDT security context according to the ID of the UE, and verify the MAC-I;
所述收发模块还用于若所述处理模块验证所述第一数据包签名有效, 将 所述第一数据包通过所述 MME发送给所述 UE;  The transceiver module is further configured to: if the processing module verifies that the first data packet signature is valid, send the first data packet to the UE by using the MME;
或者,  Or,
在所述第一数据包还包括: APP 的 ID 时, 所述处理模块用于根据所述 UE的 ID和 APP的 ID获取所述 SDT安全上下文, 对所述 MAC-I进行验证; 若所述处理模块验证所述第一数据包 MAC-I有效,所述收发模块将所述 第一数据包通过所述 MME发送给所述 UE;  When the first data packet further includes: an ID of the APP, the processing module is configured to acquire the SDT security context according to the ID of the UE and the ID of the APP, and verify the MAC-I; The processing module verifies that the first data packet MAC-I is valid, and the transceiver module sends the first data packet to the UE by using the MME;
或者,  Or,
在所述第一数据包还包括: UE的 ID和 /或 APP的 ID时, 所述处理模块 还用于根据所述 UE的 ID和 /或 APP的 ID获取所述 SDT安全上下文, 对所 述第一数据进行加密和完整性保护处理;  When the first data packet further includes: an ID of the UE and/or an ID of the APP, the processing module is further configured to acquire the SDT security context according to the ID of the UE and/or the ID of the APP, where The first data is encrypted and integrity protected;
所述收发模块还用于将所述处理后的第一数据包通过所述 MME发送给 所述 UE;  The transceiver module is further configured to send the processed first data packet to the UE by using the MME;
或者,  Or,
在所述第一数据包还包括: UE的 ID和 /或 APP的 ID时, 所述处理模块 还用于根据所述服务器的 ID获取所述服务器的公钥,并根据所述服务器的公 钥, 验证所述签名; 若验证所述第一数据包的签名有效, 则根据用户 UE 的 ID和 /或 APP的 ID获取对应的所述 SDT安全上下文, 对所述第一数据进行 加密处理, 或者加密和完整性保护处理;  When the first data packet further includes: an ID of the UE and/or an ID of the APP, the processing module is further configured to acquire the public key of the server according to the ID of the server, and according to the public key of the server And verifying the signature; if the signature of the first data packet is valid, obtaining the corresponding SDT security context according to the ID of the user UE and/or the ID of the APP, and performing encryption processing on the first data, or Encryption and integrity protection processing;
所述收发模块还用于将所述处理后的第一数据包通过所述 MME发送给 所述 UE。  The transceiver module is further configured to send the processed first data packet to the UE by using the MME.
结合第十二方面的第二种可能的实施方式, 在第十二方面的第三种可能 的实施方式中, 还包括: In combination with the second possible implementation of the twelfth aspect, the third possibility in the twelfth aspect In the implementation manner, the method further includes:
若所述第一数据包中包括所述服务器的 ID和所述 UE的 ID,所述处理模 块还用于根据预先配置的授权列表中保存的服务器与 UE的对应关系, 对所 述第一数据包中的所述服务器的 ID和所述 UE的 ID进行匹配检査, 在检査 所述服务器与所述 UE的对应关系正确后, 所述收发模块将所述第一数据包 通过所述 MME发送给所述 UE;  If the first data packet includes the ID of the server and the ID of the UE, the processing module is further configured to: use the first data according to a correspondence between the server and the UE saved in the pre-configured authorization list. Performing a matching check on the ID of the server in the packet and the ID of the UE. After checking that the correspondence between the server and the UE is correct, the transceiver module passes the first data packet through the MME. Sent to the UE;
或者,  Or,
若所述第一数据包中包括所述服务器的 ID、 所述 UE的 ID和所述 APP 的 ID, 所述处理模块还用于根据预先配置的授权列表中保存的服务器、 UE 以及 APP的对应关系, 对所述第一数据包中的所述服务器的 ID、所述 UE的 ID和所述 APP的 ID进行匹配检査,在检査所述服务器、所述 UE和所述 APP 的对应关系正确后, 所述收发模块将所述第一数据包通过所述 MME发送给 所述 UE;  If the first data packet includes the ID of the server, the ID of the UE, and the ID of the APP, the processing module is further configured to: correspond to the server, the UE, and the APP saved according to the pre-configured authorization list. a relationship, performing a matching check on an ID of the server in the first data packet, an ID of the UE, and an ID of the APP, and checking a correspondence between the server, the UE, and the APP After being correctly, the transceiver module sends the first data packet to the UE by using the MME;
或者,  Or,
若所述第一数据包中包括所述服务器的 ID和所述 UE的 ID,则所述收发 模块将所述服务器的 ID和所述 UE的 ID发送给所述 HSS , 以供所述 HSS根 据预先配置的授权列表中保存的服务器与 UE的对应关系, 对所述第一数据 包中的所述服务器的 ID和所述 UE的 ID进行匹配检査, 在检査所述服务器 与所述 UE的对应关系正确后, 向所述 IWF返回确认结果, 以使所述 IWF将 所述第一数据包通过所述 MME发送给所述 UE;  And if the first data packet includes an ID of the server and an ID of the UE, the transceiver module sends the ID of the server and the ID of the UE to the HSS, where the HSS is configured according to the HSS. Corresponding relationship between the server and the UE saved in the pre-configured authorization list, performing matching check on the ID of the server in the first data packet and the ID of the UE, and checking the server and the UE After the corresponding relationship is correct, the confirmation result is returned to the IWF, so that the IWF sends the first data packet to the UE by using the MME;
或者,  Or,
若所述第一数据包中包括所述服务器的 ID、 所述 UE的 ID和所述 APP 的 ID, 则所述收发模块将所述服务器的 ID、所述 UE的 ID和所述 APP的 ID 发送给所述 HSS , 以供所述 HSS根据预先配置的授权列表中保存的服务器、 UE以及 APP的对应关系,对所述第一数据包中的所述服务器的 ID、所述 UE 的 ID和所 APP的 ID进行匹配检査, 在检査所述服务器、 所述 UE和所述 APP的对应关系正确后, 向所述 IWF返回确认结果, 以使 IWF将所述第一 数据包通过所述 MME发送给所述 UE。  And if the first data packet includes an ID of the server, an ID of the UE, and an ID of the APP, the transceiver module sets an ID of the server, an ID of the UE, and an ID of the APP. Sending to the HSS, for the HSS, according to the correspondence between the server, the UE, and the APP saved in the pre-configured authorization list, the ID of the server in the first data packet, the ID of the UE, and Performing a matching check on the ID of the APP, and after checking that the correspondence between the server, the UE, and the APP is correct, returning an acknowledgement result to the IWF, so that the IWF passes the first data packet through the The MME sends to the UE.
本发明实施例第十三方面提供一种移动性管理实体 MME, 包括: 收发模块, 用于接收互通设备 IWF发送的第一数据包, 所述第一数据包 包括: 用户设备 UE的 ID、 服务器的 ID和签名; A thirteenth aspect of the embodiments of the present invention provides a mobility management entity MME, including: a transceiver module, configured to receive a first data packet sent by the interworking device IWF, where the first data packet The method includes: an ID of the user equipment UE, an ID of the server, and a signature;
处理模块, 用于根据所述服务器的公钥, 对所述签名进行验证; 其中, 所述服务器的公钥存储在所述 MME上;  a processing module, configured to verify the signature according to the public key of the server, where the public key of the server is stored on the MME;
所述收发模块在所述处理模块验证签名有效后, 将所述第一数据包发送 给所述 UE。  After receiving the verification signature, the transceiver module sends the first data packet to the UE.
本发明实施例第十四方面提供一种归属用户服务器 HSS , 包括: 收发模块, 用于接收移动管理实体 MME发送的用户设备 UE的标识和 / 或所述 MME为所述 UE选择的互通设备 IWF的 ID; 所述标识包括国际移动 用户标识 IMSI或临时移动用户标识 TMSI;  A fourteenth aspect of the embodiments of the present invention provides a home subscriber server HSS, including: a transceiver module, configured to receive an identifier of a user equipment UE sent by a mobility management entity MME, and/or an interworking device IWF selected by the MME for the UE ID; the identifier includes an International Mobile Subscriber Identity (IMSI) or a Temporary Mobile Subscriber Identity (TMSI);
处理模块, 用于根据所述标识获取所述 UE 的签约数据, 判断所述 UE 具有小数据业务的特性时, 则根据预先获取的密钥生成参数生成 SDT密钥; 所述收发模块还用于将所述密钥生成参数和所述 SDT 密钥发送给所述 IWF的 ID对应的 IWF,并通过所述 MME向所述 UE发送所述密钥生成参数, 以供所述 UE根据所述密钥生成参数生成 SDT安全上下文, 其中, 所述 SDT 安全上下文包括所述 SDT密钥和 SDT安全保护算法。  a processing module, configured to acquire the subscription data of the UE according to the identifier, and determine that the UE has the characteristics of the small data service, and generate an SDT key according to the previously generated key generation parameter; the transceiver module is further used to: Sending the key generation parameter and the SDT key to the IWF corresponding to the ID of the IWF, and sending the key generation parameter to the UE by using the MME, for the UE to use the secret The key generation parameter generates an SDT security context, where the SDT security context includes the SDT key and an SDT security protection algorithm.
结合第十四方面, 在第十四方面的第一种可能的实施方式中, 所述收发 模块还用于接收所述 IWF发送的第一数据包;  In conjunction with the fourteenth aspect, in a first possible implementation of the fourteenth aspect, the transceiver module is further configured to receive a first data packet that is sent by the IWF;
若所述第一数据包中包括所述服务器的 ID和所述 UE的 ID,则所述处理 模块根据预先配置的授权列表中保存的服务器与 UE的对应关系, 对所述第 一数据包中的所述服务器的 ID和所述 UE的 ID进行匹配检査, 在检査所述 服务器与所述 UE的对应关系正确后, 向所述 IWF返回确认结果, 以使所述 IWF将所述第一数据包通过所述 MME发送给所述 UE;  And if the first data packet includes the ID of the server and the ID of the UE, the processing module is configured to be in the first data packet according to a correspondence between the server and the UE saved in the pre-configured authorization list. Performing a matching check on the ID of the server and the ID of the UE, and after checking that the correspondence between the server and the UE is correct, returning a confirmation result to the IWF, so that the IWF will be the first a data packet is sent to the UE by the MME;
或者,  Or,
若所述第一数据包中包括所述服务器的 ID、 所述 UE的 ID和所述 APP 的 ID, 则所述处理模块根据预先配置的授权列表中保存的服务器、 UE以及 APP的对应关系, 对所述第一数据包中的所述服务器的 ID、 所述 UE的 ID 和所 APP的 ID进行匹配检査, 在检査所述服务器、 所述 UE和所述 APP的 对应关系正确后, 所述收发模块向所述 IWF返回确认结果, 以使所述 IWF 将所述第一数据包通过所述 MME发送给所述 UE。  If the first data packet includes the ID of the server, the ID of the UE, and the ID of the APP, the processing module according to the correspondence between the server, the UE, and the APP saved in the pre-configured authorization list. Performing a matching check on the ID of the server, the ID of the UE, and the ID of the APP in the first data packet, after checking that the correspondence between the server, the UE, and the APP is correct, The transceiver module returns an acknowledgement result to the IWF, so that the IWF sends the first data packet to the UE by using the MME.
结合第十四方面的第一种可能的实施方式, 在第十四方面的第二种可能 的实施方式中, 还包括: In combination with the first possible implementation of the fourteenth aspect, the second possibility in the fourteenth aspect In the implementation manner, the method further includes:
在所述收发模块将所述 SDT密钥发送给所述 IWF的 ID对应的 IWF之后, 所述收发模块还用于将所述 IWF的 ID通过所述 MME发送给所述 UE, 以使 所述 UE根据所述 IWF的 ID生成 SDT密钥并通过 MME将 SDT安全保护算 法发送给所述 IWF, 其中, 所述 UE与所述 IWF的对应关系存储在所述 HSS 中。  After the transceiver module sends the SDT key to the IWF corresponding to the ID of the IWF, the transceiver module is further configured to send the ID of the IWF to the UE by using the MME, so that the The UE generates an SDT key according to the ID of the IWF and sends an SDT security protection algorithm to the IWF through the MME, where the correspondence between the UE and the IWF is stored in the HSS.
结合第十四方面和第十四方面的第一种可能的实施方式中的任一种, 在 第十四方面的第三种可能的实施方式中, 所述收发模块发送给所述 UE的参 数包括所述 IWF的 ID、 应用 APP的 ID、 随机数 RAND、 临时数据中的至少 一项, 其中, 所述临时数据是在所述处理模块判断所述 UE具有小数据业务 的特性之后, 生成的用于生成 SDT密钥的参数;  With reference to the fourteenth aspect, the first possible implementation manner of the fourteenth aspect, in a third possible implementation manner of the fourteenth aspect, the parameter sent by the transceiver module to the UE And including at least one of an ID of the IWF, an ID of an application APP, a random number RAND, and temporary data, where the temporary data is generated after the processing module determines that the UE has a characteristic of a small data service. The parameters used to generate the SDT key;
所述密钥生成参数包括所述 SDT密钥的生成参数。  The key generation parameter includes a generation parameter of the SDT key.
本发明实施例第十五方面提供一种用户设备 UE, 包括:  A fifteenth aspect of the embodiments of the present invention provides a user equipment UE, including:
处理模块, 用于根据所述 UE的私钥和服务器的公钥对第二数据包进行 加密和 /或签名处理,或者根据 SDT安全上下文对所述第二数据包进行加密和 /或完整性保护处理; 其中, 所述 UE的私钥和与所述 UE签约的所述服务器 的公钥或者与归属用户服务器 HSS协商生成 SDT安全上下文存储在所述 UE 上;  a processing module, configured to perform encryption and/or signature processing on the second data packet according to the private key of the UE and a public key of the server, or perform encryption and/or integrity protection on the second data packet according to an SDT security context Processing, wherein the private key of the UE and the public key of the server that is contracted with the UE or negotiate with the home subscriber server HSS to generate an SDT security context are stored on the UE;
收发模块, 用于将处理后的第二数据包通过移动性管理实体 MME和互 通设备 IWF发送给所述服务器。  And a transceiver module, configured to send the processed second data packet to the server by using a mobility management entity MME and an interworking device IWF.
结合第十五方面, 在第十五方面的第一种可能的实施方式中, 所述收发 模块还用于接收所述 HSS发送的密钥生成参数; 所述处理模块还用于根据所 述密钥生成参数, 生成 SDT密钥; 所述处理模块还用于在非接入安全模式命 令 NAS SMC过程中协商 SDT安全保护算法, 或者, 在非接入安全模式命令 NAS SMC过程中协商的非接入层安全算法作为 SDT安全保护算法。  With the fifteenth aspect, in a first possible implementation manner of the fifteenth aspect, the transceiver module is further configured to receive a key generation parameter that is sent by the HSS, and the processing module is further configured to use the The key generation parameter generates an SDT key; the processing module is further configured to negotiate the SDT security protection algorithm in the non-access security mode command NAS SMC process, or negotiate the non-connection in the non-access security mode command NAS SMC process. The intrusion security algorithm acts as an SDT security protection algorithm.
结合第十五方面或第十五方面的第一种可能的实施方式, 在第十五方面 的第二种可能的实施方式中, 所述处理模块具体用于根据所述 UE的私钥签 名所述第二数据包, 并根据所述服务器的公钥对所述第二数据包进行加密处 理;  With reference to the fifteenth aspect, or the first possible implementation manner of the fifteenth aspect, in a second possible implementation manner of the fifteenth aspect, the processing module is specifically configured to: according to the private key signature of the UE Decoding a second data packet, and performing encryption processing on the second data packet according to the public key of the server;
所述收发模块还用于将处理后的第二数据包通过所述 MME和所述 IWF 发送给所述服务器, 以供所述服务器根据所述第二数据包中的 UE的 ID获取 所述 UE的公钥,并根据所述 UE的公钥验证所述处理后的第二数据包中的签 名是否有效, 若验证有效, 则根据所述服务器的私钥对所述处理后的第二数 据包进行解密处理。 The transceiver module is further configured to pass the processed second data packet to the MME and the IWF. Sending to the server, for the server to acquire the public key of the UE according to the ID of the UE in the second data packet, and verifying the processed second data packet according to the public key of the UE Whether the signature is valid, if the verification is valid, decrypting the processed second data packet according to the private key of the server.
结合第十五方面的第一种可能的实施方式, 在第十五方面的第三种可能 的实施方式中, 所述处理模块还用于根据所述 SDT安全上下文对所述第二数 据包进行加密或加密和完整性保护处理;  In conjunction with the first possible implementation manner of the fifteenth aspect, in a third possible implementation manner of the fifteenth aspect, the processing module is further configured to perform the second data packet according to the SDT security context. Encryption or encryption and integrity protection processing;
所述收发模块还用于将携带 MAC-I的所述处理后的第二数据包发送给服 务器, 以供所述 IWF或者服务器根据所述处理后的第二数据包中的所述 UE 的 ID获取所述 SDT安全上下文, 并根据所述 SDT安全上下文, 验证所述安 全保护后的第二数据包中的所述 MAC-I, 若验证有效, 则对所述处理后的第 二数据包进行解密。  The transceiver module is further configured to send the processed second data packet carrying the MAC-I to the server, where the IWF or the server is configured according to the UE ID in the processed second data packet. Acquiring the SDT security context, and verifying the MAC-I in the security-protected second data packet according to the SDT security context, and if the verification is valid, performing the processed second data packet Decrypt.
结合第十五方面的第三种可能的实施方式中的任一种, 在第十五方面的 第四种可能的实施方式中, 所述收发模块还用于接收所述 HSS发送的参数, 所述 HSS发送的参数包括所述 IWF的 ID、 所述 APP的 ID、 随机数 RAND、 临时数据中的至少一项。  In conjunction with the third possible implementation manner of the fifteenth aspect, in a fourth possible implementation manner of the fifteenth aspect, the transceiver module is further configured to receive a parameter sent by the HSS, where The parameters transmitted by the HSS include at least one of an ID of the IWF, an ID of the APP, a random number RAND, and temporary data.
本发明实施例第十六方面提供一种服务器, 包括:  A sixteenth aspect of the embodiments of the present invention provides a server, including:
收发模块, 用于接收互通设备 IWF发送的处理后的第二数据包; 处理模块, 用于根据用户设备 UE的公钥和所述服务器的私钥对所述第 二数据包进行签名验证和解密,或者根据所述 UE的 ID和 /或 IWF的 ID査找 SDT安全上下文, 对所述处理后的第二数据包进行完整性验证和解密;  a transceiver module, configured to receive a processed second data packet sent by the interworking device IWF; and a processing module, configured to perform signature verification and decryption on the second data packet according to the public key of the user equipment UE and the private key of the server Or searching for the SDT security context according to the ID of the UE and/or the ID of the IWF, performing integrity verification and decryption on the processed second data packet;
其中, 所述服务器的私钥和与所述服务器签约的所述 UE的公钥存储在 所述服务器上, 所述 SDT安全上下文为互通设备 IWF发送的。  The private key of the server and the public key of the UE that is contracted with the server are stored on the server, and the SDT security context is sent by the interworking device IWF.
本发明实施例第十七方面提供一种互通设备 IWF, 包括:  A seventeenth aspect of the embodiments of the present invention provides an interworking device IWF, including:
收发模块, 用于接收用户设备 UE通过移动性管理实体 MME发送的处 理后的第二数据包, 所述处理后的第二数据包包括所述 UE的 ID和签名, 或 者所述 UE的 ID和 MAC-I;  a transceiver module, configured to receive a processed second data packet sent by the user equipment UE by using the mobility management entity MME, where the processed second data packet includes an ID and a signature of the UE, or an ID of the UE MAC-I;
处理模块, 用于根据所述 UE的公钥或 SDT安全上下文, 对所述签名或 者 MAC-I进行验证; 其中, 所述 UE的公钥存储在所述 IWF上, 所述 SDT 安全上下文为预先从归属用户服务器 HSS获取的; 所述收发模块还用于在验证通过后, 将所述处理后的第二数据包发送给 所述服务器。 a processing module, configured to perform verification on the signature or the MAC-I according to the public key or the SDT security context of the UE, where the public key of the UE is stored on the IWF, and the SDT security context is an advance Obtained from the home subscriber server HSS; The transceiver module is further configured to send the processed second data packet to the server after the verification is passed.
结合第十七方面, 在第十七方面的第一种可能的实施方式中, 所述收发 模块还用于:  In conjunction with the seventeenth aspect, in a first possible implementation manner of the seventeenth aspect, the transceiver module is further configured to:
接收所述 HSS发送的 SDT密钥;  Receiving an SDT key sent by the HSS;
接收所述 UE通过所述 MME发送的 SDT安全保护算法;  Receiving an SDT security protection algorithm sent by the UE by using the MME;
其中, 所述 SDT安全上下文包括所述 SDT密钥和所述 SDT安全保护算 法。  The SDT security context includes the SDT key and the SDT security protection algorithm.
结合第十七方面的第一种可能的实施方式, 在第十七方面的第二种可能 的实施方式中, 包括:  In conjunction with the first possible implementation of the seventeenth aspect, in a second possible implementation of the seventeenth aspect, the method includes:
所述处理模块还用于根据所述 UE的公钥, 验证所述处理后的第二数据 包的所述签名是否有效;  The processing module is further configured to verify, according to the public key of the UE, whether the signature of the processed second data packet is valid;
所述收发模块还用于在所述处理模块验证所述处理后的第二数据包的所 述签名有效时, 将所述第二数据包发送给服务器;  The transceiver module is further configured to: when the processing module verifies that the signature of the processed second data packet is valid, send the second data packet to a server;
或者,  Or,
所述处理模块用于根据所述 SDT安全上下文对所述处理后的第二数据包 的所述 MAC-I进行验证;  The processing module is configured to verify the MAC-I of the processed second data packet according to the SDT security context;
所述收发模块还用于若所述处理模块验证所述处理后的第二数据包的所 述 MAC-I有效,则将所述处理后的第二数据包进行解密处理后发送给服务器。  The transceiver module is further configured to: if the processing module verifies that the MAC-I of the processed second data packet is valid, decrypt the processed second data packet and send the processed data packet to the server.
结合第十七方面的第二种可能的实施方式, 在第十二方面的第三种可能 的实施方式中, 若所述第一数据包中包括所述服务器的 ID和所述 UE的 ID, 所述处理模块根据预先配置的授权列表中保存的服务器与 UE的对应关系, 对所述第一数据包中的所述服务器的 ID和所述 UE的 ID进行匹配检査, 在 检査所述服务器与所述 UE 的对应关系正确后, 所述收发模块将所述第二数 据包发送给所述服务器;  With reference to the second possible implementation manner of the seventeenth aspect, in a third possible implementation manner of the twelfth aspect, if the first data packet includes an ID of the server and an ID of the UE, The processing module performs a matching check on the ID of the server in the first data packet and the ID of the UE according to the correspondence between the server and the UE saved in the pre-configured authorization list, and checks the After the correspondence between the server and the UE is correct, the transceiver module sends the second data packet to the server;
或者,  Or,
若所述第一数据包中包括所述服务器的 ID、 所述 UE的 ID和所述 APP 的 ID,所述处理模块根据预先配置的授权列表中保存的服务器、 UE以及 APP 的对应关系,对所述第一数据包中的所述服务器的 ID、所述 UE的 ID和所述 APP的 ID进行匹配检査, 在检査所述服务器、 所述 UE和所述 APP的对应 关系正确后, 所述收发模块将所述第二数据包发送给所述服务器; 或者, If the first data packet includes the ID of the server, the ID of the UE, and the ID of the APP, the processing module is configured according to the correspondence between the server, the UE, and the APP saved in the pre-configured authorization list. Performing a matching check on the ID of the server, the ID of the UE, and the ID of the APP in the first data packet, and checking the correspondence between the server, the UE, and the APP After the relationship is correct, the transceiver module sends the second data packet to the server; or
若所述第二数据包中包括所述服务器的 ID和所述 UE的 ID,则所述收发 模块将所述服务器的 ID和所述 UE的 ID发送给 HSS, 以供所述 HSS根据预 先配置的授权列表中保存的服务器与 UE的对应关系, 对所述第二数据包中 的所述服务器的 ID和所述 UE的 ID进行匹配检査, 在检査所述服务器与所 述 UE的对应关系正确后, 将所述第二数据包发送给所述服务器;  If the second data packet includes the ID of the server and the ID of the UE, the transceiver module sends the ID of the server and the ID of the UE to the HSS, so that the HSS is configured according to the pre-configuration. Corresponding relationship between the server and the UE saved in the authorization list, performing matching check on the ID of the server in the second data packet and the ID of the UE, and checking the correspondence between the server and the UE After the relationship is correct, the second data packet is sent to the server;
或者,  Or,
若所述第二数据包中包括所述服务器的 ID、所述 UE的 ID以及应用 APP 的 ID, 则所述收发模块将所述服务器的 ID、 所述 UE的 ID以及所述 APP的 ID发送给 HSS , 以供所述 HSS根据预先配置的授权列表中保存的服务器、 UE以及 APP的对应关系,对所述第二数据包中的所述服务器的 ID、所述 UE 的 ID和所 APP的 ID进行匹配检査, 在检査所述服务器、 所述 UE以及所述 APP的对应关系正确后, 将所述第二数据包发送给所述服务器。  If the second data packet includes the ID of the server, the ID of the UE, and the ID of the application APP, the transceiver module sends the ID of the server, the ID of the UE, and the ID of the APP. Giving the HSS, for the HSS, according to the correspondence between the server, the UE, and the APP saved in the pre-configured authorization list, the ID of the server in the second data packet, the ID of the UE, and the APP The ID performs a matching check, and after checking that the correspondence between the server, the UE, and the APP is correct, the second data packet is sent to the server.
本发明实施例第八方面提供一种移动性管理实体 MME, 包括: 收发模块, 用于接收用户设备 UE发送的处理后的第二数据包, 所述第 二数据包包括: 所述 UE的 ID、 服务器的 ID和签名;  An eighth aspect of the embodiments of the present invention provides a mobility management entity MME, including: a transceiver module, configured to receive a processed second data packet sent by a user equipment UE, where the second data packet includes: an ID of the UE , server ID and signature;
处理模块, 用于根据所述 UE的公钥, 对所述签名进行验证; 其中, 所 述 UE的公钥存储在所述 MME上;  a processing module, configured to verify the signature according to the public key of the UE, where the public key of the UE is stored on the MME;
所述收发模块还用于在验证所述签名有效后, 将所述第二数据包发送给 互通设备 IWF。  The transceiver module is further configured to send the second data packet to the interworking device IWF after verifying that the signature is valid.
结合第十八方面, 在第十八方面的第一种可能的实施方式中, 若所述第 二数据包中包括所述服务器的 ID和所述 UE的 ID,则所述处理模块还用于根 据预先配置的授权列表、所述第二数据包中的所述服务器的 ID和所述 UE的 ID, 根据所述授权列表中保存的服务器和 UE的对应关系, 对所述第二数据 包中的所述服务器的 ID和所述 UE的 ID进行匹配检査, 在检査所述服务器 和所述 UE的对应关系正确后, 所述收发模块将所述第二数据包发送给所述 服务器;  In conjunction with the eighteenth aspect, in a first possible implementation manner of the eighteenth aspect, if the second data packet includes an ID of the server and an ID of the UE, the processing module is further configured to: And according to the pre-configured authorization list, the ID of the server in the second data packet, and the ID of the UE, according to the correspondence between the server and the UE saved in the authorization list, in the second data packet Performing a matching check on the ID of the server and the ID of the UE. After checking that the correspondence between the server and the UE is correct, the transceiver module sends the second data packet to the server.
或者,  Or,
若所述第二数据包中包括所述服务器的 ID、 所述 UE的 ID和应用 APP 的 ID, 则所述处理模块还用于根据预先配置的授权列表、 所述第二数据包中 的所述服务器的 ID、 所述 UE的 ID以及所述 APP的 ID, 根据所述授权列表 中保存的服务器、 UE以及 APP的对应关系, 对所述第二数据包中的所述服 务器的 ID、所述 UE的 ID和所述 APP的 ID进行匹配检査, 在检査所述服务 器、 所述 UE以及所述 APP的对应关系正确后, 所述收发模块将所述第二数 据包发送给所述服务器。 If the second data packet includes an ID of the server, an ID of the UE, and an application APP And the processing module is further configured to use, according to the pre-configured authorization list, the ID of the server in the second data packet, the ID of the UE, and the ID of the APP, according to the authorization list. Corresponding relationship between the saved server, the UE, and the APP, performing matching check on the ID of the server in the second data packet, the ID of the UE, and the ID of the APP, and checking the server and the After the correspondence between the UE and the APP is correct, the transceiver module sends the second data packet to the server.
本实施例提供的数据的安全传输方法和设备, 通过 UE和与签约的服务 器的公钥或者私钥, 或者 UE与 HSS协商的 SDT安全上下文, 对服务器向 UE发送的下行或者 UE向服务器上行发送的数据包进行加密解密或者安全性 保护, 完成小数据的传输, 解决了在 UE和服务器之间的小数据通过 MME 和 MTC-IWF之间的 T5接口传输的场景下, 没有相应的安全机制来保护 UE 与签约服务器之间的数据传输的问题, 提高系统数据传输的安全性。 附图说明  The method and device for securely transmitting data provided by this embodiment, by using the public key or the private key of the UE and the contracted server, or the SDT security context negotiated by the UE and the HSS, sending the downlink sent by the server to the UE or the uplink of the UE to the server The data packet is encrypted, decrypted or secured, and the small data is transmitted. The solution is that the small data between the UE and the server is transmitted through the T5 interface between the MME and the MTC-IWF. There is no corresponding security mechanism. Protect the problem of data transmission between the UE and the subscription server, and improve the security of system data transmission. DRAWINGS
为了更清楚地说明本发明实施例或现有技术中的技术方案, 下面将对实 施例或现有技术描述中所需要使用的附图作一简单地介绍, 显而易见地, 下 面描述中的附图是本发明的一些实施例, 对于本领域普通技术人员来讲, 在 不付出创造性劳动性的前提下, 还可以根据这些附图获得其他的附图。  In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, a brief description of the drawings used in the embodiments or the prior art description will be briefly described below. Obviously, the drawings in the following description It is a certain embodiment of the present invention, and other drawings can be obtained from those skilled in the art without any inventive labor.
图 1为本发明数据的安全传输方法实施例一的流程图;  1 is a flowchart of Embodiment 1 of a method for secure transmission of data according to the present invention;
图 2为本发明数据的安全传输方法实施例五的流程图;  2 is a flowchart of Embodiment 5 of a method for secure transmission of data according to the present invention;
图 3为本发明数据的安全传输方法实施例六的流程图;  3 is a flowchart of Embodiment 6 of a method for secure transmission of data according to the present invention;
图 4为本发明数据的安全传输方法实施例九的流程图;  4 is a flowchart of Embodiment 9 of a secure transmission method of data according to the present invention;
图 5为本发明数据的安全传输方法实施例十的流程图;  FIG. 5 is a flowchart of Embodiment 10 of a method for secure transmission of data according to the present invention; FIG.
图 6为本发明数据的安全传输方法实施例十二的流程图;  6 is a flowchart of Embodiment 12 of a method for secure transmission of data according to the present invention;
图 7为本发明数据的安全传输方法实施例十四的流程图;  7 is a flowchart of Embodiment 14 of a method for secure transmission of data according to the present invention;
图 8为本发明数据的安全传输方法实施例十五的流程图;  8 is a flowchart of Embodiment 15 of a method for secure transmission of data according to the present invention;
图 9为本发明数据的安全传输方法实施例十七的流程图;  9 is a flowchart of Embodiment 17 of the method for secure transmission of data according to the present invention;
图 10为基于 PKI系统使用公钥私钥保护服务器到 UE的下行数据包传输 交互图;  10 is a downlink data packet transmission interaction diagram of a PKI system using a public key private key to protect a server to a UE;
图 11为基于 PKI系统使用公钥私钥保护 UE到服务器的上行数据包传输 交互图; FIG. 11 is a PKI system for protecting an uplink packet transmission from a UE to a server by using a public key private key. Interaction diagram
图 12为 UE和 IWF协商 SDT安全上下文的交互图;  12 is an interaction diagram of a UE and an IWF negotiating an SDT security context;
图 13为基于 SDT安全上下文保护服务器到 UE的下行数据包传输交互 图;  13 is a downlink data packet transmission interaction diagram of a server to a UE based on an SDT security context protection;
图 14为基于 SDT安全上下文保护 UE到服务器的上行数据包传输交互 图;  14 is an uplink data packet transmission interaction diagram for protecting a UE to a server based on an SDT security context;
图 15为本发明 UE的一实施例的结构示意图;  15 is a schematic structural diagram of an embodiment of a UE according to the present invention;
图 16为本发明服务器的一实施例的结构示意图;  16 is a schematic structural diagram of an embodiment of a server according to the present invention;
图 17为本发明 IWF的一实施例的结构示意图;  17 is a schematic structural diagram of an embodiment of an IWF according to the present invention;
图 18为本发明 MME的一实施例的结构示意图;  18 is a schematic structural diagram of an embodiment of an MME according to the present invention;
图 19为本发明 HSS的一实施例的结构示意图;  19 is a schematic structural view of an embodiment of an HSS according to the present invention;
图 20为本发明 UE的又一实施例的结构示意图;  20 is a schematic structural diagram of still another embodiment of a UE according to the present invention;
图 21为本发明服务器的又一实施例的结构示意图;  21 is a schematic structural diagram of still another embodiment of a server according to the present invention;
图 22为本发明 IWF的又一实施例的结构示意图;  22 is a schematic structural diagram of still another embodiment of an IWF according to the present invention;
图 23为本发明 MME的又一实施例的结构示意图;  23 is a schematic structural diagram of still another embodiment of an MME according to the present invention;
图 24为本发明 UE的另一实施例的结构示意图;  24 is a schematic structural diagram of another embodiment of a UE according to the present invention;
图 25为本发明服务器的另一实施例的结构示意图;  25 is a schematic structural diagram of another embodiment of a server according to the present invention;
图 26为本发明 IWF的另一实施例的结构示意图;  26 is a schematic structural diagram of another embodiment of an IWF according to the present invention;
图 27为本发明 MME的另一实施例的结构示意图;  27 is a schematic structural diagram of another embodiment of an MME according to the present invention;
图 28为本发明 HSS的另一实施例的结构示意图;  28 is a schematic structural view of another embodiment of an HSS according to the present invention;
图 29为本发明 UE的再一实施例的结构示意图;  29 is a schematic structural diagram of still another embodiment of a UE according to the present invention;
图 30为本发明服务器的再一实施例的结构示意图;  FIG. 30 is a schematic structural diagram of still another embodiment of a server according to the present invention; FIG.
图 31为本发明 IWF的再一实施例的结构示意图;  FIG. 31 is a schematic structural diagram of still another embodiment of an IWF according to the present invention; FIG.
图 32为本发明 MME的再一实施例的结构示意图。 具体实施方式 为使本发明实施例的目的、 技术方案和优点更加清楚, 下面将结合本发 明实施例中的附图, 对本发明实施例中的技术方案进行清楚、 完整地描述, 显然, 所描述的实施例是本发明一部分实施例, 而不是全部的实施例。 基于 本发明中的实施例, 本领域普通技术人员在没有做出创造性劳动前提下所获 得的所有其他实施例, 都属于本发明保护的范围。 FIG. 32 is a schematic structural diagram of still another embodiment of an MME according to the present invention. The technical solutions in the embodiments of the present invention are clearly and completely described in the following with reference to the accompanying drawings in the embodiments of the present invention. The embodiments are a part of the embodiments of the invention, and not all of the embodiments. Based on the embodiments of the present invention, those of ordinary skill in the art obtain the following without creative efforts. All other embodiments obtained are within the scope of the invention.
图 1为本发明数据的安全传输方法实施例一的流程图, 本发明实施例可 应用于机器类通信的用户设备与服务器之间的数据传输过程中, 来保护信令 以及数据包的安全。 本实施例的执行主体为用户设备, 应用于服务器向 UE 的下行数据包发送过程, 如图 1所示, 具体歩骤为:  1 is a flowchart of Embodiment 1 of a secure transmission method of data according to the present invention. The embodiment of the present invention can be applied to data transmission between a user equipment and a server for machine type communication to protect signaling and data packet security. The execution entity of this embodiment is a user equipment, and is applied to a downlink data packet sending process of the server to the UE. As shown in FIG. 1 , the specific steps are as follows:
S101 : 用户设备 (User equipment, 简称 UE) 接收服务器通过互通设备 (Inter Working Function,简称 IWF)和移动性管理实体(Mobility Management Entity, 简称 MME) 发送的第一数据包, 所述第一数据包携带所述服务器的 ID或所述 IWF的 ID。  S101: The user equipment (User equipment, UE for short) receives the first data packet sent by the server through an Interworking Function (IWF) and a Mobility Management Entity (MME), where the first data packet is sent. Carrying the ID of the server or the ID of the IWF.
在本实施例中, 该 UE可以是普通手机、 智能手机、 平板电脑, 也可以 是自动仪表例如水电气表、 工业远程监控设备, 支付设备等可以直接进行通 信的设备, 即机器类通信设备。 互通设备是为了更好的管控机器类通信设备 和相关业务引入的一个网络实体, 将来自服务器的信令和数据通过该 IWF传 递给 MME再进一歩发送给机器类通信设备, 或者通过该 IWF将来自与机器 类通信设备的信令和数据发送给服务器。 该 IWF后续还可以开放更多的接口 与内部或外部服务器, 或者其他设备进行连接, 本发明不作限制。  In this embodiment, the UE may be a normal mobile phone, a smart phone, a tablet computer, or an automatic instrument such as a water and electricity meter, an industrial remote monitoring device, a payment device, or the like, which can directly communicate, that is, a machine type communication device. The interworking device is a network entity introduced to better control the machine type communication device and related services, and the signaling and data from the server are transmitted to the MME through the IWF and then sent to the machine type communication device, or through the IWF. Signaling and data from the communication device with the machine type are sent to the server. The IWF can also open more interfaces to connect with internal or external servers or other devices, and the present invention is not limited.
服务器向该 UE传输下行数据包第一数据包, 需要经过 IWF和 MME设 备的遂传, 并且在 IWF和 MME设备上进行相应的处理, 最终 UE接收到进 行了安全保护的第一数据包。  The server transmits the first data packet of the downlink data packet to the UE, and needs to pass the transmission of the IWF and the MME device, and performs corresponding processing on the IWF and the MME device, and finally the UE receives the first data packet that has been secured.
S102: 所述 UE根据所述第一数据包中的所述服务器的 ID或所述 IWF 的 ID, 获得所述服务器的公钥和 /或所述 SDT安全上下文, 其中, 所述 UE 签约的服务器的公钥或者与归属用户服务器 (Home Subscriber Server, 简称 HSS ) 协商生成小数据传输 (Small Data Transmission, 简称 SDT) 安全上下 文存储在所述 UE上, 且通过所述服务器的身份识别码 (Identity, 简称 ID) 或所述 IWF的 ID来标识。  S102: The UE obtains a public key of the server and/or the SDT security context according to an ID of the server in the first data packet or an ID of the IWF, where the UE subscribes to the server The public key is negotiated with a Home Subscriber Server (HSS) to generate a Small Data Transmission (SDT) security context stored on the UE, and the identity code (Identity, The ID is referred to as ID) or the ID of the IWF.
在本实施例中,在进行数据包传输前,该 UE上需要预先配置该 UE的私 钥, 也配置了与该 UE有签约关系的服务器的公钥, 或者需要与 HSS协商生 成用于小数据安全保护的 SDT安全上下文。  In this embodiment, before the data packet is transmitted, the UE needs to pre-configure the private key of the UE, and also configures the public key of the server that has a contractual relationship with the UE, or needs to negotiate with the HSS to generate data for small data. Secured SDT security context.
S103:所述 UE根据所述服务器的公钥和所述 UE的私钥,或者所述 SDT 安全上下文, 或者所述服务器的公钥和所述 SDT安全上下文, 对所述第一数 据包进行验证和解密处理, 得到解密后的第一数据包。 S103: The UE compares the first number according to a public key of the server and a private key of the UE, or the SDT security context, or a public key of the server and the SDT security context. According to the packet verification and decryption processing, the decrypted first data packet is obtained.
在本实施例中,该第一数据包中携带了需要传输的小数据,服务器的 ID, 该 UE的 ID, 还可能包括要发送给的某应用程序 (Application, 简称 APP) 的 ID, 用户根据该服务器的 ID, 获取与该 UE有签约关系的服务器的公钥和 UE的私钥, 或者获取 UE与 HSS协商的 SDT安全上下文, 对该第一数据包 进行验证和解密处理。 具体的有如下几种验证解密方法:  In this embodiment, the first data packet carries the small data to be transmitted, the ID of the server, the ID of the UE, and may also include the ID of an application (Application, referred to as APP) to be sent, according to the user. The ID of the server obtains the public key of the server that has a contractual relationship with the UE and the private key of the UE, or obtains an SDT security context negotiated by the UE with the HSS, and performs verification and decryption processing on the first data packet. Specifically, there are several verification and decryption methods as follows:
UE根据与该 UE有签约关系的服务器的公钥验证该第一数据包的签名的 有效性, 在根据该 UE的私钥对该第一数据包进行解密。 或者,  The UE verifies the validity of the signature of the first data packet according to the public key of the server having a contractual relationship with the UE, and decrypts the first data packet according to the private key of the UE. Or,
UE根据与 HSS协商的 SDT安全上下文中的 SDT安全保护算法和 SDT 密钥验证该第一数据包的 MAC-I的有效性, 再对该第一数据包进行解密。 或 者,  The UE verifies the validity of the MAC-I of the first data packet according to the SDT security protection algorithm and the SDT key in the SDT security context negotiated with the HSS, and then decrypts the first data packet. Or,
UE根据与该 UE有签约关系的服务器的公钥验证该第一数据包的签名的 有效性, 若是加密的数据包可以根据协商的 SDT安全上下文中的 SDT安全 保护算法和 SDT密钥对该第一数据包进行解密。  The UE verifies the validity of the signature of the first data packet according to the public key of the server having the contract relationship with the UE, and if the encrypted data packet can be based on the SDT security protection algorithm and the SDT key in the negotiated SDT security context, the A packet is decrypted.
可选的, UE对该第一数据包解密后, 还可以将服务器发送的第一数据包 发送给需要获取小数据包的应用, 完成小数据包的下行传输。  Optionally, after decrypting the first data packet, the UE may send the first data packet sent by the server to the application that needs to obtain the small data packet, and complete downlink transmission of the small data packet.
本实施例提供的数据的安全传输方法通过 UE 的私钥与签约的服务器的 公钥, 或者 UE与 HSS协商的 SDT安全上下文, 对服务器向 UE发送的下行 第一数据包进行验证和解密, 并将解密后的第一数据包发送给相应的应用, 完成小数据的传输, 解决了在 UE 和服务器之间的小数据通过 MME 和 MTC-IWF之间的 T5接口传输的场景下, 没有相应的安全机制来保护 UE与 签约服务器之间的数据传输的问题, 提高系统数据传输的安全性。  The secure transmission method of the data provided in this embodiment verifies and decrypts the downlink first data packet sent by the server to the UE by using the private key of the UE and the public key of the subscribed server or the SDT security context negotiated by the UE and the HSS, and Sending the decrypted first data packet to the corresponding application, completing the transmission of the small data, and solving the scenario that the small data between the UE and the server is transmitted through the T5 interface between the MME and the MTC-IWF, there is no corresponding Security mechanism to protect the data transmission between the UE and the subscription server, and improve the security of system data transmission.
进一歩的, 在本发明方法实施例二中, 在上述图 1所示的实施例的基础 上, UE与 HSS协商生成 SDT安全上下文的具体实施方式为:  Further, in the second embodiment of the method of the present invention, on the basis of the foregoing embodiment shown in FIG. 1, the specific implementation manner in which the UE negotiates with the HSS to generate an SDT security context is:
该 UE接收所述 HSS发送的密钥生成参数,然后根据所述密钥生成参数, 生成 SDT密钥。 并且进一歩在非接入安全模式命令 NAS SMC过程中协商 SDT安全保护算法, 或者, 在非接入安全模式命令 NAS SMC过程中协商的 非接入层安全算法作为 SDT安全保护算法。  The UE receives a key generation parameter sent by the HSS, and then generates an SDT key according to the key generation parameter. And further, the SDT security protection algorithm is negotiated in the non-access security mode command NAS SMC process, or the non-access stratum security algorithm negotiated in the non-access security mode command NAS SMC process is used as the SDT security protection algorithm.
进一歩的, 在本发明方法实施例三中, 在上述图 1所示的实施例一和实 施例二的基础上, S103的具体实施方式有以下几种: 第一种实现方式, 所述 UE根据所述服务器的公钥验证所述第一数据包 中的签名是否有效; 所述 UE若验证所述第一数据包中的签名有效, 则根据 所述 UE的私钥对所述第一数据包进行解密处理, 得到解密后的所述第一数 据包。 Further, in the third embodiment of the method of the present invention, based on the first embodiment and the second embodiment shown in FIG. 1 , the specific implementation manners of S103 are as follows: The first implementation manner, the UE verifies whether the signature in the first data packet is valid according to the public key of the server; if the UE verifies that the signature in the first data packet is valid, according to the UE The private key decrypts the first data packet to obtain the decrypted first data packet.
若验证该签名无效, 则将所述第一数据包丢弃。  If it is verified that the signature is invalid, the first data packet is discarded.
第二种实现方式, 所述 UE根据所述 SDT安全上下文验证所述第一数据 包中的消息认证码 MAC-I;若验证成功,则对所述第一数据包进行解密处理, 得到解密后的所述第一数据包。  The second implementation manner, the UE verifies the message authentication code MAC-I in the first data packet according to the SDT security context; if the verification is successful, decrypting the first data packet to obtain the decrypted The first data packet.
若验证该 MAC-I无效, 则将所述第一数据包丢弃。  If it is verified that the MAC-I is invalid, the first data packet is discarded.
第三种实现方式,所述 UE根据所述服务器的公钥验证所述第一数据包中的 签名是否有效; 若验证所述第一数据包的签名有效, 则根据所述 SDT安全上 下文对所述第一数据包进行解密处理, 或者根据所述 SDT安全上下文对所述 第一数据包进行完整性验证和解密处理, 得到解密后的所述第一数据包。 若验证该签名无效, 则将所述第一数据包丢弃。  In a third implementation manner, the UE verifies whether the signature in the first data packet is valid according to the public key of the server, and if the signature of the first data packet is valid, according to the SDT security context Decoding the first data packet, or performing integrity verification and decryption processing on the first data packet according to the SDT security context, to obtain the decrypted first data packet. If it is verified that the signature is invalid, the first data packet is discarded.
本实施例提供的数据的安全传输方法, 通过 UE存储自身的私钥和与之 签约的服务器的公钥, 或者 UE与 HSS协商的 SDT安全上下文, 对接收到的 第一数据包验证签名的有效性, 并将签名有效的第一数据包进行解密, 或者 验证消息认证码 MAC-I, 并将 MAC-I正确的第一数据包进行解密, 并将解密 后的第一数据包发送给相应的 APP, 完成数据包的下行传输, 通过验证和解 密过程, 解决了没有相应的安全机制保护数据包在 UE和服务器之间的传输 的问题, 提高系统数据传输的安全性。  The secure transmission method of the data provided in this embodiment is effective for verifying the signature of the received first data packet by the UE storing its own private key and the public key of the server with which it is contracted, or the SDT security context negotiated by the UE and the HSS. Sex, decrypt the first data packet with valid signature, or verify the message authentication code MAC-I, and decrypt the correct first data packet of the MAC-I, and send the decrypted first data packet to the corresponding APP, completes the downlink transmission of the data packet, and solves the problem that the corresponding security mechanism protects the transmission of the data packet between the UE and the server through the verification and decryption process, thereby improving the security of the system data transmission.
进一歩的, 在本发明方法实施例四中, 在上述图 1所示的实施例一、 实 施例二和实施例三的基础上, UE跟 HSS协商 SDT安全上下文之前, 所述 UE从所述 HSS接收的参数包括所述 IWF的 ID、 所述 APP的 ID、 随机数 RAND,临时数据中的至少一项,作为生成 SDT安全上下文的密钥生成参数。  Further, in the fourth embodiment of the method of the present invention, on the basis of the first embodiment, the second embodiment, and the third embodiment shown in FIG. 1 , before the UE negotiates the SDT security context with the HSS, the UE The parameters received by the HSS include at least one of the ID of the IWF, the ID of the APP, the random number RAND, and the temporary data as a key generation parameter for generating an SDT security context.
所述密钥生成参数包括所述 SDT密钥的生成参数; 其中, 所述 SDT密 钥的生成参数包括接入安全管理实体密钥、 完整性保护密钥 IK、 加密密钥 CK、所述 IWF的 ID、所述 UE的 ID或国际移动用户标识(International Mobile Subscriber Identity, 简称 IMSI) 、 所述 APP的 ID、 所述 RAND、 所述临时 数据、 SDT密钥标签中的至少一项。 图 2为本发明数据的安全传输方法实施例五的流程图, 本实施例的执行 主体为服务器, 该服务器可以是业务能力服务器 (service capability server, 简称 SCS ) 或应用服务器 (application server, 简称 AS ) , 或者其他服务器。 应用于服务器向 UE的下行数据包发送过程, 如图 2所示, 具体的歩骤为: S201 :服务器根据所述服务器的私钥和与所述服务器签约的用户设备 UE 的公钥对等待发送的第一数据包进行签名和加密处理, 或者根据 SDT安全上 下文对所述第一数据包进行加密处理或加密和完整性保护处理, 其中, 所述 服务器的私钥和与所述服务器签约的所述 UE公钥存储在所述服务器上, 所 述 SDT安全上下文为互通设备 IWF发送的。 The key generation parameter includes a generation parameter of the SDT key, where the generation parameter of the SDT key includes an access security management entity key, an integrity protection key IK, an encryption key CK, and the IWF. At least one of an ID, an ID of the UE, or an International Mobile Subscriber Identity (IMSI), an ID of the APP, the RAND, the temporary data, and an SDT key label. 2 is a flowchart of Embodiment 5 of a method for securely transmitting data according to the present invention. The execution subject of the embodiment is a server, and the server may be a service capability server (SCS) or an application server (AS). ), or other server. The process of sending the downlink data packet to the UE to the UE is as shown in FIG. 2, and the specific steps are as follows: S201: The server waits to send according to the private key of the server and the public key pair of the user equipment UE that is contracted with the server. The first data packet is subjected to a signature and encryption process, or the first data packet is subjected to encryption processing or encryption and integrity protection processing according to an SDT security context, wherein the server's private key and the server contracted with the server The UE public key is stored on the server, and the SDT security context is sent by the interworking device IWF.
在本实施例中, 在进行数据包的传输前, 该服务器上需要预先配置该服 务器的私钥, 同时配置与该服务器有签约关系的 UE的公钥, 或者接收互通 设备发送的该 UE与 HSS协商生成的用于小数据安全保护的 SDT安全上下 文,该 SDT安全上下文包含用于该 UE和该服务器之间数据交互的 SDT密钥 和 SDT安全保护算法, 以便在数据传输过程中对数据包进行加密解密以及安 全保护等操作。  In this embodiment, before the data packet is transmitted, the server needs to pre-configure the private key of the server, configure the public key of the UE that has a contractual relationship with the server, or receive the UE and the HSS sent by the interworking device. Negotiating the generated SDT security context for small data security protection, the SDT security context includes an SDT key and an SDT security protection algorithm for data interaction between the UE and the server, so as to perform data packet transmission during data transmission Encryption and decryption and security protection operations.
S202: 所述服务器将加密后的所述第一数据包通过互通设备 IWF和移动 性管理实体 MME发送给所述 UE; 以供所述 UE根据所述第一数据包中的服 务器的 ID, 获取所述服务器的公钥和 /或所述 SDT安全上下文, 并根据所述 服务器的公钥和所述 UE的私钥, 或者所述 SDT安全上下文, 或者与所述服 务器的公钥和所述 SDT安全上下文,对所述第一数据包进行验证和解密处理, 得到解密后的所述第一数据包。  S202: The server sends the encrypted first data packet to the UE by using the interworking device IWF and the mobility management entity MME, where the UE obtains according to the ID of the server in the first data packet. a public key of the server and/or the SDT security context, and according to the public key of the server and the private key of the UE, or the SDT security context, or the public key of the server and the SDT a security context, performing verification and decryption processing on the first data packet to obtain the decrypted first data packet.
本实施例提供的数据的安全传输方法, 通过服务器存储的自身的私钥和 与之签约的 UE的公钥, 或者接收 IWF发送的该 UE与 HSS协商的 SDT安 全上下文,对待发送的第一数据包进行加密处理或者加密和完整性保护处理, 并将签名加密后的第一数据包通过 IWF和 MME发送给该 UE,以供该 UE验 证该第一数据包的签名的有效性, 或者验证消息认证码 MAC-I, 再对该第一 数据包进行解密, 并可以将解密后的第一数据包发送给相应的 APP, 完成数 据包的下行传输, 该服务器通过对数据包的签名和加密过程, 严格保护数据 包在 UE和服务器之间的安全传输, 提高系统数据传输的安全性。  The secure transmission method of the data provided by the embodiment, the first data to be sent by the private key of the UE and the public key of the UE that is subscribed to by the server, or the SDT security context negotiated by the UE and the HSS sent by the IWF. The packet is subjected to encryption processing or encryption and integrity protection processing, and the first data packet encrypted by the signature is sent to the UE through the IWF and the MME, so that the UE can verify the validity of the signature of the first data packet, or verify the message. The authentication code MAC-I decrypts the first data packet, and can send the decrypted first data packet to the corresponding APP to complete downlink transmission of the data packet, and the server signs and encrypts the data packet. Strictly protect the secure transmission of data packets between the UE and the server, and improve the security of system data transmission.
图 3为本发明数据的安全传输方法实施例六的流程图, 本实施例的执行 主体为 IWF, 该 IWF是为了更好的管控机器类通信设备和相关业务引入的一 个网络实体, 在 MME和服务器之间通过互通设备传递数据。 该 IWF后续还 可以开放更多的接口与内部或外部服务器, 或者其他设备进行连接, 本发明 不作限制。 应用于服务器向 UE的下行数据包发送过程, 如图 3所示, 具体 的歩骤为: FIG. 3 is a flowchart of Embodiment 6 of a secure transmission method of data according to the present invention, and is performed by this embodiment. The main body is an IWF. The IWF is a network entity introduced to better control the machine type communication device and related services, and the data is transmitted between the MME and the server through the interworking device. The IWF can also open more interfaces to connect with internal or external servers or other devices, and the present invention is not limited. The downlink data packet sending process applied to the server to the UE is as shown in FIG. 3, and the specific steps are as follows:
S301 : 互通设备 IWF接收服务器发送的第一数据包, 所述第一数据包包 括所述服务器的 ID和签名, 或者所述服务器的 ID和 MAC-L  S301: The interworking device, the IWF, receives the first data packet sent by the server, where the first data packet includes an ID and a signature of the server, or an ID of the server and a MAC-L.
在本实施例中, 该第一数据包除了包括要发送的数据, 还包括服务器的 ID、 UE的 ID、 以及要发送给的 APP的 ID等其他信息。  In this embodiment, the first data packet includes other information such as an ID of the server, an ID of the UE, and an ID of the APP to be sent, in addition to the data to be transmitted.
S302:所述 IWF根据所述服务器的公钥对所述签名进行验证,或根据 SDT 安全上下文对所述 MAC-I进行验证,并在验证通过后将所述第一数据包通过 移动性管理实体 MME发送给 UE; 或者, 所述 IWF根据所述 SDT安全上下 文对所述第一数据包进行加密和 /或完整性保护处理, 将所述第一数据包通过 移动性管理实体 MME发送给 UE。  S302: The IWF verifies the signature according to the public key of the server, or validates the MAC-I according to an SDT security context, and passes the first data packet to the mobility management entity after the verification is passed. The MME sends the MME to the UE; or the IWF performs the encryption and/or integrity protection processing on the first data packet according to the SDT security context, and sends the first data packet to the UE by using the mobility management entity MME.
其中, 所述服务器的公钥和与所述服务器签约的所述 UE的公钥存储在 所述 IWF上, 所述 SDT安全上下文为预先从归属用户服务器 HSS获取的。  The public key of the server and the public key of the UE that is contracted with the server are stored on the IWF, and the SDT security context is obtained in advance from the home subscriber server HSS.
在本实施例中,获取所述 UE和所述 HSS协商生成的 SDT安全上下文具 体可以为, 该 IWF接收所述 HSS发送的 SDT密钥。 并接收所述 UE通过所 述 MME发送的 SDT安全保护算法, 该 SDT密钥和 SDT安全保护算法组成 SDT安全上下文。  In this embodiment, the SDT security context generated by the UE and the HSS negotiation may be obtained by the IWF receiving the SDT key sent by the HSS. And receiving an SDT security protection algorithm sent by the UE by using the MME, where the SDT key and the SDT security protection algorithm form an SDT security context.
在本实施例中, 若 IWF验证该第一数据包的签名无效, 或者是 MAC-I 没有验证通过后, IWF将该第一数据包丢弃。  In this embodiment, if the IWF verifies that the signature of the first data packet is invalid, or the MAC-I fails to pass the verification, the IWF discards the first data packet.
本实施例提供的数据的安全传输方法, 通过 IWF获取服务器的公钥和与 该服务器签约的 UE的公钥, 或者获取的该 UE与 HSS协商的 SDT安全上下 文, 接收服务器发送的经过签名加密的第一数据包签名, 并验证该第一数据 包的签名的有效性, 或者验证消息认证码 MAC-I, 若验证该第一数据包的签 名有效或者 MAC-I验证通过, 则将该第一数据包通过 MME发送给该 UE, 完成小数据包的下行传输, 该 IWF通过对数据包的签名和 MAC-I的验证, 严格保护数据包在 UE和服务器之间的安全传输, 提高系统数据传输的安全 性。 进一歩的, 在本发明方法实施例七中, 在上述图 3所示的实施例六的基 础上, 歩骤 S303中 IWF根据所述服务器的公钥对所述签名进行验证, 或根 据 SDT安全上下文对所述 MAC-I进行验证, 并在验证通过后将所述第一数 据包通过移动性管理实体 MME发送给 UE; 或者, 所述 IWF根据所述 SDT 安全上下文对所述第一数据包进行加密和 /或完整性保护处理, 将所述第一数 据包通过移动性管理实体 MME发送给 UE, 其具体有以下几种实施方式为: 第一种实施方式, 所述 IWF根据所述服务器的 ID査询并获取所述服务 器的公钥, 并根据所述服务器的公钥, 验证所述第一数据包签名是否有效; 若验证所述第一数据包签名有效, 则将所述第一数据包通过所述 MME发送 给所述 UE; 若验证该签名无效, 则将该第一数据包丢弃。 The secure transmission method of the data provided by the embodiment, obtains the public key of the server and the public key of the UE that is contracted with the server through the IWF, or obtains the SDT security context negotiated by the UE and the HSS, and receives the signature and encryption sent by the server. Signing the first data packet, and verifying the validity of the signature of the first data packet, or verifying the message authentication code MAC-I, if the signature of the first data packet is verified to be valid or the MAC-I verification is passed, the first The data packet is sent to the UE through the MME, and the downlink transmission of the small data packet is completed. The IWF strictly protects the secure transmission of the data packet between the UE and the server by verifying the signature of the data packet and the MAC-I, and improves the system data transmission. Security. Further, in the seventh embodiment of the method of the present invention, based on the sixth embodiment shown in FIG. 3, the IWF verifies the signature according to the public key of the server in step S303, or according to the SDT security. Context, the MAC-I is verified, and the first data packet is sent to the UE by using the mobility management entity MME after the verification is passed; or the IWF is configured to the first data packet according to the SDT security context. And performing the encryption and/or integrity protection process, and sending the first data packet to the UE by using the mobility management entity MME, where the following implementation manners are as follows: In a first implementation manner, the IWF is configured according to the server. ID querying and obtaining the public key of the server, and verifying whether the first data packet signature is valid according to the public key of the server; if the first data packet signature is valid, the first The data packet is sent to the UE by the MME; if the signature is invalid, the first data packet is discarded.
第二种实施方式, 在所述第一数据包还包括: UE的 ID时, 所述 IWF根 据所述 UE的 ID获取所述 SDT安全上下文, 对所述 MAC-I进行验证;  In a second implementation manner, when the first data packet further includes: an ID of the UE, the IWF acquires the SDT security context according to the ID of the UE, and performs verification on the MAC-I;
若验证所述 MAC-I有效, 则将所述第一数据包通过所述 MME发送给所 述 UE; 若验证该签名无效, 则将该第一数据包丢弃。  And if the MAC-I is valid, the first data packet is sent to the UE by using the MME; if the signature is invalid, the first data packet is discarded.
第三种实施方式, 在所述第一数据包还包括: APP的 ID时, 所述 IWF 根据所述 UE的 ID和 APP的 ID获取所述 SDT安全上下文, 对所述 MAC-I 进行验证;  In a third implementation manner, when the first data packet further includes: an ID of the APP, the IWF acquires the SDT security context according to the ID of the UE and the ID of the APP, and performs verification on the MAC-I;
若验证所述第一数据包 MAC-I有效,则将所述第一数据包通过所述 MME 发送给所述 UE; 若验证所述第一数据包 MAC-I无效, 则将该第一数据包丢 弃。  If the first data packet MAC-I is valid, the first data packet is sent to the UE by using the MME; if the first data packet MAC-I is invalid, the first data is used. The packet is discarded.
第四种实施方式, 在所述第一数据包还包括: UE的 ID和 /或 APP的 ID 时,所述 IWF根据所述 UE的 ID和 /或 APP的 ID获取所述 SDT安全上下文, 对所述第一数据进行加密和完整性保护处理; 并将所述处理后的第一数据包 通过所述 MME发送给所述 UE;  In a fourth implementation manner, when the first data packet further includes: an ID of the UE and/or an ID of the APP, the IWF acquires the SDT security context according to the ID of the UE and/or the ID of the APP, where The first data is subjected to encryption and integrity protection processing; and the processed first data packet is sent to the UE by using the MME;
第五种实施方式, 在所述第一数据包还包括: UE的 ID和 /或 APP的 ID 时, 所述 IWF根据所述服务器的 ID获取所述服务器的公钥, 并根据所述服 务器的公钥, 验证所述签名; 若验证所述第一数据包的签名有效, 则根据用 户 UE的 ID和 /或 APP的 ID获取所述 SDT安全上下文, 对所述第一数据进 行加密处理, 或者加密和完整性保护处理, 并将所述处理后的第一数据包通 过所述 MME发送给所述 UE。 本实施例提供的数据的安全传输方法, 通过 IWF获取服务器的公钥和与 该服务器签约的 UE的公钥, 或者获取的该 UE与 HSS协商的 SDT安全上下 文, 接收服务器发送的经过签名加密的第一数据包签名, 并验证该第一数据 包的签名的有效性, 或者验证消息认证码 MAC-I, 或者对该第一数据包进行 加密或完整性保护, 再将该第一数据包通过 MME发送给该 UE, 完成小数据 包的下行传输, 该 IWF通过对数据包的签名和 MAC-I的验证, 或者加密和 完整性保护, 严格保护数据包在 UE和服务器之间的安全传输, 提高系统数 据传输的安全性。 In a fifth implementation manner, when the first data packet further includes: an ID of the UE and/or an ID of the APP, the IWF acquires a public key of the server according to an ID of the server, and according to the server a public key, the signature is verified; if the signature of the first data packet is valid, the SDT security context is obtained according to the ID of the user UE and/or the ID of the APP, and the first data is encrypted, or The encryption and integrity protection process is performed, and the processed first data packet is sent to the UE by using the MME. The secure transmission method of the data provided by the embodiment, obtains the public key of the server and the public key of the UE that is contracted with the server through the IWF, or obtains the SDT security context negotiated by the UE and the HSS, and receives the signature and encryption sent by the server. Signing the first data packet, and verifying the validity of the signature of the first data packet, or verifying the message authentication code MAC-I, or encrypting or integrity protecting the first data packet, and then passing the first data packet The MME sends the UE to complete the downlink transmission of the small data packet, and the IWF strictly protects the secure transmission of the data packet between the UE and the server by verifying the signature of the data packet and MAC-I, or encryption and integrity protection. Improve the security of system data transmission.
进一歩的, 在本发明方法实施例八中, 在上述图 3所示的实施例六和实 施例七的基础上, 在验证通过后, 将所述第一数据包通过 MME发送给 UE 之前, 还需要进行授权验证, 其具体的实施方式有以下几种:  Further, in the eighth embodiment of the method of the present invention, on the basis of the sixth embodiment and the seventh embodiment shown in FIG. 3, after the verification is passed, before the first data packet is sent to the UE through the MME, Authorization verification is also required, and the specific implementation methods are as follows:
第一种实施方式, 若所述第一数据包中包括所述服务器的 ID和所述 UE 的 ID,所述 IWF根据预先配置的授权列表中保存的服务器与 UE的对应关系, 对所述第一数据包中的所述服务器的 ID和所述 UE的 ID进行匹配检査, 在 检査所述服务器与所述 UE 的对应关系正确后, 将所述第一数据包通过所述 MME发送给所述 UE。  In a first embodiment, if the ID of the server and the ID of the UE are included in the first data packet, the IWF is configured according to a correspondence between a server and a UE saved in a pre-configured authorization list. Performing a matching check on the ID of the server in the data packet and the ID of the UE. After checking that the correspondence between the server and the UE is correct, sending the first data packet to the MME to the MME. The UE.
第二种实施方式, 若所述第一数据包中包括所述服务器的 ID、 所述 UE 的 ID和所述 APP的 ID,所述 IWF根据预先配置的授权列表中保存的服务器、 UE以及 APP的对应关系,对所述第一数据包中的所述服务器的 ID、所述 UE 的 ID和所述 APP的 ID进行匹配检査, 在检査所述服务器、 所述 UE和所述 APP的对应关系正确后, 将所述第一数据包通过所述 MME发送给所述 UE。  In a second implementation manner, if the first data packet includes an ID of the server, an ID of the UE, and an ID of the APP, the IWF is configured according to a server, a UE, and an APP saved in a pre-configured authorization list. Corresponding relationship, performing matching check on the ID of the server in the first data packet, the ID of the UE, and the ID of the APP, and checking the server, the UE, and the APP After the corresponding relationship is correct, the first data packet is sent to the UE by using the MME.
第三种实施方式, 若所述第一数据包中包括所述服务器的 ID和所述 UE 的 ID,则所述 IWF将所述服务器的 ID和所述 UE的 ID发送给所述 HSS , 以 供所述 HSS根据预先配置的授权列表中保存的服务器与 UE的对应关系, 对 所述第一数据包中的所述服务器的 ID和所述 UE的 ID进行匹配检査, 在检 査所述服务器与所述 UE的对应关系正确后, 向所述 IWF返回确认结果, 以 使所述 IWF将所述第一数据包通过所述 MME发送给所述 UE。  In a third implementation manner, if the first data packet includes an ID of the server and an ID of the UE, the IWF sends the ID of the server and the ID of the UE to the HSS, to And performing, by the HSS, a matching check on the ID of the server in the first data packet and the ID of the UE according to the correspondence between the server and the UE saved in the pre-configured authorization list, and checking the After the corresponding relationship between the server and the UE is correct, the acknowledgment result is returned to the IWF, so that the IWF sends the first data packet to the UE by using the MME.
第四种实施方式, 若所述第一数据包中包括所述服务器的 ID、 所述 UE 的 ID和所述 APP的 ID, 则所述 IWF将所述服务器的 ID、 所述 UE的 ID和 所述 APP的 ID发送给所述 HSS , 以供所述 HSS根据预先配置的授权列表中 保存的服务器、 UE以及 APP的对应关系, 对所述第一数据包中的所述服务 器的 ID、 所述 UE的 ID和所 APP的 ID进行匹配检査, 在检査所述服务器、 所述 UE和所述 APP的对应关系正确后, 向所述 IWF返回确认结果, 以使所 述 IWF将所述第一数据包通过所述 MME发送给所述 UE。 In a fourth implementation manner, if the first data packet includes an ID of the server, an ID of the UE, and an ID of the APP, the IWF sets an ID of the server, an ID of the UE, and Sending the ID of the APP to the HSS for the HSS according to a pre-configured authorization list Corresponding relationship between the stored server, the UE, and the APP, performing matching check on the ID of the server in the first data packet, the ID of the UE, and the ID of the APP, in checking the server, After the correspondence between the UE and the APP is correct, an acknowledgment result is returned to the IWF, so that the IWF sends the first data packet to the UE by using the MME.
图 4为本发明数据的安全传输方法实施例九的流程图, 本实施例的执行 主体为 MME, 应用于服务器向 UE的下行数据包发送过程, 如图 4所示, 具 体的歩骤为:  4 is a flowchart of Embodiment 9 of a secure transmission method of data according to the present invention. The executor of this embodiment is an MME, and is applied to a downlink data packet sending process of a server to a UE. As shown in FIG. 4, the specific steps are as follows:
S401 : 移动性管理实体 MME接收互通设备 IWF发送的第一数据包, 所 述第一数据包包括: 用户设备 UE的 ID、 服务器的 ID和签名。  S401: The mobility management entity MME receives the first data packet sent by the interworking device IWF, where the first data packet includes: an ID of the user equipment UE, an ID of the server, and a signature.
S402: 所述 MME根据所述服务器的公钥, 对所述签名进行验证; 其中, 所述服务器的公钥存储在所述 MME上。  S402: The MME verifies the signature according to the public key of the server, where the public key of the server is stored on the MME.
在本实施例中, MME可以直接配置好该 UE和服务器的公钥,还可以是, UE和服务器的公钥保存在 HSS的签约信息中, 当 UE初始接入网络进行认 证和密钥协商时候, MME接收 HSS向 MME发送的 UE和服务器的公钥。  In this embodiment, the MME may directly configure the public key of the UE and the server, or the public key of the UE and the server may be stored in the subscription information of the HSS. When the UE initially accesses the network for authentication and key negotiation. The MME receives the public key of the UE and the server that the HSS sends to the MME.
S403: 所述 MME在验证签名有效后, 将所述第一数据包发送给所述 UE 的 ID对应的所述 UE。  S403: After the verification signature is valid, the MME sends the first data packet to the UE corresponding to the ID of the UE.
在本实施例中, 若 MME验证第一数据包的签名无效, 未通过验证, 则 将该第一数据包丢弃, 中断数据的下行传输流程。  In this embodiment, if the MME verifies that the signature of the first data packet is invalid and fails the verification, the first data packet is discarded, and the downlink transmission process of the data is interrupted.
本实施例提供的数据的安全传输方法, 通过 MME获取服务器的公钥和 与该服务器签约的 UE的公钥, 接收经 IWF发送的经过签名加密的第一数据 包签名, 根据该服务器的公钥验证该第一数据包的签名的有效性, 若验证通 过将该第一数据包发送给 UE的 ID对应的 UE, 解决了没有相应的安全机制 保护数据包在 UE和服务器之间的传输的问题, 提高系统数据传输的安全性。  The secure transmission method of the data provided by the embodiment, the MME obtains the public key of the server and the public key of the UE that is contracted with the server, and receives the signed first encrypted data packet sent by the IWF, according to the public key of the server. Verifying the validity of the signature of the first data packet, if verifying that the first data packet is sent to the UE corresponding to the ID of the UE, the problem that the corresponding security mechanism protects the data packet between the UE and the server is solved. Improve the security of system data transmission.
图 5为本发明数据的安全传输方法实施例十的流程图, 本实施例的执行 主体为 HSS , 可应用于 UE和服务器之间进行上下行数据包传输之前, 进行 SDT安全上下文的协商。 如图 5所示, 具体的歩骤为:  FIG. 5 is a flowchart of Embodiment 10 of the data security transmission method of the present invention. The execution entity of this embodiment is an HSS, and can be applied to the SDT security context negotiation before the uplink and downlink data packet transmission between the UE and the server. As shown in Figure 5, the specific steps are:
S501 : HSS接收 MME发送的 UE的标识和 /或所述 MME为所述 UE选 择的 IWF 的 ID ; 所述标识包括国际移动用户标识 (International Mobile Subscriber Identification Number,简称 IMSI)或临时移动用户标识(Temporary Mobile Subscriber Identity, 简称 TMSI) 。 在本实施例中,网络中存在多个 IWF,若该 UE没有限定接入特定的 IWF, 则 MME需要根据所有 IWF的负载情况为该 UE选择一个服务的 IWF, 此时 MME需要将选择的 IWF的 ID发送给 HSS , 以便 HSS生成 SDT密钥。 S501: The HSS receives the identifier of the UE sent by the MME and/or the ID of the IWF selected by the MME for the UE; the identifier includes an International Mobile Subscriber Identification Number (IMSI) or a temporary mobile subscriber identity ( Temporary Mobile Subscriber Identity, TMSI for short. In this embodiment, a plurality of IWFs exist in the network. If the UE does not restrict access to a specific IWF, the MME needs to select a serving IWF for the UE according to the load condition of all IWFs, and the MME needs to select the selected IWF. The ID is sent to the HSS so that the HSS generates the SDT key.
S502: 所述 HSS根据所述标识获取所述 UE的签约数据, 判断所述 UE 具有小数据业务的特性时, 则根据预先获取的密钥生成参数生成 SDT密钥。  S502: The HSS acquires the subscription data of the UE according to the identifier, and when determining that the UE has the characteristics of the small data service, generates an SDT key according to the previously generated key generation parameter.
在本实施例中, 预先获取密钥生成参数的方式可以为 HSS自己生成相应 的密钥生成参数, 也可以为接收 UE或者 MME发送的密钥生成参数, 还可 以为 HSS 自己生成一部分密钥生成参数, 接收 UE或者 MME发送的该密钥 生成参数的其他部分, 本发明对此不做限制。  In this embodiment, the method for acquiring the key generation parameter in advance may generate the corresponding key generation parameter for the HSS itself, or may generate the key generation parameter sent by the UE or the MME, and may also generate a part of the key generation for the HSS itself. The parameter, the other part of the key generation parameter sent by the UE or the MME is received, which is not limited by the present invention.
S503: 所述 HSS将所述密钥生成参数和所述 SDT密钥发送给所述 IWF 的 ID对应的 IWF, 并通过所述 MME向所述 UE发送所述密钥生成参数, 以 供所述 UE根据所述密钥生成参数生成 SDT安全上下文,其中,所述 SDT安 全上下文包括所述 SDT密钥和 SDT安全保护算法。  S503: The HSS sends the key generation parameter and the SDT key to an IWF corresponding to the ID of the IWF, and sends the key generation parameter to the UE by using the MME, where The UE generates an SDT security context according to the key generation parameter, where the SDT security context includes the SDT key and an SDT security protection algorithm.
在本实施例中, HSS将该密钥生成参数以及 SDT密钥发送给 IWF, 或者 通过 IWF发送给服务器。 另外, 如果 UE限定接入某 IWF则 HSS中预先配 置了 IWF和 UE的对应的签约关系, HSS需要在本歩骤之前将 IWF的 ID发 送给 MME。 在所述 HSS将所述 SDT密钥发送给所述 IWF的 ID对应的 IWF 之后,所述 HSS将所述 IWF的 ID通过所述 MME发送给所述 UE, 以使所述 UE根据所述 IWF的 ID生成 SDT密钥并通过 MME将 SDT安全保护算法发 送给所述 IWFo  In this embodiment, the HSS sends the key generation parameter and the SDT key to the IWF, or sends the same to the server through the IWF. In addition, if the UE restricts access to an IWF, the HSS pre-configures the corresponding contract relationship between the IWF and the UE, and the HSS needs to send the ID of the IWF to the MME before this step. After the HSS sends the SDT key to the IWF corresponding to the ID of the IWF, the HSS sends the ID of the IWF to the UE through the MME, so that the UE is based on the IWF. ID generates an SDT key and sends an SDT security protection algorithm to the IWFo through the MME
本实施例提供的数据的安全传输方法, 通过 HSS根据密钥生成参数生成 SDT密钥, 并将参数发送给 UE, 以供 UE根据该密钥生成参数 SDT安全上 下文, 并将该 SDT安全上下文告知 IWF, 以便在数据传输过程中可以在 IWF 和 UE上进行数据包的加密解密和完整性保护, 解决了没有相应的安全机制 保护数据包在 UE和服务器之间的传输的问题, 提高系统数据传输的安全性。  The method for secure transmission of data provided by this embodiment generates an SDT key according to a key generation parameter by the HSS, and sends the parameter to the UE, so that the UE generates a parameter SDT security context according to the key, and notifies the SDT security context. IWF, in order to encrypt and decrypt and integrity protect data packets on the IWF and UE during data transmission, and solve the problem that there is no corresponding security mechanism to protect the transmission of data packets between the UE and the server, and improve system data transmission. Security.
进一歩的, 在本发明方法实施例十一中, 在上述图 5所示的实施例十基 础上, 所述 HSS接收所述 IWF发送的第一数据包之后, 所述 HSS还需要进 行授权验证, 具体的实现方式为:  Further, in the eleventh embodiment of the present invention, on the basis of the tenth embodiment shown in FIG. 5, after the HSS receives the first data packet sent by the IWF, the HSS needs to perform authorization verification. The specific implementation is:
第一种实施方式, 若所述第一数据包中包括所述服务器的 ID和所述 UE 的 ID,则所述 HSS根据预先配置的授权列表中保存的服务器与 UE的对应关 系,对所述第一数据包中的所述服务器的 ID和所述 UE的 ID进行匹配检査, 在检査所述服务器与所述 UE的对应关系正确后,向所述 IWF返回确认结果, 以使所述 IWF将所述第一数据包通过所述 MME发送给所述 UE; In a first implementation manner, if the first data packet includes an ID of the server and an ID of the UE, the HSS is configured according to a server and a UE that are saved in a pre-configured authorization list. And performing a matching check on the ID of the server in the first data packet and the ID of the UE, and after checking that the correspondence between the server and the UE is correct, returning an acknowledgement result to the IWF So that the IWF sends the first data packet to the UE through the MME;
第二种实施方式, 若所述第一数据包中包括所述服务器的 ID、 所述 UE 的 ID和所述 APP的 ID,则所述 HSS根据预先配置的授权列表中保存的服务 器、 UE以及 APP的对应关系, 对所述第一数据包中的所述服务器的 ID、 所 述 UE的 ID和所 APP的 ID进行匹配检査, 在检査所述服务器、 所述 UE和 所述 APP的对应关系正确后, 向所述 IWF返回确认结果, 以使所述 IWF将 所述第一数据包通过所述 MME发送给所述 UE。  In a second implementation manner, if the first data packet includes an ID of the server, an ID of the UE, and an ID of the APP, the HSS is configured according to a server, a UE, and a UE saved in a pre-configured authorization list. Corresponding relationship of the APP, performing matching check on the ID of the server in the first data packet, the ID of the UE, and the ID of the APP, and checking the server, the UE, and the APP After the corresponding relationship is correct, the confirmation result is returned to the IWF, so that the IWF sends the first data packet to the UE by using the MME.
进一歩的, 在进行授权验证后, 在所述 HSS将所述 SDT密钥发送给所 述 IWF的 ID对应的 IWF之后, 所述 HSS将所述 IWF的 ID通过所述 MME 发送给所述 UE,以使所述 UE根据所述 IWF的 ID生成 SDT密钥并通过 MME 将 SDT安全保护算法发送给所述 IWF,其中,所述 UE与所述 IWF的对应关 系存储在所述 HSS中。  Further, after performing the authorization verification, after the HSS sends the SDT key to the IWF corresponding to the ID of the IWF, the HSS sends the ID of the IWF to the UE through the MME. So that the UE generates an SDT key according to the ID of the IWF and sends an SDT security protection algorithm to the IWF through the MME, where the correspondence between the UE and the IWF is stored in the HSS.
在上述实施例十和实施例 ^一种, 所述 HSS发送给所述 UE的参数包括 所述 IWF的 ID、 应用 APP的 ID、 随机数 RAND、 临时数据中的至少一项, 其中,所述临时数据是在所述 HSS判断所述 UE具有小数据业务的特性之后, 所述 HSS生成的用于生成 SDT密钥的参数;  In the above-mentioned tenth embodiment and the embodiment, the parameter that the HSS sends to the UE includes at least one of an ID of the IWF, an ID of an application APP, a random number RAND, and temporary data, where the The temporary data is a parameter generated by the HSS for generating an SDT key after the HSS determines that the UE has a characteristic of a small data service;
所述密钥生成参数包括所述 SDT密钥的生成参数; 其中,  The key generation parameter includes a generation parameter of the SDT key;
所述 SDT 密钥的生成参数为接入安全管理实体密钥、 完整性保护密钥 The SDT key generation parameter is an access security management entity key and an integrity protection key.
IK、加密密钥 CK、所述 IWF的 ID、所述 UE的 ID或国际移动用户标识 IMSI、 所述 APP的 ID、 所述 RAND、 所述临时数据、 SDT密钥标签中的至少一项。 IK, an encryption key CK, an ID of the IWF, an ID of the UE or an international mobile subscriber identity IMSI, an ID of the APP, the RAND, the temporary data, and an SDT key label.
本实施例提供的数据的安全传输方法, 通过 HSS根据密钥生成参数生成 SDT密钥, 并将参数发送给 UE, 以供 UE根据该密钥生成参数 SDT安全上 下文,并将该 SDT安全上下文告知 IWF, HSS对服务器和 UE进行授权验证, 以便在数据传输过程中可以在 IWF和 UE上进行数据包的加密解密和完整性 保护, 解决了没有相应的安全机制保护数据包在 UE和服务器之间的传输的 问题, 提高系统数据传输的安全性。  The secure transmission method of the data provided in this embodiment generates an SDT key according to the key generation parameter by the HSS, and sends the parameter to the UE, so that the UE generates a parameter SDT security context according to the key, and notifies the SDT security context. The IWF and the HSS perform authorization verification on the server and the UE, so that the data encryption and decryption and integrity protection can be performed on the IWF and the UE during the data transmission process, and the corresponding security mechanism is not protected to protect the data packet between the UE and the server. The problem of transmission increases the security of system data transmission.
图 6为本发明数据的安全传输方法实施例十二的流程图, 本实施例的执 行主体为 UE, 主要应用于 UE向服务器发送的上行数据包传输过程中, 如图 6所示, 具体的歩骤为: FIG. 6 is a flowchart of Embodiment 12 of the method for secure transmission of data according to the present invention. The executor of this embodiment is a UE, which is mainly used in the process of transmitting uplink data packets sent by the UE to the server. As shown in 6, the specific steps are:
S601 : 用户设备 UE根据所述 UE的私钥和服务器的公钥对第二数据包 进行加密和 /或签名处理,或者根据 SDT安全上下文对所述第二数据包进行加 密和 /或完整性保护处理。  S601: The user equipment UE performs encryption and/or signature processing on the second data packet according to the private key of the UE and the public key of the server, or performs encryption and/or integrity protection on the second data packet according to the SDT security context. deal with.
在本实施例中,所述 UE的私钥和与所述 UE签约的所述服务器的公钥或 者与归属用户服务器 HSS协商生成 SDT安全上下文存储在所述 UE上。 UE 可以根据 UE的私钥和服务器的公钥对第二数据包进行加密, 或者加密和签 名, 还可以根据 SDT安全上下文对第二数据包进行加密或者加密和完整性保 护。  In this embodiment, the private key of the UE and the public key of the server that is contracted with the UE or negotiate with the home subscriber server HSS to generate an SDT security context are stored on the UE. The UE may encrypt the second data packet according to the private key of the UE and the public key of the server, or encrypt and sign, and may also encrypt or encrypt and protect the second data packet according to the SDT security context.
IWF 是为了更好的管控机器类通信设备和相关业务引入的一个网络实 体, 将来自服务器的信令和数据通过该 IWF传递给 MME再进一歩发送给机 器类通信设备, 或者通过该 IWF将来自与机器类通信设备的信令和数据发送 给服务器。 该 IWF后续还可以开放更多的接口与内部或外部服务器, 或者其 他设备进行连接, 本发明不作限制。  The IWF is a network entity introduced to better control the machine type communication equipment and related services. The signaling and data from the server are transmitted to the MME through the IWF and then sent to the machine type communication device, or the IWF will come from the IWF. Signaling and data with the machine type communication device are sent to the server. The IWF can also open more interfaces to internal or external servers, or other devices, and the present invention is not limited.
UE与 HSS协商 SDT安全上下文的具体实施方式可以是, 所述 UE接收 所述 HSS发送的密钥生成参数, 所述 UE根据所述密钥生成参数, 生成 SDT 密钥。  The UE may negotiate with the HSS for the SDT security context. The UE may receive the key generation parameter sent by the HSS, and the UE generates an SDT key according to the key generation parameter.
所述 UE在非接入安全模式命令 NAS SMC过程中协商 SDT安全保护算 法, 或者, 在非接入安全模式命令 NAS SMC过程中协商的非接入层安全算 法作为 SDT安全保护算法。  The UE negotiates the SDT security protection algorithm in the non-access security mode command NAS SMC process, or the non-access layer security algorithm negotiated in the non-access security mode command NAS SMC process as the SDT security protection algorithm.
S602: 所述 UE将处理后的第二数据包通过移动性管理实体 MME和互 通设备 IWF发送给所述服务器。  S602: The UE sends the processed second data packet to the server by using the mobility management entity MME and the interworking device IWF.
本实施例提供的数据的安全传输方法, 通过 UE获取自身的私钥和与之 签约的服务器的公钥, 或者 UE与 HSS协商的 SDT安全上下文, 将要向服务 器发送的第二数据包进行加密或者加密和完整性保护, 通过 MME和 IWF发 送给该服务器, 完成数据包的上行传输, 通过签名加密, 和完整性保护, 解 决了没有相应的安全机制保护数据包在 UE和服务器之间的传输的问题, 提 高系统数据传输的安全性。  The secure transmission method of the data provided by the embodiment, the second data packet to be sent to the server is encrypted by the UE acquiring the private key of the UE and the public key of the server with which the UE is subscribed, or the SDT security context negotiated by the UE and the HSS. Encryption and integrity protection, sent to the server by the MME and IWF, complete the uplink transmission of the data packet, through signature encryption, and integrity protection, and solve the problem that there is no corresponding security mechanism to protect the transmission of the data packet between the UE and the server. Problem, improve the security of system data transmission.
进一歩的, 在本发明方法实施例十三中, 在上述图 6所示的实施例的基 础上, S601和 S602具体有以下几种实现方式: 第一种实现方式,所述 UE根据所述 UE的私钥签名所述第二数据包,并 根据所述服务器的公钥对所述第二数据包进行加密处理。 Further, in the thirteenth embodiment of the method of the present invention, based on the embodiment shown in FIG. 6 above, S601 and S602 specifically have the following implementation manners: In a first implementation manner, the UE signs the second data packet according to the private key of the UE, and performs encryption processing on the second data packet according to the public key of the server.
所述 UE将处理后的第二数据包通过所述 MME和所述 IWF发送给所述 服务器, 以供所述服务器根据所述第二数据包中的 UE的 ID获取所述 UE的 公钥, 并根据所述 UE的公钥验证所述处理后的第二数据包中的签名是否有 效, 若验证有效, 则根据所述服务器的私钥对所述处理后的第二数据包进行 解密处理, 得到解密后的所述第二数据包。  Sending, by the UE, the processed second data packet to the server by using the MME and the IWF, so that the server acquires the public key of the UE according to the ID of the UE in the second data packet, And verifying, according to the public key of the UE, whether the signature in the processed second data packet is valid, and if the verification is valid, decrypting the processed second data packet according to the private key of the server, The decrypted second data packet is obtained.
第二种实现方式, 所述 UE根据所述 SDT安全上下文对所述第二数据包 进行加密或加密和完整性保护处理。  In a second implementation manner, the UE performs encryption or encryption and integrity protection processing on the second data packet according to the SDT security context.
所述 UE将携带 MAC-I的所述处理后的第二数据包发送给 IWF或者服务 器, 以供所述 IWF或者服务器根据所述处理后的第二数据包中的所述 UE的 ID获取所述 SDT安全上下文, 并根据所述 SDT安全上下文, 验证所述安全 保护后的第二数据包中的所述 MAC-I, 若验证有效, 则对所述处理后的第二 数据包进行解密处理, 得到解密后的所述第二数据包。 若验证 MAC-I无效, 则将该第二数据包丢弃, 结束上行数据传输进程。  Transmitting, by the UE, the processed second data packet that carries the MAC-I to the IWF or the server, where the IWF or the server obtains the identifier according to the ID of the UE in the processed second data packet. Determining the SDT security context, and verifying the MAC-I in the second packet after the security protection according to the SDT security context, and if the verification is valid, decrypting the processed second data packet And obtaining the decrypted second data packet. If the verification MAC-I is invalid, the second data packet is discarded, and the uplink data transmission process is ended.
在上述实施例中,所述 UE接收的所述 HSS发送的参数包括所述 IWF的 ID、 应用 APP的 ID、 随机数 RAND、 临时数据中的至少一项;  In the foregoing embodiment, the parameter that is sent by the HSS received by the UE includes at least one of an ID of the IWF, an ID of an application APP, a random number RAND, and temporary data.
所述密钥生成参数包括所述 SDT密钥的生成参数; 其中,  The key generation parameter includes a generation parameter of the SDT key;
所述 SDT 密钥的生成参数为接入安全管理实体密钥、 完整性保护密钥 IK、加密密钥 CK、所述 IWF的 ID、所述 UE的 ID或国际移动用户标识 IMSI、 所述 APP的 ID、 所述 RAND、 所述临时数据、 SDT密钥标签中的至少一项。  The generating parameter of the SDT key is an access security management entity key, an integrity protection key IK, an encryption key CK, an ID of the IWF, an ID of the UE or an international mobile subscriber identity IMSI, the APP At least one of an ID, the RAND, the temporary data, and an SDT key label.
本实施例提供的数据的安全传输方法, 通过 UE获取自身的私钥和与之 签约的服务器的公钥, 或者 UE与 HSS协商的 SDT安全上下文, 将要向服务 器发送的第二数据包进行加密或者加密和完整性保护, 通过 MME和 IWF发 送给该服务器,服务器对签名或者 MAC-I进行验证,对第二数据包进行解密, 完成数据包的上行传输, 通过签名加密, 和完整性保护, 解决了没有相应的 安全机制保护数据包在 UE和服务器之间的传输的问题, 提高系统数据传输 的安全性。  The secure transmission method of the data provided by the embodiment, the second data packet to be sent to the server is encrypted by the UE acquiring the private key of the UE and the public key of the server with which the UE is subscribed, or the SDT security context negotiated by the UE and the HSS. Encryption and integrity protection, sent to the server through the MME and IWF, the server verifies the signature or MAC-I, decrypts the second data packet, completes the uplink transmission of the data packet, encrypts by signature, and solves the integrity protection. There is no corresponding security mechanism to protect the transmission of data packets between the UE and the server, and improve the security of system data transmission.
图 7为本发明数据的安全传输方法实施例十四的流程图, 本实施例的执 行主体为服务器, 该服务器可以是 SCS或者 AS ,主要应用于 UE向服务器发 送的上行数据包传输过程中, 如图 7所示, 具体的歩骤为: FIG. 7 is a flowchart of Embodiment 14 of the data security transmission method of the present invention. The execution entity of this embodiment is a server, and the server may be an SCS or an AS, and is mainly applied to the UE to send to the server. During the transmission of the uplink data packet, as shown in Figure 7, the specific steps are:
S701 : 服务器接收互通设备 IWF发送的处理后的第二数据包。  S701: The server receives the processed second data packet sent by the interworking device IWF.
在本实施例中, 第二数据包携带 UE的 ID、 IWF的 ID、 服务器的 ID和 识别标识或者 MAC-I等信息。  In this embodiment, the second data packet carries information such as the ID of the UE, the ID of the IWF, the ID of the server, the identification identifier, or the MAC-I.
S702: 根据用户设备 UE的公钥和所述服务器的私钥对所述第二数据包 进行签名验证和解密, 或者根据所述 UE的 ID和 /或 IWF的 ID査找 SDT安 全上下文, 对所述处理后的第二数据包进行完整性验证和解密。  S702: Perform signature verification and decryption on the second data packet according to the public key of the user equipment UE and the private key of the server, or search for an SDT security context according to the ID of the UE and/or the ID of the IWF. The processed second data packet is integrity verified and decrypted.
其中, 所述服务器的私钥和与所述服务器签约的所述 UE的公钥存储在 所述服务器上, 所述 SDT安全上下文为互通设备 IWF发送的。  The private key of the server and the public key of the UE that is contracted with the server are stored on the server, and the SDT security context is sent by the interworking device IWF.
在本实施例中, 服务器可以预先配置所述服务器的私钥和与所述服务器 签约的用户设备 UE的公钥, 或者所述接收 IWF发送的 SDT安全上下文; 其 中, 所述 SDT安全上下文包括所述 UE和 HSS协商生成的 SDT密钥和 SDT 安全保护算法。  In this embodiment, the server may pre-configure the private key of the server and the public key of the user equipment UE that is contracted with the server, or the SDT security context sent by the IWF; wherein the SDT security context includes The SDT key and the SDT security protection algorithm generated by the UE and the HSS are negotiated.
本实施例提供的数据的安全传输方法, 通过服务器获取自身的私钥和与 之签约的 UE的公钥, 或者接收 IWF发送的该 UE与 HSS协商的 SDT安全 上下文, 对接收的 UE经过 MME和 IWF发送的第二数据包进行签名的验证 和解密或者 MAC-I的验证和解密, 完成数据包的上行传输, 该服务器通过对 数据包的签名验证和解密过程,解决了没有相应的安全机制保护数据包在 UE 和服务器之间的传输的问题, 提高系统数据传输的安全性。  The secure transmission method of the data provided by the embodiment, the server obtains its own private key and the public key of the UE with which it is contracted, or receives the SDT security context negotiated by the UE and the HSS sent by the IWF, and the received UE passes the MME and the The second data packet sent by the IWF performs signature verification and decryption or MAC-I verification and decryption, and completes uplink transmission of the data packet. The server solves the problem of no corresponding security mechanism protection by verifying and decrypting the data packet. The problem of data packet transmission between the UE and the server improves the security of system data transmission.
图 8为本发明数据的安全传输方法实施例十五的流程图, 本实施例的执 行主体为 IWF, 主要应用于 UE向服务器发送的上行数据包传输过程中, 如 图 8所示, 具体的歩骤为:  FIG. 8 is a flowchart of the fifteenth embodiment of the method for secure transmission of data according to the present invention. The executor of the embodiment is an IWF, which is mainly used in the process of transmitting uplink data packets sent by the UE to the server, as shown in FIG. The steps are:
S801 : 互通设备 IWF接收用户设备 UE通过移动性管理实体 MME发送 的处理后的第二数据包,所述处理后的第二数据包包括所述 UE的 ID和签名, 或者所述 UE的 ID和 MAC-I。  S801: The interworking device IWF receives the processed second data packet sent by the user equipment UE by using the mobility management entity MME, where the processed second data packet includes an ID and a signature of the UE, or an ID of the UE. MAC-I.
S802:所述 IWF根据所述 UE的公钥或 SDT安全上下文,对所述签名或 者 MAC-I进行验证; 并在验证通过后, 将所述处理后的第二数据包发送给所 述服务器。  S802: The IWF verifies the signature or the MAC-I according to the public key or the SDT security context of the UE. After the verification is passed, the processed second data packet is sent to the server.
其中, 所述 UE的公钥存储在所述 IWF上, 所述 SDT安全上下文为预先 从归属用户服务器 HSS获取的。 在本实施例中, IWF预先配置每个服务器对应的服务器的公钥和与所述 服务器签约的 UE的公钥,和 /或获取所述 UE和 HSS协商生成的 SDT安全上 下文; 其中, 所述 SDT安全上下文包括 SDT密钥和 SDT安全保护算法。 The public key of the UE is stored on the IWF, and the SDT security context is obtained in advance from the home subscriber server HSS. In this embodiment, the IWF pre-configures the public key of the server corresponding to each server and the public key of the UE that is contracted with the server, and/or obtains the SDT security context generated by the negotiation between the UE and the HSS; The SDT security context includes the SDT key and the SDT security protection algorithm.
在本实施例中, 获取 SDT安全上下文具体可以是, 接收所述 HSS发送 的 SDT密钥, 接收所述 UE通过所述 MME发送的 SDT安全保护算法, 所述 SDT密钥和所述 SDT安全保护算法组成 SDT安全上下文。  In this embodiment, the acquiring the SDT security context may be: receiving an SDT key sent by the HSS, receiving an SDT security protection algorithm sent by the UE by using the MME, the SDT key, and the SDT security protection. The algorithm forms the SDT security context.
本实施例提供的数据的安全传输方法, 通过 IWF获取服务器的公钥和与 之签约的 UE的公钥, 或者获取该 UE与 HSS协商的 SDT安全上下文, 对接 收的 UE经过 MME发送的第二数据包进行签名的验证或者 MAC-I的验证, 将验证通过的第二数据包发送给服务器, 完成数据包的上行传输, 该服务器 通过对数据包的签名验证和解密过程, 解决了没有相应的安全机制保护数据 包在 UE和服务器之间的传输的问题, 提高系统数据传输的安全性。  The secure transmission method of the data provided by the embodiment, obtains the public key of the server and the public key of the UE that is contracted by the IWF, or obtains the SDT security context negotiated by the UE and the HSS, and sends the second sent by the received UE to the MME. The data packet is verified by the signature or verified by the MAC-I, and the second data packet that is verified is sent to the server to complete the uplink transmission of the data packet. The server solves the problem by verifying and decrypting the data packet. The security mechanism protects the transmission of data packets between the UE and the server, improving the security of system data transmission.
进一歩的, 在本发明方法实施例十六中, 在上述图 8所示的实施例的基 础上, 所述 IWF预先从归属用户服务器 HSS获取 SDT安全上下文, 具体包 括: 接收所述 HSS发送的 SDT密钥; 接收所述 UE通过所述 MME发送的 SDT安全保护算法; 其中, 所述 SDT安全上下文包括所述 SDT密钥和所述 SDT安全保护算法。  Further, in the sixteenth embodiment of the method of the present invention, on the basis of the foregoing embodiment shown in FIG. 8, the IWF obtains the SDT security context from the home subscriber server HSS in advance, and specifically includes: receiving the HSS sending And receiving an SDT security protection algorithm sent by the UE by using the MME; where the SDT security context includes the SDT key and the SDT security protection algorithm.
在本实施例中, 所述 IWF根据所述 UE的公钥或 SDT安全上下文, 对所 述签名或者 MAC-I进行验证; 并在验证通过后, 将所述处理后的第二数据包 发送给所述服务器, 具体的实施方式有以下几种:  In this embodiment, the IWF verifies the signature or the MAC-I according to the public key or the SDT security context of the UE; and after the verification is passed, sends the processed second data packet to The specific implementation manner of the server is as follows:
第一种实施方式, 所述 IWF根据所述 UE的公钥, 验证所述处理后的第 二数据包的所述签名是否有效; 若验证所述处理后的第二数据包签名有效, 则将所述处理后的第二数据包发送给服务器。  In a first implementation manner, the IWF verifies whether the signature of the processed second data packet is valid according to the public key of the UE, and if it is verified that the processed second data packet signature is valid, The processed second data packet is sent to the server.
第二种实施方式, 所述 IWF根据所述 SDT安全上下文对所述处理后的 第二数据包的所述 MAC-I进行验证;若验证所述处理后的第二数据包的所述 MAC-I有效, 则将所述处理后的第二数据包进行解密处理后发送给服务器。  In a second implementation manner, the IWF verifies the MAC-I of the processed second data packet according to the SDT security context; if the MAC address of the processed second data packet is verified If I is valid, the processed second data packet is decrypted and sent to the server.
可选的, 在将所述第二数据包发送给所述服务器之前, IWF还需要进行 授权验证, 具体的验证方式包括以下几种:  Optionally, before sending the second data packet to the server, the IWF also needs to perform authorization verification, and the specific verification manners include the following:
第一种验证方式, 若所述第一数据包中包括所述服务器的 ID和所述 UE 的 ID,所述 IWF根据预先配置的授权列表中保存的服务器与 UE的对应关系, 对所述第一数据包中的所述服务器的 ID和所述 UE的 ID进行匹配检査, 在 检査所述服务器与所述 UE 的对应关系正确后, 将所述第二数据包发送给所 述服务器。 In the first verification mode, if the first data packet includes the ID of the server and the ID of the UE, the IWF is configured according to a correspondence between the server and the UE saved in the pre-configured authorization list. Performing a matching check on the ID of the server in the first data packet and the ID of the UE, and after checking that the correspondence between the server and the UE is correct, sending the second data packet to The server.
第二种验证方式, 若所述第一数据包中包括所述服务器的 ID、 所述 UE 的 ID和所述 APP的 ID,所述 IWF根据预先配置的授权列表中保存的服务器、 UE以及 APP的对应关系,对所述第一数据包中的所述服务器的 ID、所述 UE 的 ID和所述 APP的 ID进行匹配检査, 在检査所述服务器、 所述 UE和所述 APP的对应关系正确后, 将所述第二数据包发送给所述服务器。  The second verification mode, if the first data packet includes an ID of the server, an ID of the UE, and an ID of the APP, the IWF is configured according to a server, a UE, and an APP saved in a pre-configured authorization list. Corresponding relationship, performing matching check on the ID of the server in the first data packet, the ID of the UE, and the ID of the APP, and checking the server, the UE, and the APP After the correspondence is correct, the second data packet is sent to the server.
第三种验证方式, 若所述第二数据包中包括所述服务器的 ID和所述 UE 的 ID,则所述 IWF将所述服务器的 ID和所述 UE的 ID发送给 HSS , 以供所 述 HSS根据预先配置的授权列表中保存的服务器与 UE的对应关系, 对所述 第二数据包中的所述服务器的 ID和所述 UE的 ID进行匹配检査, 在检査所 述服务器与所述 UE的对应关系正确后, 将所述第二数据包发送给所述服务 器。  a third verification mode, if the second data packet includes the ID of the server and the ID of the UE, the IWF sends the ID of the server and the ID of the UE to the HSS for the The HSS performs a matching check on the ID of the server in the second data packet and the ID of the UE according to the correspondence between the server and the UE stored in the pre-configured authorization list, and checks the server and the After the corresponding relationship of the UE is correct, the second data packet is sent to the server.
第四种验证方式, 若所述第二数据包中包括所述服务器的 ID、 所述 UE 的 ID以及应用 APP的 ID, 则所述 IWF将所述服务器的 ID、 所述 UE的 ID 以及所述 APP的 ID发送给 HSS , 以供所述 HSS根据预先配置的授权列表中 保存的服务器、 UE以及 APP的对应关系, 对所述第二数据包中的所述服务 器的 ID、 所述 UE的 ID和所 APP的 ID进行匹配检査, 在检査所述服务器、 所述 UE以及所述 APP的对应关系正确后, 将所述第二数据包发送给所述服 务器。  The fourth verification mode, if the second data packet includes the ID of the server, the ID of the UE, and the ID of the application APP, the IWF sets the ID of the server, the ID of the UE, and the Sending the ID of the APP to the HSS, for the HSS to associate the ID of the server in the second data packet with the UE, according to the correspondence between the server, the UE, and the APP saved in the pre-configured authorization list. The ID and the ID of the APP are checked for matching. After checking that the correspondence between the server, the UE, and the APP is correct, the second data packet is sent to the server.
本实施例提供的数据的安全传输方法, 通过 IWF获取服务器的公钥和与 之签约的 UE的公钥, 或者获取该 UE与 HSS协商的 SDT安全上下文, 对接 收的 UE经过 MME发送的第二数据包进行签名的验证或者 MAC-I的验证, 并且对服务器和 UE进行授权验证, 并将验证通过的第二数据包发送给服务 器, 完成数据包的上行传输, 该服务器通过对数据包的签名验证和解密过程, 解决了没有相应的安全机制保护数据包在 UE和服务器之间的传输的问题, 提高系统数据传输的安全性。  The secure transmission method of the data provided by the embodiment, obtains the public key of the server and the public key of the UE that is contracted by the IWF, or obtains the SDT security context negotiated by the UE and the HSS, and sends the second sent by the received UE to the MME. The data packet is verified by the signature or verified by the MAC-I, and the server and the UE are authenticated, and the second data packet that is verified is sent to the server to complete the uplink transmission of the data packet, and the server signs the data packet. The verification and decryption process solves the problem that there is no corresponding security mechanism to protect the transmission of data packets between the UE and the server, and the security of the system data transmission is improved.
图 9为本发明数据的安全传输方法实施例十七的流程图, 本实施例的执 行主体为 MME, 主要应用于 UE向服务器发送的上行数据包传输过程中, 如 图 9所示, 具体的歩骤为: FIG. 9 is a flowchart of Embodiment 17 of the method for secure transmission of data according to the present invention. The executor of this embodiment is an MME, which is mainly used in the process of transmitting uplink data packets sent by the UE to the server, such as As shown in Figure 9, the specific steps are:
S901 : 移动性管理实体 MME接收用户设备 UE发送的处理后的第二数 据包, 所述第二数据包包括: 所述 UE的 ID、 所述服务器的 ID和签名。  S901: The mobility management entity MME receives the processed second data packet sent by the user equipment UE, where the second data packet includes: an ID of the UE, an ID of the server, and a signature.
S902: 所述 MME根据所述 UE的公钥对所述签名进行验证。  S902: The MME verifies the signature according to the public key of the UE.
在本实施例中, 其中, 所述 UE的公钥存储在所述 MME上。  In this embodiment, the public key of the UE is stored on the MME.
若验证该第二数据包的签名没有通过, 则将第二数据包丢弃, 结束上行 数据包的传输进程。  If it is verified that the signature of the second data packet has not passed, the second data packet is discarded, and the transmission process of the uplink data packet is ended.
S903: 所述 MME在验证所述签名有效后, 将所述第二数据包发送给互 通设备 IWF。  S903: After verifying that the signature is valid, the MME sends the second data packet to the interworking device IWF.
本实施例提供的数据的安全传输方法, MME获取服务器的公钥和与之签 约的 UE的公钥,对接收的 UE发送的第二数据包进行签名的验证,将验证通 过的第二数据包通过 IWF发送给服务器, 完成数据包的上行传输, 该 MME 通过对数据包的签名验证, 解决了没有相应的安全机制保护数据包在 UE和 服务器之间的传输的问题, 提高系统数据传输的安全性。  In the secure transmission method of the data provided by the embodiment, the MME obtains the public key of the server and the public key of the UE that is contracted with the MME, performs signature verification on the second data packet sent by the received UE, and verifies the passed second data packet. The IWF is sent to the server to complete the uplink transmission of the data packet. The MME solves the problem that the corresponding security mechanism protects the transmission of the data packet between the UE and the server by verifying the signature of the data packet, thereby improving the security of the system data transmission. Sex.
在本发明数据的安全传输方法的实施例十八中,在上述实施例的基础上, 将第二数据包发送给 IWF之前, 所述 MME还需要进行授权验证, 具体的包 括以下两张验证方式:  In the eighteenth embodiment of the secure transmission method of the data of the present invention, on the basis of the foregoing embodiment, before the second data packet is sent to the IWF, the MME needs to perform authorization verification, and specifically includes the following two verification methods. :
第一种验证方式, 若所述第二数据包中包括所述服务器的 ID和所述 UE 的 ID, 则所述 MME根据预先配置的授权列表、 所述第二数据包中的所述服 务器的 ID和所述 UE的 ID,根据所述授权列表中保存的服务器和 UE的对应 关系, 对所述第二数据包中的所述服务器的 ID和所述 UE的 ID进行匹配检 査, 在检査所述服务器和所述 UE的对应关系正确后, 将所述第二数据包通 过 IWF发送给所述服务器。  In the first verification mode, if the second data packet includes the ID of the server and the ID of the UE, the MME is configured according to a pre-configured authorization list, and the server in the second data packet. ID and the ID of the UE, according to the correspondence between the server and the UE saved in the authorization list, performing matching check on the ID of the server and the ID of the UE in the second data packet, inspecting After checking that the correspondence between the server and the UE is correct, the second data packet is sent to the server through the IWF.
第二种验证方式, 若所述第二数据包中包括所述服务器的 ID、 所述 UE 的 ID和应用 APP的 ID, 则所述 MME根据预先配置的授权列表、 所述第二 数据包中的所述服务器的 ID、 所述 UE的 ID以及所述 APP的 ID, 根据所述 授权列表中保存的服务器、 UE以及 APP的对应关系, 对所述第二数据包中 的所述服务器的 ID、所述 UE的 ID和所述 APP的 ID进行匹配检査,在检査 所述服务器、 所述 UE以及所述 APP的对应关系正确后, 将所述第二数据包 通过 IWF发送给所述服务器。 下面特举相应的实施例来说明本发明提供的数据的安全传输方法各个设 备的交互过程。 The second verification mode, if the second data packet includes the ID of the server, the ID of the UE, and the ID of the application APP, the MME is configured according to the pre-configured authorization list and the second data packet. The ID of the server, the ID of the UE, and the ID of the APP, according to the correspondence between the server, the UE, and the APP stored in the authorization list, the ID of the server in the second data packet Performing a matching check on the ID of the UE and the ID of the APP, and after checking that the correspondence between the server, the UE, and the APP is correct, sending the second data packet to the server. The corresponding embodiments are used to illustrate the interaction process of each device in the secure transmission method of data provided by the present invention.
图 10为基于 PKI系统使用公钥私钥保护服务器到 UE的下行数据包传输 交互图。 在本实施例中, 服务器上保存了自身的私钥, 同时也保存了与其有 签约关系 UE的公钥,每个 UE上保存了自身的私钥, 同时也保存了与其有签 约关系的服务器的公钥, 在下行方向, 服务器使用其私钥对小数据包进行签 名, 用要发送给的 UE的公钥加密该小数据包, 而 UE接收到该小数据包, 则 使用该服务器的公钥验证签名的有效性, 再用其私钥解密小数据包, 如图 10 所示, 具体的交互过程如下:  FIG. 10 is a diagram showing a downlink data packet transmission interaction between a server and a UE by using a public key private key based on a PKI system. In this embodiment, the server stores its own private key, and also stores the public key of the UE with which it has a contractual relationship. Each UE stores its own private key, and also saves the server with which it has a contractual relationship. Public key, in the downstream direction, the server uses its private key to sign the small data packet, encrypts the small data packet with the public key of the UE to be sent, and when the UE receives the small data packet, the public key of the server is used. Verify the validity of the signature, and then use its private key to decrypt the small data packet, as shown in Figure 10. The specific interaction process is as follows:
S1001 : 服务器将根据该服务器的私钥和 UE的公钥进行签名和加密的第 一数据包发送给 IWF。  S1001: The server sends the first data packet signed and encrypted according to the private key of the server and the public key of the UE to the IWF.
在本实施例中, 服务器可以将该第一数据包封装在 Tsp-AP-PDU中, 通过 Tsp-AP协议发给 IWF, 其中可以携带待发送的数据, 服务器的 ID, UE的 ID, 以及 APP的 ID和数据的识别标识等信息。  In this embodiment, the server may encapsulate the first data packet in the Tsp-AP-PDU, and send the data to the IWF through the Tsp-AP protocol, where the data to be sent, the ID of the server, the ID of the UE, and the APP may be carried. Information such as the ID and identification of the data.
S1002: IWF根据该服务器的公钥验证签名是否有效, 若验证签名有效, 则将该第一数据包发送给 MME  S1002: The IWF verifies whether the signature is valid according to the public key of the server, and if the verification signature is valid, sends the first data packet to the MME.
在本实施例中, IWF根据服务器的 ID査找到对应的服务器的公钥,验证 该第一数据包的签名是否有效, 若签名无效, 则 block该第一数据包, 若签 名有效, 则将该第一数据包封装在 T5-AP-PDU中, 通过 T5-AP协议发送给 MME。  In this embodiment, the IWF searches for the public key of the corresponding server according to the ID of the server, and verifies whether the signature of the first data packet is valid. If the signature is invalid, the first data packet is blocked, and if the signature is valid, the IWT The first data packet is encapsulated in the T5-AP-PDU and sent to the MME through the T5-AP protocol.
可选的, 如果有需要, IWF还可以将服务器的 ID、 UE的 ID和 APP的 ID发送给 HSS作进一歩的验证, HSS根据预先配置的授权列表中保存的服 务器和 UE的对应关系, 对所述第一数据包中的所述服务器的 ID和所述 UE 的 ID进行匹配检査, 在检査所述服务器的 ID对应的服务器允许向所述 UE 的 ID对应的 UE发送数据包后, 将所述第一数据包发送给 MME。  Optionally, if necessary, the IWF may also send the ID of the server, the ID of the UE, and the ID of the APP to the HSS for further verification. The HSS according to the correspondence between the server and the UE saved in the pre-configured authorization list, Performing a matching check on the ID of the server in the first data packet and the ID of the UE, after checking that the server corresponding to the ID of the server is allowed to send a data packet to the UE corresponding to the ID of the UE, Sending the first data packet to the MME.
其中, 由于服务器数量有限而且它们只会与某些特定 UE签约, 另外它 们可能会通过 Tsp接口一直与 IWF保持连接, 因此 IWF可以直接预置好 UE 的公钥和服务器的公钥信息。  Among them, because the number of servers is limited and they only sign up with certain UEs, they may remain connected to the IWF through the Tsp interface. Therefore, the IWF can directly preset the public key of the UE and the public key information of the server.
S1003 : MME根据服务器的公钥, 验证签名是否有效, 若验证有效, 则 将该第一数据包发送给 UE。 在本实施例中, MME根据服务器的 ID査找到对应的服务器的公钥, 验证 该第一数据包的签名是否有效, 若签名无效, 则 block该第一数据包, 若签名 有效, 则将该第一数据包通过 NAS消息 (如 Generic NAS Transport message) 发送给 UE。 S1003: The MME verifies whether the signature is valid according to the public key of the server, and if the verification is valid, sends the first data packet to the UE. In this embodiment, the MME searches for the public key of the corresponding server according to the ID of the server, and verifies whether the signature of the first data packet is valid. If the signature is invalid, the first data packet is blocked, and if the signature is valid, the MME The first packet is sent to the UE via a NAS message such as a Generic NAS Transport message.
其中, MME可以直接预置好 UE的公钥和服务器的公钥; 或者 UE的公钥 和服务器的公钥保存在 HSS中的签约信息中, 当 UE初始附着到到网络进行 AKA时, HSS可以将 UE的公钥和服务器的公钥信息发送给 MME。  The MME may directly preset the public key of the UE and the public key of the server; or the public key of the UE and the public key of the server are stored in the subscription information in the HSS. When the UE initially attaches to the network for AKA, the HSS may The public key of the UE and the public key information of the server are sent to the MME.
S1004: UE接收第一数据包, 根据服务器的公钥验证签名是否有效, 若 验证第一数据包的签名有效, 再利用该 UE的私钥解密第一数据包, 并发送给 对应的 APP。  S1004: The UE receives the first data packet, and verifies whether the signature is valid according to the public key of the server. If the signature of the first data packet is valid, the first data packet is decrypted by using the private key of the UE, and sent to the corresponding APP.
在本实施例中, UE根据服务器的 ID找到对应的服务器的公钥, 验证签名 的有效后, 再用其私钥解密小数据包, 并根据 APP的 ID将第一数据包发送给 相应的 APP。  In this embodiment, the UE finds the public key of the corresponding server according to the ID of the server, and after verifying that the signature is valid, decrypts the small data packet with the private key, and sends the first data packet to the corresponding APP according to the ID of the APP. .
进一歩的,如果需要返回对应的数据包或者确认字符(Acknowledgement, 简称 ACK) , 则该 APP将其发给 UE, 用 UE的私钥签名数据包或者 ACK, 用 目标服务器的公钥加密小数据包或者 ACK (另外, ACK可以不用加密) 通过 Further, if it is necessary to return a corresponding data packet or an acknowledgement character (Acknowledgement, ACK for short), the APP sends it to the UE, signs the data packet or ACK with the private key of the UE, and encrypts the small data with the public key of the target server. Packet or ACK (in addition, ACK can be encrypted without encryption)
MME和 IWF发送给服务器。 The MME and the IWF are sent to the server.
本实施例提供的数据的安全传输方法, 通过服务器和 UE的公钥私钥对第 一数据包进行加密签名, 通过 IWF、 MME对第一数据包签名的验证, 还可以 用 HSS验证授权关系, 将第一数据包发送给 UE。解决了在 UE和服务器之间的 小数据通过 MME和 MTC-IWF之间的 T5接口传输的场景下, 没有相应的安全 机制来保护 UE与签约服务器之间的数据传输的问题, 提高系统数据传输的安 全性。  In the secure transmission method of the data provided by the embodiment, the first data packet is encrypted and signed by the server and the public key of the UE, and the signature of the first data packet is verified by the IWF and the MME, and the authorization relationship may also be verified by the HSS. The first data packet is sent to the UE. In the scenario that the small data between the UE and the server is transmitted through the T5 interface between the MME and the MTC-IWF, there is no corresponding security mechanism to protect the data transmission between the UE and the subscription server, and the system data transmission is improved. Security.
图 11为基于 PKI系统使用公钥私钥保护 UE到服务器的上行数据包传输 交互图。 在本实施例中, 服务器上保存了自身的私钥, 同时也保存了与其有 签约关系 UE的公钥,每个 UE上保存了自身的私钥, 同时也保存了与其有签 约关系的服务器的公钥, 在上行方向, UE使用其私钥对小数据包进行签名, 用要发送给的服务器的公钥加密该小数据包, 而服务器接收到该小数据包, 则使用该 UE的公钥验证签名的有效性, 再用服务器的私钥解密小数据包, 如图 11所示, 具体的交互过程如下: S1101 : UE用 UE的私钥和服务器的公钥对第二数据包进行签名和加密, 并发送给 MME。 11 is an uplink data packet transmission interaction diagram for protecting a UE to a server by using a public key private key based on a PKI system. In this embodiment, the server stores its own private key, and also stores the public key of the UE with which it has a contractual relationship. Each UE stores its own private key, and also saves the server with which it has a contractual relationship. Public key, in the uplink direction, the UE uses its private key to sign the small data packet, encrypts the small data packet with the public key of the server to be sent, and when the server receives the small data packet, the public key of the UE is used. Verify the validity of the signature, and then decrypt the small data packet with the private key of the server. As shown in Figure 11, the specific interaction process is as follows: S1101: The UE signs and encrypts the second data packet by using the private key of the UE and the public key of the server, and sends the second data packet to the MME.
在本实施例中, 第二数据包通过 NAS消息 (如 Generic NAS Transport message) 发送给 MME。 该第二数据包中可以携带服务器的 ID, UE的 ID, 以 及 APP的 ID和数据的识别标识等信息。  In this embodiment, the second data packet is sent to the MME through a NAS message (such as a Generic NAS Transport message). The second data packet may carry information such as an ID of the server, an ID of the UE, and an ID of the APP and an identification identifier of the data.
S1102: MME根据该 UE的公钥验证签名是否有效, 若验证签名有效, 则 将该第二数据包发送给 IWF。  S1102: The MME verifies whether the signature is valid according to the public key of the UE, and if the verification signature is valid, sends the second data packet to the IWF.
在本实施例中, 若验证签名无效, 则 MME可以 block该第二数据包。验证 签名有效时, MME可以将该第二数据包封装在 T5-AP-PDU中, 通过 T5-AP协 议发送给 IWF。  In this embodiment, if the verification signature is invalid, the MME may block the second data packet. When the signature is valid, the MME may encapsulate the second data packet in the T5-AP-PDU and send it to the IWF through the T5-AP protocol.
S1103 : IWF将根据该 UE的公钥验证签名是否有效, 若验证该第二数据 包签名有效, 则将该第二数据包发送给服务器。  S1103: The IWF verifies whether the signature is valid according to the public key of the UE, and if the signature of the second data packet is verified to be valid, the second data packet is sent to the server.
在本实施例中, IWF根据该 UE的 ID査找到 UE的公钥, 验证该第二数据包 的签名是否有效, 若签名无效, 则 block该第二数据包, 若有效则该第二数据 包封装在 Tsp-AP-PDU中, 通过 Tsp-AP协议发给服务器。  In this embodiment, the IWF searches for the public key of the UE according to the ID of the UE, and verifies whether the signature of the second data packet is valid. If the signature is invalid, the second data packet is blocked, and if the second data packet is valid, the second data packet is valid. It is encapsulated in the Tsp-AP-PDU and sent to the server through the Tsp-AP protocol.
S1104: 服务器接收第二数据包, 根据 UE的公钥验证签名是否有效, 若 验证第二数据包的签名有效, 再利用该服务器的私钥解密第二数据包。  S1104: The server receives the second data packet, and verifies whether the signature is valid according to the public key of the UE. If the signature of the second data packet is verified to be valid, the second data packet is decrypted by using the private key of the server.
在本实施例中, 服务器可以通过 UE的公钥验证签名是否有效, 若有效, 则利用服务器本身的私钥进行解密第二数据包, 并响应。  In this embodiment, the server can verify whether the signature is valid by the public key of the UE, and if valid, decrypt the second data packet by using the private key of the server itself, and respond.
进一歩的,如果需要返回对应的数据包或者确认字符(Acknowledgement, 简称 ACK) , 则该服务器将其用服务器的私钥签名数据包或者 ACK, 用目标 UE的公钥加密数据包或者 ACK (另外, ACK可以不用加密)通过 IWF和 MME 发送给 UE。  Further, if it is necessary to return the corresponding data packet or Acknowledgement (ACK), the server will use the private key of the server to sign the data packet or ACK, and encrypt the data packet or ACK with the public key of the target UE (in addition , ACK can be sent to the UE through the IWF and MME without encryption.
本实施例提供的数据的安全传输方法, 通过服务器和 UE的公钥私钥对第 二数据包进行加密签名, 通过 MME、 IWF对第二数据包签名的验证, 或者 提前 block, 将第二数据包发送给服务器。解决了在 UE和服务器之间的小数据 通过 MME和 MTC-IWF之间的 T5接口传输的场景下, 没有相应的安全机制来 保护 UE与签约服务器之间的数据传输的问题, 提高系统数据传输的安全性。  In the secure transmission method of the data provided by the embodiment, the second data packet is encrypted and signed by the server and the public key of the UE, and the second data packet is verified by the MME or the IWF, or the second data is advanced. The package is sent to the server. In the scenario that the small data between the UE and the server is transmitted through the T5 interface between the MME and the MTC-IWF, there is no corresponding security mechanism to protect the data transmission between the UE and the subscription server, and the system data transmission is improved. Security.
图 12为 UE和 IWF协商 SDT安全上下文的交互图。 本实施例中, HSS上保 存着服务器的 ID, UE的 ID, APP的 ID的关联关系, 另外还保存了该 UE的 IMSI 信息。 如图 12所示, 具体的协商过程如下: FIG. 12 is an interaction diagram of a UE and an IWF negotiating an SDT security context. In this embodiment, the HSS stores the association between the ID of the server, the ID of the UE, and the ID of the APP, and also stores the IMSI of the UE. information. As shown in Figure 12, the specific negotiation process is as follows:
S1201 : MME向 HS S发送 UE的 IMSI或着 TMSI和 MME为 UE选择的互通设 备 IWF的 ID。  S1201: The MME sends the IMSI of the UE or the TMSI of the UE to the HS S and the ID of the interworking device IWF selected by the MME for the UE.
在本实施例中, UE接入网络中后, 若有特定的接入 IWF, 则 MME直接发 送 IMSI给 HSS , 若无特定接入的 IWF, 网络中存在多个 IWF, MME可以根据 IWF负载等情况为该 UE选择服务 IWF,此时 MME需要将 IWF的 ID报告给 HSS, 以便 HSS生成 SDT密钥, 并将该 SDT密钥发给对应的 IWF。  In this embodiment, after the UE accesses the network, if there is a specific access IWF, the MME directly sends the IMSI to the HSS. If there is no specific access IWF, there are multiple IWFs in the network, and the MME may load according to the IWF. In this case, the UE selects the serving IWF. At this time, the MME needs to report the ID of the IWF to the HSS, so that the HSS generates an SDT key, and sends the SDT key to the corresponding IWF.
S1202: HSS根据 IMSI査询所述 UE的签约数据, 判断 UE具有小数据业务 的特性时, 则根据密钥生成参数生成 SDT密钥。  S1202: The HSS queries the subscription data of the UE according to the IMSI, and determines that the UE has the characteristics of the small data service, and generates an SDT key according to the key generation parameter.
在本实施例中, HSS根据 IMSI査找 UE的签约数据, 如果该 UE是机器 类通信的 UE, 既具有小数据传输业务特性, 则根据密钥生成参数为其生成 SDT安全上下文, 其中 SDT密钥的生成参数为 Kasme、 IK、 CK、 IWF的 ID、 UE的 ID或 IMSI、 APP的 ID、 RAND, Nonce_SDT、 SDT密钥标签中的至 少一项。  In this embodiment, the HSS searches for the subscription data of the UE according to the IMSI. If the UE is a UE of the machine type communication and has the small data transmission service characteristic, the SDT security context is generated according to the key generation parameter, where the SDT key is generated. The generated parameters are at least one of Kasme, IK, CK, IWF ID, UE ID or IMSI, APP ID, RAND, Nonce_SDT, SDT key label.
S1203: HSS将 SDT密钥发送给 IWF。  S1203: The HSS sends the SDT key to the IWF.
在本实施例中, 在发送 SDT算法的同时, 将 UE的 IMSI信息, UE的 ID、 服务器的 ID以及 APP的 ID也发送给 IWF。  In this embodiment, the IMSI information of the UE, the ID of the UE, the ID of the server, and the ID of the APP are also sent to the IWF while the SDT algorithm is being transmitted.
S1203: HSS通过 MME将生成的密钥生成参数发送给 UE, 同时 MME通过 NAS安全模式命令 (Service Capability Server, 简称 SMC) 将 IWF的 ID发送给 UE。  S1203: The HSS sends the generated key generation parameter to the UE by using the MME, and the MME sends the ID of the IWF to the UE by using a NAS (Service Capability Server, SMC for short).
S1204: UE接收 HSS发送的的密钥生成参数, 并根据该密钥生成参数生 成 SDT安全上下文。  S1204: The UE receives a key generation parameter sent by the HSS, and generates an SDT security context according to the key generation parameter.
在本实施例中, UE在非接入安全模式命令 NAS SMC过程中协商 SDT安全 保护算法, 或者, 在非接入安全模式命令 NAS SMC过程中协商的非接入层安 全算法作为 SDT安全保护算法。  In this embodiment, the UE negotiates the SDT security protection algorithm in the non-access security mode command NAS SMC process, or the non-access layer security algorithm negotiated in the non-access security mode command NAS SMC process as the SDT security protection algorithm. .
S1205: MME将与 UE协商的 NAS算法发送给 IWF, 作为 SDT安全保护算 法。  S1205: The MME sends the NAS algorithm negotiated with the UE to the IWF as an SDT security protection algorithm.
在本实施例中, MME将协商的 NAS算法发送给 IWF, 作为 SDT安全保护 算法, IWF保存 SDT密钥和该 SDT安全保护算法, 作为 SDT安全上下文。 协商 完成后, 若在服务器和 UE之间有数据包的传递, 则可以利用该 SDT安全上下 文进行加密解密, 或者完整性保护。 In this embodiment, the MME sends the negotiated NAS algorithm to the IWF as an SDT security protection algorithm, and the IWF saves the SDT key and the SDT security protection algorithm as the SDT security context. After the negotiation is completed, if there is a packet transfer between the server and the UE, the SDT can be safely used up and down. Encryption and decryption, or integrity protection.
进一歩的, IWF将 SDT安全上下文, UE的 ID、 服务器的 ID以及 APP的 ID 发送给服务器。  Further, the IWF sends the SDT security context, the UE ID, the server ID, and the APP ID to the server.
图 13为基于 SDT安全上下文保护服务器到 UE的下行数据包传输交互 图。 在本实施例中, IWF和 UE都存储了经图 12所示歩骤协商的 SDT安全 上下文 ,IWF将安全上下文发送给服务器。 在下行方向, 服务器使用 SDT安 全上下文对第一数据包进行加密和或完整性保护, 而 UE接收到第一数据包, 则使用该 SDT安全上下文验证 MAC-I, 并解密该第一数据包, 如图 13所示, 具体的交互过程如下:  Figure 13 is a diagram showing the downlink data packet transmission interaction between the server and the UE based on the SDT security context protection. In this embodiment, both the IWF and the UE store the SDT security context negotiated in step 12, and the IWF sends the security context to the server. In the downlink direction, the server encrypts and integrity protects the first data packet by using the SDT security context, and the UE receives the first data packet, uses the SDT security context to verify the MAC-I, and decrypts the first data packet. As shown in Figure 13, the specific interaction process is as follows:
S1301 : 服务器根据所述 SDT安全上下文对第一数据包进行加密或加密 和完整性保护, 并发送给 IWF。  S1301: The server encrypts or encrypts and protects the first data packet according to the SDT security context, and sends the first data packet to the IWF.
S1302: IWF根据 UE的 ID或服务器的 ID和 UE的 ID,获取对应的 SDT 安全上下文, 对第一数据包的 MAC-I进行验证, 并在验证通过后, 将第一数 据发送给 MME。  S1302: The IWF obtains the corresponding SDT security context according to the ID of the UE or the ID of the server and the ID of the UE, and validates the MAC-I of the first data packet, and sends the first data to the MME after the verification is passed.
在本实施例中, IWF根据服务器的 ID、 UE的 ID和 APP的 ID中的一个 或多个以及其本地保存的白 /黑名单列表, 验证该服务器是否可以发起 SDT 小数据业务, 若验证该服务器可以发起小数据包的业务, 再验证第一数据包 的 MAC-I, 若验证没有通过, 则 block第一数据包, 若验证通过, 则将该第 一数据包封装在 T5-AP-PDU中, 通过 T5-AP协议发送给 MME。  In this embodiment, the IWF verifies whether the server can initiate the SDT small data service according to one or more of the ID of the server, the ID of the UE, and the ID of the APP, and the locally saved white/black list. The server may initiate the service of the small data packet, and then verify the MAC-I of the first data packet. If the verification fails, the first data packet of the block, if the verification succeeds, the first data packet is encapsulated in the T5-AP-PDU. The MME is sent to the MME through the T5-AP protocol.
可选的, 如果有需要, IWF还可以将服务器的 ID、 UE的 ID发送给 HSS 作进一歩的验证, HSS根据预先配置的授权列表中保存的服务器的 ID和 UE 的 ID的对应关系, 对所述第一数据包中的所述服务器的 ID和所述 UE的 ID 进行匹配检査, 在检査所述服务器的 ID对应的服务器允许向所述 UE的 ID 对应的 UE发送数据包后, 将所述第一数据包发送给 MME。  Optionally, if necessary, the IWF may send the ID of the server and the ID of the UE to the HSS for further verification. The HSS according to the correspondence between the ID of the server and the ID of the UE saved in the pre-configured authorization list. Performing a matching check on the ID of the server in the first data packet and the ID of the UE, after checking that the server corresponding to the ID of the server is allowed to send a data packet to the UE corresponding to the ID of the UE, Sending the first data packet to the MME.
或者, IWF还可以将服务器的 ID、 UE的 ID、 和 APP的 ID发送给 HSS 作进一歩的验证, HSS 根据预先配置的授权列表中保存的服务器的 ID、 UE 的 ID、 和 APP的 ID的对应关系, 对所述第一数据包中的所述服务器的 ID、 所述 UE的 ID、和 APP的 ID进行匹配检査, 在检査所述服务器的 ID对应的 服务器允许向所述 UE的 ID和 APP的 ID对应的应用发送数据包后, 将所述 第一数据包发送给 MME。 S1303: MME将第一数据包通过 NAS消息发送给 UE。 Alternatively, the IWF may also send the ID of the server, the ID of the UE, and the ID of the APP to the HSS for further verification. The HSS according to the ID of the server, the ID of the UE, and the ID of the APP saved in the pre-configured authorization list. Corresponding relationship, performing matching check on the ID of the server in the first data packet, the ID of the UE, and the ID of the APP, and checking that the server corresponding to the ID of the server is allowed to the UE After the application corresponding to the ID and the ID of the APP sends the data packet, the first data packet is sent to the MME. S1303: The MME sends the first data packet to the UE by using a NAS message.
S1304: UE接收第一数据包, 并根据 IWF的 ID选择 SDT安全上下文验 证第一数据包的 MAC-I, 并在验证通过后, 解密第一数据包。  S1304: The UE receives the first data packet, and selects the SDT security context to verify the MAC-I of the first data packet according to the ID of the IWF, and decrypts the first data packet after the verification is passed.
在本实施例中, 如果 UE和多个 IWF之间协商了 SDT安全上下文, 则 UE需 要根据 IWF的 ID选择对应的 SDT安全上下文, 对第一数据包进行 MAC-I验证, 若验证没有通过, 则将该第一数据包 block, 若验证通过, 则对第一数据包进 行解密并发送给相应的 APP。  In this embodiment, if the SDT security context is negotiated between the UE and the multiple IWFs, the UE needs to select the corresponding SDT security context according to the ID of the IWF, and perform MAC-I verification on the first data packet. If the verification fails, Then, the first data packet block is decrypted, and if the verification is passed, the first data packet is decrypted and sent to the corresponding APP.
进一歩的,如果需要返回对应的数据包或者 ACK,则该 APP将其发给 UE, 用 UE的 SDT安全上下文加密或者加密和完整性保护数据包或者 ACK (另外, ACK可以不用加密) 通过 MME和 IWF发送给服务器。  Further, if it is necessary to return the corresponding data packet or ACK, the APP sends it to the UE, and uses the SDT security context encryption or encryption and integrity protection data packet or ACK of the UE (in addition, the ACK may not be encrypted) through the MME. And the IWF is sent to the server.
本实施例提供的数据的安全传输方法, 通过 IWF和 UE的协商的 SDT安全 上下文对第一数据包进行加密或者加密和完整性保护, 通过 IWF对第一数据 包签名的验证, 还可以用 HSS验证授权关系, 将第一数据包发送给 UE。 解决 了在 UE和服务器之间的小数据通过 MME和 MTC-IWF之间的 T5接口传输的场 景下, 没有相应的安全机制来保护 UE与签约服务器之间的数据传输的问题, 提高系统数据传输的安全性。  In the secure transmission method of the data provided by the embodiment, the first data packet is encrypted or encrypted and integrity protected by the negotiated SDT security context of the IWF and the UE, and the first data packet signature is verified by the IWF, and the HSS can also be used. Verify the authorization relationship and send the first data packet to the UE. In the scenario that the small data between the UE and the server is transmitted through the T5 interface between the MME and the MTC-IWF, there is no corresponding security mechanism to protect the data transmission between the UE and the subscription server, and the system data transmission is improved. Security.
图 14为基于 SDT安全上下文保护 UE到服务器的上行数据包传输交互 图。 在本实施例中, IWF和 UE都存储了经图 12所示歩骤协商的 SDT安全 上下文 ,IWF将安全上下文发送给服务器。 在下行方向, 服务器使用 SDT安 全上下文对第一数据包进行加密和或完整性保护, 而 UE接收到第一数据包, 则使用该 SDT安全上下文验证 MAC-I, 并解密该第一数据包, 如图 13所示, 具体的交互过程如下:  Figure 14 is a diagram showing the uplink packet transmission interaction of the UE to the server based on the SDT security context. In this embodiment, both the IWF and the UE store the SDT security context negotiated in step 12, and the IWF sends the security context to the server. In the downlink direction, the server encrypts and integrity protects the first data packet by using the SDT security context, and the UE receives the first data packet, uses the SDT security context to verify the MAC-I, and decrypts the first data packet. As shown in Figure 13, the specific interaction process is as follows:
S1401 : 如果 UE和多个 IWF之间协商了 SDT安全上下文, 则 UE根据 IWF 的 ID査找对应的 SDT安全上下文, 并用该 SDT安全上下文对第二数据包进行 加密或加密和完整性保护, 并发送给 MME。  S1401: If the SDT security context is negotiated between the UE and the multiple IWFs, the UE searches for the corresponding SDT security context according to the ID of the IWF, and encrypts or encrypts and protects the second data packet with the SDT security context, and sends To the MME.
S1402: MME根据所述授权列表中保存的服务器、 UE以及 APP的对应关 系, 对所述第二数据包中的所述服务器的 ID、 所述 UE的 ID和所 APP的 ID进行 匹配检査, 在检査所述 UE的 ID对应的 UE允许向所述服务器的 ID和 APP的 ID 对应的应用发送数据包后将该第二数据包转发给 IWF; 或者, MME根据所述 授权列表中保存的服务器、 UE的对应关系, 对所述第二数据包中的所述服务 器的 ID和所述 UE的 ID进行匹配检査, 在检査所述 UE的 ID对应的 UE允许向所 述服务器的 ID对应的服务器发送数据包后将该第二数据包转发给 IWF。 S1402: The MME performs a matching check on the ID of the server, the ID of the UE, and the ID of the APP in the second data packet according to the correspondence between the server, the UE, and the APP saved in the authorization list. After the UE corresponding to the ID of the UE is allowed to send the data packet to the application corresponding to the ID of the server and the ID of the APP, the second data packet is forwarded to the IWF; or the MME saves according to the authorization list. Corresponding relationship between the server and the UE, the service in the second data packet The ID of the UE is matched with the ID of the UE, and the second data packet is forwarded to the IWF after the UE corresponding to the ID of the UE is allowed to send a data packet to the server corresponding to the ID of the server.
在本实施例中, 为了 MME能够 block非法数据, MME根据预先配置的授 权列表、 所述第二数据包中的服务器的 ID、 UE的 ID, 和 /或 APP的 ID, 根据所 述授权列表中保存的服务器、 UE和 /或 APP的对应关系, 对所述第二数据包中 的所述服务器的 ID、所述 UE的 ID, 和 /或所述 APP的 ID进行匹配检査, 在检査 所述 UE的 ID对应的 UE允许向所述服务器的 ID和 APP的 ID对应的应用发送数 据包后, 或者, 在检査所述 UE的 ID对应的 UE允许向所述服务器的 ID对应的 服务器发送数据包后, 将所述第二数据包发送给所述服务器。 当然, 也可以 在 IWF上 (或 HSS中) 进行匹配检査。  In this embodiment, in order for the MME to block illegal data, the MME according to the pre-configured authorization list, the ID of the server in the second data packet, the ID of the UE, and/or the ID of the APP, according to the authorization list. Corresponding relationship between the saved server, the UE, and/or the APP, performing matching check on the ID of the server in the second data packet, the ID of the UE, and/or the ID of the APP, in the check The UE corresponding to the ID of the UE is allowed to send a data packet to the application corresponding to the ID of the server and the ID of the APP, or the server corresponding to the ID corresponding to the ID of the UE is allowed to check the ID corresponding to the ID of the server. After transmitting the data packet, the second data packet is sent to the server. Of course, you can also perform a matching check on the IWF (or HSS).
S1403 : IWF将根据该 UE的 ID査找对应的 SDT安全上下文, 并用该 SDT 安全上下文验证 MAC-I, 若验证通过则将该第二数据包发送给服务器。  S1403: The IWF searches for the corresponding SDT security context according to the ID of the UE, and verifies the MAC-I with the SDT security context. If the verification succeeds, the second data packet is sent to the server.
S1404: 服务器接收第二数据包, 根据接收 IWF发送的 SDT安全上下文验 证 MAC-I, 若验证通过再利用该 SDT安全上下文解密第二数据包。  S1404: The server receives the second data packet, and verifies the MAC-I according to the SDT security context sent by the receiving IWF, and if the verification decrypts the second data packet by reusing the SDT security context.
进一歩的, 如果需要返回对应的数据包或者 ACK, 则该服务器根据 SDT 安全上下文加密或者加密和完整性保护数据包或者 ACK (另外, ACK可以不 用加密) 通过 IWF和 MME发送给 UE。  Further, if it is necessary to return a corresponding data packet or ACK, the server transmits the data packet or ACK according to the SDT security context encryption or encryption and integrity protection (in addition, the ACK may not be encrypted) to the UE through the IWF and the MME.
本实施例提供的数据的安全传输方法, 通过 IWF和 UE的协商的 SDT安全 上下文对第二数据包进行加密或者加密和完整性保护, MME验证授权关系, 还可以用 IWF或 HSS验证授权关系, 通过 IWF对第二数据包签名的验证, 将第 二数据包发送给服务器。 解决了在 UE和服务器之间的小数据通过 MME和 MTC-IWF之间的 T5接口传输的场景下, 没有相应的安全机制来保护 UE与签 约服务器之间的数据传输的问题, 提高系统数据传输的安全性。  In the secure transmission method of the data provided by the embodiment, the second data packet is encrypted or encrypted and integrity protected by the negotiated SDT security context of the IWF and the UE, and the MME verifies the authorization relationship, and the IWF or the HSS can also be used to verify the authorization relationship. The second data packet is sent to the server through the verification of the signature of the second data packet by the IWF. In the scenario that the small data between the UE and the server is transmitted through the T5 interface between the MME and the MTC-IWF, there is no corresponding security mechanism to protect the data transmission between the UE and the subscription server, and the system data transmission is improved. Security.
此外, 本发明数据的安全传输方法还提供一种结合图 10、 11和图 13、 14 所示的实施例的数据包的安全保护方式。 只在服务器上配置服务器的私钥, 服务器用私钥对下行第一数据包进行签名, 如果需要加密, 密钥协商根据图 12所示的技术方案, 协商 SDT密钥, 对第一数据包进行加密。 则: 服务器向 UE发送第一数据包的下行方向, 完整性保护由服务器的公钥生成的签名来实 现, 而加密保护由 IWF协商的 SDT安全上下文实现, 具体过程参考图 13所示 实施例; 由 UE向服务器发送第二数据包的上行方向, 与图 14所示的实施例完 全一致。 Furthermore, the secure transmission method of the data of the present invention also provides a security protection method for the data packets in combination with the embodiments shown in Figs. 10, 11 and Figs. The private key of the server is configured only on the server, and the server signs the first data packet with the private key. If encryption is required, the key negotiation is based on the technical solution shown in FIG. 12, and the SDT key is negotiated to perform the first data packet. encryption. Then: the server sends the downlink direction of the first data packet to the UE, the integrity protection is implemented by the signature generated by the public key of the server, and the encryption protection is implemented by the SDT security context negotiated by the IWF, and the specific process refers to the embodiment shown in FIG. 13; The uplink direction of the second data packet is sent by the UE to the server, and the embodiment shown in FIG. 14 is completed. All consistent.
或者, 采用 PKI系统的服务器和 UE的公钥私钥结合现有 LTE NAS安全的 方法: UE和 MME之间的安全依赖于 NAS安全和 MME和 IWF之间的安全依赖 于网络域安全(Network Domain Security, 简称 NDS ) 安全, IWF的安全和服 务器的安全依赖于 NDS安全,包括网络协议安全性(Internet Protocol Security, 简称 IPsec) 和安全传输层协议 (Transport Layer Security, 简称 TLS ) 。 贝 lj: 下行方向, 服务器用其私钥对第一数据包进行签名, IWF、 MME, UE都査询 服务器的公钥来验证该第一数据包的签名的有效性, 服务器的第一数据包的 授权依然由 IWF和 /或 HSS验证(可选的, 在 IWF上配置 IWF的证书和私钥, 由 IWF对第一数据包进行签名, IWF和服务器之间安全由 Internet协议安全性 IPsec保证) , 对第一数据包的加密则由 MME上的 NAS安全实现; 上行方向, 则完全由 NAS安全保护, IWF和服务器之间安全由 IPsec保证, MME上配置有 UE的 ID、服务器的 ID、 APP的 ID的绑定关系, 以便检査 UE的上行第二数据包 的数据授权。 只有在 MME上通过 NAS完整性验证并通过授权验证, MME才 会把第二数据包发给 IWF, 否则 block, 这样做可以尽早 block非法数据包 (可 选的, 授权验证可以在 IWF上或 HSS上进行) 。  Alternatively, the server using the PKI system and the public key of the UE are combined with the existing LTE NAS security method: The security between the UE and the MME depends on the NAS security and the security between the MME and the IWF depends on the network domain security (Network Domain Security, referred to as NDS) Security, IWF security and server security rely on NDS security, including Internet Protocol Security (IPsec) and Transport Layer Security (TLS). In the downstream direction, the server signs the first data packet with its private key, and the IWF, MME, and UE both query the public key of the server to verify the validity of the signature of the first data packet, and the first data packet of the server. The authorization is still verified by the IWF and/or HSS (optional, the IWF certificate and private key are configured on the IWF, the first data packet is signed by the IWF, and the security between the IWF and the server is guaranteed by the Internet Protocol security IPsec) The encryption of the first data packet is implemented by the NAS on the MME; in the uplink direction, it is completely protected by the NAS security, and the security between the IWF and the server is guaranteed by the IPsec. The MME is configured with the ID of the UE, the ID of the server, and the APP. The binding relationship of the ID, in order to check the data authorization of the UE's uplink second data packet. Only after the NAS integrity verification and authorization verification on the MME, the MME will send the second data packet to the IWF, otherwise block, so that the illegal data packet can be blocked as early as possible (optional, the authorization verification can be on the IWF or HSS) Carried on) .
本发明实施例提供的数据的安全传输方法, 主要针对 T5接口的机器类通 信的小数据传输, 建立了 UE和 IWF之间的安全关联, 或者建立了 UE和服务器 之间的端到端安全关联, 从而保证了机器类数据的安全传输, 该数据的安全 传输方法以及传输方法还可应用于类似的通信系统或通信场景, 本发明对此 不做限制。  The method for securely transmitting data provided by the embodiment of the present invention is mainly for small data transmission of machine type communication of the T5 interface, establishing a security association between the UE and the IWF, or establishing an end-to-end security association between the UE and the server. Therefore, the secure transmission of the machine-like data is ensured, and the secure transmission method and the transmission method of the data can be applied to a similar communication system or communication scenario, which is not limited by the present invention.
图 15为本发明 UE的一实施例的结构示意图,如图 15所示,该 UE包括 收发模块 151和处理模块 152。 其中, 收发模块 151, 用于接收所述服务器通 过互通设备 IWF和移动性管理实体 MME发送的第一数据包, 所述第一数据 包携带所述服务器的 ID或所述 IWF的 ID; 处理模块 152, 用于根据所述第 一数据包中的所述服务器的 ID或所述 IWF的 ID,获得所述服务器的公钥和 / 或所述 SDT安全上下文, 其中, 所述 UE签约的服务器的公钥或者与归属用 户服务器 HSS协商生成 SDT安全上下文存储在所述 UE上,且通过所述服务 器的 ID或所述 IWF的 ID来标识;所述处理模块 152还用于根据所述服务器 的公钥和所述 UE的私钥, 或者所述 SDT安全上下文, 或者所述服务器的公 钥和所述 SDT安全上下文, 对所述第一数据包进行验证和解密处理, 得到解 密后的第一数据包。 FIG. 15 is a schematic structural diagram of an embodiment of a UE according to the present invention. As shown in FIG. 15, the UE includes a transceiver module 151 and a processing module 152. The transceiver module 151 is configured to receive a first data packet sent by the server by using the interworking device IWF and the mobility management entity MME, where the first data packet carries an ID of the server or an ID of the IWF; 152. The public key and/or the SDT security context of the server is obtained according to an ID of the server in the first data packet or an ID of the IWF, where the server that is subscribed by the UE The public key is negotiated with the home subscriber server HSS to generate an SDT security context, which is stored on the UE, and is identified by an ID of the server or an ID of the IWF; the processing module 152 is further configured to a key and a private key of the UE, or the SDT security context, or the public of the server And the SDT security context, performing verification and decryption processing on the first data packet to obtain the decrypted first data packet.
本实施例提供的 UE,用于执行图 1所示方法的技术方案, 处理模块将收 发模块接收到的服务器向 UE发送的下行第一数据包进行验证和解密, 并将 解密后的第一数据包发送给对应的应用程序, 完成小数据的传输, 解决了在 UE和服务器之间的小数据通过 MME和 MTC-IWF之间的 T5接口传输的场 景下, 没有相应的安全机制来保护 UE与签约服务器之间的数据传输的问题, 提高系统数据传输的安全性。  The UE provided in this embodiment is used to perform the technical solution of the method shown in FIG. 1. The processing module performs verification and decryption on the downlink first data packet sent by the server received by the transceiver module to the UE, and decrypts the first data. The packet is sent to the corresponding application to complete the transmission of the small data. In the scenario where the small data between the UE and the server is transmitted through the T5 interface between the MME and the MTC-IWF, there is no corresponding security mechanism to protect the UE and the scenario. The problem of data transmission between the contracted servers improves the security of system data transmission.
可选的, 所述收发模块 151还用于接收所述 HSS发送的密钥生成参数; 所述处理模块 152还用于根据所述密钥生成参数, 生成 SDT密钥; 所述处理 模块 152还用于在非接入安全模式命令 NAS SMC过程中协商 SDT安全保护 算法, 或者, 在非接入安全模式命令 NAS SMC过程中协商的非接入层安全 算法作为 SDT安全保护算法。  Optionally, the transceiver module 151 is further configured to receive a key generation parameter that is sent by the HSS, where the processing module 152 is further configured to generate an SDT key according to the key generation parameter, where the processing module 152 further The SDT security protection algorithm is used to negotiate the SDT security protection algorithm in the non-access security mode command NAS SMC process, or the non-access stratum security algorithm negotiated in the non-access security mode command NAS SMC process as the SDT security protection algorithm.
可选的, 所述处理模块 152具体用于:  Optionally, the processing module 152 is specifically configured to:
根据所述服务器的公钥验证所述第一数据包中的签名是否有效; 若验证所述第一数据包中的签名有效, 则根据所述 UE的私钥对所述第 一数据包进行解密处理, 得到解密后的所述第一数据包。  Verifying whether the signature in the first data packet is valid according to the public key of the server; if the signature in the first data packet is valid, decrypting the first data packet according to the private key of the UE Processing, obtaining the decrypted first data packet.
可选的, 所述处理模块 152具体用于:  Optionally, the processing module 152 is specifically configured to:
根据所述 SDT安全上下文验证所述第一数据包中的消息认证码 MAC-I; 若验证成功, 则对所述第一数据包进行解密处理, 得到解密后的所述第一数 据包。  And verifying, by the SDT security context, the message authentication code MAC-I in the first data packet; if the verification is successful, decrypting the first data packet to obtain the decrypted first data packet.
可选的, 所述处理模块 152具体用于:  Optionally, the processing module 152 is specifically configured to:
根据所述服务器的公钥验证所述第一数据包中的签名是否有效; 若验证 所述第一数据包的签名有效, 则根据所述 SDT安全上下文对所述第一数据包 进行解密处理, 或者根据所述 SDT安全上下文对所述第一数据包进行完整性 验证和解密处理, 得到解密后的所述第一数据包。  Verifying whether the signature in the first data packet is valid according to the public key of the server; if the signature of the first data packet is valid, decrypting the first data packet according to the SDT security context, Or performing integrity verification and decryption processing on the first data packet according to the SDT security context to obtain the decrypted first data packet.
可选的, 所述收发模块 151还用于接收所述 HSS发送的参数, 所述 HSS 发送的参数包括所述 IWF的 ID、 所述 APP的 ID、 随机数 RAND、 临时数据 中的至少一项。  Optionally, the transceiver module 151 is further configured to receive the parameter sent by the HSS, where the parameter sent by the HSS includes at least one of an ID of the IWF, an ID of the APP, a random number RAND, and temporary data. .
上述实施例的执行方式与图 1所示的方法实施例一至四相对应, 用于执 行实施例一至四的技术方案, 方法、 原理以及技术效果可参见方法实施例, 此处不再赘述。 The implementation manner of the above embodiment corresponds to the method embodiments 1 to 4 shown in FIG. For the technical solutions, methods, principles, and technical effects of the first to fourth embodiments, refer to the method embodiments, and details are not described herein again.
图 16为本发明服务器的一实施例的结构示意图, 如图 16所示, 该服务 器包括处理模块 161和收发模块 162。 其中, 处理模块 161, 用于根据所述服 务器的私钥和与所述服务器签约的用户设备 UE的公钥对等待发送的第一数 据包进行签名和加密处理, 或者根据 SDT安全上下文对所述第一数据包进行 加密处理或加密和完整性保护处理, 其中, 所述服务器的私钥和与所述服务 器签约的所述 UE公钥存储在所述服务器上, 所述 SDT安全上下文为互通设 备 IWF发送的;  FIG. 16 is a schematic structural diagram of an embodiment of a server according to the present invention. As shown in FIG. 16, the server includes a processing module 161 and a transceiver module 162. The processing module 161 is configured to perform signature and encryption processing on the first data packet to be sent according to the private key of the server and the public key of the user equipment UE that is subscribed to the server, or according to the SDT security context. The first data packet is subjected to an encryption process or an encryption and integrity protection process, wherein the private key of the server and the public key of the UE that is contracted with the server are stored on the server, and the SDT security context is an interworking device. Sent by the IWF;
收发模块 162, 用于将加密后的第一数据包通过所述 IWF和移动性管理 实体 MME发送给所述 UE; 以供所述 UE根据所述第一数据包中的服务器的 ID, 获取所述服务器的公钥和 /或所述 SDT 安全上下文, 并根据所述服务器 的公钥和所述 UE的私钥, 或者所述 SDT安全上下文, 或者与所述服务器的 公钥和所述 SDT安全上下文, 对所述第一数据包进行验证和解密处理, 得到 解密后的所述第一数据包。  The transceiver module 162 is configured to send the encrypted first data packet to the UE by using the IWF and the mobility management entity MME, where the UE obtains the location according to the ID of the server in the first data packet. Describe the public key of the server and/or the SDT security context, and according to the public key of the server and the private key of the UE, or the SDT security context, or the public key of the server and the SDT security Context, performing verification and decryption processing on the first data packet to obtain the decrypted first data packet.
本实施例提供的服务器, 用于执行图 2所示方法, 处理模块根据服务器 的私钥和 UE的公钥对待发送的第一数据包进行加密和签名, 并通过收发模 块将签名加密后的第一数据包通过 IWF和 MME发送给该 UE, 完成数据包 的下行传输, 该服务器通过对数据包的签名和加密过程, 严格保护数据包在 UE和服务器之间的安全传输, 提高系统数据传输的安全性。  The server provided in this embodiment is configured to perform the method shown in FIG. 2, and the processing module encrypts and signs the first data packet to be sent according to the private key of the server and the public key of the UE, and encrypts the signature by the transceiver module. A data packet is sent to the UE through the IWF and the MME to complete downlink transmission of the data packet. The server strictly protects the secure transmission of the data packet between the UE and the server by signing and encrypting the data packet, thereby improving system data transmission. safety.
图 17为本发明 IWF的一实施例的结构示意图, 如图 17所示, 该 IWF 包括收发模块 171和处理模块 172。 其中, 收发模块 171, 用于接收服务器发 送的第一数据包, 所述第一数据包包括所述服务器的 ID和签名, 或者所述服 务器的 ID和 MAC-I; 处理模块 172, 用于根据所述服务器的公钥对所述签名 进行验证, 或用于根据 SDT安全上下文对所述 MAC-I进行验证, 并在验证 通过后将所述第一数据包通过移动性管理实体 MME发送给 UE; 或者, 所述 处理模块还用于根据所述 SDT 安全上下文对所述第一数据包进行加密和 /或 完整性保护处理, 将所述第一数据包通过移动性管理实体 MME发送给 UE; 其中, 所述服务器的公钥和与所述服务器签约的所述 UE的公钥存储在所述 IWF上, 所述 SDT安全上下文为预先从归属用户服务器 HSS获取的。 本实施例提供的 IWF, 用于执行图 3所示方法, 收发模块接收服务器发 送的经过签名加密的第一数据包签名, 并通过处理模块验证该第一数据包的 签名的有效性, 或者验证消息认证码 MAC-I, 若验证该第一数据包的签名有 效或者 MAC-I验证通过, 则将该第一数据包通过 MME发送给该 UE, 完成 小数据包的下行传输, 该 IWF通过对数据包的签名和 MAC-I的验证, 严格 保护数据包在 UE和服务器之间的安全传输, 提高系统数据传输的安全性。 FIG. 17 is a schematic structural diagram of an embodiment of an IWF according to the present invention. As shown in FIG. 17, the IWF includes a transceiver module 171 and a processing module 172. The transceiver module 171 is configured to receive a first data packet sent by the server, where the first data packet includes an ID and a signature of the server, or an ID of the server and a MAC-I, and the processing module 172 is configured to: The public key of the server verifies the signature, or is used to verify the MAC-I according to an SDT security context, and send the first data packet to the UE through the mobility management entity MME after the verification is passed Or the processing module is further configured to: perform encryption and/or integrity protection processing on the first data packet according to the SDT security context, and send the first data packet to the UE by using a mobility management entity MME; The public key of the server and the public key of the UE that is contracted with the server are stored on the IWF, and the SDT security context is obtained in advance from the home subscriber server HSS. The IWF provided in this embodiment is used to perform the method shown in FIG. 3. The transceiver module receives the signed and encrypted first data packet signature sent by the server, and verifies the validity of the signature of the first data packet by using the processing module, or verifies The message authentication code MAC-I, if it is verified that the signature of the first data packet is valid or the MAC-I verification is passed, the first data packet is sent to the UE through the MME, and the downlink transmission of the small data packet is completed, and the IWF passes the The signature of the data packet and the verification of the MAC-I strictly protect the secure transmission of the data packet between the UE and the server, and improve the security of the system data transmission.
可选的, 所述收发模块 171还用于: 接收所述 HSS发送的 SDT密钥; 接收所述 UE通过所述 MME发送的 SDT安全保护算法; 其中, 所述 SDT安 全上下文包括所述 SDT密钥和所述 SDT安全保护算法。  The SDT security protection algorithm includes: Key and the SDT security protection algorithm.
可选的, 还包括: 所述处理模块 172用于根据所述服务器的 ID査询并获 取所述服务器的公钥, 并根据所述服务器的公钥, 验证所述第一数据包签名 是否有效; 若所述处理模块 172验证所述第一数据包签名有效, 所述收发模 块 171将所述第一数据包通过所述 MME发送给所述 UE;  Optionally, the processing module 172 is configured to query and acquire a public key of the server according to the ID of the server, and verify, according to the public key of the server, whether the first data packet signature is valid. If the processing module 172 verifies that the first data packet signature is valid, the transceiver module 171 sends the first data packet to the UE through the MME;
或者,  Or,
在所述第一数据包还包括: UE的 ID时, 所述处理模块 172用于用于根 据所述 UE的 ID获取所述 SDT安全上下文, 对所述 MAC-I进行验证;  When the first data packet further includes: an ID of the UE, the processing module 172 is configured to acquire the SDT security context according to the ID of the UE, and verify the MAC-I.
若所述处理模块 172验证所述第一数据包签名有效, 所述收发模块 171 将所述第一数据包通过所述 MME发送给所述 UE;  If the processing module 172 verifies that the first data packet signature is valid, the transceiver module 171 sends the first data packet to the UE through the MME;
或者,  Or,
在所述第一数据包还包括: APP的 ID时,所述处理模块 172用于根据所 述 UE的 ID和 APP的 ID获取所述 SDT安全上下文, 对所述 MAC-I进行验 证;  When the first data packet further includes: an ID of the APP, the processing module 172 is configured to acquire the SDT security context according to the ID of the UE and the ID of the APP, and verify the MAC-I;
若所述处理模块 172验证所述第一数据包 MAC-I有效,则所述收发模块 171将所述第一数据包通过所述 MME发送给所述 UE;  If the processing module 172 verifies that the first data packet MAC-I is valid, the transceiver module 171 sends the first data packet to the UE through the MME;
或者,  Or,
在所述第一数据包还包括: UE的 ID和 /或 APP的 ID时, 所述处理模块 172还用于根据所述 UE的 ID和 /或 APP的 ID获取所述 SDT安全上下文,对 所述第一数据进行加密和完整性保护处理;  When the first data packet further includes: an ID of the UE and/or an ID of the APP, the processing module 172 is further configured to acquire the SDT security context according to the ID of the UE and/or the ID of the APP, where Decoding the first data for encryption and integrity protection;
所述收发模块 171还用于将所述处理后的第一数据包通过所述 MME发 送给所述 UE; 或者, The transceiver module 171 is further configured to send the processed first data packet to the UE by using the MME; or,
在所述第一数据包还包括: UE的 ID和 /或 APP的 ID时, 所述处理模块 172还用于根据所述服务器的 ID获取所述服务器的公钥, 并根据所述服务器 的公钥, 验证所述签名; 若验证所述第一数据包的签名有效, 则根据用户 UE 的 ID和 /或 APP的 ID获取对应的所述 SDT安全上下文, 对所述第一数据进 行加密处理, 或者加密和完整性保护处理;  When the first data packet further includes: an ID of the UE and/or an ID of the APP, the processing module 172 is further configured to acquire the public key of the server according to the ID of the server, and according to the publicity of the server Key, verifying the signature; if the signature of the first data packet is valid, obtaining the corresponding SDT security context according to the ID of the user UE and/or the ID of the APP, and performing encryption processing on the first data, Or encryption and integrity protection processing;
所述收发模块 171还用于将所述处理后的第一数据包通过所述 MME发 送给所述 UE。  The transceiver module 171 is further configured to send the processed first data packet to the UE by using the MME.
可选的,若所述第一数据包中包括所述服务器的 ID和所述 UE的 ID,所 述处理模块 172还用于根据预先配置的授权列表中保存的服务器与 UE的对 应关系, 对所述第一数据包中的所述服务器的 ID和所述 UE的 ID进行匹配 检査, 在检査所述服务器与所述 UE 的对应关系正确后, 所述收发模块 171 将所述第一数据包通过所述 MME发送给所述 UE;  Optionally, if the first data packet includes the ID of the server and the ID of the UE, the processing module 172 is further configured to: according to the correspondence between the server and the UE saved in the pre-configured authorization list, Performing a matching check on the ID of the server in the first data packet and the ID of the UE. After checking that the correspondence between the server and the UE is correct, the transceiver module 171 will perform the first Transmitting a data packet to the UE by using the MME;
或者,  Or,
若所述第一数据包中包括所述服务器的 ID、 所述 UE的 ID和所述 APP 的 ID, 所述处理模块 172还用于根据预先配置的授权列表中保存的服务器、 UE以及 APP的对应关系,对所述第一数据包中的所述服务器的 ID、所述 UE 的 ID和所述 APP的 ID进行匹配检査, 在检査所述服务器、 所述 UE和所述 APP的对应关系正确后,所述收发模块 171将所述第一数据包通过所述 MME 发送给所述 UE;  If the first data packet includes the ID of the server, the ID of the UE, and the ID of the APP, the processing module 172 is further configured to: according to the server, the UE, and the APP saved in the pre-configured authorization list. Corresponding relationship, performing matching check on the ID of the server in the first data packet, the ID of the UE, and the ID of the APP, and checking the correspondence between the server, the UE, and the APP After the relationship is correct, the transceiver module 171 sends the first data packet to the UE by using the MME;
或者,  Or,
若所述第一数据包中包括所述服务器的 ID和所述 UE的 ID,则所述收发 模块 171将所述服务器的 ID和所述 UE的 ID发送给所述 HSS ,以供所述 HSS 根据预先配置的授权列表中保存的服务器与 UE的对应关系, 对所述第一数 据包中的所述服务器的 ID和所述 UE的 ID进行匹配检査, 在检査所述服务 器与所述 UE的对应关系正确后, 向所述 IWF返回确认结果, 以使所述 IWF 将所述第一数据包通过所述 MME发送给所述 UE;  If the ID of the server and the ID of the UE are included in the first data packet, the transceiver module 171 sends the ID of the server and the ID of the UE to the HSS for the HSS. Performing a matching check on the ID of the server in the first data packet and the ID of the UE according to the correspondence between the server and the UE saved in the pre-configured authorization list, and checking the server and the After the corresponding relationship of the UE is correct, the acknowledgment result is returned to the IWF, so that the IWF sends the first data packet to the UE by using the MME;
或者,  Or,
若所述第一数据包中包括所述服务器的 ID、 所述 UE的 ID和所述 APP 的 ID, 则所述收发模块 171将所述服务器的 ID、 所述 UE的 ID和所述 APP 的 ID发送给所述 HSS, 以供所述 HSS根据预先配置的授权列表中保存的服 务器、 UE以及 APP的对应关系, 对所述第一数据包中的所述服务器的 ID、 所述 UE的 ID和所 APP的 ID进行匹配检査, 在检査所述服务器、 所述 UE 和所述 APP的对应关系正确后, 向所述 IWF返回确认结果, 以使 IWF将所 述第一数据包通过所述 MME发送给所述 UE。 If the first data packet includes the ID of the server, the ID of the UE, and the ID of the APP, the transceiver module 171 sets the ID of the server, the ID of the UE, and the APP. The ID of the server is sent to the HSS for the HSS to associate with the server, the UE, and the APP in the pre-configured authorization list, the ID of the server in the first data packet, and the UE. Checking the ID and the ID of the APP, and after checking that the correspondence between the server, the UE, and the APP is correct, returning an acknowledgement result to the IWF, so that the IWF passes the first data packet. The MME sends the MME to the UE.
上述实施例的执行方式与图 3所示的方法实施例六至八相对应, 用于执 行实施例六至八的技术方案, 其方法、 原理以及技术效果可参见方法实施例, 此处不再赘述。  The implementation manners of the foregoing embodiments are the same as the method embodiments 6 to 8 of FIG. 3, and are used to implement the technical solutions of the sixth to eighth embodiments. The methods, principles, and technical effects can be referred to the method embodiments. Narration.
图 18为本发明 MME的一实施例的结构示意图, 如图 18所示, 该 MME 包括收发模块 181和处理模块 182。 其中, 收发模块 181, 用于接收互通设备 IWF发送的第一数据包, 所述第一数据包包括: 用户设备 UE的 ID、 服务器 的 ID和签名; 处理模块 182, 用于根据所述服务器的公钥, 对所述签名进行 验证; 其中, 所述服务器的公钥存储在所述 MME上; 所述收发模块 181在 所述处理模块验证签名有效后, 将所述第一数据包发送给所述 UE。  FIG. 18 is a schematic structural diagram of an embodiment of an MME according to the present invention. As shown in FIG. 18, the MME includes a transceiver module 181 and a processing module 182. The transceiver module 181 is configured to receive the first data packet sent by the interworking device IWF, where the first data packet includes: an ID of the user equipment UE, an ID and a signature of the server, and a processing module 182, configured to: according to the server a public key, the signature is verified; wherein the public key of the server is stored on the MME; the transceiver module 181 sends the first data packet to the server after the processing module verifies that the signature is valid Said UE.
本实施例提供的 MME,用于执行图 4所示的方法,收发模块接收经 IWF 发送的经过签名加密的第一数据包签名, 根据该服务器的公钥验证该第一数 据包的签名的有效性,处理模块判断若验证通过后将该第一数据包发送给 UE 的 ID对应的 UE, 解决了没有相应的安全机制保护数据包在 UE和服务器之 间的传输的问题, 提高系统数据传输的安全性。  The MME provided in this embodiment is configured to perform the method shown in FIG. 4, and the transceiver module receives the signed first encrypted data packet signature sent by the IWF, and validates the signature of the first data packet according to the public key of the server. The processing module determines that if the first data packet is sent to the UE corresponding to the ID of the UE after the verification is passed, the problem that the corresponding security mechanism protects the data packet between the UE and the server is solved, and the system data transmission is improved. safety.
图 19为本发明 HSS的一实施例的结构示意图, 如图 19所示, 该 HSS 包括收发模块 191和处理模块 192。 其中, 收发模块 191, 用于接收移动管理 实体 MME发送的用户设备 UE的标识和 /或所述 MME为所述 UE选择的互 通设备 IWF的 ID; 所述标识包括国际移动用户标识 IMSI或临时移动用户标 识 TMSI; 处理模块 192, 用于根据 IMSI査询所述 UE的签约数据, 判断 UE 具有小数据业务的特性时, 用于根据所述标识获取所述 UE的签约数据, 判 断所述 UE具有小数据业务的特性时, 则根据预先获取的密钥生成参数生成 SDT密钥;所述收发模块 191还用于将所述密钥生成参数和所述 SDT密钥发 送给所述 IWF的 ID对应的 IWF,并通过所述 MME向所述 UE发送所述密钥 生成参数, 以供所述 UE根据所述密钥生成参数生成 SDT安全上下文,其中, 所述 SDT安全上下文包括所述 SDT密钥和 SDT安全保护算法。 本实施例提供的 HSS, 用于执行图 5所示的方法实施例的技术方案, 通 过处理模块根据密钥生成参数生成 SDT密钥, 并将参数通过收发模块发送给 UE, 以供 UE根据该密钥生成参数 SDT安全上下文, 并将该 SDT安全上下 文告知 IWF, 以便在数据传输过程中可以在 IWF和 UE上进行数据包的加密 解密和完整性保护, 解决了没有相应的安全机制保护数据包在 UE和服务器 之间的传输的问题, 提高系统数据传输的安全性。 FIG. 19 is a schematic structural diagram of an embodiment of an HSS according to the present invention. As shown in FIG. 19, the HSS includes a transceiver module 191 and a processing module 192. The transceiver module 191 is configured to receive an identifier of the user equipment UE sent by the mobility management entity MME and/or an ID of the interworking device IWF selected by the MME for the UE; the identifier includes an international mobile subscriber identity IMSI or temporary mobility a user identifier TMSI; a processing module 192, configured to query the subscription data of the UE according to the IMSI, and determine that the UE has the characteristics of the small data service, and is configured to acquire the subscription data of the UE according to the identifier, and determine that the UE has The SDT key is generated according to the key generation parameter that is acquired in advance; the transceiver module 191 is further configured to send the key generation parameter and the SDT key to the ID of the IWF. The IWF, and the key generation parameter is sent to the UE by the MME, for the UE to generate an SDT security context according to the key generation parameter, where the SDT security context includes the SDT key And SDT security protection algorithms. The HSS provided in this embodiment is used to perform the technical solution of the method embodiment shown in FIG. 5, and the processing module generates an SDT key according to the key generation parameter, and sends the parameter to the UE through the transceiver module, so that the UE can The key generates a parameter SDT security context, and informs the IWF of the SDT security context, so that the data packet can be encrypted, decrypted and integrity protected on the IWF and the UE during the data transmission process, and the corresponding security mechanism is protected from the data packet. The problem of transmission between the UE and the server improves the security of system data transmission.
可选的, 所述收发模块 191还用于接收所述 IWF发送的第一数据包; 若所述第一数据包中包括所述服务器的 ID和所述 UE的 ID,则所述处理 模块 192根据预先配置的授权列表中保存的服务器与 UE的对应关系, 对所 述第一数据包中的所述服务器的 ID和所述 UE的 ID进行匹配检査, 在检査 所述服务器与所述 UE的对应关系正确后, 向所述 IWF返回确认结果, 以使 所述 IWF将所述第一数据包通过所述 MME发送给所述 UE;  Optionally, the transceiver module 191 is further configured to receive the first data packet sent by the IWF; if the first data packet includes an ID of the server and an ID of the UE, the processing module 192 Performing a matching check on the ID of the server in the first data packet and the ID of the UE according to the correspondence between the server and the UE saved in the pre-configured authorization list, and checking the server and the After the corresponding relationship of the UE is correct, the acknowledgment result is returned to the IWF, so that the IWF sends the first data packet to the UE by using the MME;
或者,  Or,
若所述第一数据包中包括所述服务器的 ID、 所述 UE的 ID和所述 APP 的 ID, 则所述处理模块 192根据预先配置的授权列表中保存的服务器、 UE 以及 APP的对应关系, 对所述第一数据包中的所述服务器的 ID、所述 UE的 ID和所 APP的 ID进行匹配检査, 在检査所述服务器、 所述 UE和所述 APP 的对应关系正确后, 所述收发模块 191向所述 IWF返回确认结果, 以使所述 IWF将所述第一数据包通过所述 MME发送给所述 UE。  If the first data packet includes the ID of the server, the ID of the UE, and the ID of the APP, the processing module 192 is configured according to the correspondence between the server, the UE, and the APP saved in the pre-configured authorization list. Performing a matching check on the ID of the server, the ID of the UE, and the ID of the APP in the first data packet, after checking that the correspondence between the server, the UE, and the APP is correct The transceiver module 191 returns an acknowledgement result to the IWF, so that the IWF sends the first data packet to the UE by using the MME.
可选的, 在所述收发模块 191将所述 SDT密钥发送给所述 IWF的 ID对 应的 IWF之后, 所述收发模块 191还用于将所述 IWF的 ID通过所述 MME 发送给所述 UE,以使所述 UE根据所述 IWF的 ID生成 SDT密钥并通过 MME 将 SDT安全保护算法发送给所述 IWF,其中,所述 UE与所述 IWF的对应关 系存储在所述 HSS中。  Optionally, after the sending and receiving module 191 sends the SDT key to the IWF corresponding to the ID of the IWF, the transceiver module 191 is further configured to send the ID of the IWF to the The UE is configured to enable the UE to generate an SDT key according to the ID of the IWF and send an SDT security protection algorithm to the IWF by using an MME, where a correspondence between the UE and the IWF is stored in the HSS.
可选的, 所述收发模块 191发送给所述 UE的参数包括所述 IWF的 ID、 应用 APP的 ID、 随机数 RAND、 临时数据中的至少一项, 其中, 所述临时 数据是在所述处理模块 192判断所述 UE具有小数据业务的特性之后, 生成 的用于生成 SDT密钥的参数;  Optionally, the parameter sent by the transceiver module 191 to the UE includes at least one of an ID of the IWF, an ID of an application APP, a random number RAND, and temporary data, where the temporary data is in the After the processing module 192 determines that the UE has the characteristics of the small data service, the generated parameters for generating the SDT key are generated;
所述密钥生成参数包括所述 SDT密钥的生成参数。  The key generation parameter includes a generation parameter of the SDT key.
上述实施例的执行方式与图 5所示的方法实施例十和十一相对应, 用于 执行实施例十和实施例十一的技术方案, 其方法、 原理以及技术效果可参见 方法实施例, 此处不再赘述。 The implementation manner of the above embodiment corresponds to the method embodiments 10 and 11 shown in FIG. 5, and is used for For the technical solutions of the tenth embodiment and the eleventh embodiment, the method, the principle, and the technical effects can be referred to the method embodiments, and details are not described herein again.
图 20为本发明 UE的又一实施例的结构示意图, 如图 20所示, 该 UE 包括处理模块 201和收发模块 202。 其中, 处理模块 201, 用于根据所述 UE 的私钥和服务器的公钥对第二数据包进行加密和 /或签名处理,或者根据 SDT 安全上下文对所述第二数据包进行加密和 /或完整性保护处理; 其中, 所述 UE的私钥和与所述 UE签约的所述服务器的公钥或者与归属用户服务器 HSS 协商生成 SDT安全上下文存储在所述 UE上; 收发模块 202, 用于将处理后 的第二数据包通过移动性管理实体 MME和互通设备 IWF发送给所述服务 器。  FIG. 20 is a schematic structural diagram of still another embodiment of a UE according to the present invention. As shown in FIG. 20, the UE includes a processing module 201 and a transceiver module 202. The processing module 201 is configured to perform encryption and/or signature processing on the second data packet according to the private key of the UE and the public key of the server, or encrypt the second data packet according to an SDT security context. An integrity protection process; wherein, the private key of the UE and the public key of the server that is contracted with the UE or negotiate with the home subscriber server HSS to generate an SDT security context is stored on the UE; The processed second data packet is sent to the server through the mobility management entity MME and the interworking device IWF.
本实施例提供的 UE,用于执行图 6所示实施例的技术方案,通过处理模 块根据 UE的私钥和服务器的公钥或者 SDT安全上下文将要向服务器发送的 第二数据包进行加密或者加密和完整性保护, 收发模块通过 MME和 IWF发 送给该服务器, 完成数据包的上行传输, 通过签名加密, 和完整性保护, 解 决了没有相应的安全机制保护数据包在 UE和服务器之间的传输的问题, 提 高系统数据传输的安全性。  The UE provided in this embodiment is used to perform the technical solution of the embodiment shown in FIG. 6. The processing module encrypts or encrypts the second data packet to be sent to the server according to the private key of the UE and the public key of the server or the SDT security context. And integrity protection, the transceiver module sends to the server through the MME and the IWF, completes the uplink transmission of the data packet, through signature encryption, and integrity protection, and solves the problem that no corresponding security mechanism protects the transmission of the data packet between the UE and the server. The problem is to improve the security of system data transmission.
可选的, 所述收发模块 202还用于接收所述 HSS发送的密钥生成参数; 所述处理模块 201还用于根据所述密钥生成参数, 生成 SDT密钥; 所述处理 模块 201还用于在非接入安全模式命令 NAS SMC过程中协商 SDT安全保护 算法, 或者, 在非接入安全模式命令 NAS SMC过程中协商的非接入层安全 算法作为 SDT安全保护算法。  Optionally, the transceiver module 202 is further configured to receive a key generation parameter that is sent by the HSS, where the processing module 201 is further configured to generate an SDT key according to the key generation parameter, where the processing module 201 further The SDT security protection algorithm is used to negotiate the SDT security protection algorithm in the non-access security mode command NAS SMC process, or the non-access stratum security algorithm negotiated in the non-access security mode command NAS SMC process as the SDT security protection algorithm.
可选的, 所述处理模块 201具体用于根据所述 UE的私钥签名所述第二 数据包, 并根据所述服务器的公钥对所述第二数据包进行加密处理;  Optionally, the processing module 201 is specifically configured to: sign the second data packet according to the private key of the UE, and perform encryption processing on the second data packet according to the public key of the server;
所述收发模块 202还用于将处理后的第二数据包通过所述 MME和所述 IWF发送给所述服务器, 以供所述服务器根据所述第二数据包中的 UE的 ID 获取所述 UE的公钥,并根据所述 UE的公钥验证所述处理后的第二数据包中 的签名是否有效, 若验证有效, 则根据所述服务器的私钥对所述处理后的第 二数据包进行解密处理。  The transceiver module 202 is further configured to send the processed second data packet to the server by using the MME and the IWF, where the server obtains the identifier according to the ID of the UE in the second data packet. And verifying, by the public key of the UE, whether the signature in the processed second data packet is valid according to the public key of the UE, and if the verification is valid, pairing the processed second data according to the private key of the server The packet is decrypted.
可选的, 所述处理模块 201还用于根据所述 SDT安全上下文对所述第二 数据包进行加密或加密和完整性保护处理; 所述收发模块 202还用于将携带 MAC-I的所述处理后的第二数据包发送 给服务器, 以供所述 IWF或者服务器根据所述处理后的第二数据包中的所述 UE的 ID获取所述 SDT安全上下文, 并根据所述 SDT安全上下文, 验证所 述安全保护后的第二数据包中的所述 MAC-I, 若验证有效, 则对所述处理后 的第二数据包进行解密。 Optionally, the processing module 201 is further configured to perform encryption or encryption and integrity protection processing on the second data packet according to the SDT security context. The transceiver module 202 is further configured to send the processed second data packet that carries the MAC-I to the server, where the IWF or the server is configured according to the UE in the processed second data packet. Determining, by the ID, the SDT security context, and verifying the MAC-I in the second packet after the security protection according to the SDT security context, and if the verification is valid, processing the processed second data packet Decrypt.
可选的, 所述收发模块 202还用于接收所述 HSS发送的参数, 所述 HSS 发送的参数包括所述 IWF的 ID、 所述 APP的 ID、 随机数 RAND、 临时数据 中的至少一项; 所述密钥生成参数包括所述 SDT密钥的生成参数。  Optionally, the transceiver module 202 is further configured to receive the parameter sent by the HSS, where the parameter sent by the HSS includes at least one of an ID of the IWF, an ID of the APP, a random number RAND, and temporary data. The key generation parameter includes a generation parameter of the SDT key.
上述实施例的执行方式与图 6所示的方法实施例十二和十三相对应, 用 于执行实施例十二和十三的技术方案, 其方法、 原理以及技术效果可参见方 法实施例, 此处不再赘述。  The implementation manners of the foregoing embodiments are the same as those of the method embodiments 12 and 13 shown in FIG. 6 , and are used to implement the technical solutions of the twelfth and thirteenth embodiments. The method, the principle, and the technical effects can be referred to the method embodiments. I will not repeat them here.
图 21为本发明服务器的又一实施例的结构示意图, 如图 21所示, 该服 务器包括: 收发模块 211和处理模块 212。 其中, 收发模块 211, 用于接收互 通设备 IWF发送的处理后的第二数据包; 处理模块 212, 用于根据用户设备 UE的公钥和所述服务器的私钥对所述第二数据包进行签名验证和解密,或者 根据所述 UE的 ID和 /或 IWF的 ID査找 SDT安全上下文, 对所述处理后的 第二数据包进行完整性验证和解密; 其中, 所述服务器的私钥和与所述服务 器签约的所述 UE的公钥存储在所述服务器上, 所述 SDT安全上下文为互通 设备 IWF发送的。  FIG. 21 is a schematic structural diagram of still another embodiment of a server according to the present invention. As shown in FIG. 21, the server includes: a transceiver module 211 and a processing module 212. The transceiver module 211 is configured to receive the processed second data packet sent by the interworking device IWF. The processing module 212 is configured to perform, according to the public key of the user equipment UE and the private key of the server, the second data packet. Signature verification and decryption, or searching for the SDT security context according to the ID of the UE and/or the ID of the IWF, performing integrity verification and decryption on the processed second data packet; wherein, the private key and the server of the server The public key of the UE that is subscribed by the server is stored on the server, and the SDT security context is sent by the interworking device IWF.
本实施例提供的服务器, 用于执行图 7所示的方法的技术方案, 收发模 块接收第二数据包, 处理模块根据服务器的私钥和 UE的公钥或者 SDT安全 上下文对接收的 UE经过 MME和 IWF发送的第二数据包进行完整性验证和 解密, 完成数据包的上行传输, 该服务器通过对数据包的签名验证和解密过 程, 解决了没有相应的安全机制保护数据包在 UE和服务器之间的传输的问 题, 提高系统数据传输的安全性。  The server provided in this embodiment is used to perform the technical solution of the method shown in FIG. 7. The transceiver module receives the second data packet, and the processing module passes the MME according to the private key of the server and the public key of the UE or the SDT security context. And the second data packet sent by the IWF performs integrity verification and decryption, completes the uplink transmission of the data packet, and the server solves the problem that there is no corresponding security mechanism to protect the data packet in the UE and the server through the signature verification and decryption process of the data packet. The problem of transmission between the two, to improve the security of system data transmission.
图 22为本发明 IWF的又一实施例的结构示意图, 如图 22所示, 该 IWF 包括收发模块 221和处理模块 222。 其中, 收发模块 221, 用于接收用户设备 UE通过移动性管理实体 MME发送的处理后的第二数据包,所述处理后的第 二数据包包括所述 UE的 ID和签名, 或者所述 UE的 ID和 MAC-I; 处理模 块 222,用于根据所述 UE的公钥或 SDT安全上下文,对所述签名或者 MAC-I 进行验证; 其中, 所述 UE的公钥存储在所述 IWF上, 所述 SDT安全上下文 为预先从归属用户服务器 HSS获取的; 所述收发模块 221还用于在验证通过 后, 将所述处理后的第二数据包发送给所述服务器。 FIG. 22 is a schematic structural diagram of still another embodiment of an IWF according to the present invention. As shown in FIG. 22, the IWF includes a transceiver module 221 and a processing module 222. The transceiver module 221 is configured to receive the processed second data packet sent by the user equipment UE by using the mobility management entity MME, where the processed second data packet includes an ID and a signature of the UE, or the UE ID and MAC-I; processing module 222, configured to use the public key or SDT security context of the UE, the signature or MAC-I The public key of the UE is stored on the IWF, and the SDT security context is obtained from the home subscriber server HSS in advance; the transceiver module 221 is further configured to: after the verification is passed, the processing is performed. The second packet is sent to the server.
本实施例提供的 IWF, 用于执行图 8所示的方法的技术方案, 通过处理 模块根据服务器的公钥和 UE的公钥或者 SDT安全上下文对收发模块接收的 UE经过 MME发送的第二数据包进行签名的验证或者 MAC-I的验证, 将验 证通过的第二数据包发送给服务器, 完成数据包的上行传输, 该服务器通过 对数据包的签名验证和解密过程, 解决了没有相应的安全机制保护数据包在 UE和服务器之间的传输的问题, 提高系统数据传输的安全性。  The IWF provided in this embodiment is used to perform the method shown in FIG. 8. The processing module sends the second data sent by the UE received by the transceiver module to the UE through the MME according to the public key of the server and the public key of the UE or the SDT security context. The packet is verified by the signature or verified by the MAC-I, and the second data packet that is verified is sent to the server to complete the uplink transmission of the data packet. The server solves the problem of no corresponding security by verifying and decrypting the data packet. The mechanism protects the transmission of data packets between the UE and the server, and improves the security of system data transmission.
可选的, 所述收发模块 221还用于: 接收所述 HSS发送的 SDT密钥; 接收所述 UE通过所述 MME发送的 SDT安全保护算法; 其中, 所述 SDT安 全上下文包括所述 SDT密钥和所述 SDT安全保护算法。  The SDT security protection algorithm includes: Key and the SDT security protection algorithm.
可选的, 所述处理模块 222还用于根据所述 UE的公钥, 验证所述处理 后的第二数据包的所述签名是否有效;  Optionally, the processing module 222 is further configured to verify, according to the public key of the UE, whether the signature of the processed second data packet is valid.
所述收发模块 221还用于在所述处理模块 222验证所述处理后的第二数 据包的所述签名有效时, 将所述第二数据包发送给服务器;  The transceiver module 221 is further configured to: when the processing module 222 verifies that the signature of the processed second data packet is valid, send the second data packet to a server;
或者,  Or,
所述处理模块 222用于根据所述 SDT安全上下文对所述处理后的第二数 据包的所述 MAC-I进行验证;  The processing module 222 is configured to verify, according to the SDT security context, the MAC-I of the processed second data packet.
所述收发模块 221还用于若所述处理模块 222验证所述处理后的第二数 据包的所述 MAC-I有效,则将所述处理后的第二数据包进行解密处理后发送 给服务器。  The transceiver module 221 is further configured to: after the processing module 222 verifies that the MAC-I of the processed second data packet is valid, decrypt the processed second data packet and send the processed data packet to the server. .
可选的, 还包括:  Optionally, it also includes:
若所述第一数据包中包括所述服务器的 ID和所述 UE的 ID,所述处理模 块 222根据预先配置的授权列表中保存的服务器与 UE的对应关系, 对所述 第一数据包中的所述服务器的 ID和所述 UE的 ID进行匹配检査, 在检査所 述服务器与所述 UE的对应关系正确后, 所述收发模块 221将所述第二数据 包发送给所述服务器;  If the first data packet includes the ID of the server and the ID of the UE, the processing module 222 is configured to be in the first data packet according to the correspondence between the server and the UE saved in the pre-configured authorization list. Performing a matching check on the ID of the server and the ID of the UE. After checking that the correspondence between the server and the UE is correct, the transceiver module 221 sends the second data packet to the server. ;
或者,  Or,
若所述第一数据包中包括所述服务器的 ID、 所述 UE的 ID和所述 APP 的 ID, 所述处理模块 222根据预先配置的授权列表中保存的服务器、 UE以 及 APP的对应关系,对所述第一数据包中的所述服务器的 ID、所述 UE的 ID 和所述 APP的 ID进行匹配检査, 在检査所述服务器、 所述 UE和所述 APP 的对应关系正确后,所述收发模块 221将所述第二数据包发送给所述服务器; 或者, If the first data packet includes an ID of the server, an ID of the UE, and the APP ID of the server, the ID of the UE, and the APP in the first data packet according to the correspondence between the server, the UE, and the APP saved in the pre-configured authorization list. The ID is matched, and after the server, the UE, and the APP are in the correct relationship, the transceiver module 221 sends the second data packet to the server; or
若所述第二数据包中包括所述服务器的 ID和所述 UE的 ID,则所述收发 模块 221将所述服务器的 ID和所述 UE的 ID发送给 HSS , 以供所述 HSS根 据预先配置的授权列表中保存的服务器与 UE的对应关系, 对所述第二数据 包中的所述服务器的 ID和所述 UE的 ID进行匹配检査, 在检査所述服务器 与所述 UE的对应关系正确后, 将所述第二数据包发送给所述服务器;  If the second data packet includes the ID of the server and the ID of the UE, the transceiver module 221 sends the ID of the server and the ID of the UE to the HSS, so that the HSS is based on the advance. Corresponding relationship between the server and the UE saved in the configured authorization list, performing matching check on the ID of the server in the second data packet and the ID of the UE, and checking the server and the UE After the correspondence is correct, the second data packet is sent to the server;
或者,  Or,
若所述第二数据包中包括所述服务器的 ID、所述 UE的 ID以及应用 APP 的 ID,则所述收发模块 221将所述服务器的 ID、所述 UE的 ID以及所述 APP 的 ID发送给 HSS , 以供所述 HSS根据预先配置的授权列表中保存的服务器、 UE以及 APP的对应关系,对所述第二数据包中的所述服务器的 ID、所述 UE 的 ID和所 APP的 ID进行匹配检査, 在检査所述服务器、 所述 UE以及所述 APP的对应关系正确后, 将所述第二数据包发送给所述服务器。  If the second data packet includes the ID of the server, the ID of the UE, and the ID of the application APP, the transceiver module 221 sets the ID of the server, the ID of the UE, and the ID of the APP. Sending to the HSS, for the HSS, according to the correspondence between the server, the UE, and the APP saved in the pre-configured authorization list, the ID of the server in the second data packet, the ID of the UE, and the APP The ID is checked, and after checking that the correspondence between the server, the UE, and the APP is correct, the second data packet is sent to the server.
上述实施例的执行方式与图 8所示的方法实施例十五和十六相对应, 用 于执行实施例十五和实施例十六的技术方案, 其方法、 原理以及技术效果可 参见方法实施例, 此处不再赘述。  The implementation manners of the foregoing embodiments are the same as the method embodiments 15 and 16 shown in FIG. 8 , and are used to implement the technical solutions of the fifteenth embodiment and the sixteenth embodiment. The method, the principle, and the technical effects can be referred to the method implementation. For example, it will not be described here.
图 23为本发明 MME的又一实施例的结构示意图,如图 23所示,该 MME 包括收发模块 231和处理模块 232。 其中, 收发模块 231, 用于接收用户设备 UE发送的处理后的第二数据包, 所述第二数据包包括: 所述 UE的 ID、 服 务器的 ID和签名; 处理模块 232, 用于根据所述 UE的公钥, 对所述签名进 行验证; 其中, 所述 UE的公钥存储在所述 MME上; 所述收发模块 231还 用于在验证所述签名有效后, 将所述第二数据包发送给互通设备 IWF。  FIG. 23 is a schematic structural diagram of still another embodiment of an MME according to the present invention. As shown in FIG. 23, the MME includes a transceiver module 231 and a processing module 232. The transceiver module 231 is configured to receive the processed second data packet sent by the user equipment UE, where the second data packet includes: an ID of the UE, an ID and a signature of the server, and a processing module 232, configured to The public key of the UE is used to verify the signature; wherein the public key of the UE is stored on the MME; the transceiver module 231 is further configured to: after verifying that the signature is valid, the second data The packet is sent to the interworking device IWF.
本实施例提供的 MME,用于执行图 9所示的方法的技术方案, 处理模块 对收发模块接收的 UE发送的第二数据包进行签名的验证, 收发模块将验证 通过的第二数据包通过 IWF发送给服务器,完成数据包的上行传输,该 MME 通过对数据包的签名验证, 解决了没有相应的安全机制保护数据包在 UE和 服务器之间的传输的问题, 提高系统数据传输的安全性。 The MME provided in this embodiment is used to perform the technical solution of the method shown in FIG. 9. The processing module performs signature verification on the second data packet sent by the UE received by the transceiver module, and the transceiver module verifies the passed second data packet. The IWF sends the packet to the server to complete the uplink transmission of the data packet. The MME solves the problem that there is no corresponding security mechanism to protect the data packet in the UE and the signature verification of the data packet. The problem of transmission between servers improves the security of system data transmission.
可选的,若所述第二数据包中包括所述服务器的 ID和所述 UE的 ID,则 所述处理模块 232还用于根据预先配置的授权列表、 所述第二数据包中的所 述服务器的 ID和所述 UE的 ID,根据所述授权列表中保存的服务器和 UE的 对应关系, 对所述第二数据包中的所述服务器的 ID和所述 UE的 ID进行匹 配检査,在检査所述服务器和所述 UE的对应关系正确后,所述收发模块 231 将所述第二数据包发送给所述服务器;  Optionally, if the second data packet includes the ID of the server and the ID of the UE, the processing module 232 is further configured to: according to the pre-configured authorization list, the second data packet Performing matching check on the ID of the server and the ID of the UE in the second data packet according to the ID of the server and the ID of the UE according to the correspondence between the server and the UE saved in the authorization list After the correspondence between the server and the UE is checked, the transceiver module 231 sends the second data packet to the server;
或者,  Or,
若所述第二数据包中包括所述服务器的 ID、 所述 UE的 ID和应用 APP 的 ID, 则所述处理模块 232还用于根据预先配置的授权列表、 所述第二数据 包中的所述服务器的 ID、 所述 UE的 ID以及所述 APP的 ID, 根据所述授权 列表中保存的服务器、 UE以及 APP的对应关系, 对所述第二数据包中的所 述服务器的 ID、所述 UE的 ID和所述 APP的 ID进行匹配检査,在检査所述 服务器、 所述 UE以及所述 APP的对应关系正确后, 所述收发模块 231将所 述第二数据包发送给所述服务器。  If the second data packet includes the ID of the server, the ID of the UE, and the ID of the application APP, the processing module 232 is further configured to: according to the pre-configured authorization list, in the second data packet The ID of the server, the ID of the UE, and the ID of the APP, according to the correspondence between the server, the UE, and the APP stored in the authorization list, the ID of the server in the second data packet, Performing a matching check on the ID of the UE and the ID of the APP. After checking that the correspondence between the server, the UE, and the APP is correct, the transceiver module 231 sends the second data packet to The server.
上述实施例的执行方式与图 8所示的方法实施例对应, 用于执行图 8所 示技术方案, 其方法、 原理以及技术效果可参见方法实施例, 此处不再赘述。  The implementation manner of the foregoing embodiment is the same as the method embodiment shown in FIG. 8 and is used to implement the technical solution shown in FIG. 8. The method, the principle, and the technical effect can be referred to the method embodiment, and details are not described herein again.
图 24为本发明 UE的另一实施例的结构示意图, 如图 24所示, 该 UE 包括: 收发器 241和处理器 242, 收发器 241用于接收所述服务器通过互通 设备 IWF和移动性管理实体 MME发送的第一数据包, 所述第一数据包携带 所述服务器的 ID或所述 IWF的 ID; 处理器 241用于根据所述第一数据包中 的所述服务器的 ID或所述 IWF的 ID,获得所述服务器的公钥和 /或所述 SDT 安全上下文,其中,所述 UE签约的服务器的公钥或者与归属用户服务器 HSS 协商生成 SDT安全上下文存储在所述 UE上, 且通过所述服务器的 ID或所 述 IWF的 ID来标识; 所述处理器 242还用于根据所述服务器的公钥和所述 UE的私钥, 或者所述 SDT安全上下文, 或者所述服务器的公钥和所述 SDT 安全上下文, 对所述第一数据包进行验证和解密处理, 得到解密后的第一数 据包。  FIG. 24 is a schematic structural diagram of another embodiment of a UE according to the present invention. As shown in FIG. 24, the UE includes: a transceiver 241 and a processor 242, where the transceiver 241 is configured to receive the server through the interworking device IWF and mobility management. a first data packet sent by the entity MME, where the first data packet carries an ID of the server or an ID of the IWF; the processor 241 is configured to: according to the ID of the server in the first data packet, or the ID of the IWF, obtaining the public key of the server and/or the SDT security context, wherein the public key of the server subscribed by the UE or negotiated with the home subscriber server HSS to generate an SDT security context is stored on the UE, and Identifying by the ID of the server or the ID of the IWF; the processor 242 is further configured to use the public key of the server and the private key of the UE, or the SDT security context, or the server The public key and the SDT security context perform verification and decryption processing on the first data packet to obtain a decrypted first data packet.
本实施例提供的 UE用于执行图 1所示的方法的技术方案, 其执行方法、 原理以及技术效果类似, 通过处理器对收发器接收的服务器向 UE发送的下 行第一数据包进行验证和解密, 并通过收发器将解密后的第一数据包发送给 相应的应用, 完成小数据的传输, 解决了在 UE和服务器之间的小数据通过 MME和 MTC-IWF之间的 T5接口传输的场景下, 没有相应的安全机制来保 护 UE与签约服务器之间的数据传输的问题, 提高系统数据传输的安全性。 The technical solution provided by the UE in this embodiment is used to perform the method shown in FIG. 1 , and the execution method, the principle, and the technical effect are similar, and the server sends the server received by the transceiver to the UE. The first data packet is verified and decrypted, and the decrypted first data packet is sent to the corresponding application through the transceiver, and the small data transmission is completed, and the small data between the UE and the server is solved through the MME and the MTC- In the scenario of T5 interface transmission between IWFs, there is no corresponding security mechanism to protect the data transmission between the UE and the subscription server, and improve the security of system data transmission.
在上述实施例的基础上, 所述收发器 241还用于接收所述 HSS发送的密 钥生成参数; 所述处理器 242还用于根据所述密钥生成参数, 生成所述 SDT 密钥, 并在非接入安全模式命令 NAS SMC过程中协商所述 SDT安全保护算 法, 或者, 在非接入安全模式命令 NAS SMC过程中协商的非接入层安全算 法作为所述 SDT安全保护算法。  On the basis of the foregoing embodiment, the transceiver 241 is further configured to receive a key generation parameter sent by the HSS, where the processor 242 is further configured to generate the SDT key according to the key generation parameter. And the SDT security protection algorithm is negotiated in the non-access security mode command NAS SMC process, or the non-access stratum security algorithm negotiated in the non-access security mode command NAS SMC process is used as the SDT security protection algorithm.
可选的, 所述处理器 242具体用于  Optionally, the processor 242 is specifically configured to:
根据所述服务器的公钥验证所述第一数据包中的签名是否有效; 若验证所述第一数据包中的签名有效, 则根据所述 UE的私钥对所述第 一数据包进行解密处理, 得到解密后的所述第一数据包。  Verifying whether the signature in the first data packet is valid according to the public key of the server; if the signature in the first data packet is valid, decrypting the first data packet according to the private key of the UE Processing, obtaining the decrypted first data packet.
可选的, 所述处理器 242还用于: 根据所述 SDT安全上下文验证所述第 一数据包中的消息认证码 MAC-I; 若验证成功, 则对所述第一数据包进行解 密处理, 得到解密后的所述第一数据包。  Optionally, the processor 242 is further configured to: verify, according to the SDT security context, the message authentication code MAC-I in the first data packet; if the verification succeeds, decrypt the first data packet And obtaining the decrypted first data packet.
可选的, 所述处理器 242还用于: 根据所述服务器的公钥验证所述第一 数据包中的签名是否有效; 若验证所述第一数据包的签名有效, 则根据所述 SDT安全上下文对所述第一数据包进行解密处理,或者根据所述 SDT安全上 下文对所述第一数据包进行完整性验证和解密处理, 得到解密后的所述第一 数据包。  Optionally, the processor 242 is further configured to: verify, according to the public key of the server, whether the signature in the first data packet is valid; if the signature of the first data packet is valid, according to the SDT The security context decrypts the first data packet, or performs integrity verification and decryption processing on the first data packet according to the SDT security context to obtain the decrypted first data packet.
可选的, 所述收发器 241从所述 HSS接收的参数包括所述 IWF的 ID、 所述 APP的 ID、 随机数 RAND、 临时数据中的至少一项; 所述密钥生成参 数包括所述 SDT密钥的生成参数; 其中, 所述 SDT密钥的生成参数包括接 入安全管理实体密钥、 完整性保护密钥 IK、 加密密钥 CK、 所述 IWF的 ID、 所述 UE的 ID或国际移动用户标识 IMSI、 所述 APP的 ID、 所述 RAND、 所 述临时数据、 SDT密钥标签中的至少一项。  Optionally, the parameter that the transceiver 241 receives from the HSS includes at least one of an ID of the IWF, an ID of the APP, a random number RAND, and temporary data; the key generation parameter includes the a generation parameter of the SDT key; wherein the generation parameter of the SDT key includes an access security management entity key, an integrity protection key IK, an encryption key CK, an ID of the IWF, an ID of the UE, or At least one of an international mobile subscriber identity IMSI, an ID of the APP, the RAND, the temporary data, and an SDT key label.
本实施例提供的 UE用于执行方法实施例一至三、 以及图 10、 图 12和图 13所示的技术方案, 其实现原理和技术效果类似, 在此不再赘述。  The UE provided in this embodiment is used to perform the technical solutions in the first and third embodiments, and the technical solutions shown in FIG. 10, FIG. 12 and FIG. 13 , and the implementation principles and technical effects are similar, and details are not described herein again.
图 25为本发明服务器的另一实施例的结构示意图, 如图 24所示, 该服 务器包括: 处理器 251和收发器 252, 处理器 251用于根据所述服务器的私 钥和与所述服务器签约的用户设备 UE的公钥对等待发送的第一数据包进行 签名和加密处理, 或者根据 SDT安全上下文对所述第一数据包进行加密处理 或加密和完整性保护处理, 其中, 所述服务器的私钥和与所述服务器签约的 所述 UE公钥存储在所述服务器上,所述 SDT安全上下文为互通设备 IWF发 送的; 收发器 252, 用于将加密后的第一数据包通过所述 IWF和移动性管理 实体 MME发送给所述 UE; 以供所述 UE根据所述第一数据包中的服务器的 ID, 获取所述服务器的公钥和 /或所述 SDT 安全上下文, 并根据所述服务器 的公钥和所述 UE的私钥, 或者所述 SDT安全上下文, 或者与所述服务器的 公钥和所述 SDT安全上下文, 对所述第一数据包进行验证和解密处理, 得到 解密后的所述第一数据包。 25 is a schematic structural diagram of another embodiment of a server according to the present invention, as shown in FIG. The server includes: a processor 251 and a transceiver 252, wherein the processor 251 is configured to perform signature and encryption processing on the first data packet to be sent according to the private key of the server and the public key of the user equipment UE that is contracted with the server. Or performing encryption processing or encryption and integrity protection processing on the first data packet according to an SDT security context, where the private key of the server and the UE public key subscribed to the server are stored on the server The SDT security context is sent by the interworking device IWF; the transceiver 252 is configured to send the encrypted first data packet to the UE by using the IWF and the mobility management entity MME; Determining the ID of the server in the first data packet, obtaining the public key of the server and/or the SDT security context, and according to the public key of the server and the private key of the UE, or the SDT security context, Or performing verification and decryption processing on the first data packet with the public key of the server and the SDT security context to obtain the decrypted first data packet.
本实施例提供的服务器, 与本发明图 2所提供的方法实施例相对应, 该 服务器用于执行图 2所示的方法的技术方案, 通过处理器根据服务器的私钥 和 UE的私钥或者 SDT安全上下文对待发送的第一数据包进行加密处理或者 加密和完整性保护处理,收发器将签名加密后的第一数据包通过 IWF和 MME 发送给该 UE, 以供该 UE验证该第一数据包的签名的有效性, 或者验证消息 认证码 MAC-I, 再对该第一数据包进行解密, 并将解密后的第一数据包发送 给相应的 APP, 完成数据包的下行传输, 该服务器通过对数据包的签名和加 密过程, 严格保护数据包在 UE和服务器之间的安全传输, 提高系统数据传 输的安全性。  The server provided in this embodiment corresponds to the method embodiment provided by FIG. 2 of the present invention. The server is used to implement the technical solution of the method shown in FIG. 2, and the processor is based on the private key of the server and the private key of the UE or The SDT security context performs encryption processing or encryption and integrity protection processing on the first data packet to be sent, and the transceiver sends the first data packet encrypted by the identifier to the UE through the IWF and the MME, so that the UE can verify the first data. The validity of the signature of the packet, or verifying the message authentication code MAC-I, decrypting the first data packet, and transmitting the decrypted first data packet to the corresponding APP, completing the downlink transmission of the data packet, the server Through the signature and encryption process of the data packet, the secure transmission of the data packet between the UE and the server is strictly protected, and the security of the system data transmission is improved.
图 26为本发明 IWF的另一实施例的结构示意图, 如图 26所示, 该 IWF 包括: 收发器 261和处理器 262, 收发器 261, 用于接收服务器发送的第一数 据包, 所述第一数据包包括所述服务器的 ID和签名, 或者所述服务器的 ID 和 MAC-I; 处理器 262, 用于根据所述服务器的公钥对所述签名进行验证, 或用于根据 SDT安全上下文对所述 MAC-I进行验证, 并在验证通过后将所 述第一数据包通过移动性管理实体 MME发送给 UE; 或者, 所述处理模块还 用于根据所述 SDT 安全上下文对所述第一数据包进行加密和 /或完整性保护 处理, 将所述第一数据包通过移动性管理实体 MME发送给 UE; 其中, 所述 服务器的公钥和与所述服务器签约的所述 UE的公钥存储在所述 IWF上, 所 述 SDT安全上下文为预先从归属用户服务器 HSS获取的。 本实施例提供的 IWF, 用于执行图 3所示的方法实施例的技术方案, 其 实现原理和技术效果类似,通过存储的服务器的公钥和与该服务器签约的 UE 的公钥, 或者 SDT安全上下文, 收发器接收服务器发送的经过签名加密的第 一数据包签名, 并验证该第一数据包的签名的有效性, 或者验证消息认证码 MAC-I, 若验证该第一数据包的签名有效或者 MAC-I验证通过, 则收发器将 该第一数据包通过 MME发送给该 UE, 完成小数据包的下行传输, 该 IWF 通过对数据包的签名和 MAC-I的验证, 严格保护数据包在 UE和服务器之间 的安全传输, 提高系统数据传输的安全性。 FIG. 26 is a schematic structural diagram of another embodiment of an IWF according to the present invention. As shown in FIG. 26, the IWF includes: a transceiver 261 and a processor 262, where the transceiver 261 is configured to receive a first data packet sent by the server, where The first data packet includes an ID and a signature of the server, or an ID of the server and a MAC-I; a processor 262, configured to verify the signature according to the public key of the server, or used to secure according to SDT Context, the MAC-I is verified, and the first data packet is sent to the UE by using the mobility management entity MME after the verification is passed; or the processing module is further configured to: according to the SDT security context The first data packet is subjected to an encryption and/or integrity protection process, and the first data packet is sent to the UE by the mobility management entity MME; wherein the public key of the server and the UE that is contracted with the server The public key is stored on the IWF, and the SDT security context is obtained in advance from the home subscriber server HSS. The IWF provided in this embodiment is used to implement the technical solution of the method embodiment shown in FIG. 3, and the implementation principle and the technical effect are similar, by using the public key of the stored server and the public key of the UE that is contracted with the server, or SDT. The security context, the transceiver receives the signed and encrypted first data packet signature sent by the server, and verifies the validity of the signature of the first data packet, or verifies the message authentication code MAC-I, if the signature of the first data packet is verified After the valid or MAC-I verification is passed, the transceiver sends the first data packet to the UE through the MME to complete downlink transmission of the small data packet, and the IWF strictly protects the data by signing the data packet and verifying the MAC-I. Secure transmission between the UE and the server to improve the security of system data transmission.
在上述实施例的基础上, 所述收发器 261 还用于接收所述 HSS 发送的 SDT密钥; 所述收发器 261还用于接收所述 UE通过所述 MME发送的 SDT 安全保护算法; 其中, 所述 SDT安全上下文包括所述 SDT密钥和所述 SDT 安全保护算法。  On the basis of the foregoing embodiment, the transceiver 261 is further configured to receive an SDT key sent by the HSS, where the transceiver 261 is further configured to receive an SDT security protection algorithm sent by the UE by using the MME, where The SDT security context includes the SDT key and the SDT security protection algorithm.
可选的,所述处理器 262还用于根据所述服务器的 ID査询并获取所述服 务器的公钥, 并根据所述服务器的公钥, 验证所述第一数据包签名是否有效; 若验证所述第一数据包签名有效, 则所述收发器 261还用于将所述第一 数据包通过所述 MME发送给所述 UE;  Optionally, the processor 262 is further configured to query and acquire a public key of the server according to the ID of the server, and verify, according to the public key of the server, whether the first data packet signature is valid; Verifying that the first data packet signature is valid, the transceiver 261 is further configured to send the first data packet to the UE by using the MME;
或者,  Or,
在所述第一数据包还包括: UE的 ID时, 所述处理器 262还用于根据所 述 UE的 ID获取所述 SDT安全上下文, 对所述 MAC-I进行验证;  When the first data packet further includes: an ID of the UE, the processor 262 is further configured to acquire the SDT security context according to the ID of the UE, and verify the MAC-I;
若验证所述 MAC-I有效,则所述收发器 261还用于将所述第一数据包通 过所述 MME发送给所述 UE;  If the MAC-I is valid, the transceiver 261 is further configured to send the first data packet to the UE by using the MME;
或者,  Or,
在所述第一数据包还包括: APP的 ID时,所述处理器 262还用于根据所 述 UE的 ID和 APP的 ID获取所述 SDT安全上下文, 对所述 MAC-I进行验 证;  When the first data packet further includes: an ID of the APP, the processor 262 is further configured to acquire the SDT security context according to the ID of the UE and the ID of the APP, and verify the MAC-I;
若验证所述第一数据包 MAC-I有效,则所述收发器 261还用于将所述第 一数据包通过所述 MME发送给所述 UE;  If the first data packet MAC-I is valid, the transceiver 261 is further configured to send the first data packet to the UE by using the MME;
或者,  Or,
在所述第一数据包还包括: UE的 ID和 /或 APP的 ID时,所述处理器 262 还用于根据所述 UE的 ID和 /或 APP的 ID获取所述 SDT安全上下文, 对所 述第一数据进行加密和完整性保护处理; 所述收发器 261将所述处理后的第 一数据包通过所述 MME发送给所述 UE; When the first data packet further includes: an ID of the UE and/or an ID of the APP, the processor 262 is further configured to acquire the SDT security context according to the ID of the UE and/or the ID of the APP, where The first data is subjected to encryption and integrity protection processing; the transceiver 261 sends the processed first data packet to the UE through the MME;
或者,  Or,
在所述第一数据包还包括: UE的 ID和 /或 APP的 ID时,所述处理器 262 还用于根据所述服务器的 ID获取所述服务器的公钥,并根据所述服务器的公 钥, 验证所述签名; 若验证所述第一数据包的签名有效, 则根据用户 UE 的 ID和 /或 APP的 ID获取所述 SDT安全上下文, 对所述第一数据进行加密处 理, 或者加密和完整性保护处理, 所述收发器 261将所述处理后的第一数据 包通过所述 MME发送给所述 UE。  When the first data packet further includes: an ID of the UE and/or an ID of the APP, the processor 262 is further configured to acquire the public key of the server according to the ID of the server, and according to the publicity of the server Key, verifying the signature; if the signature of the first data packet is valid, obtaining the SDT security context according to the ID of the user UE and/or the ID of the APP, encrypting the first data, or encrypting And the integrity protection process, the transceiver 261 sends the processed first data packet to the UE by using the MME.
可选的,若所述第一数据包中包括所述服务器的 ID和所述 UE的 ID,所 述处理器 262还用于根据预先配置的授权列表中保存的服务器与 UE的对应 关系, 对所述第一数据包中的所述服务器的 ID和所述 UE的 ID进行匹配检 査, 在检査所述服务器与所述 UE的对应关系正确后, 所述收发器 261将所 述第一数据包通过所述 MME发送给所述 UE;  Optionally, if the first data packet includes the ID of the server and the ID of the UE, the processor 262 is further configured to: according to the correspondence between the server and the UE saved in the pre-configured authorization list, Performing a matching check on the ID of the server in the first data packet and the ID of the UE. After checking that the correspondence between the server and the UE is correct, the transceiver 261 will perform the first Transmitting a data packet to the UE by using the MME;
或者,  Or,
若所述第一数据包中包括所述服务器的 ID、 所述 UE的 ID和所述 APP 的 ID,所述处理器 262还用于根据预先配置的授权列表中保存的服务器、 UE 以及 APP的对应关系, 对所述第一数据包中的所述服务器的 ID、所述 UE的 ID和所述 APP的 ID进行匹配检査,在检査所述服务器、所述 UE和所述 APP 的对应关系正确后, 所述收发器 261将所述第一数据包通过所述 MME发送 给所述 UE;  If the first data packet includes the ID of the server, the ID of the UE, and the ID of the APP, the processor 262 is further configured to: according to the server, the UE, and the APP saved in the pre-configured authorization list. Corresponding relationship, performing matching check on the ID of the server in the first data packet, the ID of the UE, and the ID of the APP, and checking the correspondence between the server, the UE, and the APP After the relationship is correct, the transceiver 261 sends the first data packet to the UE by using the MME;
或者,  Or,
若所述第一数据包中包括所述服务器的 ID和所述 UE的 ID,则所述收发 器 261还用于将所述服务器的 ID和所述 UE的 ID发送给所述 HSS , 以供所 述 HSS根据预先配置的授权列表中保存的服务器与 UE的对应关系, 对所述 第一数据包中的所述服务器的 ID和所述 UE的 ID进行匹配检査, 在检査所 述服务器与所述 UE的对应关系正确后, 向所述 IWF返回确认结果, 以使所 述收发器 261将所述第一数据包通过所述 MME发送给所述 UE;  And if the ID of the server and the ID of the UE are included in the first data packet, the transceiver 261 is further configured to send the ID of the server and an ID of the UE to the HSS, where The HSS performs a matching check on the ID of the server in the first data packet and the ID of the UE according to the correspondence between the server and the UE saved in the pre-configured authorization list, and checks the server. After the corresponding relationship with the UE is correct, the acknowledgment result is returned to the IWF, so that the transceiver 261 sends the first data packet to the UE by using the MME;
或者,  Or,
若所述第一数据包中包括所述服务器的 ID、 所述 UE的 ID和所述 APP 的 ID, 则所述收发器 261还用于将所述服务器的 ID、 所述 UE的 ID和所述 APP的 ID发送给所述 HSS , 以供所述 HSS根据预先配置的授权列表中保存 的服务器、 UE以及 APP的对应关系, 对所述第一数据包中的所述服务器的 ID、 所述 UE的 ID和所 APP的 ID进行匹配检査, 在检査所述服务器、 所述 UE和所述 APP的对应关系正确后, 向所述 IWF返回确认结果, 以使所述收 发器 261将所述第一数据包通过所述 MME发送给所述 UE。 If the first data packet includes an ID of the server, an ID of the UE, and the APP ID, the transceiver 261 is further configured to send the ID of the server, the ID of the UE, and the ID of the APP to the HSS, for the HSS to save according to a pre-configured authorization list. Corresponding relationship between the server, the UE, and the APP, performing matching check on the ID of the server in the first data packet, the ID of the UE, and the ID of the APP, and checking the server, the UE, and After the corresponding relationship of the APP is correct, the confirmation result is returned to the IWF, so that the transceiver 261 sends the first data packet to the UE by using the MME.
本实施例提供的 IWF, 用于执行方法实施例六至八、 以及图 10、 图 12 和图 13所示的技术方案,其执行方法、原理以及技术效果可参见方法实施例, 此处不再赘述。  The IWF provided in this embodiment is used to perform the technical solutions shown in Embodiments 6 to 8 and 10, 12, and 13. The implementation methods, principles, and technical effects can be referred to the method embodiments. Narration.
图 27为本发明 MME的另一实施例的结构示意图,如图 26所示,该 MME 包括: 收发器 271和处理器 272, 收发器 271, 用于接收互通设备 IWF发送 的第一数据包, 所述第一数据包包括: 用户设备 UE的 ID、服务器的 ID和签 名; 处理器 272, 用于根据所述服务器的公钥, 对所述签名进行验证; 其 中,所述服务器的公钥存储在所述 MME上; 所述收发器 271在所述处理器 272验证签名有效后, 将所述第一数据包发送给所述 UE。  FIG. 27 is a schematic structural diagram of another embodiment of an MME according to the present invention. As shown in FIG. 26, the MME includes: a transceiver 271 and a processor 272. The transceiver 271 is configured to receive a first data packet sent by the interworking device IWF. The first data packet includes: an ID of the user equipment UE, an ID of the server, and a signature; the processor 272 is configured to verify the signature according to the public key of the server; where the public key storage of the server On the MME, the transceiver 271 sends the first data packet to the UE after the processor 272 verifies that the signature is valid.
本实施例提供的 MME,用于执行图 4所示的方法实施例的技术方案,其 执行方法、 原理以及技术效果类似, 通过保存的服务器的公钥和与该服务器 签约的 UE的公钥, 收发器接收经 IWF发送的经过签名加密的第一数据包签 名, 处理器根据该服务器的公钥验证该第一数据包的签名的有效性, 若验证 通过收发器将该第一数据包发送给 UE的 ID对应的 UE, 解决了没有相应的 安全机制保护数据包在 UE和服务器之间的传输的问题, 提高系统数据传输 的安全性。  The MME provided in this embodiment is used to perform the technical solution of the method embodiment shown in FIG. 4, and the execution method, the principle, and the technical effect are similar. The public key of the saved server and the public key of the UE that is contracted with the server are used. The transceiver receives the signed and encrypted first data packet signature sent by the IWF, and the processor verifies the validity of the signature of the first data packet according to the public key of the server, and if the verification sends the first data packet to the transceiver The UE corresponding to the ID of the UE solves the problem that the corresponding security mechanism protects the transmission of the data packet between the UE and the server, and improves the security of the system data transmission.
图 28为本发明 HSS的另一实施例的结构示意图, 如图 28所示, 该 HSS 包括: 收发器 281和处理器 282, 收发器 281用于接收移动管理实体 MME发 送的用户设备 UE的标识和 /或所述 MME为所述 UE选择的互通设备 IWF的 ID; 所述标识包括国际移动用户标识 IMSI或临时移动用户标识 TMSI; 处理 器 282用于根据所述标识获取所述 UE的签约数据,判断所述 UE具有小数据 业务的特性时, 则根据预先获取的密钥生成参数生成 SDT密钥; 所述收发器 281还用于将所述密钥生成参数和所述 SDT密钥发送给所述 IWF的 ID对应 的 IWF, 并通过所述 MME向所述 UE发送所述密钥生成参数, 以供所述 UE 根据所述密钥生成参数生成 SDT安全上下文, 其中, 所述 SDT安全上下文 包括所述 SDT密钥和 SDT安全保护算法。 FIG. 28 is a schematic structural diagram of another embodiment of an HSS according to the present invention. As shown in FIG. 28, the HSS includes: a transceiver 281 and a processor 282, where the transceiver 281 is configured to receive an identifier of the user equipment UE sent by the mobility management entity MME. And/or the MME is an ID of the interworking device IWF selected by the UE; the identifier includes an international mobile subscriber identity (IMSI) or a temporary mobile subscriber identity (TMSI), and the processor 282 is configured to acquire the subscription data of the UE according to the identifier. And determining, by the UE, that the UE has the characteristics of the small data service, generating an SDT key according to the previously generated key generation parameter; the transceiver 281 is further configured to send the key generation parameter and the SDT key to An IWF corresponding to the ID of the IWF, and sending the key generation parameter to the UE by using the MME, for the UE Generating an SDT security context according to the key generation parameter, where the SDT security context includes the SDT key and an SDT security protection algorithm.
本实施例提供的 HSS , 用于执行图 5所示的方法还是离的技术方案, 通 过处理器根据密钥生成参数生成 SDT密钥, 收发器将参数发送给 UE, 以供 UE根据该密钥生成参数 SDT安全上下文,并将该 SDT安全上下文告知 IWF, 以便在数据传输过程中可以在 IWF和 UE上进行数据包的加密解密和完整性 保护, 解决了没有相应的安全机制保护数据包在 UE和服务器之间的传输的 问题, 提高系统数据传输的安全性。  The HSS provided in this embodiment is used to perform the method shown in FIG. 5 or the technical solution, and the SDT key is generated by the processor according to the key generation parameter, and the transceiver sends the parameter to the UE, so that the UE can use the key according to the key. Generating a parameter SDT security context and informing the IWF of the SDT security context, so that the data packet can be encrypted and decrypted and integrity protected on the IWF and the UE during the data transmission process, and the corresponding security mechanism is not protected in the UE. The problem of transmission between the server and the server improves the security of system data transmission.
在上述实施例的基础上, 所述收发器 281还用于接收所述 IWF发送的第 一数据包;若所述第一数据包中包括所述服务器的 ID和所述 UE的 ID,则所 述处理器 282还用于根据预先配置的授权列表中保存的服务器与 UE的对应 关系, 对所述第一数据包中的所述服务器的 ID和所述 UE的 ID进行匹配检 査, 在检査所述服务器与所述 UE的对应关系正确后, 所述收发器 281 向所 述 IWF返回确认结果,以使所述 IWF将所述第一数据包通过所述 MME发送 给所述 UE;  On the basis of the foregoing embodiment, the transceiver 281 is further configured to receive a first data packet sent by the IWF; if the first data packet includes an ID of the server and an ID of the UE, The processor 282 is further configured to perform, according to the correspondence between the server and the UE saved in the pre-configured authorization list, the ID of the server in the first data packet and the ID of the UE, and check After checking that the corresponding relationship between the server and the UE is correct, the transceiver 281 returns an acknowledgement result to the IWF, so that the IWF sends the first data packet to the UE by using the MME;
或者,  Or,
若所述第一数据包中包括所述服务器的 ID、 所述 UE的 ID和所述 APP 的 ID, 则所述处理器 282还用于根据预先配置的授权列表中保存的服务器、 UE以及 APP的对应关系,对所述第一数据包中的所述服务器的 ID、所述 UE 的 ID和所 APP的 ID进行匹配检査, 在检査所述服务器、 所述 UE和所述 APP的对应关系正确后, 所述收发器 281向所述 IWF返回确认结果, 以使所 述 IWF将所述第一数据包通过所述 MME发送给所述 UE。  If the first data packet includes the ID of the server, the ID of the UE, and the ID of the APP, the processor 282 is further configured to use the server, the UE, and the APP saved according to the pre-configured authorization list. Corresponding relationship, performing matching check on the ID of the server in the first data packet, the ID of the UE, and the ID of the APP, and checking the correspondence between the server, the UE, and the APP After the relationship is correct, the transceiver 281 returns an acknowledgement result to the IWF, so that the IWF sends the first data packet to the UE through the MME.
可选的, 在所述收发器 281还用于将所述 SDT密钥发送给所述 IWF的 ID对应的 IWF之后, 将所述 IWF的 ID通过所述 MME发送给所述 UE, 以 使所述 UE根据所述 IWF的 ID生成 SDT密钥并通过 MME将 SDT安全保护 算法发送给所述 IWF, 其中, 所述 UE与所述 IWF的对应关系存储在所述 HSS中。  Optionally, after the transceiver 281 is further configured to send the SDT key to the IWF corresponding to the ID of the IWF, send the ID of the IWF to the UE by using the MME, so that The UE generates an SDT key according to the ID of the IWF and sends an SDT security protection algorithm to the IWF through the MME, where the correspondence between the UE and the IWF is stored in the HSS.
可选的, 所述收发器 281发送给所述 UE的参数包括所述 IWF的 ID、 应 用 APP的 ID、 随机数 RAND、 临时数据中的至少一项, 其中, 所述临时数 据是在所述 HSS判断所述 UE具有小数据业务的特性之后,所述 HSS生成的 用于生成 SDT密钥的参数; 所述密钥生成参数包括所述 SDT密钥的生成参 数; 其中, 所述 SDT密钥的生成参数为接入安全管理实体密钥、 完整性保护 密钥 IK、 加密密钥 CK、 所述 IWF的 ID、 所述 UE的 ID或国际移动用户标 识 IMSI、 所述 APP的 ID、 所述 RAND、 所述临时数据、 SDT密钥标签中的 至少一项。 Optionally, the parameter that is sent by the transceiver 281 to the UE includes at least one of an ID of the IWF, an ID of an application APP, a random number RAND, and temporary data, where the temporary data is in the After the HSS determines that the UE has the characteristics of a small data service, the HSS generates a parameter for generating an SDT key; the key generation parameter includes a generation parameter of the SDT key; wherein the generation parameter of the SDT key is an access security management entity key, an integrity protection key IK And an encryption key CK, an ID of the IWF, an ID of the UE or an international mobile subscriber identity IMSI, an ID of the APP, the RAND, the temporary data, and an SDT key label.
本实施例提供的 HSS , 用于执行方法实施例十、 十一以及图 10和图 13 所示的技术方案, 其执行方法、 原理以及技术效果类似, 此处不再赘述。  The HSS provided in this embodiment is used to implement the technical solutions shown in the tenth and eleventh embodiments, and the technical solutions shown in FIG. 10 and FIG. 13 , and the implementation methods, principles, and technical effects are similar, and details are not described herein again.
图 29为本发明 UE的再一实施例的结构示意图, 如图 29所示, 该 UE 包括: 处理器 291和收发器 292, 处理器 291用于根据所述 UE的私钥和服务 器的公钥对第二数据包进行加密和 /或签名处理,或者根据 SDT安全上下文对 所述第二数据包进行加密和 /或完整性保护处理; 其中, 所述 UE的私钥和与 所述 UE签约的所述服务器的公钥或者与归属用户服务器 HSS协商生成 SDT 安全上下文存储在所述 UE上; 收发器 292用于将处理后的第二数据包通过 移动性管理实体 MME和互通设备 IWF发送给所述服务器。  FIG. 29 is a schematic structural diagram of still another embodiment of a UE according to the present invention. As shown in FIG. 29, the UE includes: a processor 291 and a transceiver 292, where the processor 291 is configured to use a private key of the UE and a public key of the server. Performing encryption and/or signature processing on the second data packet, or performing encryption and/or integrity protection processing on the second data packet according to the SDT security context; wherein the private key of the UE and the subscription with the UE The public key of the server is negotiated with the home subscriber server HSS to generate an SDT security context, and the transceiver 292 is configured to send the processed second data packet to the mobility management entity MME and the interworking device IWF. Said server.
本实施例提供的 UE,用于执行图 6所示的方法实施例的技术方案, 其实 现原理和技术效果类似, 通过处理器保存的自身的私钥和与之签约的服务器 的公钥, 或者 SDT安全上下文, 处理器将要向服务器发送的第二数据包进行 加密或者加密和完整性保护, 收发器通过 MME和 IWF发送给该服务器, 完 成数据包的上行传输, 通过签名加密, 和完整性保护, 解决了没有相应的安 全机制保护数据包在 UE和服务器之间的传输的问题, 提高系统数据传输的 安全性。  The UE provided in this embodiment is used to perform the technical solution of the method embodiment shown in FIG. 6. The implementation principle and the technical effect are similar. The private key saved by the processor and the public key of the server with which the server is subscribed, or SDT security context, the processor will encrypt or encrypt and protect the second data packet sent by the server. The transceiver sends the data packet to the server through the MME and the IWF, completes the uplink transmission of the data packet, encrypts by signature, and protects the integrity. , solve the problem that there is no corresponding security mechanism to protect the transmission of the data packet between the UE and the server, and improve the security of the system data transmission.
可选的, 所述收发器 292还用于接收所述 HSS发送的密钥生成参数; 所述处理器 291还用于根据所述密钥生成参数, 生成 SDT密钥; 所述处理器 291 还用于在非接入安全模式命令 NAS SMC 过程中协商 SDT安全保护算法, 或者, 在非接入安全模式命令 NAS SMC过程中协商的 非接入层安全算法作为 SDT安全保护算法。  Optionally, the transceiver 292 is further configured to receive a key generation parameter that is sent by the HSS, where the processor 291 is further configured to generate an SDT key according to the key generation parameter, where the processor 291 further The SDT security protection algorithm is used to negotiate the SDT security protection algorithm in the non-access security mode command NAS SMC, or the non-access stratum security algorithm negotiated in the non-access security mode command NAS SMC process as the SDT security protection algorithm.
可选的, 所述处理器 291还用于根据所述 UE的私钥签名所述第二数据 包, 并根据所述服务器的公钥对第二数据包进行加密处理;  Optionally, the processor 291 is further configured to: sign the second data packet according to the private key of the UE, and perform encryption processing on the second data packet according to the public key of the server;
所述收发器 292 还用于将处理后的第二数据包通过所述 MME和所述 IWF发送给所述服务器, 以供所述服务器根据所述第二数据包中的 UE的 ID 获取所述 UE的公钥,并根据所述 UE的公钥验证所述处理后的第二数据包中 的签名是否有效, 若验证有效, 则根据所述服务器的私钥对所述处理后的第 二数据包进行解密处理。 The transceiver 292 is further configured to send the processed second data packet to the server by using the MME and the IWF, for the server to use, according to the ID of the UE in the second data packet. Obtaining a public key of the UE, and verifying, according to the public key of the UE, whether the signature in the processed second data packet is valid, and if the verification is valid, performing the processed according to the private key of the server The second data packet is decrypted.
可选的, 所述处理器 291还用于根据所述 SDT安全上下文对所述第二数 据包进行加密或加密和完整性保护处理;  Optionally, the processor 291 is further configured to perform encryption or encryption and integrity protection processing on the second data packet according to the SDT security context.
所述收发器 292还用于将携带 MAC-I的所述处理后的第二数据包发送给 IWF或者服务器, 以供所述 IWF或者服务器根据所述处理后的第二数据包中 的所述 UE的 ID获取所述 SDT安全上下文, 并根据所述 SDT安全上下文, 验证所述安全保护后的第二数据包中的所述 MAC-I, 若验证有效, 则对所述 处理后的第二数据包进行解密。  The transceiver 292 is further configured to send the processed second data packet carrying the MAC-I to the IWF or the server, where the IWF or the server is configured according to the processed second data packet. Obtaining, by the ID of the UE, the SDT security context, and verifying the MAC-I in the second packet after the security protection according to the SDT security context, and if the verification is valid, performing the second processing The packet is decrypted.
可选的, 所述收发器 292接收的所述 HSS发送的参数包括所述 IWF的 ID、 应用 APP的 ID、 随机数 RAND、 临时数据中的至少一项; 所述密钥生 成参数包括所述 SDT密钥的生成参数; 其中, 所述 SDT密钥的生成参数为 接入安全管理实体密钥、完整性保护密钥 IK、加密密钥 CK、所述 IWF的 ID、 所述 UE的 ID或国际移动用户标识 IMSI、 所述 APP的 ID、 所述 RAND、 所 述临时数据、 SDT密钥标签中的至少一项。  Optionally, the parameter sent by the HSS received by the transceiver 292 includes at least one of an ID of the IWF, an ID of an application APP, a random number RAND, and temporary data; the key generation parameter includes the a generation parameter of the SDT key; wherein the generation parameter of the SDT key is an access security management entity key, an integrity protection key IK, an encryption key CK, an ID of the IWF, an ID of the UE, or At least one of an international mobile subscriber identity IMSI, an ID of the APP, the RAND, the temporary data, and an SDT key label.
本实施例提供的 UE, 用于执行方法实施例十二至十四、 以及图 11和图 14所示的技术方案, 其执行方法、 原理以及技术效果类似, 此处不再赘述。  The UE provided in this embodiment is used to perform the technical solutions of the method embodiments 12 to 14 and FIG. 11 and FIG. 14 , and the execution methods, principles, and technical effects thereof are similar, and details are not described herein again.
图 30为本发明服务器的再一实施例的结构示意图, 如图 30所示, 该服 务器包括: 收发器 301和处理器 302, 收发器 301, 用于接收互通设备 IWF 发送的处理后的第二数据包; 处理器 302,用于根据用户设备 UE的公钥和所 述服务器的私钥对所述第二数据包进行签名验证和解密, 或者根据所述 UE 的 ID和 /或 IWF的 ID査找 SDT安全上下文, 对所述处理后的第二数据包进 行完整性验证和解密; 其中, 所述服务器的私钥和与所述服务器签约的所述 UE的公钥存储在所述服务器上, 所述 SDT安全上下文为互通设备 IWF发送 的。  FIG. 30 is a schematic structural diagram of still another embodiment of a server according to the present invention. As shown in FIG. 30, the server includes: a transceiver 301 and a processor 302, and a transceiver 301, configured to receive a processed second sent by the interworking device IWF. The processor 302 is configured to perform signature verification and decryption on the second data packet according to the public key of the user equipment UE and the private key of the server, or search according to the ID of the UE and/or the ID of the IWF. An SDT security context, performing integrity verification and decryption on the processed second data packet; wherein the private key of the server and the public key of the UE that is contracted with the server are stored on the server, where The SDT security context is sent by the interworking device IWF.
本实施例提供的服务器, 用于执行图 7所示的方法实施例的技术方案, 其执行方法、 原理以及技术效果类似, 通过处理器保存的自身的私钥和与之 签约的 UE的公钥, 或者 SDT安全上下文, 处理器对收发器接收的 UE经过 MME和 IWF发送的第二数据包进行签名的验证和解密或者 MAC-I的验证和 解密, 完成数据包的上行传输, 该服务器通过对数据包的签名验证和解密过 程, 解决了没有相应的安全机制保护数据包在 UE和服务器之间的传输的问 题, 提高系统数据传输的安全性。 The server provided in this embodiment is used to execute the technical solution of the method embodiment shown in FIG. 7. The execution method, the principle, and the technical effect are similar. The private key saved by the processor and the public key of the UE that is contracted by the server are similar. Or the SDT security context, the processor performs verification and decryption of the signature of the second data packet sent by the UE through the MME and the IWF, or the verification of the MAC-I. Decryption, complete the uplink transmission of the data packet, the server solves the problem that the corresponding security mechanism protects the transmission of the data packet between the UE and the server by the signature verification and decryption process of the data packet, and improves the security of the system data transmission. .
图 31为本发明 IWF的再一实施例的结构示意图, 如图 31所示, 该 IWF 包括: 收发器 311和处理器 312, 收发器 311, 用于接收用户设备 UE通过移 动性管理实体 MME发送的处理后的第二数据包, 所述处理后的第二数据包 包括所述 UE的 ID和签名, 或者所述 UE的 ID和 MAC-I; 处理器 312, 用 于根据所述 UE的公钥或 SDT安全上下文,对所述签名或者 MAC-I进行验证; 其中, 所述 UE的公钥存储在所述 IWF上, 所述 SDT安全上下文为预先从归 属用户服务器 HSS获取的; 所述收发器 311还用于在验证通过后, 将所述处 理后的第二数据包发送给所述服务器。  FIG. 31 is a schematic structural diagram of still another embodiment of an IWF according to the present invention. As shown in FIG. 31, the IWF includes: a transceiver 311 and a processor 312, where the transceiver 311 is configured to receive, by the user equipment, the UE, that the UE is sent by the mobility management entity MME. The processed second data packet, the processed second data packet includes an ID and a signature of the UE, or an ID of the UE and a MAC-I; and a processor 312, configured to be used according to the UE The key or the SDT security context is used to verify the signature or the MAC-I; wherein the public key of the UE is stored on the IWF, and the SDT security context is obtained in advance from the home subscriber server HSS; The device 311 is further configured to send the processed second data packet to the server after the verification is passed.
本实施例提供的 IWF, 用于执行图 8所示的方法实施例的技术方案, 其 实现原理和技术效果类似, 通过处理器预先配置服务器的公钥和与之签约的 UE的公钥, 或者获取该 UE与 HSS协商的 SDT安全上下文, 对收发器接收 的 UE经过 MME发送的第二数据包进行签名的验证或者 MAC-I的验证, 收 发器将验证通过的第二数据包发送给服务器, 完成数据包的上行传输, 该服 务器通过对数据包的签名验证和解密过程, 解决了没有相应的安全机制保护 数据包在 UE和服务器之间的传输的问题, 提高系统数据传输的安全性。  The IWF provided in this embodiment is used to perform the technical solution of the method embodiment shown in FIG. 8. The implementation principle and the technical effect are similar. The public key of the server and the public key of the UE that is contracted with the server are pre-configured by the processor, or Acquiring the SDT security context negotiated by the UE and the HSS, performing signature verification or MAC-I verification on the second data packet sent by the UE received by the transceiver, and transmitting, by the transceiver, the second data packet that is verified to be sent to the server, After the uplink transmission of the data packet is completed, the server solves the problem that the corresponding security mechanism protects the transmission of the data packet between the UE and the server by the signature verification and decryption process of the data packet, thereby improving the security of the system data transmission.
可选的, 所述收发器 311还用于接收所述 HSS发送的 SDT密钥; 所述收发器 311还用于接收所述 UE通过所述 MME发送的 SDT安全保 护算法; 其中, 所述 SDT安全上下文包括所述 SDT密钥和所述 SDT安全保 护算法。  Optionally, the transceiver 311 is further configured to receive an SDT key that is sent by the HSS, where the transceiver 311 is further configured to receive an SDT security protection algorithm that is sent by the UE by using the MME, where the SDT is The security context includes the SDT key and the SDT security protection algorithm.
可选的, 所述处理器 312还用于根据所述 UE的公钥, 验证所述处理后 的第二数据包的所述签名是否有效;  Optionally, the processor 312 is further configured to verify, according to the public key of the UE, whether the signature of the processed second data packet is valid.
若验证所述处理后的第二数据包签名有效, 则所述收发器 311还用于将 所述处理后的第二数据包发送给服务器;  And if the verification of the processed second data packet signature is valid, the transceiver 311 is further configured to send the processed second data packet to the server;
或者,  Or,
所述处理器 312还用于根据所述 SDT安全上下文对所述处理后的第二数 据包的所述 MAC-I进行验证;  The processor 312 is further configured to verify, according to the SDT security context, the MAC-I of the processed second data packet.
若验证所述处理后的第二数据包的所述 MAC-I有效, 则所述收发器 311 还用于将所述处理后的第二数据包进行解密处理后发送给服务器。 可选的, 所述收发器 311将所述第二数据包发送给所述服务器之前, 所 述方法还包括: If the MAC-I of the processed second data packet is verified to be valid, the transceiver 311 The method further includes: decrypting the processed second data packet, and transmitting the processed data packet to the server. Optionally, before the transceiver 311 sends the second data packet to the server, the method further includes:
若所述第一数据包中包括所述服务器的 ID和所述 UE的 ID,所述处理器 312还用于根据预先配置的授权列表中保存的服务器与 UE的对应关系,对所 述第一数据包中的所述服务器的 ID和所述 UE的 ID进行匹配检査, 在检査 所述服务器与所述 UE的对应关系正确后, 所述收发器 311将所述第二数据 包发送给所述服务器;  If the first data packet includes the ID of the server and the ID of the UE, the processor 312 is further configured to: according to the correspondence between the server and the UE saved in the pre-configured authorization list, the first Performing a matching check on the ID of the server in the data packet and the ID of the UE. After checking that the correspondence between the server and the UE is correct, the transceiver 311 sends the second data packet to The server;
或者,  Or,
若所述第一数据包中包括所述服务器的 ID、 所述 UE的 ID和所述 APP 的 ID,所述处理器 312还用于根据预先配置的授权列表中保存的服务器、 UE 以及 APP的对应关系, 对所述第一数据包中的所述服务器的 ID、所述 UE的 ID和所述 APP的 ID进行匹配检査,在检査所述服务器、所述 UE和所述 APP 的对应关系正确后, 所述收发器 311将所述第二数据包发送给所述服务器; 或者,  If the first data packet includes the ID of the server, the ID of the UE, and the ID of the APP, the processor 312 is further configured to: according to the server, the UE, and the APP saved in the pre-configured authorization list. Corresponding relationship, performing matching check on the ID of the server in the first data packet, the ID of the UE, and the ID of the APP, and checking the correspondence between the server, the UE, and the APP After the relationship is correct, the transceiver 311 sends the second data packet to the server; or
若所述第二数据包中包括所述服务器的 ID和所述 UE的 ID,则所述收发 器 311还用于将所述服务器的 ID和所述 UE的 ID发送给 HSS ,以供所述 HSS 根据预先配置的授权列表中保存的服务器与 UE的对应关系, 对所述第二数 据包中的所述服务器的 ID和所述 UE的 ID进行匹配检査, 在检査所述服务 器与所述 UE的对应关系正确后, 将所述第二数据包发送给所述服务器; 或者,  If the second data packet includes the ID of the server and the ID of the UE, the transceiver 311 is further configured to send the ID of the server and the ID of the UE to the HSS, where The HSS performs a matching check on the ID of the server in the second data packet and the ID of the UE according to the correspondence between the server and the UE saved in the pre-configured authorization list, and checks the server and the server. After the correspondence between the UEs is correct, the second data packet is sent to the server; or
若所述第二数据包中包括所述服务器的 ID、所述 UE的 ID以及应用 APP 的 ID, 则所述收发器 311还用于将所述服务器的 ID、 所述 UE的 ID以及所 述 APP的 ID发送给 HSS , 以供所述 HSS根据预先配置的授权列表中保存的 服务器、 UE以及 APP的对应关系,对所述第二数据包中的所述服务器的 ID、 所述 UE的 ID和所 APP的 ID进行匹配检査, 在检査所述服务器、 所述 UE 以及所述 APP的对应关系正确后, 将所述第二数据包发送给所述服务器。  If the second data packet includes the ID of the server, the ID of the UE, and the ID of the application APP, the transceiver 311 is further configured to use an ID of the server, an ID of the UE, and the The ID of the APP is sent to the HSS, and the ID of the server and the ID of the UE in the second data packet are used by the HSS according to the correspondence between the server, the UE, and the APP saved in the pre-configured authorization list. And performing matching check with the ID of the APP, and after checking that the correspondence between the server, the UE, and the APP is correct, sending the second data packet to the server.
本实施例提供的 IWF, 该 IWF用于方法实施例十五、 十六以及图 11和 图 14所示的技术方案,其执行方法、原理以及技术效果类似,此处不再赘述。  The IWF provided in this embodiment is used in the technical solutions shown in the fifteenth, sixteenth, and FIG. 11 and FIG. 14 of the method embodiments, and the execution method, the principle, and the technical effects are similar, and details are not described herein again.
图 32为本发明 MME的再一实施例的结构示意图,如图 32所示,该 MME 包括: 收发器 321和处理器 322, 收发器 321, 用于接收用户设备 UE发送的 处理后的第二数据包, 所述第二数据包包括: 所述 UE的 ID、服务器的 ID和 签名; 处理器 322, 用于根据所述 UE的公钥, 对所述签名进行验证; 其中, 所述 UE的公钥存储在所述 MME上; 所述收发器 321还用于在验证所述签 名有效后, 将所述第二数据包发送给互通设备 IWF。 FIG. 32 is a schematic structural diagram of still another embodiment of an MME according to the present invention. As shown in FIG. The transceiver 321 and the processor 322, the transceiver 321 is configured to receive the processed second data packet sent by the user equipment UE, where the second data packet includes: an ID of the UE, an ID of the server, and a signature; The processor 322 is configured to verify the signature according to the public key of the UE, where the public key of the UE is stored on the MME, and the transceiver 321 is further configured to verify that the signature is valid. Then, the second data packet is sent to the interworking device IWF.
本实施例提供的 MME,用于执行图 9所示的方法实施例的技术方案,七 实现原理和技术效果类似, 通过存储的服务器的公钥和与之签约的 UE的公 钥, 收发器接收 UE发送的第二数据包进行签名的验证, 收发器将验证通过 的第二数据包通过 IWF发送给服务器, 完成数据包的上行传输, 该 MME通 过对数据包的签名验证, 解决了没有相应的安全机制保护数据包在 UE和服 务器之间的传输的问题, 提高系统数据传输的安全性。  The MME provided in this embodiment is used to perform the technical solution of the method embodiment shown in FIG. 9. The implementation principle and the technical effect are similar. The transceiver receives the public key of the stored server and the public key of the UE that is contracted with the transceiver. The second data packet sent by the UE is used for verification of the signature, and the transceiver sends the second data packet that is verified to be sent to the server through the IWF, and completes the uplink transmission of the data packet. The MME solves the problem by verifying the signature of the data packet. The security mechanism protects the transmission of data packets between the UE and the server, improving the security of system data transmission.
可选的,若所述第二数据包中包括所述服务器的 ID和所述 UE的 ID,则 所述处理器 322还用于根据预先配置的授权列表、 所述第二数据包中的所述 服务器的 ID和所述 UE的 ID,根据所述授权列表中保存的服务器和 UE的对 应关系, 对所述第二数据包中的所述服务器的 ID和所述 UE的 ID进行匹配 检査, 在检査所述服务器和所述 UE的对应关系正确后, 所述收发器 321还 用于将所述第二数据包通过 IWF发送给所述服务器;  Optionally, if the second data packet includes the ID of the server and the ID of the UE, the processor 322 is further configured to: according to the pre-configured authorization list, the second data packet Performing matching check on the ID of the server and the ID of the UE in the second data packet according to the ID of the server and the ID of the UE according to the correspondence between the server and the UE saved in the authorization list After checking that the corresponding relationship between the server and the UE is correct, the transceiver 321 is further configured to send the second data packet to the server by using an IWF;
或者,  Or,
若所述第二数据包中包括所述服务器的 ID、 所述 UE的 ID和应用 APP 的 ID, 则所述处理器 322还用于根据预先配置的授权列表、 所述第二数据包 中的所述服务器的 ID、 所述 UE的 ID以及所述 APP的 ID, 根据所述授权列 表中保存的服务器、 UE以及 APP的对应关系, 对所述第二数据包中的所述 服务器的 ID、所述 UE的 ID和所述 APP的 ID进行匹配检査,在检査所述服 务器、 所述 UE以及所述 APP的对应关系正确后, 所述收发器 321还用于将 所述第二数据包通过 IWF发送给所述服务器。  If the second data packet includes the ID of the server, the ID of the UE, and the ID of the application APP, the processor 322 is further configured to use, according to the pre-configured authorization list, the second data packet. The ID of the server, the ID of the UE, and the ID of the APP, according to the correspondence between the server, the UE, and the APP stored in the authorization list, the ID of the server in the second data packet, Performing a matching check on the ID of the UE and the ID of the APP. After checking that the correspondence between the server, the UE, and the APP is correct, the transceiver 321 is further configured to use the second data. The packet is sent to the server via the IWF.
本实施例提供的 MME, 该 MME用于执行方法实施例十七、十八以及图 11和图 14所示的技术方案, 其执行方法、 原理以及技术效果类似, 此处不 再赘述。  The MME provided in this embodiment is used to perform the technical solutions shown in the seventeenth and eighteenth embodiments, and the technical solutions shown in FIG. 11 and FIG. 14 , and the implementation methods, principles, and technical effects are similar, and details are not described herein.
本领域普通技术人员可以理解: 实现上述各方法实施例的全部或部分歩 骤可以通过程序指令相关的硬件来完成。 前述的程序可以存储于一计算机可 读取存储介质中。 该程序在执行时, 执行包括上述各方法实施例的歩骤; 而 前述的存储介质包括: ROM、 RAM, 磁碟或者光盘等各种可以存储程序代码 的介质。 It will be understood by those skilled in the art that all or part of the steps of implementing the above method embodiments may be performed by hardware related to the program instructions. The aforementioned program can be stored in a computer Read in the storage medium. The program, when executed, performs the steps including the foregoing method embodiments; and the foregoing storage medium includes: a medium that can store program codes, such as a ROM, a RAM, a magnetic disk, or an optical disk.
最后应说明的是: 以上各实施例仅用以说明本发明的技术方案, 而非对 其限制; 尽管参照前述各实施例对本发明进行了详细的说明, 本领域的普通 技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改, 或者对其中部分或者全部技术特征进行等同替换; 而这些修改或者替换, 并 不使相应技术方案的本质脱离本发明各实施例技术方案的范围。  Finally, it should be noted that the above embodiments are only for explaining the technical solutions of the present invention, and are not intended to be limiting thereof; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art will understand that The technical solutions described in the foregoing embodiments may be modified, or some or all of the technical features may be equivalently replaced; and the modifications or substitutions do not deviate from the technical solutions of the embodiments of the present invention. range.

Claims

权 利 要 求 书 Claim
1、 一种数据的安全传输方法, 其特征在于, 包括: A method for securely transmitting data, characterized in that it comprises:
用户设备 UE接收服务器通过互通设备 IWF和移动性管理实体 MME发 送的第一数据包, 所述第一数据包携带所述服务器的 ID或所述 IWF的 ID; 所述 UE根据所述第一数据包中的所述服务器的 ID或所述 IWF的 ID, 获得所述服务器的公钥和 /或所述 SDT安全上下文, 其中, 所述 UE签约的服 务器的公钥或者与归属用户服务器 HSS协商生成 SDT安全上下文存储在所 述 UE上, 且通过所述服务器的 ID或所述 IWF的 ID来标识;  The user equipment UE receives the first data packet sent by the server through the interworking device IWF and the mobility management entity MME, where the first data packet carries an ID of the server or an ID of the IWF; the UE is configured according to the first data. Obtaining, by the ID of the server or the ID of the IWF, the public key of the server and/or the SDT security context, where the public key of the server subscribed by the UE is negotiated with the home user server HSS An SDT security context is stored on the UE, and is identified by an ID of the server or an ID of the IWF;
所述 UE根据所述服务器的公钥和所述 UE的私钥, 或者所述 SDT安全 上下文, 或者所述服务器的公钥和所述 SDT安全上下文, 对所述第一数据包 进行验证和解密处理, 得到解密后的第一数据包。  The UE performs verification and decryption on the first data packet according to the public key of the server and the private key of the UE, or the SDT security context, or the public key of the server and the SDT security context. Processing, obtaining the decrypted first data packet.
2、 根据权利要求 1所述的方法, 其特征在于, 还包括: 所述 UE与归属 用户服务器 HSS协商生成所述 SDT安全上下文, 具体歩骤包括:  The method according to claim 1, further comprising: the UE collaborating with the home subscriber server HSS to generate the SDT security context, and the specific steps include:
接收所述 HSS发送的密钥生成参数;  Receiving a key generation parameter sent by the HSS;
根据所述密钥生成参数, 生成所述 SDT密钥;  Generating the SDT key according to the key generation parameter;
在非接入安全模式命令 NAS SMC过程中协商所述 SDT安全保护算法, 或者, 在非接入安全模式命令 NAS SMC过程中协商的非接入层安全算法作 为所述 SDT安全保护算法。  The SDT security protection algorithm is negotiated in the non-access security mode command NAS SMC process, or the non-access stratum security algorithm negotiated in the non-access security mode command NAS SMC process is used as the SDT security protection algorithm.
3、 根据权利要求 1或 2所述的方法, 其特征在于, 所述 UE根据所述服 务器的公钥和所述 UE的私钥, 或者所述 SDT安全上下文, 或者所述服务器 的公钥和所述 SDT安全上下文, 对所述第一数据包进行验证和解密处理, 得 到解密后的第一数据包, 包括:  The method according to claim 1 or 2, wherein the UE is based on a public key of the server and a private key of the UE, or the SDT security context, or a public key of the server The SDT security context, the first data packet is verified and decrypted, and the decrypted first data packet is obtained, including:
所述 UE根据所述服务器的公钥验证所述第一数据包中的签名是否有效; 所述 UE若验证所述第一数据包中的签名有效,则根据所述 UE的私钥对 所述第一数据包进行解密处理, 得到解密后的所述第一数据包。  The UE verifies whether the signature in the first data packet is valid according to the public key of the server; if the UE verifies that the signature in the first data packet is valid, the UE is configured according to the private key of the UE. The first data packet is decrypted to obtain the decrypted first data packet.
4、 根据权利要求 2所述的方法, 其特征在于, 所述 UE根据所述服务器 的公钥和所述 UE的私钥, 或者所述 SDT安全上下文, 或者所述服务器的公 钥和所述 SDT安全上下文, 对所述第一数据包进行验证和解密处理, 得到解 密后的第一数据包, 包括:  The method according to claim 2, wherein the UE is based on a public key of the server and a private key of the UE, or the SDT security context, or a public key of the server, and the The SDT security context, the first data packet is verified and decrypted, and the decrypted first data packet is obtained, including:
所述 UE根据所述 SDT安全上下文验证所述第一数据包中的消息认证码 MAC-I; 若验证成功, 则对所述第一数据包进行解密处理, 得到解密后的所 述第一数据包。 The UE verifies the message authentication code in the first data packet according to the SDT security context MAC-I; if the verification is successful, decrypting the first data packet to obtain the decrypted first data packet.
5、 根据权利要求 2所述的方法, 其特征在于, 所述 UE根据所述服务器 的公钥和所述 UE的私钥, 或者所述 SDT安全上下文, 或者所述服务器的公 钥和所述 SDT安全上下文, 对所述第一数据包进行验证和解密处理, 得到解 密后的第一数据包, 包括:  The method according to claim 2, wherein the UE is based on a public key of the server and a private key of the UE, or the SDT security context, or a public key of the server, and the The SDT security context, the first data packet is verified and decrypted, and the decrypted first data packet is obtained, including:
所述 UE根据所述服务器的公钥验证所述第一数据包中的签名是否有效; 若验证所述第一数据包的签名有效, 则根据所述 SDT安全上下文对所述第一 数据包进行解密处理, 或者根据所述 SDT安全上下文对所述第一数据包进行 完整性验证和解密处理, 得到解密后的所述第一数据包。  The UE verifies whether the signature in the first data packet is valid according to the public key of the server; if the signature of the first data packet is valid, the first data packet is performed according to the SDT security context. Decrypting processing, or performing integrity verification and decryption processing on the first data packet according to the SDT security context, to obtain the decrypted first data packet.
6、 根据权利要求 4或 5所述的方法, 其特征在于, 还包括:  The method according to claim 4 or 5, further comprising:
所述 UE从所述 HSS接收的参数包括所述 IWF的 ID、 所述 APP的 ID、 随机数 RAND、 临时数据中的至少一项;  The parameter that the UE receives from the HSS includes at least one of an ID of the IWF, an ID of the APP, a random number RAND, and temporary data;
所述密钥生成参数包括所述 SDT密钥的生成参数; 其中, 所述 SDT密 钥的生成参数包括接入安全管理实体密钥、 完整性保护密钥 IK、 加密密钥 CK、 所述 IWF的 ID、 所述 UE的 ID或国际移动用户标识 IMSI、 所述 APP 的 ID、 所述 RAND、 所述临时数据、 SDT密钥标签中的至少一项。  The key generation parameter includes a generation parameter of the SDT key, where the generation parameter of the SDT key includes an access security management entity key, an integrity protection key IK, an encryption key CK, and the IWF. At least one of an ID, an ID of the UE or an International Mobile Subscriber Identity (IMSI), an ID of the APP, the RAND, the temporary data, and an SDT key label.
7、 一种数据的安全传输方法, 其特征在于, 包括:  7. A method for securely transmitting data, characterized by comprising:
服务器根据所述服务器的私钥和与所述服务器签约的用户设备 UE的公 钥对等待发送的第一数据包进行签名和加密处理, 或者根据 SDT安全上下文 对所述第一数据包进行加密处理或加密和完整性保护处理, 其中, 所述服务 器的私钥和与所述服务器签约的所述 UE公钥存储在所述服务器上,所述 SDT 安全上下文为互通设备 IWF发送的;  The server signs and encrypts the first data packet waiting to be sent according to the private key of the server and the public key of the user equipment UE that is contracted with the server, or encrypts the first data packet according to the SDT security context. Or the encryption and integrity protection process, wherein the private key of the server and the public key of the UE that is contracted with the server are stored on the server, and the SDT security context is sent by the interworking device IWF;
所述服务器将加密后的所述第一数据包通过互通设备 IWF和移动性管理 实体 MME发送给所述 UE; 以供所述 UE根据所述第一数据包中的服务器的 ID, 获取所述服务器的公钥和 /或所述 SDT 安全上下文, 并根据所述服务器 的公钥和所述 UE的私钥, 或者所述 SDT安全上下文, 或者与所述服务器的 公钥和所述 SDT安全上下文, 对所述第一数据包进行验证和解密处理, 得到 解密后的所述第一数据包。  Sending, by the server, the encrypted first data packet to the UE by using the interworking device IWF and the mobility management entity MME, where the UE obtains the identifier according to the ID of the server in the first data packet. a public key of the server and/or the SDT security context, and based on the public key of the server and the private key of the UE, or the SDT security context, or with the public key of the server and the SDT security context And performing the verification and decryption processing on the first data packet to obtain the decrypted first data packet.
8、 一种数据的安全传输方法, 其特征在于, 包括: 互通设备 IWF接收服务器发送的第一数据包, 所述第一数据包包括所述 服务器的 ID和签名, 或者所述服务器的 ID和 MAC-I; 8. A method for securely transmitting data, characterized by comprising: The interworking device IWF receives the first data packet sent by the server, the first data packet includes an ID and a signature of the server, or an ID of the server and a MAC-I;
所述 IWF根据所述服务器的公钥对所述签名进行验证, 或根据 SDT安 全上下文对所述 MAC-I进行验证,并在验证通过后将所述第一数据包通过移 动性管理实体 MME发送给 UE; 或者, 所述 IWF根据所述 SDT安全上下文 对所述第一数据包进行加密和 /或完整性保护处理, 将所述第一数据包通过移 动性管理实体 MME发送给 UE;  The IWF verifies the signature according to the public key of the server, or validates the MAC-I according to an SDT security context, and sends the first data packet through the mobility management entity MME after the verification is passed Or the IWF performs encryption and/or integrity protection processing on the first data packet according to the SDT security context, and sends the first data packet to the UE through the mobility management entity MME;
其中, 所述服务器的公钥和与所述服务器签约的所述 UE的公钥存储在 所述 IWF上, 所述 SDT安全上下文为预先从归属用户服务器 HSS获取的。  The public key of the server and the public key of the UE that is contracted with the server are stored on the IWF, and the SDT security context is obtained in advance from the home subscriber server HSS.
9、 根据权利要求 8 所述的方法, 其特征在于, 预先从归属用户服务器 9. The method according to claim 8, characterized by: pre-following from a home subscriber server
HSS获取 SDT安全上下文, 包括: The HSS obtains the SDT security context, including:
接收所述 HSS发送的 SDT密钥;  Receiving an SDT key sent by the HSS;
接收所述 UE通过所述 MME发送的 SDT安全保护算法;  Receiving an SDT security protection algorithm sent by the UE by using the MME;
其中, 所述 SDT安全上下文包括所述 SDT密钥和所述 SDT安全保护算 法。  The SDT security context includes the SDT key and the SDT security protection algorithm.
10、 根据权利要求 8或 9所述的方法, 其特征在于, 所述 IWF根据所述 服务器的公钥对所述签名进行验证, 或根据 SDT安全上下文对所述 MAC-I 进行验证, 并在验证通过后将所述第一数据包通过移动性管理实体 MME发 送给 UE; 或者, 所述 IWF根据所述 SDT安全上下文对所述第一数据包进行 加密和 /或完整性保护处理, 将所述第一数据包通过移动性管理实体 MME发 送给 UE, 包括:  The method according to claim 8 or 9, wherein the IWF verifies the signature according to a public key of the server, or verifies the MAC-I according to an SDT security context, and After the verification is passed, the first data packet is sent to the UE by using the mobility management entity MME; or the IWF performs encryption and/or integrity protection processing on the first data packet according to the SDT security context, The first data packet is sent to the UE by the mobility management entity MME, and includes:
所述 IWF根据所述服务器的 ID査询并获取所述服务器的公钥, 并根据 所述服务器的公钥, 验证所述第一数据包签名是否有效; 若验证所述第一数 据包签名有效, 则将所述第一数据包通过所述 MME发送给所述 UE;  The IWF queries and acquires the public key of the server according to the ID of the server, and verifies whether the first data packet signature is valid according to the public key of the server; if the first data packet signature is valid, Transmitting, by the MME, the first data packet to the UE;
或者,  Or,
在所述第一数据包还包括: UE的 ID时, 所述 IWF根据所述 UE的 ID 获取所述 SDT安全上下文, 对所述 MAC-I进行验证;  When the first data packet further includes: an ID of the UE, the IWF acquires the SDT security context according to the ID of the UE, and performs verification on the MAC-I;
若验证所述 MAC-I有效, 则将所述第一数据包通过所述 MME发送给所 述 UE;  If the MAC-I is valid, the first data packet is sent to the UE through the MME;
或者, 在所述第一数据包还包括: APP的 ID时, 所述 IWF根据所述 UE的 ID 和 APP的 ID获取所述 SDT安全上下文, 对所述 MAC-I进行验证; or, When the first data packet further includes: an ID of the APP, the IWF acquires the SDT security context according to the ID of the UE and the ID of the APP, and performs verification on the MAC-I;
若验证所述第一数据包 MAC-I有效,则将所述第一数据包通过所述 MME 发送给所述 UE;  If the first data packet MAC-I is valid, the first data packet is sent to the UE through the MME;
或者,  Or,
在所述第一数据包还包括: UE的 ID和 /或 APP的 ID时,所述 IWF根据 所述 UE的 ID和 /或 APP的 ID获取所述 SDT安全上下文, 对所述第一数据 进行加密和完整性保护处理; 并将所述处理后的第一数据包通过所述 MME 发送给所述 UE;  When the first data packet further includes: an ID of the UE and/or an ID of the APP, the IWF acquires the SDT security context according to the ID of the UE and/or the ID of the APP, and performs the first data. Encryption and integrity protection processing; and sending the processed first data packet to the UE by using the MME;
或者,  Or,
在所述第一数据包还包括: UE的 ID和 /或 APP的 ID时,所述 IWF根据 所述服务器的 ID获取所述服务器的公钥, 并根据所述服务器的公钥, 验证所 述签名;若验证所述第一数据包的签名有效,则根据用户 UE的 ID和 /或 APP 的 ID获取所述 SDT安全上下文, 对所述第一数据进行加密处理, 或者加密 和完整性保护处理, 并将所述处理后的第一数据包通过所述 MME发送给所 述 UE。  When the first data packet further includes: an ID of the UE and/or an ID of the APP, the IWF acquires the public key of the server according to the ID of the server, and verifies the according to the public key of the server. Signing; if the signature of the first data packet is valid, obtaining the SDT security context according to the ID of the user UE and/or the ID of the APP, performing encryption processing, or encryption and integrity protection processing on the first data And sending the processed first data packet to the UE by using the MME.
11、 根据权利要求 10所述的方法, 其特征在于, 所述方法还包括: 若所述第一数据包中包括所述服务器的 ID和所述 UE的 ID, 所述 IWF 根据预先配置的授权列表中保存的服务器与 UE的对应关系, 对所述第一数 据包中的所述服务器的 ID和所述 UE的 ID进行匹配检査, 在检査所述服务 器与所述 UE的对应关系正确后, 将所述第一数据包通过所述 MME发送给 所述 UE;  The method according to claim 10, wherein the method further comprises: if the first data packet includes an ID of the server and an ID of the UE, the IWF is based on a pre-configured authorization Corresponding relationship between the server and the UE saved in the list, performing matching check on the ID of the server in the first data packet and the ID of the UE, and checking that the correspondence between the server and the UE is correct After the first data packet is sent to the UE by using the MME;
或者,  Or,
若所述第一数据包中包括所述服务器的 ID、 所述 UE的 ID和所述 APP 的 ID, 所述 IWF根据预先配置的授权列表中保存的服务器、 UE以及 APP的 对应关系, 对所述第一数据包中的所述服务器的 ID、 所述 UE的 ID和所述 APP的 ID进行匹配检査, 在检査所述服务器、 所述 UE和所述 APP的对应 关系正确后, 将所述第一数据包通过所述 MME发送给所述 UE;  If the first data packet includes the ID of the server, the ID of the UE, and the ID of the APP, the IWF is configured according to the correspondence between the server, the UE, and the APP saved in the pre-configured authorization list. Performing a matching check on the ID of the server, the ID of the UE, and the ID of the APP in the first data packet, and after checking that the correspondence between the server, the UE, and the APP is correct, Sending, by the MME, the first data packet to the UE;
或者,  Or,
若所述第一数据包中包括所述服务器的 ID和所述 UE的 ID,则所述 IWF 将所述服务器的 ID和所述 UE的 ID发送给所述 HSS , 以供所述 HSS根据预 先配置的授权列表中保存的服务器与 UE的对应关系, 对所述第一数据包中 的所述服务器的 ID和所述 UE的 ID进行匹配检査, 在检査所述服务器与所 述 UE的对应关系正确后, 向所述 IWF返回确认结果, 以使所述 IWF将所述 第一数据包通过所述 MME发送给所述 UE; If the ID of the server and the ID of the UE are included in the first data packet, the IWF Sending the ID of the server and the ID of the UE to the HSS, for the HSS to refer to the corresponding relationship between the server and the UE saved in the pre-configured authorization list, in the first data packet Performing a matching check on the ID of the server and the ID of the UE. After checking that the correspondence between the server and the UE is correct, returning an acknowledgement result to the IWF, so that the IWF sends the first data packet. Transmitted to the UE by the MME;
或者,  Or,
若所述第一数据包中包括所述服务器的 ID、 所述 UE的 ID和所述 APP 的 ID, 则所述 IWF将所述服务器的 ID、 所述 UE的 ID和所述 APP的 ID发 送给所述 HSS , 以供所述 HSS根据预先配置的授权列表中保存的服务器、 UE 以及 APP的对应关系, 对所述第一数据包中的所述服务器的 ID、所述 UE的 ID和所 APP的 ID进行匹配检査, 在检査所述服务器、 所述 UE和所述 APP 的对应关系正确后, 向所述 IWF返回确认结果, 以使所述 IWF将所述第一数 据包通过所述 MME发送给所述 UE。  If the first data packet includes the ID of the server, the ID of the UE, and the ID of the APP, the IWF sends the ID of the server, the ID of the UE, and the ID of the APP. Giving the HSS, for the HSS, according to the correspondence between the server, the UE, and the APP stored in the pre-configured authorization list, the ID of the server in the first data packet, the ID of the UE, and the Performing a matching check on the ID of the APP, and after checking that the correspondence between the server, the UE, and the APP is correct, returning an acknowledgement result to the IWF, so that the IWF passes the first data packet. The MME sends the MME to the UE.
12、 一种数据的安全传输方法, 其特征在于, 包括:  12. A secure transmission method for data, comprising:
移动性管理实体 MME接收互通设备 IWF发送的第一数据包, 所述第一 数据包包括: 用户设备 UE的 ID、 服务器的 ID和签名;  The mobility management entity MME receives the first data packet sent by the interworking device IWF, where the first data packet includes: an ID of the user equipment UE, an ID of the server, and a signature;
所述 MME根据所述服务器的公钥, 对所述签名进行验证; 其中, 所述 服务器的公钥存储在所述 MME上;  The MME verifies the signature according to the public key of the server, where the public key of the server is stored on the MME;
所述 MME在验证签名有效后, 将所述第一数据包发送给所述 UE的 ID 对应的所述 UE。  After the verification signature is valid, the MME sends the first data packet to the UE corresponding to the ID of the UE.
13、 一种数据的安全传输方法, 其特征在于, 包括:  13. A method for secure transmission of data, comprising:
归属用户服务器 HSS接收移动管理实体 MME发送的用户设备 UE的标 识和 /或所述 MME为所述 UE选择的互通设备 IWF的 ID;所述标识包括国际 移动用户标识 IMSI或临时移动用户标识 TMSI;  The home subscriber server HSS receives the identifier of the user equipment UE sent by the mobility management entity MME and/or the ID of the interworking device IWF selected by the MME for the UE; the identifier includes an international mobile subscriber identity IMSI or a temporary mobile subscriber identity TMSI;
所述 HSS根据所述标识获取所述 UE的签约数据, 判断所述 UE具有小 数据业务的特性时, 则根据预先获取的密钥生成参数生成 SDT密钥;  And obtaining, by the HSS, the subscription data of the UE according to the identifier, and determining that the UE has the characteristics of the small data service, generating an SDT key according to the previously generated key generation parameter;
所述 HSS将所述密钥生成参数和所述 SDT密钥发送给所述 IWF的 ID对 应的 IWF, 并通过所述 MME向所述 UE发送所述密钥生成参数, 以供所述 UE根据所述密钥生成参数生成 SDT安全上下文, 其中, 所述 SDT安全上下 文包括所述 SDT密钥和 SDT安全保护算法。 The HSS sends the key generation parameter and the SDT key to the IWF corresponding to the ID of the IWF, and sends the key generation parameter to the UE by using the MME, for the UE to The key generation parameter generates an SDT security context, where the SDT security context includes the SDT key and an SDT security protection algorithm.
14、 根据权利要求 13所述的方法, 其特征在于, 还包括: 14. The method according to claim 13, further comprising:
所述 HSS接收所述 IWF发送的第一数据包;  Receiving, by the HSS, the first data packet sent by the IWF;
若所述第一数据包中包括所述服务器的 ID和所述 UE的 ID,则所述 HSS 根据预先配置的授权列表中保存的服务器与 UE的对应关系, 对所述第一数 据包中的所述服务器的 ID和所述 UE的 ID进行匹配检査, 在检査所述服务 器与所述 UE的对应关系正确后, 向所述 IWF返回确认结果, 以使所述 IWF 将所述第一数据包通过所述 MME发送给所述 UE;  If the ID of the server and the ID of the UE are included in the first data packet, the HSS is in the first data packet according to the correspondence between the server and the UE saved in the pre-configured authorization list. Performing a matching check on the ID of the server and the ID of the UE, and after checking that the correspondence between the server and the UE is correct, returning a confirmation result to the IWF, so that the IWF will be the first Transmitting a data packet to the UE by using the MME;
或者,  Or,
若所述第一数据包中包括所述服务器的 ID、 所述 UE的 ID和所述 APP 的 ID, 则所述 HSS根据预先配置的授权列表中保存的服务器、 UE以及 APP 的对应关系, 对所述第一数据包中的所述服务器的 ID、 所述 UE的 ID和所 APP的 ID进行匹配检査, 在检査所述服务器、 所述 UE和所述 APP的对应 关系正确后, 向所述 IWF返回确认结果, 以使所述 IWF将所述第一数据包通 过所述 MME发送给所述 UE。  If the first data packet includes the ID of the server, the ID of the UE, and the ID of the APP, the HSS is configured according to the correspondence between the server, the UE, and the APP saved in the pre-configured authorization list. Performing a matching check on the ID of the server, the ID of the UE, and the ID of the APP in the first data packet, and after checking that the correspondence between the server, the UE, and the APP is correct, The IWF returns an acknowledgement result, so that the IWF sends the first data packet to the UE by using the MME.
15、 根据权利要求 14所述的方法, 其特征在于, 还包括:  The method according to claim 14, further comprising:
在所述 HSS将所述 SDT密钥发送给所述 IWF的 ID对应的 IWF之后, 所述 HSS将所述 IWF的 ID通过所述 MME发送给所述 UE,以使所述 UE根 据所述 IWF的 ID生成 SDT密钥并通过 MME将 SDT安全保护算法发送给所 述 IWF, 其中, 所述 UE与所述 IWF的对应关系存储在所述 HSS中。  After the HSS sends the SDT key to the IWF corresponding to the ID of the IWF, the HSS sends the ID of the IWF to the UE by using the MME, so that the UE is based on the IWF. The ID generates an SDT key and sends an SDT security protection algorithm to the IWF through the MME, where the correspondence between the UE and the IWF is stored in the HSS.
16、 根据权利要求 13至 15任一项所述的方法, 其特征在于, 还包括: 所述 HSS发送给所述 UE的参数包括所述 IWF的 ID、 应用 APP的 ID、 随机数 RAND、 临时数据中的至少一项, 其中, 所述临时数据是在所述 HSS 判断所述 UE具有小数据业务的特性之后,所述 HSS生成的用于生成 SDT密 钥的参数;  The method according to any one of claims 13 to 15, further comprising: the parameter that the HSS sends to the UE includes an ID of the IWF, an ID of an application APP, a random number RAND, and a temporary At least one of the data, wherein the temporary data is a parameter generated by the HSS for generating an SDT key after the HSS determines that the UE has a characteristic of a small data service;
所述密钥生成参数包括所述 SDT密钥的生成参数; 其中,  The key generation parameter includes a generation parameter of the SDT key;
所述 SDT 密钥的生成参数为接入安全管理实体密钥、 完整性保护密钥 IK、加密密钥 CK、所述 IWF的 ID、所述 UE的 ID或国际移动用户标识 IMSI、 所述 APP的 ID、 所述 RAND、 所述临时数据、 SDT密钥标签中的至少一项。  The generating parameter of the SDT key is an access security management entity key, an integrity protection key IK, an encryption key CK, an ID of the IWF, an ID of the UE or an international mobile subscriber identity IMSI, the APP At least one of an ID, the RAND, the temporary data, and an SDT key label.
17、 一种数据的安全传输方法, 其特征在于, 包括:  17. A secure transmission method for data, comprising:
用户设备 UE根据所述 UE的私钥和服务器的公钥对第二数据包进行加密 和 /或签名处理, 或者根据 SDT安全上下文对所述第二数据包进行加密和 /或 完整性保护处理, 并将处理后的第二数据包通过移动性管理实体 MME和互 通设备 IWF发送给所述服务器; 其中, 所述 UE的私钥和与所述 UE签约的 所述服务器的公钥或者与归属用户服务器 HSS协商生成 SDT安全上下文存 储在所述 UE上。 The user equipment UE encrypts the second data packet according to the private key of the UE and the public key of the server. And/or signature processing, or performing encryption and/or integrity protection processing on the second data packet according to the SDT security context, and sending the processed second data packet to the mobility management entity MME and the interworking device IWF The server; wherein the private key of the UE and the public key of the server that is contracted with the UE or negotiate with the home subscriber server HSS to generate an SDT security context are stored on the UE.
18、 根据权利要求 17所述的方法, 其特征在于, 还包括: 与归属用户服 务器 HSS协商生成所述 SDT安全上下文, 具体歩骤包括:  The method according to claim 17, further comprising: negotiating with the home subscriber server HSS to generate the SDT security context, and the specific steps include:
所述 UE接收所述 HSS发送的密钥生成参数;  Receiving, by the UE, a key generation parameter sent by the HSS;
所述 UE根据所述密钥生成参数, 生成 SDT密钥;  The UE generates an SDT key according to the key generation parameter;
所述 UE在非接入安全模式命令 NAS SMC过程中协商 SDT安全保护算 法, 或者, 在非接入安全模式命令 NAS SMC过程中协商的非接入层安全算 法作为 SDT安全保护算法。  The UE negotiates the SDT security protection algorithm in the non-access security mode command NAS SMC process, or the non-access layer security algorithm negotiated in the non-access security mode command NAS SMC process as the SDT security protection algorithm.
19、 根据权利要求 17或 18所述的方法, 其特征在于, 所述 UE根据所 述 UE的私钥和服务器的公钥对第二数据包进行加密和 /或签名处理, 或者根 据 SDT安全上下文对所述第二数据包进行加密和 /或完整性保护处理,并将处 理后的第二数据包通过移动性管理实体 MME和互通设备 IWF发送给所述服 务器, 包括:  The method according to claim 17 or 18, wherein the UE performs encryption and/or signature processing on the second data packet according to the private key of the UE and the public key of the server, or according to the SDT security context. Performing the encryption and/or integrity protection processing on the second data packet, and sending the processed second data packet to the server by using the mobility management entity MME and the interworking device IWF, including:
所述 UE根据所述 UE的私钥签名所述第二数据包,并根据所述服务器的 公钥对第二数据包进行加密处理;  The UE signs the second data packet according to the private key of the UE, and performs encryption processing on the second data packet according to the public key of the server;
所述 UE将处理后的第二数据包通过所述 MME和所述 IWF发送给所述 服务器, 以供所述服务器根据所述第二数据包中的 UE的 ID获取所述 UE的 公钥, 并根据所述 UE的公钥验证所述处理后的第二数据包中的签名是否有 效, 若验证有效, 则根据所述服务器的私钥对所述处理后的第二数据包进行 解密处理, 得到解密后的所述第二数据包。  Sending, by the UE, the processed second data packet to the server by using the MME and the IWF, so that the server acquires the public key of the UE according to the ID of the UE in the second data packet, And verifying, according to the public key of the UE, whether the signature in the processed second data packet is valid, and if the verification is valid, decrypting the processed second data packet according to the private key of the server, The decrypted second data packet is obtained.
20、 根据权利要求 18所述的方法, 其特征在于, 所述 UE根据所述 UE 的私钥和服务器的公钥对第二数据包进行加密和 /或签名处理,或者根据 SDT 安全上下文对所述第二数据包进行加密和 /或完整性保护处理, 并将处理后的 第二数据包通过移动性管理实体 MME和互通设备 IWF发送给所述服务器, 包括:  The method according to claim 18, wherein the UE performs encryption and/or signature processing on the second data packet according to the private key of the UE and the public key of the server, or according to the SDT security context. The second data packet is subjected to the encryption and/or integrity protection process, and the processed second data packet is sent to the server by the mobility management entity MME and the interworking device IWF, including:
所述 UE根据所述 SDT安全上下文对所述第二数据包进行加密或加密和 完整性保护处理; The UE encrypts or encrypts the second data packet according to the SDT security context. Integrity protection processing;
所述 UE将携带 MAC-I的所述处理后的第二数据包发送给 IWF或者服务 器, 以供所述 IWF或者服务器根据所述处理后的第二数据包中的所述 UE的 ID获取所述 SDT安全上下文, 并根据所述 SDT安全上下文, 验证所述安全 保护后的第二数据包中的所述 MAC-I, 若验证有效, 则对所述处理后的第二 数据包进行解密处理, 得到解密后的所述第二数据包。  Transmitting, by the UE, the processed second data packet that carries the MAC-I to the IWF or the server, where the IWF or the server obtains the identifier according to the ID of the UE in the processed second data packet. Determining the SDT security context, and verifying the MAC-I in the second packet after the security protection according to the SDT security context, and if the verification is valid, decrypting the processed second data packet And obtaining the decrypted second data packet.
21、根据权利要求 20所述的方法,其特征在于,所述密钥生成参数包括: 所述 UE接收的所述 HSS发送的参数包括所述 IWF的 ID、 应用 APP的 The method according to claim 20, wherein the key generation parameter comprises: the parameter sent by the HSS received by the UE includes an ID of the IWF, an application APP
ID、 随机数 RAND、 临时数据中的至少一项; At least one of ID, random number RAND, temporary data;
所述密钥生成参数包括所述 SDT密钥的生成参数; 其中,  The key generation parameter includes a generation parameter of the SDT key;
所述 SDT 密钥的生成参数为接入安全管理实体密钥、 完整性保护密钥 IK、加密密钥 CK、所述 IWF的 ID、所述 UE的 ID或国际移动用户标识 IMSI、 所述 APP的 ID、 所述 RAND、 所述临时数据、 SDT密钥标签中的至少一项。  The generating parameter of the SDT key is an access security management entity key, an integrity protection key IK, an encryption key CK, an ID of the IWF, an ID of the UE or an international mobile subscriber identity IMSI, the APP At least one of an ID, the RAND, the temporary data, and an SDT key label.
22、 一种数据的安全传输方法, 其特征在于, 包括:  22. A secure transmission method for data, comprising:
服务器接收互通设备 IWF发送的处理后的第二数据包;  Receiving, by the server, the processed second data packet sent by the interworking device IWF;
根据用户设备 UE的公钥和所述服务器的私钥对所述第二数据包进行签 名验证和解密, 或者根据所述 UE的 ID和 /或 IWF的 ID査找 SDT安全上下 文, 对所述处理后的第二数据包进行完整性验证和解密;  Performing signature verification and decryption on the second data packet according to the public key of the user equipment UE and the private key of the server, or searching for an SDT security context according to the ID of the UE and/or the ID of the IWF, after the processing The second data packet is integrity verified and decrypted;
其中, 所述服务器的私钥和与所述服务器签约的所述 UE的公钥存储在 所述服务器上, 所述 SDT安全上下文为互通设备 IWF发送的。  The private key of the server and the public key of the UE that is contracted with the server are stored on the server, and the SDT security context is sent by the interworking device IWF.
23、 一种数据的安全传输方法, 其特征在于, 包括:  23. A secure transmission method for data, comprising:
互通设备 IWF接收用户设备 UE通过移动性管理实体 MME发送的处理 后的第二数据包, 所述处理后的第二数据包包括所述 UE的 ID和签名, 或者 所述 UE的 ID和 MAC-I;  The interworking device IWF receives the processed second data packet sent by the user equipment UE through the mobility management entity MME, where the processed second data packet includes the ID and signature of the UE, or the ID and MAC of the UE. I;
所述 IWF根据所述 UE 的公钥或 SDT 安全上下文, 对所述签名或者 The IWF, according to the public key or SDT security context of the UE, the signature or
MAC-I进行验证; 并在验证通过后, 将所述处理后的第二数据包发送给所述 服务器; The MAC-I performs verification; and after the verification is passed, the processed second data packet is sent to the server;
其中, 所述 UE的公钥存储在所述 IWF上, 所述 SDT安全上下文为预先 从归属用户服务器 HSS获取的。  The public key of the UE is stored on the IWF, and the SDT security context is obtained in advance from the home subscriber server HSS.
24、 根据权利要求 23所述的方法, 其特征在于, 预先从归属用户服务器 HSS获取 SDT安全上下文, 包括: 24. The method according to claim 23, characterized in that the user server is pre-followed The HSS obtains the SDT security context, including:
接收所述 HSS发送的 SDT密钥;  Receiving an SDT key sent by the HSS;
接收所述 UE通过所述 MME发送的 SDT安全保护算法;  Receiving an SDT security protection algorithm sent by the UE by using the MME;
其中, 所述 SDT安全上下文包括所述 SDT密钥和所述 SDT安全保护算 法。  The SDT security context includes the SDT key and the SDT security protection algorithm.
25、 根据权利要求 23或 24所述的方法, 其特征在于, 所述 IWF根据所 述 UE的公钥或 SDT安全上下文,对所述签名或者 MAC-I进行验证; 并在验 证通过后, 将所述处理后的第二数据包发送给所述服务器, 包括:  The method according to claim 23 or 24, wherein the IWF verifies the signature or the MAC-I according to the public key or the SDT security context of the UE; and after the verification is passed, Sending the processed second data packet to the server, including:
所述 IWF根据所述 UE的公钥, 验证所述处理后的第二数据包的所述签 名是否有效;  Determining, by the IWF, whether the signature of the processed second data packet is valid according to the public key of the UE;
若验证所述处理后的第二数据包签名有效, 则将所述处理后的第二数据 包发送给服务器;  If it is verified that the processed second data packet signature is valid, sending the processed second data packet to the server;
或者,  Or,
所述 IWF根据所述 SDT安全上下文对所述处理后的第二数据包的所述 MAC-I进行验证;  The IWF verifies the MAC-I of the processed second data packet according to the SDT security context;
若验证所述处理后的第二数据包的所述 MAC-I有效,则将所述处理后的 第二数据包进行解密处理后发送给服务器。  If it is verified that the MAC-I of the processed second data packet is valid, the processed second data packet is decrypted and sent to the server.
26、 根据权利要求 25所述的方法, 其特征在于, 所述将所述第二数据包 发送给所述服务器之前, 所述方法还包括:  The method according to claim 25, wherein before the sending the second data packet to the server, the method further includes:
若所述第一数据包中包括所述服务器的 ID和所述 UE的 ID, 所述 IWF 根据预先配置的授权列表中保存的服务器与 UE的对应关系, 对所述第一数 据包中的所述服务器的 ID和所述 UE的 ID进行匹配检査, 在检査所述服务 器与所述 UE的对应关系正确后, 将所述第二数据包发送给所述服务器; 或者,  If the first data packet includes the ID of the server and the ID of the UE, the IWF, according to the correspondence between the server and the UE saved in the pre-configured authorization list, is in the first data packet. Performing a matching check on the ID of the server and the ID of the UE, and after checking that the correspondence between the server and the UE is correct, sending the second data packet to the server; or
若所述第一数据包中包括所述服务器的 ID、 所述 UE的 ID和所述 APP 的 ID, 所述 IWF根据预先配置的授权列表中保存的服务器、 UE以及 APP的 对应关系, 对所述第一数据包中的所述服务器的 ID、 所述 UE的 ID和所述 APP的 ID进行匹配检査, 在检査所述服务器、 所述 UE和所述 APP的对应 关系正确后, 将所述第二数据包发送给所述服务器;  If the first data packet includes the ID of the server, the ID of the UE, and the ID of the APP, the IWF is configured according to the correspondence between the server, the UE, and the APP saved in the pre-configured authorization list. Performing a matching check on the ID of the server, the ID of the UE, and the ID of the APP in the first data packet, and after checking that the correspondence between the server, the UE, and the APP is correct, Sending the second data packet to the server;
或者, 若所述第二数据包中包括所述服务器的 ID和所述 UE的 ID,则所述 IWF 将所述服务器的 ID和所述 UE的 ID发送给 HSS , 以供所述 HSS根据预先配 置的授权列表中保存的服务器与 UE的对应关系, 对所述第二数据包中的所 述服务器的 ID和所述 UE的 ID进行匹配检査,在检査所述服务器与所述 UE 的对应关系正确后, 将所述第二数据包发送给所述服务器; or, If the second data packet includes the ID of the server and the ID of the UE, the IWF sends the ID of the server and the ID of the UE to the HSS, so that the HSS is configured according to the pre-configured Corresponding relationship between the server and the UE saved in the authorization list, performing matching check on the ID of the server in the second data packet and the ID of the UE, and checking the correspondence between the server and the UE After being correct, the second data packet is sent to the server;
或者,  Or,
若所述第二数据包中包括所述服务器的 ID、所述 UE的 ID以及应用 APP 的 ID, 则所述 IWF将所述服务器的 ID、 所述 UE的 ID以及所述 APP的 ID 发送给 HSS , 以供所述 HSS根据预先配置的授权列表中保存的服务器、 UE 以及 APP的对应关系, 对所述第二数据包中的所述服务器的 ID、所述 UE的 ID和所 APP的 ID进行匹配检査,在检査所述服务器、所述 UE以及所述 APP 的对应关系正确后, 将所述第二数据包发送给所述服务器。  If the second data packet includes the ID of the server, the ID of the UE, and the ID of the application APP, the IWF sends the ID of the server, the ID of the UE, and the ID of the APP to An HSS, for the HSS, according to the correspondence between the server, the UE, and the APP saved in the pre-configured authorization list, the ID of the server, the ID of the UE, and the ID of the APP in the second data packet. Performing a matching check, and after checking that the correspondence between the server, the UE, and the APP is correct, sending the second data packet to the server.
27、 一种数据的安全传输方法, 其特征在于, 包括:  27. A secure transmission method for data, comprising:
移动性管理实体 MME接收用户设备 UE发送的处理后的第二数据包, 所述第二数据包包括: 所述 UE的 ID、 所述服务器的 ID和签名;  The mobility management entity MME receives the processed second data packet sent by the user equipment UE, where the second data packet includes: an ID of the UE, an ID of the server, and a signature;
所述 MME根据所述 UE的公钥对所述签名进行验证; 其中, 所述 UE的 公钥存储在所述 MME上;  The MME verifies the signature according to the public key of the UE, where the public key of the UE is stored on the MME;
所述 MME在验证所述签名有效后, 将所述第二数据包发送给互通设备 After verifying that the signature is valid, the MME sends the second data packet to the interworking device.
28、 根据权利要求 27所述的方法, 其特征在于, 所述将所述第二数据包 发送给互通设备 IWF, 包括: The method according to claim 27, wherein the sending the second data packet to the interworking device IWF comprises:
若所述第二数据包中包括所述服务器的 ID和所述 UE的 ID,则所述 MME 根据预先配置的授权列表、 所述第二数据包中的所述服务器的 ID和所述 UE 的 ID, 根据所述授权列表中保存的服务器和 UE的对应关系, 对所述第二数 据包中的所述服务器的 ID和所述 UE的 ID进行匹配检査, 在检査所述服务 器和所述 UE的对应关系正确后, 将所述第二数据包通过 IWF发送给所述服 务器;  If the second data packet includes an ID of the server and an ID of the UE, the MME is configured according to a pre-configured authorization list, an ID of the server in the second data packet, and the UE ID, according to the correspondence between the server and the UE saved in the authorization list, performing matching check on the ID of the server in the second data packet and the ID of the UE, and checking the server and the After the correspondence between the UEs is correct, the second data packet is sent to the server through the IWF;
或者,  Or,
若所述第二数据包中包括所述服务器的 ID、 所述 UE的 ID和应用 APP 的 ID, 则所述 MME根据预先配置的授权列表、 所述第二数据包中的所述服 务器的 ID、 所述 UE的 ID以及所述 APP的 ID, 根据所述授权列表中保存的 服务器、 UE以及 APP的对应关系,对所述第二数据包中的所述服务器的 ID、 所述 UE的 ID和所述 APP的 ID进行匹配检査, 在检査所述服务器、 所述 UE以及所述 APP的对应关系正确后, 将所述第二数据包通过 IWF发送给所 述服务器。 If the second data packet includes the ID of the server, the ID of the UE, and the ID of the application APP, the MME according to the pre-configured authorization list, the service in the second data packet The ID of the server, the ID of the UE, and the ID of the APP, according to the correspondence between the server, the UE, and the APP stored in the authorization list, the ID of the server in the second data packet, Performing a matching check on the ID of the UE and the ID of the APP. After checking that the correspondence between the server, the UE, and the APP is correct, the second data packet is sent to the server through the IWF.
29、 一种用户设备 UE, 其特征在于, 包括:  A user equipment (UE), comprising:
收发模块, 用于接收所述服务器通过互通设备 IWF 和移动性管理实体 MME发送的第一数据包, 所述第一数据包携带所述服务器的 ID或所述 IWF 的 ID;  a transceiver module, configured to receive a first data packet sent by the server by using the interworking device IWF and the mobility management entity MME, where the first data packet carries an ID of the server or an ID of the IWF;
处理模块, 用于根据所述第一数据包中的所述服务器的 ID或所述 IWF 的 ID, 获得所述服务器的公钥和 /或所述 SDT安全上下文, 其中, 所述 UE 签约的服务器的公钥或者与归属用户服务器 HSS协商生成 SDT安全上下文 存储在所述 UE上, 且通过所述服务器的 ID或所述 IWF的 ID来标识;  a processing module, configured to obtain, according to an ID of the server in the first data packet or an ID of the IWF, a public key of the server and/or the SDT security context, where the UE subscribes to the server The public key is negotiated with the home subscriber server HSS to generate an SDT security context, which is stored on the UE, and is identified by the ID of the server or the ID of the IWF;
所述处理模块还用于根据所述服务器的公钥和所述 UE的私钥, 或者所 述 SDT安全上下文, 或者所述服务器的公钥和所述 SDT安全上下文, 对所 述第一数据包进行验证和解密处理, 得到解密后的第一数据包。  The processing module is further configured to: according to the public key of the server and the private key of the UE, or the SDT security context, or the public key of the server and the SDT security context, the first data packet The verification and decryption processing is performed to obtain the decrypted first data packet.
30、 根据权利要求 29所述的 UE, 其特征在于, 包括:  The UE according to claim 29, comprising:
所述收发模块还用于接收所述 HSS发送的密钥生成参数;  The transceiver module is further configured to receive a key generation parameter sent by the HSS;
所述处理模块还用于根据所述密钥生成参数, 生成所述 SDT密钥; 所述处理模块还用于在非接入安全模式命令 NAS SMC过程中协商 SDT 安全保护算法, 或者, 在非接入安全模式命令 NAS SMC过程中协商的非接 入层安全算法作为 SDT安全保护算法。  The processing module is further configured to generate the SDT key according to the key generation parameter; the processing module is further configured to negotiate an SDT security protection algorithm in a non-access security mode command NAS SMC process, or The access security mode commands the non-access stratum security algorithm negotiated in the NAS SMC process as the SDT security protection algorithm.
31、 根据权利要求 29或 30所述的 UE, 其特征在于, 所述处理模块具体 用于:  The UE according to claim 29 or 30, wherein the processing module is specifically configured to:
根据所述服务器的公钥验证所述第一数据包中的签名是否有效; 若验证所述第一数据包中的签名有效, 则根据所述 UE的私钥对所述第 一数据包进行解密处理, 得到解密后的所述第一数据包。  Verifying whether the signature in the first data packet is valid according to the public key of the server; if the signature in the first data packet is valid, decrypting the first data packet according to the private key of the UE Processing, obtaining the decrypted first data packet.
32、根据权利要求 30所述的装置,其特征在于,所述处理模块具体用于: 根据所述 SDT安全上下文验证所述第一数据包中的消息认证码 MAC-I; 若验证成功, 则对所述第一数据包进行解密处理, 得到解密后的所述第一数 据包。 The device according to claim 30, wherein the processing module is configured to: verify, according to the SDT security context, a message authentication code MAC-I in the first data packet; if the verification succeeds, Decrypting the first data packet to obtain the decrypted first number According to the package.
33、 根据权利要求 30所述的 UE, 其特征在于, 所述处理模块具体用于: 根据所述服务器的公钥验证所述第一数据包中的签名是否有效; 若验证 所述第一数据包的签名有效, 则根据所述 SDT安全上下文对所述第一数据包 进行解密处理, 或者根据所述 SDT安全上下文对所述第一数据包进行完整性 验证和解密处理, 得到解密后的所述第一数据包。  The UE according to claim 30, wherein the processing module is configured to: verify, according to a public key of the server, whether a signature in the first data packet is valid; if the first data is verified If the signature of the packet is valid, the first data packet is decrypted according to the SDT security context, or the first data packet is subjected to integrity verification and decryption processing according to the SDT security context, to obtain a decrypted location. Said the first data packet.
34、 根据权利要求 32或 33所述的 UE, 其特征在于, 还包括:  The UE according to claim 32 or 33, further comprising:
所述收发模块还用于接收所述 HSS发送的参数,所述 HSS发送的参数包 括所述 IWF的 ID、所述 APP的 ID、随机数 RAND、临时数据中的至少一项。  The transceiver module is further configured to receive a parameter sent by the HSS, where the parameter sent by the HSS includes at least one of an ID of the IWF, an ID of the APP, a random number RAND, and temporary data.
35、 一种服务器, 其特征在于, 包括:  35. A server, comprising:
处理模块, 用于根据所述服务器的私钥和与所述服务器签约的用户设备 UE的公钥对等待发送的第一数据包进行签名和加密处理, 或者根据 SDT安 全上下文对所述第一数据包进行加密处理或加密和完整性保护处理, 其中, 所述服务器的私钥和与所述服务器签约的所述 UE公钥存储在所述服务器上, 所述 SDT安全上下文为互通设备 IWF发送的;  a processing module, configured to perform signature and encryption processing on the first data packet to be sent according to the private key of the server and the public key of the user equipment UE that is contracted with the server, or to use the first data according to the SDT security context The packet is subjected to an encryption process or an encryption and integrity protection process, wherein the private key of the server and the UE public key subscribed to the server are stored on the server, and the SDT security context is sent by the interworking device IWF. ;
收发模块, 用于将加密后的第一数据包通过所述 IWF和移动性管理实体 MME发送给所述 UE; 以供所述 UE根据所述第一数据包中的服务器的 ID, 获取所述服务器的公钥和 /或所述 SDT安全上下文,并根据所述服务器的公钥 和所述 UE的私钥, 或者所述 SDT安全上下文, 或者与所述服务器的公钥和 所述 SDT安全上下文, 对所述第一数据包进行验证和解密处理, 得到解密后 的所述第一数据包。  a transceiver module, configured to send the encrypted first data packet to the UE by using the IWF and the mobility management entity MME, where the UE obtains the identifier according to an ID of a server in the first data packet. a public key of the server and/or the SDT security context, and based on the public key of the server and the private key of the UE, or the SDT security context, or with the public key of the server and the SDT security context And performing the verification and decryption processing on the first data packet to obtain the decrypted first data packet.
36、 一种互通设备 IWF, 其特征在于, 包括:  36. An interworking device IWF, comprising:
收发模块, 用于接收服务器发送的第一数据包, 所述第一数据包包括所 述服务器的 ID和签名, 或者所述服务器的 ID和 MAC-I;  The transceiver module is configured to receive a first data packet sent by the server, where the first data packet includes an ID and a signature of the server, or an ID of the server and a MAC-I;
处理模块, 用于根据所述服务器的公钥对所述签名进行验证, 或用于根 据 SDT安全上下文对所述 MAC-I进行验证, 并在验证通过后将所述第一数 据包通过移动性管理实体 MME发送给 UE; 或者, 所述处理模块还用于根据 所述 SDT安全上下文对所述第一数据包进行加密和 /或完整性保护处理,将所 述第一数据包通过移动性管理实体 MME发送给 UE;  a processing module, configured to verify the signature according to the public key of the server, or to verify the MAC-I according to an SDT security context, and pass the first data packet after the verification is passed The management entity is sent to the UE by the MME; or the processing module is further configured to perform encryption and/or integrity protection processing on the first data packet according to the SDT security context, and adopt the mobility management by using the first data packet. The entity MME sends to the UE;
其中, 所述服务器的公钥和与所述服务器签约的所述 UE的公钥存储在 所述 IWF上, 所述 SDT安全上下文为预先从归属用户服务器 HSS获取的。The public key of the server and the public key of the UE that is contracted with the server are stored in On the IWF, the SDT security context is obtained in advance from the home subscriber server HSS.
37、 根据权利要求 36所述的 IWF, 其特征在于, 所述收发模块还用于: 接收所述 HSS发送的 SDT密钥; The IWF according to claim 36, wherein the transceiver module is further configured to: receive an SDT key sent by the HSS;
接收所述 UE通过所述 MME发送的 SDT安全保护算法;  Receiving an SDT security protection algorithm sent by the UE by using the MME;
其中, 所述 SDT安全上下文包括所述 SDT密钥和所述 SDT安全保护算 法。  The SDT security context includes the SDT key and the SDT security protection algorithm.
38、 根据权利要求 36或 37所述的 IWF, 其特征在于, 还包括: 所述处理模块用于根据所述服务器的 ID査询并获取所述服务器的公钥, 并根据所述服务器的公钥, 验证所述第一数据包签名是否有效; 若所述处理 模块验证所述第一数据包签名有效, 所述收发模块将所述第一数据包通过所 述 MME发送给所述 UE;  The IWF according to claim 36 or 37, further comprising: the processing module, configured to query and acquire a public key of the server according to an ID of the server, and according to the publicity of the server Key, verifying whether the first data packet signature is valid; if the processing module verifies that the first data packet signature is valid, the transceiver module sends the first data packet to the UE through the MME;
或者,  Or,
在所述第一数据包还包括: UE的 ID时,所述处理模块用于根据所述 UE 的 ID获取所述 SDT安全上下文, 对所述 MAC-I进行验证;  When the first data packet further includes: an ID of the UE, the processing module is configured to acquire the SDT security context according to the ID of the UE, and verify the MAC-I;
所述收发模块还用于若所述处理模块验证所述第一数据包签名有效, 将 所述第一数据包通过所述 MME发送给所述 UE;  The transceiver module is further configured to: if the processing module verifies that the first data packet signature is valid, send the first data packet to the UE by using the MME;
或者,  Or,
在所述第一数据包还包括: APP 的 ID 时, 所述处理模块用于根据所述 UE的 ID和 APP的 ID获取所述 SDT安全上下文, 对所述 MAC-I进行验证; 若所述处理模块验证所述第一数据包 MAC-I有效,所述收发模块将所述 第一数据包通过所述 MME发送给所述 UE;  When the first data packet further includes: an ID of the APP, the processing module is configured to acquire the SDT security context according to the ID of the UE and the ID of the APP, and verify the MAC-I; The processing module verifies that the first data packet MAC-I is valid, and the transceiver module sends the first data packet to the UE by using the MME;
或者,  Or,
在所述第一数据包还包括: UE的 ID和 /或 APP的 ID时, 所述处理模块 还用于根据所述 UE的 ID和 /或 APP的 ID获取所述 SDT安全上下文, 对所 述第一数据进行加密和完整性保护处理;  When the first data packet further includes: an ID of the UE and/or an ID of the APP, the processing module is further configured to acquire the SDT security context according to the ID of the UE and/or the ID of the APP, where The first data is encrypted and integrity protected;
所述收发模块还用于将所述处理后的第一数据包通过所述 MME发送给 所述 UE;  The transceiver module is further configured to send the processed first data packet to the UE by using the MME;
或者,  Or,
在所述第一数据包还包括: UE的 ID和 /或 APP的 ID时, 所述处理模块 还用于根据所述服务器的 ID获取所述服务器的公钥,并根据所述服务器的公 钥, 验证所述签名; 若验证所述第一数据包的签名有效, 则根据用户 UE 的 ID和 /或 APP的 ID获取对应的所述 SDT安全上下文, 对所述第一数据进行 加密处理, 或者加密和完整性保护处理; When the first data packet further includes: an ID of the UE and/or an ID of the APP, the processing module is further configured to acquire the public key of the server according to the ID of the server, and according to the publicity of the server Key, verifying the signature; if the signature of the first data packet is valid, obtaining the corresponding SDT security context according to the ID of the user UE and/or the ID of the APP, and performing encryption processing on the first data, Or encryption and integrity protection processing;
所述收发模块还用于将所述处理后的第一数据包通过所述 MME发送给 所述 UE。  The transceiver module is further configured to send the processed first data packet to the UE by using the MME.
39、 根据权利要求 38所述的 IWF, 其特征在于, 还包括:  39. The IWF according to claim 38, further comprising:
若所述第一数据包中包括所述服务器的 ID和所述 UE的 ID,所述处理模 块还用于根据预先配置的授权列表中保存的服务器与 UE的对应关系, 对所 述第一数据包中的所述服务器的 ID和所述 UE的 ID进行匹配检査, 在检査 所述服务器与所述 UE的对应关系正确后, 所述收发模块将所述第一数据包 通过所述 MME发送给所述 UE;  If the first data packet includes the ID of the server and the ID of the UE, the processing module is further configured to: use the first data according to a correspondence between the server and the UE saved in the pre-configured authorization list. Performing a matching check on the ID of the server in the packet and the ID of the UE. After checking that the correspondence between the server and the UE is correct, the transceiver module passes the first data packet through the MME. Sent to the UE;
或者,  Or,
若所述第一数据包中包括所述服务器的 ID、 所述 UE的 ID和所述 APP 的 ID, 所述处理模块还用于根据预先配置的授权列表中保存的服务器、 UE 以及 APP的对应关系, 对所述第一数据包中的所述服务器的 ID、所述 UE的 ID和所述 APP的 ID进行匹配检査,在检査所述服务器、所述 UE和所述 APP 的对应关系正确后, 所述收发模块将所述第一数据包通过所述 MME发送给 所述 UE;  If the first data packet includes the ID of the server, the ID of the UE, and the ID of the APP, the processing module is further configured to: correspond to the server, the UE, and the APP saved according to the pre-configured authorization list. a relationship, performing a matching check on an ID of the server in the first data packet, an ID of the UE, and an ID of the APP, and checking a correspondence between the server, the UE, and the APP After being correctly, the transceiver module sends the first data packet to the UE by using the MME;
或者,  Or,
若所述第一数据包中包括所述服务器的 ID和所述 UE的 ID,则所述收发 模块将所述服务器的 ID和所述 UE的 ID发送给所述 HSS , 以供所述 HSS根 据预先配置的授权列表中保存的服务器与 UE的对应关系, 对所述第一数据 包中的所述服务器的 ID和所述 UE的 ID进行匹配检査, 在检査所述服务器 与所述 UE的对应关系正确后, 向所述 IWF返回确认结果, 以使所述 IWF将 所述第一数据包通过所述 MME发送给所述 UE;  And if the first data packet includes an ID of the server and an ID of the UE, the transceiver module sends the ID of the server and the ID of the UE to the HSS, where the HSS is configured according to the HSS. Corresponding relationship between the server and the UE saved in the pre-configured authorization list, performing matching check on the ID of the server in the first data packet and the ID of the UE, and checking the server and the UE After the corresponding relationship is correct, the confirmation result is returned to the IWF, so that the IWF sends the first data packet to the UE by using the MME;
或者,  Or,
若所述第一数据包中包括所述服务器的 ID、 所述 UE的 ID和所述 APP 的 ID, 则所述收发模块将所述服务器的 ID、所述 UE的 ID和所述 APP的 ID 发送给所述 HSS , 以供所述 HSS根据预先配置的授权列表中保存的服务器、 UE以及 APP的对应关系,对所述第一数据包中的所述服务器的 ID、所述 UE 的 ID和所 APP的 ID进行匹配检査, 在检査所述服务器、 所述 UE和所述 APP的对应关系正确后, 向所述 IWF返回确认结果, 以使 IWF将所述第一 数据包通过所述 MME发送给所述 UE。 And if the first data packet includes an ID of the server, an ID of the UE, and an ID of the APP, the transceiver module sets an ID of the server, an ID of the UE, and an ID of the APP. Sending to the HSS, for the HSS, according to the correspondence between the server, the UE, and the APP saved in the pre-configured authorization list, the ID of the server in the first data packet, the UE Checking the ID of the ID and the ID of the APP, and after checking that the correspondence between the server, the UE, and the APP is correct, returning an acknowledgement result to the IWF, so that the IWF sends the first data packet. Transmitted to the UE by the MME.
40、 一种移动性管理实体 MME, 其特征在于, 包括:  40. A mobility management entity MME, comprising:
收发模块, 用于接收互通设备 IWF发送的第一数据包, 所述第一数据包 包括: 用户设备 UE的 ID、 服务器的 ID和签名;  a transceiver module, configured to receive a first data packet sent by the interworking device IWF, where the first data packet includes: an ID of the user equipment UE, an ID of the server, and a signature;
处理模块, 用于根据所述服务器的公钥, 对所述签名进行验证; 其中, 所述服务器的公钥存储在所述 MME上;  a processing module, configured to verify the signature according to the public key of the server, where the public key of the server is stored on the MME;
所述收发模块在所述处理模块验证签名有效后, 将所述第一数据包发送 给所述 UE。  After receiving the verification signature, the transceiver module sends the first data packet to the UE.
41、 一种归属用户服务器 HSS, 其特征在于, 包括:  41. A home subscriber server HSS, comprising:
收发模块, 用于接收移动管理实体 MME发送的用户设备 UE的标识和 / 或所述 MME为所述 UE选择的互通设备 IWF的 ID; 所述标识包括国际移动 用户标识 IMSI或临时移动用户标识 TMSI;  a transceiver module, configured to receive an identifier of the user equipment UE sent by the mobility management entity MME, and/or an ID of the interworking device IWF selected by the MME for the UE; the identifier includes an international mobile subscriber identity IMSI or a temporary mobile subscriber identity TMSI ;
处理模块, 用于根据所述标识获取所述 UE 的签约数据, 判断所述 UE 具有小数据业务的特性时, 则根据预先获取的密钥生成参数生成 SDT密钥; 所述收发模块还用于将所述密钥生成参数和所述 SDT 密钥发送给所述 IWF的 ID对应的 IWF,并通过所述 MME向所述 UE发送所述密钥生成参数, 以供所述 UE根据所述密钥生成参数生成 SDT安全上下文, 其中, 所述 SDT 安全上下文包括所述 SDT密钥和 SDT安全保护算法。  a processing module, configured to acquire the subscription data of the UE according to the identifier, and determine that the UE has the characteristics of the small data service, and generate an SDT key according to the previously generated key generation parameter; the transceiver module is further used to: Sending the key generation parameter and the SDT key to the IWF corresponding to the ID of the IWF, and sending the key generation parameter to the UE by using the MME, for the UE to use the secret The key generation parameter generates an SDT security context, where the SDT security context includes the SDT key and an SDT security protection algorithm.
42、 根据权利要求 41所述的 HSS , 其特征在于, 所述收发模块还用于接 收所述 IWF发送的第一数据包;  The HSS according to claim 41, wherein the transceiver module is further configured to receive the first data packet sent by the IWF;
若所述第一数据包中包括所述服务器的 ID和所述 UE的 ID,则所述处理 模块根据预先配置的授权列表中保存的服务器与 UE的对应关系, 对所述第 一数据包中的所述服务器的 ID和所述 UE的 ID进行匹配检査, 在检査所述 服务器与所述 UE的对应关系正确后, 向所述 IWF返回确认结果, 以使所述 IWF将所述第一数据包通过所述 MME发送给所述 UE;  And if the first data packet includes the ID of the server and the ID of the UE, the processing module is configured to be in the first data packet according to a correspondence between the server and the UE saved in the pre-configured authorization list. Performing a matching check on the ID of the server and the ID of the UE, and after checking that the correspondence between the server and the UE is correct, returning a confirmation result to the IWF, so that the IWF will be the first a data packet is sent to the UE by the MME;
或者,  Or,
若所述第一数据包中包括所述服务器的 ID、 所述 UE的 ID和所述 APP 的 ID, 则所述处理模块根据预先配置的授权列表中保存的服务器、 UE以及 APP的对应关系, 对所述第一数据包中的所述服务器的 ID、 所述 UE的 ID 和所 APP的 ID进行匹配检査, 在检査所述服务器、 所述 UE和所述 APP的 对应关系正确后, 所述收发模块向所述 IWF返回确认结果, 以使所述 IWF 将所述第一数据包通过所述 MME发送给所述 UE。 If the first data packet includes the ID of the server, the ID of the UE, and the ID of the APP, the processing module is configured according to the server, the UE, and the UE saved in the pre-configured authorization list. Corresponding relationship of the APP, performing matching check on the ID of the server in the first data packet, the ID of the UE, and the ID of the APP, and checking the server, the UE, and the APP After the corresponding relationship is correct, the transceiver module returns an acknowledgement result to the IWF, so that the IWF sends the first data packet to the UE by using the MME.
43、 根据权利要求 42所述的 HSS, 其特征在于, 还包括:  43. The HSS of claim 42, further comprising:
在所述收发模块将所述 SDT密钥发送给所述 IWF的 ID对应的 IWF之后, 所述收发模块还用于将所述 IWF的 ID通过所述 MME发送给所述 UE, 以使 所述 UE根据所述 IWF的 ID生成 SDT密钥并通过 MME将 SDT安全保护算 法发送给所述 IWF, 其中, 所述 UE与所述 IWF的对应关系存储在所述 HSS 中。  After the transceiver module sends the SDT key to the IWF corresponding to the ID of the IWF, the transceiver module is further configured to send the ID of the IWF to the UE by using the MME, so that the The UE generates an SDT key according to the ID of the IWF and sends an SDT security protection algorithm to the IWF through the MME, where the correspondence between the UE and the IWF is stored in the HSS.
44、 根据权利要求 41至 43任一项所述的 HSS , 其特征在于, 所述收发 模块发送给所述 UE的参数包括所述 IWF的 ID、 应用 APP的 ID、 随机数 RAND, 临时数据中的至少一项, 其中, 所述临时数据是在所述处理模块判 断所述 UE具有小数据业务的特性之后, 生成的用于生成 SDT密钥的参数; 所述密钥生成参数包括所述 SDT密钥的生成参数。  The HSS according to any one of claims 41 to 43, wherein the parameters sent by the transceiver module to the UE include an ID of the IWF, an ID of an application APP, a random number RAND, and temporary data. At least one item, wherein the temporary data is a parameter generated by the processing module after determining that the UE has a small data service characteristic, and the key generation parameter includes the SDT Key generation parameters.
45、 一种用户设备 UE, 其特征在于, 包括:  45. A user equipment UE, which is characterized by:
处理模块, 用于根据所述 UE的私钥和服务器的公钥对第二数据包进行 加密和 /或签名处理,或者根据 SDT安全上下文对所述第二数据包进行加密和 /或完整性保护处理; 其中, 所述 UE的私钥和与所述 UE签约的所述服务器 的公钥或者与归属用户服务器 HSS协商生成 SDT安全上下文存储在所述 UE 上;  a processing module, configured to perform encryption and/or signature processing on the second data packet according to the private key of the UE and a public key of the server, or perform encryption and/or integrity protection on the second data packet according to an SDT security context Processing, wherein the private key of the UE and the public key of the server that is contracted with the UE or negotiate with the home subscriber server HSS to generate an SDT security context are stored on the UE;
收发模块, 用于将处理后的第二数据包通过移动性管理实体 MME和互 通设备 IWF发送给所述服务器。  And a transceiver module, configured to send the processed second data packet to the server by using a mobility management entity MME and an interworking device IWF.
46、 根据权利要求 45所述的 UE, 其特征在于, 包括:  46. The UE according to claim 45, comprising:
所述收发模块还用于接收所述 HSS发送的密钥生成参数;  The transceiver module is further configured to receive a key generation parameter sent by the HSS;
所述处理模块还用于根据所述密钥生成参数, 生成 SDT密钥;  The processing module is further configured to generate an SDT key according to the key generation parameter;
所述处理模块还用于在非接入安全模式命令 NAS SMC过程中协商 SDT 安全保护算法, 或者, 在非接入安全模式命令 NAS SMC过程中协商的非接 入层安全算法作为 SDT安全保护算法。  The processing module is further configured to negotiate an SDT security protection algorithm in a non-access security mode command NAS SMC process, or a non-access layer security algorithm negotiated in a non-access security mode command NAS SMC process as an SDT security protection algorithm .
47、 根据权利要求 45或 46所述的 UE, 其特征在于, 包括: 所述处理模块具体用于根据所述 UE的私钥签名所述第二数据包, 并根 据所述服务器的公钥对所述第二数据包进行加密处理; The UE according to claim 45 or 46, comprising: The processing module is specifically configured to: sign the second data packet according to the private key of the UE, and perform encryption processing on the second data packet according to the public key of the server;
所述收发模块还用于将处理后的第二数据包通过所述 MME和所述 IWF 发送给所述服务器, 以供所述服务器根据所述第二数据包中的 UE的 ID获取 所述 UE的公钥,并根据所述 UE的公钥验证所述处理后的第二数据包中的签 名是否有效, 若验证有效, 则根据所述服务器的私钥对所述处理后的第二数 据包进行解密处理。  The transceiver module is further configured to send the processed second data packet to the server by using the MME and the IWF, where the server acquires the UE according to an ID of a UE in the second data packet. a public key, and verifying, according to the public key of the UE, whether the signature in the processed second data packet is valid, and if the verification is valid, the processed second data packet according to the private key of the server Decryption processing.
48、 根据权利要求 46所述的 UE, 其特征在于, 包括:  The UE according to claim 46, comprising:
所述处理模块还用于根据所述 SDT安全上下文对所述第二数据包进行加 密或加密和完整性保护处理;  The processing module is further configured to perform encryption or encryption and integrity protection processing on the second data packet according to the SDT security context;
所述收发模块还用于将携带 MAC-I的所述处理后的第二数据包发送给服 务器, 以供所述 IWF或者服务器根据所述处理后的第二数据包中的所述 UE 的 ID获取所述 SDT安全上下文, 并根据所述 SDT安全上下文, 验证所述安 全保护后的第二数据包中的所述 MAC-I, 若验证有效, 则对所述处理后的第 二数据包进行解密。  The transceiver module is further configured to send the processed second data packet carrying the MAC-I to the server, where the IWF or the server is configured according to the UE ID in the processed second data packet. Acquiring the SDT security context, and verifying the MAC-I in the security-protected second data packet according to the SDT security context, and if the verification is valid, performing the processed second data packet Decrypt.
49、 根据权利要求 48所述的 UE, 其特征在于, 所述收发模块还用于接 收所述 HSS发送的参数, 所述 HSS发送的参数包括所述 IWF的 ID、 所述 APP的 ID、 随机数 RAND、 临时数据中的至少一项。  The UE according to claim 48, wherein the transceiver module is further configured to receive a parameter sent by the HSS, where the parameters sent by the HSS include an ID of the IWF, an ID of the APP, and a random Count at least one of RAND, temporary data.
50、 一种服务器, 其特征在于, 包括:  50. A server, comprising:
收发模块, 用于接收互通设备 IWF发送的处理后的第二数据包; 处理模块, 用于根据用户设备 UE的公钥和所述服务器的私钥对所述第 二数据包进行签名验证和解密,或者根据所述 UE的 ID和 /或 IWF的 ID査找 SDT安全上下文, 对所述处理后的第二数据包进行完整性验证和解密;  a transceiver module, configured to receive a processed second data packet sent by the interworking device IWF; and a processing module, configured to perform signature verification and decryption on the second data packet according to the public key of the user equipment UE and the private key of the server Or searching for the SDT security context according to the ID of the UE and/or the ID of the IWF, performing integrity verification and decryption on the processed second data packet;
其中, 所述服务器的私钥和与所述服务器签约的所述 UE的公钥存储在 所述服务器上, 所述 SDT安全上下文为互通设备 IWF发送的。  The private key of the server and the public key of the UE that is contracted with the server are stored on the server, and the SDT security context is sent by the interworking device IWF.
51、 一种互通设备 IWF, 其特征在于, 包括:  51. An interworking device IWF, comprising:
收发模块, 用于接收用户设备 UE通过移动性管理实体 MME发送的处 理后的第二数据包, 所述处理后的第二数据包包括所述 UE的 ID和签名, 或 者所述 UE的 ID和 MAC-I;  a transceiver module, configured to receive a processed second data packet sent by the user equipment UE by using the mobility management entity MME, where the processed second data packet includes an ID and a signature of the UE, or an ID of the UE MAC-I;
处理模块, 用于根据所述 UE的公钥或 SDT安全上下文, 对所述签名或 者 MAC-I进行验证; 其中, 所述 UE的公钥存储在所述 IWF上, 所述 SDT 安全上下文为预先从归属用户服务器 HSS获取的; a processing module, configured to: according to the public key or SDT security context of the UE, the signature or The MAC-I is authenticated; wherein the public key of the UE is stored on the IWF, and the SDT security context is obtained in advance from the home subscriber server HSS;
所述收发模块还用于在验证通过后, 将所述处理后的第二数据包发送给 所述服务器。  The transceiver module is further configured to send the processed second data packet to the server after the verification is passed.
52、 根据权利要求 51所述的 IWF, 其特征在于, 所述收发模块还用于: 接收所述 HSS发送的 SDT密钥;  The IWF according to claim 51, wherein the transceiver module is further configured to: receive an SDT key sent by the HSS;
接收所述 UE通过所述 MME发送的 SDT安全保护算法;  Receiving an SDT security protection algorithm sent by the UE by using the MME;
其中, 所述 SDT安全上下文包括所述 SDT密钥和所述 SDT安全保护算 法。  The SDT security context includes the SDT key and the SDT security protection algorithm.
53、 根据权利要求 52所述的 IWF, 其特征在于, 包括:  The IWF according to claim 52, comprising:
所述处理模块还用于根据所述 UE的公钥, 验证所述处理后的第二数据 包的所述签名是否有效;  The processing module is further configured to verify, according to the public key of the UE, whether the signature of the processed second data packet is valid;
所述收发模块还用于在所述处理模块验证所述处理后的第二数据包的所 述签名有效时, 将所述第二数据包发送给服务器;  The transceiver module is further configured to: when the processing module verifies that the signature of the processed second data packet is valid, send the second data packet to a server;
或者,  Or,
所述处理模块用于根据所述 SDT安全上下文对所述处理后的第二数据包 的所述 MAC-I进行验证;  The processing module is configured to verify the MAC-I of the processed second data packet according to the SDT security context;
所述收发模块还用于若所述处理模块验证所述处理后的第二数据包的所 述 MAC-I有效,则将所述处理后的第二数据包进行解密处理后发送给服务器。  The transceiver module is further configured to: if the processing module verifies that the MAC-I of the processed second data packet is valid, decrypt the processed second data packet and send the processed data packet to the server.
54、 根据权利要求 53所述的 IWF, 其特征在于, 还包括:  54. The IWF according to claim 53, further comprising:
若所述第一数据包中包括所述服务器的 ID和所述 UE的 ID,所述处理模 块根据预先配置的授权列表中保存的服务器与 UE的对应关系, 对所述第一 数据包中的所述服务器的 ID和所述 UE的 ID进行匹配检査, 在检査所述服 务器与所述 UE的对应关系正确后, 所述收发模块将所述第二数据包发送给 所述服务器;  If the ID of the server and the ID of the UE are included in the first data packet, the processing module is configured to be in the first data packet according to a correspondence between the server and the UE saved in the pre-configured authorization list. Performing a matching check on the ID of the server and the ID of the UE. After checking that the correspondence between the server and the UE is correct, the transceiver module sends the second data packet to the server.
或者,  Or,
若所述第一数据包中包括所述服务器的 ID、 所述 UE的 ID和所述 APP 的 ID,所述处理模块根据预先配置的授权列表中保存的服务器、 UE以及 APP 的对应关系,对所述第一数据包中的所述服务器的 ID、所述 UE的 ID和所述 APP的 ID进行匹配检査, 在检査所述服务器、 所述 UE和所述 APP的对应 关系正确后, 所述收发模块将所述第二数据包发送给所述服务器; 或者, If the first data packet includes the ID of the server, the ID of the UE, and the ID of the APP, the processing module is configured according to the correspondence between the server, the UE, and the APP saved in the pre-configured authorization list. Performing a matching check on the ID of the server, the ID of the UE, and the ID of the APP in the first data packet, and checking the correspondence between the server, the UE, and the APP After the relationship is correct, the transceiver module sends the second data packet to the server; or
若所述第二数据包中包括所述服务器的 ID和所述 UE的 ID,则所述收发 模块将所述服务器的 ID和所述 UE的 ID发送给 HSS, 以供所述 HSS根据预 先配置的授权列表中保存的服务器与 UE的对应关系, 对所述第二数据包中 的所述服务器的 ID和所述 UE的 ID进行匹配检査, 在检査所述服务器与所 述 UE的对应关系正确后, 将所述第二数据包发送给所述服务器;  If the second data packet includes the ID of the server and the ID of the UE, the transceiver module sends the ID of the server and the ID of the UE to the HSS, so that the HSS is configured according to the pre-configuration. Corresponding relationship between the server and the UE saved in the authorization list, performing matching check on the ID of the server in the second data packet and the ID of the UE, and checking the correspondence between the server and the UE After the relationship is correct, the second data packet is sent to the server;
或者,  Or,
若所述第二数据包中包括所述服务器的 ID、所述 UE的 ID以及应用 APP 的 ID, 则所述收发模块将所述服务器的 ID、 所述 UE的 ID以及所述 APP的 ID发送给 HSS , 以供所述 HSS根据预先配置的授权列表中保存的服务器、 UE以及 APP的对应关系,对所述第二数据包中的所述服务器的 ID、所述 UE 的 ID和所 APP的 ID进行匹配检査, 在检査所述服务器、 所述 UE以及所述 APP的对应关系正确后, 将所述第二数据包发送给所述服务器。  If the second data packet includes the ID of the server, the ID of the UE, and the ID of the application APP, the transceiver module sends the ID of the server, the ID of the UE, and the ID of the APP. Giving the HSS, for the HSS, according to the correspondence between the server, the UE, and the APP saved in the pre-configured authorization list, the ID of the server in the second data packet, the ID of the UE, and the APP The ID performs a matching check, and after checking that the correspondence between the server, the UE, and the APP is correct, the second data packet is sent to the server.
55、 一种移动性管理实体 MME, 其特征在于, 包括:  55. A mobility management entity MME, comprising:
收发模块, 用于接收用户设备 UE发送的处理后的第二数据包, 所述第 二数据包包括: 所述 UE的 ID、 服务器的 ID和签名;  a transceiver module, configured to receive a processed second data packet sent by the user equipment UE, where the second data packet includes: an ID of the UE, an ID of the server, and a signature;
处理模块, 用于根据所述 UE的公钥, 对所述签名进行验证; 其中, 所 述 UE的公钥存储在所述 MME上;  a processing module, configured to verify the signature according to the public key of the UE, where the public key of the UE is stored on the MME;
所述收发模块还用于在验证所述签名有效后, 将所述第二数据包发送给 互通设备 IWF。  The transceiver module is further configured to send the second data packet to the interworking device IWF after verifying that the signature is valid.
56、 根据权利要求 55所述的 MME, 其特征在于, 包括:  The MME according to claim 55, comprising:
若所述第二数据包中包括所述服务器的 ID和所述 UE的 ID,则所述处理 模块还用于根据预先配置的授权列表、 所述第二数据包中的所述服务器的 ID 和所述 UE的 ID, 根据所述授权列表中保存的服务器和 UE的对应关系, 对 所述第二数据包中的所述服务器的 ID和所述 UE的 ID进行匹配检査, 在检 査所述服务器和所述 UE的对应关系正确后, 所述收发模块将所述第二数据 包发送给所述服务器;  If the second data packet includes the ID of the server and the ID of the UE, the processing module is further configured to: according to the pre-configured authorization list, the ID of the server in the second data packet, and The ID of the UE, according to the correspondence between the server and the UE stored in the authorization list, performing matching check on the ID of the server in the second data packet and the ID of the UE, in the checkpoint After the corresponding relationship between the server and the UE is correct, the transceiver module sends the second data packet to the server;
或者,  Or,
若所述第二数据包中包括所述服务器的 ID、 所述 UE的 ID和应用 APP 的 ID, 则所述处理模块还用于根据预先配置的授权列表、 所述第二数据包中 的所述服务器的 ID、 所述 UE的 ID以及所述 APP的 ID, 根据所述授权列表 中保存的服务器、 UE以及 APP的对应关系, 对所述第二数据包中的所述服 务器的 ID、所述 UE的 ID和所述 APP的 ID进行匹配检査, 在检査所述服务 器、 所述 UE以及所述 APP的对应关系正确后, 所述收发模块将所述第二数 据包发送给所述服务器。 If the second data packet includes an ID of the server, an ID of the UE, and an application APP And the processing module is further configured to use, according to the pre-configured authorization list, the ID of the server in the second data packet, the ID of the UE, and the ID of the APP, according to the authorization list. Corresponding relationship between the saved server, the UE, and the APP, performing matching check on the ID of the server in the second data packet, the ID of the UE, and the ID of the APP, and checking the server and the After the correspondence between the UE and the APP is correct, the transceiver module sends the second data packet to the server.
PCT/CN2014/080840 2014-06-26 2014-06-26 Data secure transmission method and device WO2015196415A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2014/080840 WO2015196415A1 (en) 2014-06-26 2014-06-26 Data secure transmission method and device
CN201480017033.5A CN105393567B (en) 2014-06-26 2014-06-26 Method and device for secure transmission of data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2014/080840 WO2015196415A1 (en) 2014-06-26 2014-06-26 Data secure transmission method and device

Publications (1)

Publication Number Publication Date
WO2015196415A1 true WO2015196415A1 (en) 2015-12-30

Family

ID=54936479

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2014/080840 WO2015196415A1 (en) 2014-06-26 2014-06-26 Data secure transmission method and device

Country Status (2)

Country Link
CN (1) CN105393567B (en)
WO (1) WO2015196415A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20200322794A1 (en) * 2016-05-30 2020-10-08 Telecom Italia S.P.A. Protection of privacy in wireless telecommunication networks

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101272618A (en) * 2008-04-24 2008-09-24 中兴通讯股份有限公司 Method and system for implementing network intercommunication through association node
CN101808321A (en) * 2009-02-16 2010-08-18 中兴通讯股份有限公司 Security authentication method
CN103249013A (en) * 2012-02-03 2013-08-14 中兴通讯股份有限公司 Method and system for sending trigger information of MTC (Machine Type Communication) UE (User Equipment) as well as UE
WO2014041806A1 (en) * 2012-09-13 2014-03-20 Nec Corporation Key management in machine type communication system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102340487B (en) * 2010-07-21 2014-04-02 航天信息股份有限公司 Integrity report transferring method and system among multiple trust domains

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101272618A (en) * 2008-04-24 2008-09-24 中兴通讯股份有限公司 Method and system for implementing network intercommunication through association node
CN101808321A (en) * 2009-02-16 2010-08-18 中兴通讯股份有限公司 Security authentication method
CN103249013A (en) * 2012-02-03 2013-08-14 中兴通讯股份有限公司 Method and system for sending trigger information of MTC (Machine Type Communication) UE (User Equipment) as well as UE
WO2014041806A1 (en) * 2012-09-13 2014-03-20 Nec Corporation Key management in machine type communication system

Also Published As

Publication number Publication date
CN105393567A (en) 2016-03-09
CN105393567B (en) 2020-07-21

Similar Documents

Publication Publication Date Title
US10601594B2 (en) End-to-end service layer authentication
TWI672933B (en) User-plane security for next generation cellular networks
US20210368314A1 (en) Mtc key management for key derivation at both ue and network
KR101554396B1 (en) Method and apparatus for binding subscriber authentication and device authentication in communication systems
WO2018045817A1 (en) Mobile network authentication method, terminal device, server and network authentication entity
KR100704675B1 (en) authentication method and key generating method in wireless portable internet system
CN107005927B (en) Access method, device and system of User Equipment (UE)
WO2017091959A1 (en) Data transmission method, user equipment and network side device
WO2019051776A1 (en) Key transmission method and device
WO2010124474A1 (en) Method and device for establishing security mechanism of air interface link
CN102843687A (en) Smartphone portable point safe access system and method
WO2014180198A1 (en) Access method, system, and device of terminal, and computer storage medium
WO2009094942A1 (en) Method and communication network system for establishing security conjunction
EP3228059A1 (en) Secure connections establishment
WO2012031510A1 (en) Method and system for implementing synchronous binding of security key
WO2014169451A1 (en) Method and device for data transmission
WO2015100974A1 (en) Terminal authentication method, device and system
WO2015058378A1 (en) Method and device for secure communication between user equipment
WO2015131379A1 (en) Information protection method, base station, user equipment and mobility management entity
WO2013166908A1 (en) Method, system, terminal equipment and access network apparatus for generating key information
WO2012094920A1 (en) Method and system for authenticating relay node
CN105393567B (en) Method and device for secure transmission of data
WO2014117524A1 (en) Method and system for transmitting pairwise master key in wlan access network
CN113973002A (en) Data key updating method and device
CN107005410B (en) Internet protocol security tunnel establishment method, user equipment and base station

Legal Events

Date Code Title Description
WWE Wipo information: entry into national phase

Ref document number: 201480017033.5

Country of ref document: CN

121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 14895648

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 14895648

Country of ref document: EP

Kind code of ref document: A1