WO2013060302A1 - 一种加密方法,解密方法和相关装置 - Google Patents

一种加密方法,解密方法和相关装置 Download PDF

Info

Publication number
WO2013060302A1
WO2013060302A1 PCT/CN2012/083661 CN2012083661W WO2013060302A1 WO 2013060302 A1 WO2013060302 A1 WO 2013060302A1 CN 2012083661 W CN2012083661 W CN 2012083661W WO 2013060302 A1 WO2013060302 A1 WO 2013060302A1
Authority
WO
WIPO (PCT)
Prior art keywords
message
initial layer
key stream
encrypted
data
Prior art date
Application number
PCT/CN2012/083661
Other languages
English (en)
French (fr)
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 EP12844330.6A priority Critical patent/EP2765734A4/en
Publication of WO2013060302A1 publication Critical patent/WO2013060302A1/zh
Priority to US14/263,253 priority patent/US9992669B2/en
Priority to US15/965,854 priority patent/US10771966B2/en
Priority to US17/013,643 priority patent/US11757623B2/en
Priority to US18/453,662 priority patent/US20240064003A1/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/06Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols the encryption apparatus using shift registers or memories for block-wise or stream coding, e.g. DES systems or RC4; Hash functions; Pseudorandom sequence generators
    • H04L9/065Encryption by serially and continuously modifying data stream elements, e.g. stream cipher systems, RC4, SEAL or A5/3
    • H04L9/0656Pseudorandom key sequence combined element-for-element with data sequence, e.g. one-time-pad [OTP] or Vernam's cipher
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/10Network architectures or network communication protocols for network security for controlling access to devices or network resources
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/10Network architectures or network communication protocols for network security for controlling access to devices or network resources
    • H04L63/104Grouping of entities
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/12Transmitting and receiving encryption devices synchronised or initially set up in a particular manner
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/02Protecting privacy or anonymity, e.g. protecting personally identifiable information [PII]
    • 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]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2209/00Additional information or applications relating to cryptographic mechanisms or cryptographic arrangements for secret or secure communication H04L9/00
    • H04L2209/80Wireless
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/70Services for machine-to-machine communication [M2M] or machine type communication [MTC]

Definitions

  • Encryption method, decryption method and related device The present application claims to be Chinese patent application filed on October 27, 2011, the Chinese Patent Office, Application No. 201110331957.0, entitled “An Encryption Method, Decryption Method and Related Device” Priority is hereby incorporated by reference in its entirety.
  • the present invention relates to the field of wireless communication technologies, and in particular, to an encryption method, a decryption method, and related devices.
  • a machine-to-machine (M2M) technology is an integration of wireless communication and information technology, and refers to a communication technology directly between a machine and a machine without manual intervention.
  • M2M communication is also called machine type communication (English name: Machine Type Communication, referred to as: MTC).
  • MTC Machine Type Communication
  • the M2M communication system is very different from the traditional human-to-human (English name: Human to Human, H2H) communication system.
  • M2M communication Due to its large number of devices, low mobility, and small communication traffic, the system has many features of machine-like communication.
  • 3GPP The 3rd Generation Partnership Project
  • the M2M communication system is called the MTC communication system, and the short message service is started in the case of small data transmission.
  • SMS Short Message Service
  • IP Internet Protocol
  • Embodiments of the present invention provide an encryption method, a decryption method, and a related apparatus, which are used to provide confidentiality protection for some data to be encrypted in an initial layer 3 message.
  • an embodiment of the present invention provides an encryption method, including:
  • the key stream is used to encrypt part of data to be encrypted in the initial layer 3 message, the part of data to be encrypted includes small data; and the key stream is XORed with the initial layer 3 message Computing, generating an initial layer 3 message in which partial data is encrypted;
  • an embodiment of the present invention provides a method for decrypting, including:
  • the initial layer 3 message includes an added encryption indication, and the encryption indication is used to identify that part of the to-be-encrypted data in the initial layer 3 message is encrypted;
  • the key stream is XORed with the initial layer 3 message to generate an initial layer 3 message in which partial data is decrypted.
  • an embodiment of the present invention provides an encryption apparatus, including:
  • a generating unit configured to generate a key stream, where the key stream is used to encrypt part of the data to be encrypted in the initial layer 3 message, where the part of the data to be encrypted includes small data;
  • a processing unit configured to enter the key stream generated by the generating unit with the initial layer 3 message XOR operation, generating an initial layer 3 message in which partial data is encrypted;
  • a transmission unit configured to send an initial layer 3 message that is encrypted by the processing unit, where the initial layer 3 message includes an added encryption indication, where the encryption indication is used to identify the initial layer 3 message.
  • the part of the data to be encrypted is encrypted.
  • an embodiment of the present invention provides a decryption apparatus, including:
  • a transmission unit configured to receive an initial layer 3 message, where the partial layer 3 message is encrypted, where the initial layer 3 message includes an added encryption indication, where the encryption indication is used to identify that part of the data to be encrypted in the initial layer 3 message is encrypted.
  • a generating unit configured to generate a key stream according to the added encryption indication in the initial layer 3 message, where the key stream is used to decrypt part of the encrypted data in the initial layer 3 message, where
  • the partially encrypted data includes small data
  • the processing unit performs an exclusive OR operation on the key stream with the initial layer 3 message to generate an initial layer 3 message that is partially decrypted.
  • the embodiments of the present invention have the following advantages:
  • An example of the present invention is to generate a key stream, where the key stream is used to encrypt part of data to be encrypted in an initial layer 3 message, the part of data to be encrypted includes small data, and the key stream is combined with the initial layer 3 And performing an XOR operation on the message, generating an initial layer 3 message in which the partial data is encrypted, and sending the initial layer 3 message in which the partial data is encrypted, where the initial layer 3 message includes an added encryption indication, where the encryption indication is used.
  • part of the data to be encrypted is encrypted. Therefore, partial data encryption can be performed on the initial layer 3 message, thereby avoiding the problem that the initial layer 3 message cannot be confidentially protected in the prior art, thereby ensuring the secure transmission of small data.
  • FIG. 1 is a schematic diagram of an embodiment of an encryption method according to an embodiment of the present invention
  • FIG. 2 is a schematic diagram of another embodiment of an encryption method according to an embodiment of the present invention
  • FIG. 4 is a schematic diagram of an embodiment of an encryption apparatus according to an embodiment of the present invention
  • FIG. 4 is a schematic diagram of another embodiment of an encryption apparatus according to an embodiment of the present invention
  • FIG. 4 is a schematic diagram of another embodiment of an encryption apparatus according to an embodiment of the present invention
  • FIG. 4 is a schematic diagram of an encryption apparatus according to an embodiment of the present invention
  • FIG. 5 is a schematic diagram of an embodiment of a decryption apparatus according to an embodiment of the present invention
  • FIG. 5 is a schematic diagram of another embodiment of a decryption apparatus according to an embodiment of the present invention.
  • FIG. 5 is a schematic diagram of another embodiment of a decryption apparatus according to an embodiment of the present invention;
  • FIG. 5 is a schematic diagram of another embodiment of a decryption apparatus according to an embodiment of the present invention.
  • Embodiments of the present invention provide an encryption method, a decryption method, and related apparatus for providing confidentiality protection for a portion of data in an initial layer 3 message to be encrypted.
  • SMS small data or IP data packet small data transmission initiated by the mobile station (English full name: Mob i le Or ig ina te, English abbreviation: M0), uplink encryption
  • the SMS small data or IP packet small data is encapsulated in the tracking area update request message (English full name Track ing Area Upda te reques t , English simplified In the TAU request or the new initial layer 3 message, the downlink encrypted SMS small data or the IP data packet small data is encapsulated in the downlink non-access layer transmission message of the S1 interface (English is called Down 1 ink NAS transport message, NAS is written in English as Non Access Stratum.
  • the downlink encrypted SMS small data or IP packet small data is encapsulated in the downlink non-access layer of the S1 interface.
  • the uplink encrypted SMS small data or the IP data packet small data is encapsulated in the uplink non-access layer transmission message of the S1 interface (English name is called Uplink NAS transport message).
  • the downlink non-access stratum transmission message of the S1 interface and the NAS message carried in the uplink non-access stratum transmission message do not belong to the initial layer 3 message, and may be performed on the existing encryption mechanism. Confidentiality and integrity protection. However, for the TAU request or the new initial layer 3 message belongs to the initial layer 3 message, according to the existing encryption mechanism, the integrity protection is performed when there is a valid security context, but the confidentiality protection of such messages is not performed, but according to The requirements of the small data transmission scheme need to be confidential for SMS small data or IP packet small data. It needs to be considered when SMS small data or IP packet small data is encapsulated in TAU request or new initial layer 3 message. Provides confidentiality protection for small data portions in the initial Layer 3 message and other parameters that need to be protected.
  • the present invention provides the following technical solutions:
  • FIG. 1 is a schematic diagram of an embodiment of an encryption method according to an embodiment of the present invention, including: 101. Generate a key stream, where the key stream is used to encrypt part of data to be encrypted in an initial layer 3 message, where the part is encrypted.
  • the data to be encrypted includes small data.
  • the initial Layer 3 message is sent, where the part of the data is encrypted, and the initial layer 3 message includes an added encryption indication, where the encryption indication is used to identify that part of the data to be encrypted in the initial layer 3 message is encrypted. So that the network side generates a key stream according to the added encryption indication, and then decrypts the initial layer 3 message whose partial data is encrypted according to the generated key stream.
  • An example of the present invention is to generate a key stream, where the key stream is used to encrypt part of data to be encrypted in an initial layer 3 message, the part of data to be encrypted includes small data, and the key stream is combined with the initial layer 3
  • the message is subjected to an exclusive OR operation to generate an initial layer 3 message in which part of the data is encrypted, and the initial layer 3 message in which the partial data is encrypted is sent, and the initial layer 3 message includes an increase.
  • an encryption indication where the encryption indication is used to identify that part of the data to be encrypted in the initial layer 3 message is encrypted. Therefore, partial data encryption can be performed on the initial layer 3 message, which avoids the problem that the initial layer 3 message cannot be confidentially protected in the prior art, thereby ensuring secure transmission of small data.
  • the MTC communication system of the 3GPP standard implements small data communication between the machine and the machine by carrying a short message or an IP data packet in the NAS signaling, and the data transmitted by the communication between the machines is small due to the small amount of data.
  • small data small data is usually carried in short messages or
  • the generated initial layer 3 message includes an added encryption indication to enable the network side to recognize that the initial layer 3 message part data is encrypted, and needs to be decrypted after receiving the initial layer 3 message at the receiving end.
  • the initial layer 3 message may specifically include: a tracking area update request message (referred to as TAU reques t in English) or a new initial layer 3 message, in which message the short message small data or the IP data packet small data is specifically carried in the actual application. It is determined by the specific application scenario and is not limited here. It should be noted that the new initial layer 3 message is a newly defined initial layer 3 message for the MTC communication system for transmitting small data.
  • the initial layer 3 message includes an added encryption indication, and an achievable manner may specifically include:
  • Integrity protection and partial encryption parameters are added to the security header type parameter in the initial layer 3 message, and the security header type parameter is set to integrity protection and partial encryption parameters.
  • the existing security header type parameters (English full name is Security header integrity protection parameter (English full name Integrity protected), integrity protection and encryption parameters (English full name Integrity protected and ciphered).
  • an integrity protection and partial encryption parameter (in English, Integrity protected and partly ciphered) is added to the Security header type to indicate that some of the data to be secreted in the initial layer 3 message is encrypted, and the data is added.
  • the security header type parameter is set to integrity protection and partial encryption parameters, and the network side identifies the data encrypted by the initial layer 3 message part.
  • the initial layer 3 message includes an added encryption indication, and another implementation manner may specifically include: adding a small data transmission indication to the initial layer 3 message, which will be secure.
  • the header type parameter is set to the integrity protection parameter.
  • the initial layer 3 message includes an added encryption indication
  • another achievable manner may specifically include: adding a small data transmission indication to the initial layer 3 message, and setting the security header type parameter to integrity. Protection and encryption parameters.
  • a small data transmission indication is added to the initial layer 3 message, indicating that the initial layer 3 message carries a part of the encrypted short message small data or the IP data packet small data, and the network is required.
  • the side decrypts the partially encrypted data after receiving the initial layer 3 message.
  • a key stream for encrypting data to be encrypted in the initial layer 3 message is generated.
  • part of the data to be encrypted in the initial layer 3 message includes small data, but Limited to small data, in practical applications, small data is encapsulated in short messages or Internet Protocol (IP) packets, and encryption is to encrypt the entire short message or IP data packet.
  • IP Internet Protocol
  • the data to be encrypted usually includes a short message or an IP data packet, but also includes a short message header or an IP header.
  • the content of the data to be encrypted is determined by a specific implementation scenario, which is not limited herein.
  • the generated key stream may specifically be an evolved packet system encryption algorithm (referred to as EEA in English, which is called EPS Encryption Algorithm, and the full name of EPS is called Evolved Packet System).
  • FIG. 2 is a schematic diagram of another embodiment of an encryption method according to an embodiment of the present invention.
  • the data encryption mechanism is first implemented by the sender transmitting the plaintext and the key stream generated by the EEA. After encrypting the plaintext, the receiving end receives the ciphertext, generates a key stream through the EEA, and XORs the ciphertext and the generated key stream to decrypt the ciphertext.
  • EEA evolved packet system encryption algorithm
  • KEY is an encrypted key parameter that can generate different key streams for different users.
  • BEARER is a radio bearer identification parameter, which can generate different key streams for different bearers of the same user.
  • BEARER is constant 0x00.
  • DIRECTION refers to the transmission direction parameter, which can generate different key streams for different transmission directions on the same bearer of the same user.
  • the DIRECTION value is 0; for the next message, the DIRECTION value is 1.
  • COUNT is a counter value parameter that can generate different key streams for the same message in the same transmission direction on the same bearer of the same user.
  • LENGTH is a length parameter, which can generate the same key stream as the plaintext, LENGTH The value only affects the length of the key stream and does not affect the bits in the key stream.
  • KEY STREAM BLOCK is the generated key stream.
  • PLAIN TEXT BLOCK is part of the data to be encrypted (ie plaintext).
  • CIPHER TEXT BLOCK is the generated ciphertext.
  • generating a key stream may be specifically implemented by: setting a value of a length parameter of the key stream to be generated (ie, LENGTH) to a part of the data to be encrypted in the initial layer 3 message.
  • the length value, the length parameter is an input parameter of the evolved packet system encryption algorithm, and the length parameter is used as an input parameter to generate a key stream by the evolved packet system encryption algorithm.
  • the LENGTH value of the key stream is set to the length value of the data to be encrypted in the initial layer 3 message, and then the key stream is generated according to the EPS encryption algorithm, for example, part of the data to be encrypted in the initial layer 3 message.
  • the length value is 3 bits
  • the LENGTH value in the generated key stream is 3 bits.
  • the key stream is XORed with a portion of the data to be encrypted in the initial layer 3 message to generate an initial layer 3 message in which the partial data is encrypted. For example, if the length of the data to be encrypted in the initial layer 3 message is 3, the input parameter LENGTH value is set to 3, assuming that the generated key stream is 101, and part of the data to be encrypted in the initial layer 3 message is 110, then The partially encrypted data generated after the final key stream is XORed with part of the data to be encrypted in the initial layer 3 message is 011.
  • the key stream is generated, and the other implementation manner may include: setting a value of a length parameter of the key stream to be generated to a variable length value or an initial layer 3 message in the initial layer 3 message.
  • a length value the length parameter is an input parameter of an evolved packet system encryption algorithm; generating the key stream by using the length parameter as an input parameter by the evolved packet system encryption algorithm; and truncating the length according to the length of the part of the data to be encrypted
  • the generated key stream, the length of the truncated key stream being the same as the length of the data to be encrypted in the initial layer 3 message.
  • An implementation manner of generating the initial layer 3 message after the partial data is encrypted is: performing an exclusive OR operation on the part of the data to be encrypted in the initial layer 3 message, and generating an initial part of the encrypted data. Layer 3 message.
  • the input parameter LENGTH value of the key stream is set to the length value of the initial layer 3 message or the variable length value of the initial layer 3 message (but the variable length of the initial layer 3 message is greater than the data to be partially encrypted).
  • the length, the length of the initial layer 3 message is also greater than the length of the data to be encrypted, and then the key stream is generated according to the EPS encryption algorithm, since only the initial layer is needed.
  • the data to be encrypted in the message is encrypted, so the key stream is truncated after the key stream is generated, and the length of the truncated key stream is the same as the length of the data to be encrypted in the initial layer 3 message.
  • the key stream When the key stream is truncated, it can be truncated from the highest bit to the lowest bit, or truncated from the lowest bit to the highest bit, or according to other truncation rules.
  • the specific implementation scenario is determined, and is not limited herein. For example, if the length value of the initial layer 3 message or the variable length value of the initial layer 3 message is 9, the LENGTH value is set to 9, assuming that the generated key stream is 111010100, the length of part of the data to be encrypted in the initial layer 3 message. If it is 5, then the generated key stream is truncated according to the way from the highest bit to the lowest bit. The truncated key stream is 11101. Assume that some of the data to be encrypted in the initial layer 3 message is 00110, then the final intercept The partially encrypted data generated after the short key stream is XORed with some of the data to be encrypted in the initial layer 3 message is 11011.
  • variable length value of the initial layer 3 message is equal to the length of the to-be-encrypted portion, please refer to the foregoing "set the value of the length parameter of the key stream to be generated (ie, LENGTH) as part of the initial layer 3 message.
  • LENGTH the value of the length parameter of the key stream to be generated
  • generating a key stream another achievable manner may specifically include: setting a value of LENGTH of the key stream to be generated to a length value of an initial layer 3 message (initial layer 3 message length) The value is greater than the length of the data to be encrypted.
  • the length parameter is used as an input parameter to generate a key stream by using the evolved packet system encryption algorithm, and the initial layer is obtained according to the format of the initial layer 3 message and the length of the data to be encrypted. 3 a start bit and a stop bit of the data to be encrypted in the message, and a bit in the key stream corresponding to the start bit to the stop bit, and the start in the key stream The bit positions other than the stop bit are changed to zero.
  • the value of the LENGTH of the key stream is set to the length value of the initial layer 3 message, and then the key stream is generated according to the EPS encryption algorithm. Since only the data to be encrypted in the initial layer 3 message is encrypted, Therefore, after generating the key stream, the start bit and the stop bit of the data to be encrypted in the initial layer 3 message may be obtained, and then the bit corresponding to the start bit to the stop bit in the key stream is reserved, and the key is fixed. The other bit positions in the key stream except the start bit to the end bit are replaced by zero, which is equivalent to encrypting only part of the data to be encrypted in the initial layer 3 message.
  • the LENGTH parameter is set to 17, assuming that the generated key stream is 01011010100111001, and the part of the data to be encrypted in the initial layer 3 message has the start bit of the fourth bit, part of The data to be encrypted has a termination bit of Bit 8, then for the key stream, it is necessary to keep the bits from the 4th bit to the 8th bit in the generated key stream (that is, the bit 11010 is reserved), and the other bit positions in the key stream. If it is changed to zero, the key stream that is finally XORed with the initial layer 3 message is 00011010000000000.
  • the initial layer 3 message is 11111010000000111, and the generated initial layer 3 message is encrypted, the initial layer 3 message is 11100000000000111.
  • another achievable manner may specifically include: setting a value of the LENGTH of the key stream to be generated to a variable length value of the initial layer 3 message (but the length of the variable part is
  • the length of the data to be encrypted is greater than the length of the data to be encrypted, and the length parameter is used as an input parameter to generate a key stream by using the evolved packet system encryption algorithm, and the initial length of the data to be encrypted is obtained according to the format of the initial layer 3 message and the length of the data to be encrypted.
  • the start bit and the stop bit of the data to be encrypted in the layer 3 message, and the bit corresponding to the start bit to the stop bit in the key stream is reserved, except in the key stream.
  • An implementation manner of generating an initial layer 3 message in which partial data is encrypted is: performing an exclusive OR operation on the key stream and a variable in the initial layer 3 message to generate an initial layer in which part of the data is encrypted. 3 messages.
  • the value of LENGTH of the key stream is set to the variable length value of the initial layer 3 message, and then the key stream is generated according to the EPS encryption algorithm, since only part of the data to be encrypted in the initial layer 3 message is encrypted. Therefore, after generating the key stream, the start bit and the stop bit of the data to be encrypted in the initial layer 3 message may be obtained, and then the bit corresponding to the start bit to the stop bit in the key stream is retained, and The other bit positions in the key stream are changed to zero, which is equivalent to encrypting only some of the data to be encrypted in the initial layer 3 message.
  • the generated key stream is 01011010100111001.
  • part of the data to be encrypted has its starting bit being the 4th bit, and part of the data to be encrypted has the ending bit being the 8th bit.
  • the bit 11010 is reserved
  • the key stream that is XORed with the variable portion of the initial layer 3 message is 00011010000000000. Assuming that the variable portion of the initial layer 3 message is 11111010000000111, then the encrypted variable portion is 11100000000000111.
  • the key stream is XORed with the variable of the initial layer 3 message or the initial layer 3 message or part of the data of the initial layer 3 message to be encrypted
  • An initial layer 3 message in which partial data is encrypted can be obtained.
  • CIPHER TEXT BL0CK can be obtained by XORing PLAIN TEXT BLOCK and KEY STREAM BLOCK on the transmitting side.
  • the CIPHER TEXT BLOCK is XORed with the KEY STREAM BLOCK, and then the PLAIN TEXT BL0CK can be decrypted.
  • the initial layer 3 message includes an added encryption indication, so that the network side learns that the initial layer 3 message part data is encrypted after receiving the initial layer 3 message, and then generates a message for the initial layer 3
  • the part of the data to be encrypted is encrypted by the key stream, and finally the X2 operation is used to obtain the initial layer 3 message after the partial data is encrypted, thereby realizing the confidentiality protection of the data to be encrypted in the initial layer 3 message.
  • FIG. 3 is a schematic diagram of an embodiment of a decryption method according to an embodiment of the present invention. 3, including:
  • the embodiment of the present invention receives the initial layer 3 message after the partial data is encrypted, and the initial layer 3 message includes an added encryption indication, where the encryption indication is used to identify that part of the data to be encrypted in the initial layer 3 message is encrypted.
  • the receiving end after receiving the initial layer 3 message that the partial data sent by the transmitting end in the MTC communication system is encrypted, the receiving end adds the encryption according to the initial layer 3 message. Instructed to get the initial layer 3 message part of the data has been Encrypted.
  • the initial layer is obtained according to the added encryption indication in the initial layer 3 message.
  • the message part data has been encrypted.
  • One achievable way is:
  • the acquisition initial layer 3 message part data has been encrypted.
  • the security header type parameter in the initial layer 3 message is set to integrity protection and partial encryption parameters, it can be known that the initial layer 3 message part data has been encrypted.
  • the initial layer 3 message part data is already encrypted according to the added encryption indication in the initial layer 3 message.
  • Another achievable way is:
  • the initial layer 3 message part data is already encrypted.
  • the acquisition initial layer 3 message part data has been encrypted.
  • the initial layer 3 Some of the encrypted data in the message include small data, but it is not limited to small data. In practical applications, small data is encapsulated in short messages or IP data packets, and encryption is performed on the entire short message or IP data packet. Encrypted, encrypted parts usually include short messages or IP packets, but also include short message headers or IP headers.
  • generating a key stream may be specifically implemented by: setting a value of a length parameter of the key stream to be generated (ie, LENGTH) to a partially encrypted data in the initial layer 3 message.
  • the length value, the length parameter is an input parameter of the evolved packet system encryption algorithm; the length parameter is used as an input parameter to generate a key stream by the evolved packet system encryption algorithm.
  • the value of the LENGTH of the key stream is set to a partially encrypted data length value in the initial layer 3 message, and then the key stream is generated according to the EPS encryption algorithm, for example, the length of the encrypted portion in the initial layer 3 message.
  • the value is 3 bits, then the value of LENGTH in the generated key stream is It is 3 bits.
  • An implementation of the initial layer 3 message after the partial data is decrypted may include: performing an exclusive OR operation on the key stream with a portion of the encrypted data in the initial layer 3 message to generate an initial part of the decrypted data.
  • Layer 3 message For example, if the length of the partially encrypted data in the initial layer 3 message is 3, the LENGTH value is set to 3, assuming that the generated key stream is 101, and the part of the initial layer 3 message is encrypted as 011, then finally The decrypted data generated after the key stream is XORed with the partially encrypted data in the initial layer 3 message is 110.
  • the key stream is generated.
  • the other method may include: setting the value of the length parameter to a variable length value in the initial layer 3 message or a length value of the initial layer 3 message, where the length parameter is An input parameter of the evolved packet system encryption algorithm; generating the key stream by using the length parameter as an input parameter by the evolved packet system encryption algorithm; and truncating the generated key stream according to the length of the partially encrypted data, The length of the truncated key stream is the same as the length of the encrypted portion of the initial layer 3 message.
  • An implementation of the initial layer 3 message after the partial data is decrypted may include: performing an exclusive OR operation on the key stream with a portion of the encrypted data in the initial layer 3 message to generate an initial part of the decrypted data. Layer 3 message.
  • the LENGTH value of the key stream is set to the length value of the initial layer 3 message or the variable length value of the initial layer 3 message (but the variable part length is greater than the length of the part of the data to be encrypted, the initial layer 3 message) The length value is also greater than the length of the data to be encrypted.) Then, the key stream is generated according to the EPS encryption algorithm. Since only the encrypted portion of the initial layer 3 message needs to be decrypted, the key stream is generated after the key stream is generated. The length is truncated, which is the same as the length of the partially encrypted data in the initial layer 3 message. When the key stream is truncated, it can be truncated from the highest bit to the lowest bit, or from the lowest bit.
  • the truncation to the highest-order mode may be determined according to a specific implementation scenario in an actual application, and is not limited herein. For example, if the length value of the initial layer 3 message or the variable length value of the initial layer 3 message is 9, the LENGTH value is set to 9, assuming that the generated key stream is 111010100, the length of the partially encrypted data in the initial layer 3 message.
  • the generated key stream is truncated according to the way from the highest bit to the lowest bit, and the truncated key stream is 11101, assuming that the partially encrypted data in the initial layer 3 message is 11011, then the final truncation
  • the decrypted data generated after the short key stream is XORed with the partially encrypted data in the initial layer 3 message is 00110.
  • generating a key stream another achievable manner may specifically include: Setting the value of the length parameter to the length value of the initial layer 3 message (the length value of the initial layer 3 message is greater than the length of the partially encrypted data), and generating the length parameter as an input parameter by the evolved packet system encryption algorithm Key stream, obtaining a start bit and a stop bit of the encrypted data in the initial layer 3 message according to a format of the initial layer 3 message and a length of the partially encrypted data, and retaining the key stream And a bit corresponding to the start bit to the end bit, and the bit position in the key stream except the start bit to the stop bit is changed to zero.
  • the value of the LENGTH of the key stream is set to the length value of the initial layer 3 message, and then the key stream is generated according to the EPS encryption algorithm. Since only the partially encrypted data in the initial layer 3 message is decrypted, Therefore, after generating the key stream, the start bit and the end bit of the partially encrypted data in the initial layer 3 message can be obtained, and then the bit corresponding to the start bit to the stop bit in the key stream is retained, and the key is dense. The other bit positions in the key stream are changed to zero, which is equivalent to decrypting only partially encrypted data in the initial layer 3 message.
  • the LENGTH parameter is set to 17, assuming that the generated key stream is 01011010100111001, and the part of the encrypted data in the initial layer 3 message has the start bit as the 4th bit.
  • the encrypted data has a termination bit of the 8th bit, and for the key stream, it is necessary to retain the bit from the 4th bit to the 8th bit in the generated key stream (that is, the bit 11010 is reserved).
  • the other bit positions in the key stream are changed to zero, and the key stream that is finally XORed with the initial layer 3 message whose partial data is encrypted is 00011010000000000.
  • the initial layer 3 message in which the partial data is encrypted is 11100000000000111
  • the decrypted initial layer 3 message is 11111010000000111.
  • another achievable manner may specifically include:
  • the length parameter being an input parameter of the evolved packet system encryption algorithm
  • the length parameter is used as an input parameter to generate a key stream by using the evolved packet system encryption algorithm
  • the encrypted data in the initial layer 3 message is obtained according to a format of the initial layer 3 message and a length of the partially encrypted data.
  • An initial layer 3 message that is generated after the partial data is decrypted may be implemented as The key stream is XORed with a variable in the initial layer 3 message to generate an initial layer 3 message in which partial data is decrypted.
  • the value of the LENGTH of the key stream is set to the variable length value of the initial layer 3 message, and then the key stream is generated according to the EPS encryption algorithm, since only the partially encrypted data in the initial layer 3 message is decrypted. Therefore, after generating the key stream, the start bit and the stop bit of the partially encrypted data in the initial layer 3 message can be obtained, and then the bit corresponding to the start bit to the stop bit in the key stream is retained, and The other bit positions in the key stream are changed to zero, which is equivalent to decrypting only partially encrypted data in the initial layer 3 message.
  • the initial layer 3 message has a variable length value of 17, then the LENGTH parameter is set to 17, assuming that the generated key stream is 010110101 00111001, and the partially encrypted data in the initial layer 3 message has a starting bit of the fourth bit.
  • the partially encrypted data has a termination bit of the 8th bit.
  • the bit from the 4th bit to the 8th bit in the generated key stream needs to be reserved (that is, the bit 11010 is reserved).
  • the key stream that is finally XORed with the variable of the initial layer 3 message whose partial data is encrypted is 00011010000000000.
  • the decrypted initial layer 3 message can be obtained by XORing the key stream with the variable portion of the initial layer 3 message or the initial layer 3 message or the encrypted portion of the initial layer 3 message.
  • the IPIN TEXT BLOCK is XORed with the KEY STREAM BLOCK to obtain PLAIN TEXT BL0CK.
  • the initial layer 3 message part data has been encrypted, so that the partially encrypted data in the initial layer 3 message needs to be decrypted, and then generated for A key stream for decrypting partially encrypted data in the initial layer 3 message, and finally obtaining a decrypted initial layer 3 message by an exclusive OR operation, provides confidentiality protection for the encrypted portion of the initial layer 3 message.
  • the above embodiment describes the encryption method and the decryption method provided by the embodiment of the present invention.
  • the encryption device and the decryption device provided by the embodiment of the present invention are introduced.
  • the encryption device and the decryption device provided by the embodiment of the present invention may be specifically applied to the MTC communication system. in.
  • MTC communication systems are available in a wide variety of applications including, but not limited to, the following five applications: automatic instrumentation (eg water and electricity meters), remote monitoring, industrial safety and home automation, payment systems (automatic rejection machines, support terminals and parking metering meters, etc.) And remote control of the vehicle (such as fleet management, toll collection, vehicle recovery, and payment of premiums based on driving conditions), while in-vehicle applications include hands-free, telecommunication systems, built-in navigation, Emergency calls, remote diagnostics, and built-in alarms.
  • automatic instrumentation eg water and electricity meters
  • remote monitoring e.g., water and electricity meters
  • industrial safety and home automation e.g.
  • payment systems automated rejection machines, support terminals and parking metering meters, etc.
  • remote control of the vehicle such as fleet management, toll collection, vehicle recovery, and payment of premiums based on driving conditions
  • in-vehicle applications include hands-free, telecommunication systems, built-in navigation, Emergency calls, remote diagnostics, and built-
  • FIG. 4 is a schematic diagram of an embodiment of an encryption device according to an embodiment of the present invention. As shown in FIG. 4, the encryption device 400 includes:
  • the generating unit 401 is configured to generate a key stream, where the key stream is used to encrypt the data to be encrypted in the middle layer of the initial layer 3 message, where the part of the data to be encrypted includes small data.
  • the processing unit 402 is configured to perform an exclusive OR operation on the key stream with the initial layer 3 message to generate an initial layer 3 message in which partial data is encrypted.
  • the transmitting unit 403 is configured to send an initial layer 3 message that is encrypted by the processing unit, where the initial layer 3 message includes an added encryption indication, where the encryption indication is used to identify the initial layer 3 Some of the data to be encrypted in the message is encrypted.
  • FIG. 4a is an embodiment of an apparatus according to the present invention. The embodiment is further refined in the embodiment shown in FIG. 4.
  • the apparatus 400 further includes:
  • the first setting unit 404 is configured to set a value of the length parameter to a length value of the part of the data to be encrypted in the initial layer 3 message, where the length parameter is an input parameter of an evolved packet system encryption algorithm.
  • the generating unit 401 is specifically configured to generate a key stream by using the evolving packet system encryption algorithm by using the length parameter set by the first setting unit 404 as an input parameter.
  • the processing unit 402 is specifically configured to perform an exclusive OR operation on the key stream generated by the generating unit 401 and a part of the data to be encrypted in the initial layer 3 message, to generate an initial layer 3 message in which partial data is encrypted. .
  • FIG. 4b is a schematic diagram of another embodiment of an encryption apparatus according to an embodiment of the present invention.
  • the encryption apparatus 400 further includes:
  • a second setting unit 405 configured to set a value of the length parameter to a variable length value in the initial layer 3 message, where the length parameter is an input parameter of an evolved packet system encryption algorithm;
  • the generating unit 401 is specifically configured to generate a key stream by using the length parameter set by the second setting unit 405 as an input parameter by using the evolved packet system encryption algorithm;
  • the encryption device 400 further includes:
  • the first format processing unit 406 is configured to acquire, according to the format of the initial layer 3 message and the length of the part of data to be encrypted, a start bit and a stop bit of the data to be encrypted in the initial layer 3 message, a bit in the key stream corresponding to the start bit to the end bit, and other than the start bit to the end bit in the key stream The bit position is changed to zero.
  • the processing unit 402 is specifically configured to perform an exclusive OR operation on the key stream processed by the first format processing unit 406 and the variable in the initial layer 3 message to generate an initial layer 3 in which partial data is encrypted. Message.
  • FIG. 4c is a schematic diagram of another embodiment of an encryption apparatus according to an embodiment of the present invention.
  • the encryption apparatus 400 further includes:
  • the third setting unit 407 is configured to set a value of the length parameter to a length value of the initial layer 3 message, where the length parameter is an input parameter of an evolved packet system encryption algorithm.
  • the generating unit 401 is specifically configured to generate a key stream by using the evolving packet system encryption algorithm by using the length parameter set by the third setting unit 407 as an input parameter.
  • the encryption device 400 further includes:
  • the second format processing unit 408 is configured to obtain, according to the format of the initial layer 3 message and the length of the part of data to be encrypted, a start bit and a stop bit of the data to be encrypted in the initial layer 3 message, Translating, in the key stream, a bit corresponding to the start bit to the end bit, and replacing other bit positions in the key stream except the start bit to the end bit to zero.
  • FIG. 4 is a schematic diagram of another embodiment of an encryption apparatus according to an embodiment of the present invention.
  • the encryption apparatus 400 further includes:
  • a fourth setting unit 409 configured to set a value of the length parameter to a variable length value in the initial layer 3 message or a length value of the initial layer 3 message, where the length parameter is an input parameter of an evolved packet system encryption algorithm .
  • the generating unit 401 is specifically configured to generate a key stream by using the length parameter set by the setting unit as an input parameter by using the evolved packet system encryption algorithm.
  • the encryption device 400 further includes:
  • the third format processing unit 410 is configured to truncate the generated key stream according to the length of the part of data to be encrypted, the length of the truncated key stream and part of the initial layer 3 message to be encrypted The length of the data is the same.
  • the processing unit 402 is specifically configured to perform an exclusive OR operation on the key stream processed by the format processing unit and a part of the data to be encrypted in the initial layer 3 message, to generate an initial layer 3 in which partial data is encrypted. Message.
  • the initial layer 3 message is a tracking area update request message TAU. Request , or a new initial layer 3 message.
  • the key stream is used to encrypt part of the data to be encrypted in the initial layer 3 message, and the part of the data to be encrypted includes small data
  • the key stream is
  • the initial layer 3 message performs an exclusive OR operation to generate an initial layer 3 message in which partial data is encrypted, and sends an initial layer 3 message in which the partial data is encrypted
  • the initial layer 3 message includes an added encryption indication.
  • the encryption indication is used to identify that part of the data to be encrypted in the initial layer 3 message is encrypted. Therefore, partial data encryption can be performed on the initial layer 3 message, thereby avoiding the problem that the initial layer 3 message cannot be confidentially protected in the prior art, thereby ensuring the secure transmission of the small data.
  • FIG. 5 is a schematic diagram of an embodiment of a decryption apparatus according to an embodiment of the present invention.
  • the decryption apparatus 500 includes:
  • the transmitting unit 501 is configured to receive an initial layer 3 message that is partially encrypted, where the initial layer 3 message includes an added encryption indication, where the encryption indication is used to identify that part of the data to be encrypted in the initial layer 3 message is encryption.
  • a generating unit 502 configured to generate a key stream according to the added encryption indication in the initial layer 3 message, where the key stream is used to decrypt part of the encrypted data in the initial layer 3 message,
  • the partially encrypted data includes small data.
  • the processing unit 503 performs an exclusive OR operation on the key stream with the initial layer 3 message to generate an initial layer 3 message in which partial data is decrypted.
  • FIG. 5a is a schematic diagram of another embodiment of a decryption apparatus according to an embodiment of the present invention.
  • the embodiment shown in FIG. 5a is a further refinement of the embodiment shown in FIG. 5.
  • the decryption apparatus 500 includes: a first setting unit 504. And a value for setting a length parameter to a length value of the partially encrypted data in the initial layer 3 message, where the length parameter is an input parameter of an evolved packet system encryption algorithm.
  • the generating unit 502 is specifically configured to generate a key stream by using the evolving packet system encryption algorithm by using the length parameter set by the first setting unit 504 as an input parameter.
  • the processing unit 503 is specifically configured to perform an exclusive OR operation on the key stream generated by the generating unit and the partially encrypted data in the initial layer 3 message to generate an initial layer 3 message in which partial data is decrypted.
  • FIG. 5b is a schematic diagram of another embodiment of a decryption apparatus according to an embodiment of the present invention.
  • the embodiment shown in FIG. 5b is further refined from the embodiment shown in FIG. 5.
  • the decryption apparatus 500 further includes:
  • the second setting unit 505 is configured to set a value of the length parameter to a variable length value in the initial layer 3 message, where the length parameter is an input parameter of an evolved packet system encryption algorithm.
  • the generating unit 502 is specifically configured to generate a key stream by using the length parameter set by the second setting unit 505 as an input parameter by using the evolved packet system encryption algorithm.
  • the decryption device 500 further includes:
  • the first format processing unit 506 is configured to acquire, according to the format of the initial layer 3 message and the length of the partially encrypted data, start bit and end bit of the encrypted data in the initial layer 3 message, Translating, in the key stream, a bit corresponding to the start bit to the end bit, and replacing other bit positions in the key stream except the start bit to the end bit to zero.
  • the processing unit 503 is specifically configured to perform an exclusive OR operation on the key stream processed by the first format processing unit 506 and the variable in the initial layer 3 message to generate an initial layer 3 message in which partial data is decrypted.
  • FIG. 5 is a schematic diagram of another embodiment of a decryption apparatus according to an embodiment of the present invention.
  • the embodiment shown in FIG. 5c is further refined from the embodiment shown in FIG. 5.
  • the decryption apparatus 500 further includes: a third setting unit 507. And configured to set a value of the length parameter to a length value of the initial layer 3 message, where the length parameter is an input parameter of an evolved packet system encryption algorithm.
  • the generating unit 502 is specifically configured to generate a key stream by using the length parameter set by the third setting unit 507 as an input parameter by using the evolved packet system encryption algorithm.
  • the decryption device 500 further includes:
  • the second format processing unit 508 is configured to obtain, according to the format of the initial layer 3 message and the length of the partially encrypted data, start bit and end bit of the encrypted data in the initial layer 3 message, Translating, in the key stream, a bit corresponding to the start bit to the end bit, and replacing other bit positions in the key stream except the start bit to the end bit to zero.
  • FIG. 5 is a schematic diagram of another embodiment of a decryption apparatus according to an embodiment of the present invention.
  • the embodiment shown in FIG. 5d is further refined from the embodiment shown in FIG. 5.
  • the decryption apparatus 500 further includes: a fourth setting unit 509. And configured to set a value of the length parameter to a variable length value in the initial layer 3 message or a length value of the initial layer 3 message, where the length parameter is an input parameter of an evolved packet system encryption algorithm.
  • the generating unit 502 is specifically configured to set a length parameter of the fourth setting unit 509 A key stream is generated by the evolved packet system encryption algorithm as an input parameter.
  • the decryption device 500 further includes:
  • the third format processing unit 510 is configured to truncate the generated key stream according to the length of the partially encrypted data, the length of the truncated key stream and the encrypted part of the initial layer 3 message The length values are the same.
  • the processing unit 503 is specifically configured to perform an exclusive OR operation on the key stream processed by the third format processing unit 510 and a part of the encrypted data in the initial layer 3 message to generate an initial layer in which partial data is decrypted. 3 messages.
  • the apparatus by receiving an initial layer 3 message, in which the partial data is encrypted, the initial layer 3 message includes an added encryption indication, where the encryption indication is used to identify part of the initial layer 3 message to be used.
  • the encrypted data is encrypted, and a key stream is generated according to the added encryption indication in the initial layer 3 message, where the key stream is used to decrypt partially encrypted data in the initial layer 3 message,
  • the partially encrypted data includes small data, and the key stream is XORed with the initial layer 3 message to generate a decrypted initial layer 3 message. Therefore, partial data decryption of the initial layer 3 message can be performed, thereby avoiding the problem that the initial layer 3 message cannot be confidentially protected in the prior art, thereby ensuring secure transmission of small data.
  • the initial layer 3 message part data has been encrypted, so the initial layer 3 message needs to be decrypted, and then generated for the initial layer 3 message.
  • the key stream for decrypting the partially encrypted data, and finally obtaining the decrypted initial layer 3 message by the exclusive OR operation provides confidentiality protection for some of the data to be encrypted in the initial layer 3 message.
  • the medium can be a read only memory, a magnetic disk or a compact disk or the like.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

本发明实施例公开了一种加密方法、解密方法与相关装置,本发明能够保证小数据的安全传输。其中,加密方法包括:生成密钥流,所述密钥流用于对初始层3消息中部分待加密数据进行加密,所述部分待加密数据包括小数据;将所述密钥流与所述初始层3消息进行异或运算,生成部分数据被加密后的初始层3消息,发送所述部分数据被加密后的初始层3消息,所述初始层3消息中包括增加的加密指示,所述加密指示用于标识所述初始层3消息中部分待加密数据被加密,以使得网络侧根据所述增加的加密指示生成密钥流,再根据生成的密钥流对部分数据被加密后的初始层3消息进行解密。

Description

一种加密方法、 解密方法和相关装置 本申请要求于 2011 年 10 月 27 日提交中国专利局、 申请号为 201110331957.0、 发明名称为"一种加密方法, 解密方法和相关装置"的中国 专利申请的优先权, 其全部内容通过引用结合在本申请中。 技术领域 本发明涉及无线通讯技术领域, 尤其涉及一种加密方法、 解密方法和 相关装置。
背景技术 机器对机器 (英文全称为 Machine to Machine, 简称: M2M )技术是无 线通信和信息技术的整合, 是指无需人工干预, 在机器与机器之间直接进 行的通信技术。
M2M通信也称机器类通信 (英文全称为 Machine Type Communication, 简称: MTC ), M2M通信系统与传统的人对人(英文全称为 Human to Human, 简称: H2H )通信系统有很大不同, M2M通信系统由于其设备数量巨大、 低移动性、 通信流量小等特点, 具有机器类通信的很多特性。 在目前的第 三代合作伙伴计戈 (英文全称为 The 3rd Generation Partnership Project, 简 称: 3GPP )标准中将 M2M通信系统称为 MTC通信系统, 并在小数据传输 情况下开始利用短消息业务(英文全称为 Short Message Service,简称: SMS ) 或者网络协议(英文全称为 Internet Protocol, 简称: IP )数据包实现机器与 机器之间的通信。
当 SMS小数据或者 IP数据包小数据封装在 TAU request或者新的初始 层 3消息中时, 如何对初始层 3消息中的小数据部分以及其他需要保护的 参数提供机密性保护。 发明内容 本发明实施例提供了一种加密方法、 解密方法和相关装置, 用于对初 始层 3消息中部分待加密的数据提供机密性保护。
一方面, 本发明实施例提供了一种加密方法, 包括:
生成密钥流, 所述密钥流用于对初始层 3 消息中部分待加密数据进行 加密, 所述部分待加密数据包括小数据; 将所述密钥流与所述初始层 3 消 息进行异或运算, 生成部分数据被加密后的初始层 3消息;
发送所述部分数据被加密后的初始层 3消息, 所述初始层 3消息中包 括增加的加密指示, 所述加密指示用于标识所述初始层 3 消息中部分待加 密数据被加密, 以使得网络侧根据所述增加的加密指示生成密钥流, 再根 据生成的密钥流对部分数据被加密后的初始层 3消息进行解密。
一方面, 本发明实施例提供了一种解密的方法, 包括:
接收部分数据被加密后的初始层 3消息, 所述所述初始层 3消息中包 括增加的加密指示, 所述加密指示用于标识所述初始层 3 消息中部分待加 密数据被加密;
才艮据所述初始层 3 消息中的所述增加的加密指示, 生成密钥流, 所述 密钥流用于对所述初始层 3 消息中部分被加密数据进行解密, 所述部分被 加密数据包括小数据;
将所述密钥流与所述初始层 3 消息进行异或运算, 生成部分数据被解 密后的初始层 3消息。
另一方面, 本发明实施例提供了一种加密装置, 包括:
生成单元, 用于生成密钥流, 所述密钥流用于对初始层 3 消息中部分 待加密数据进行加密, 所述部分待加密数据包括小数据;
处理单元, 用于将所述生成单元生成的密钥流与所述初始层 3 消息进 行异或运算, 生成部分数据被加密后的初始层 3消息;
传输单元, 用于发送所述处理单元处理后的部分数据被加密后的初始 层 3消息, 所述初始层 3消息中包括增加的加密指示, 所述加密指示用于 标识所述初始层 3消息中部分待加密数据被加密。
另一方面, 本发明实施例提供了一种解密装置, 包括:
传输单元, 用于接收部分数据被加密后的初始层 3消息, 所述初始层 3 消息中包括增加的加密指示, 所述加密指示用于标识所述初始层 3 消息中 部分待加密数据被加密;
生成单元, 用于才艮据所述初始层 3 消息中的所述增加的加密指示, 生 成密钥流, 所述密钥流用于对所述初始层 3 消息中部分被加密数据进行解 密, 所述部分被加密数据包括小数据;
处理单元, 将所述密钥流与所述初始层 3 消息进行异或运算, 生成部 分被解密后的初始层 3消息。
从以上技术方案可以看出, 本发明实施例具有以下优点:
本发明实例通过生成密钥流, 所述密钥流用于对初始层 3 消息中部分 待加密数据进行加密, 所述部分待加密数据包括小数据, 将所述密钥流与 所述初始层 3消息进行异或运算, 生成部分数据被加密后的初始层 3消息, 发送所述部分数据被加密后的初始层 3消息, 所述初始层 3消息中包括增 加的加密指示, 所述加密指示用于标识所述初始层 3 消息中部分待加密数 据被加密。 从而能够对初始层 3 消息进行部分数据加密, 避免现有技术中 不能对初始层 3 消息进行机密性保护的问题, 从而保证了小数据的安全传 输。
附图说明 为了更清楚地说明本发明实施例中的技术方案, 下面将对实施例描述 中所需要使用的附图作简单地介绍, 显而易见地, 下面描述中的附图仅仅 是本发明的一些实施例, 对于本领域的技术人员来讲, 还可以根据这些附 图获得其他的附图。
图 1为本发明实施例提供的一种加密方法的一个实施例示意图; 图 2为本发明实施例提供的一种加密方法的另一个实施例示意图; 图 3为本发明实施例提供的一种解密方法的一个实施例示意图; 图 4为本发明实施例提供的一种加密装置的一个实施例示意图; 图 4a为本发明实施例提供的一种加密装置的另一个实施例示意图; 图 4b为本发明实施例提供的一种加密装置的另一个实施例示意图; 图 4c为本发明实施例提供的一种加密装置的另一个实施例示意图; 图 4d为本发明实施例提供的一种加密装置的另一个实施例示意图; 图 5为本发明实施例提供的一种解密装置的一个实施例示意图; 图 5a为本发明实施例提供的一种解密装置的另一个实施例示意图; 图 5b为本发明实施例提供的一种解密装置的另一个实施例示意图。 图 5c为本发明实施例提供的一种解密装置的另一个实施例示意图; 图 5d为本发明实施例提供的一种解密装置的另一个实施例示意图。
具体实施方式 本发明实施例提供了一种加密方法、 解密方法和相关装置, 用于对初 始层 3消息中部分待加密的数据提供机密性保护。
为使得本发明的发明目的、 特征、 优点能够更加的明显和易懂, 下面 将结合本发明实施例中的附图, 对本发明实施例中的技术方案进行清楚、 完整地描述, 显然, 下面所描述的实施例仅仅是本发明一部分实施例, 而 非全部实施例。 基于本发明中的实施例, 本领域的技术人员所获得的所有 其他实施例, 都属于本发明保护的范围。
在现有技术中存在一种短消息的传输方案中: 对于移动台发起(英文 全称为 Mob i le Or i g ina te , 英文简称: M0 ) 的 SMS小数据或者 IP数据 包小数据传输,上行加密的 SMS小数据或者 IP数据包小数据被封装在跟踪 区域更新请求消息 (英文全称为 Track ing Area Upda te reques t , 英文简 称: TAU request )或者新的初始层 3消息中, 下行加密的 SMS小数据或者 IP数据包小数据被封装在 S1 接口的下行非接入层传输消息 (英文全称为 Down 1 ink NAS transport message, NAS的英文全称为 Non Access Stratum ) 中。 对于移动台接收(英文全称为 Mobile Terminated, 简称: MT ) 的 SMS 小数据或者 IP数据包小数据传输, 下行加密的 SMS小数据或者 IP数据包 小数据被封装在 S1接口的下行非接入层传输消息中, 上行加密的 SMS小数 据或者 IP数据包小数据被封装在 S1 接口的上行非接入层传输消息 (英文 全称为 Uplink NAS transport message ) 中。
在上述小数据传输方案中, S1接口的下行非接入层传输消息和上行非 接入层传输消息中携带的 NAS消息不属于初始层 3消息, 在现有的加密机 制中可以对这些消息进行机密性和完整性保护。 但是对于 TAU request或 者新的初始层 3消息属于初始层 3消息, 按照现有的加密机制中当存在有 效安全上下文时会进行完整性保护, 却不会对这类消息进行机密性保护, 但是按照小数据传输方案的要求却需要对 SMS小数据或者 IP数据包小数据 进行机密性保护, 需要考虑当 SMS小数据或者 IP数据包小数据封装在 TAU request或者新的初始层 3消息中时,如何对初始层 3消息中的小数据部分 以及其他需要保护的参数提供机密性保护。
为了解决上述技术问题, 本发明提供了如下技术方案:
图 1为本发明实施例提供的一种加密方法的一个实施例示意图, 包括: 101、 生成密钥流, 所述密钥流用于对初始层 3消息中部分待加密数据 进行加密, 所述部分待加密数据包括小数据。
102、 将所述密钥流与所述初始层 3消息进行异或运算, 生成部分数据 被加密后的初始层 3消息。
103、 发送所述部分数据被加密后的初始层 3消息, 所述初始层 3消息 中包括增加的加密指示, 所述加密指示用于标识所述初始层 3 消息中部分 待加密数据被加密, 以使得网络侧根据所述增加的加密指示生成密钥流, 再根据生成的密钥流对部分数据被加密后的初始层 3消息进行解密。
本发明实例通过生成密钥流, 所述密钥流用于对初始层 3 消息中部分 待加密数据进行加密, 所述部分待加密数据包括小数据, 将所述密钥流与 所述初始层 3消息进行异或运算, 生成部分数据被加密后的初始层 3消息, 发送所述部分数据被加密后的初始层 3消息, 所述初始层 3消息中包括增 加的加密指示, 所述加密指示用于标识所述初始层 3 消息中部分待加密数 据被加密。 从而能够对初始层 3 消息进行部分数据加密, 避免现有技术中 不能对初始层 3 消息进行机密性保护的问题, 从而保证了小数据的安全传 输。
在本发明实施例中, 3GPP标准的 MTC通信系统通过在 NAS信令中携带 短消息或者 IP数据包实现机器与机器之间的小数据通信, 机器之间通信传 输的数据由于数据量较小, 被称之为小数据, 小数据通常携带在短消息或
IP数据包中。 对于 M0的 SMS小数据或者 IP数据包小数据传输, 通常 SMS 小数据或者 IP数据包小数据被封装在初始层 3层 3消息中, 为了实现对短 消息小数据的部分加密, 本发明实施例中生成的初始层 3 消息中包括增加 的加密指示, 以使网络侧能够识别出初始层 3 消息部分数据被加密, 在接 收端接收到该初始层 3消息之后需要进行解密。 其中初始层 3消息具体可 以包括: 跟踪区域更新请求消息(英文全称为 TAU reques t )或新的初始层 3消息, 在实际应用中短消息小数据或 IP数据包小数据具体携带在哪个消 息中由具体的应用场景决定, 此处不再限定。 需要说明的是, 新的初始层 3 消息为 MTC通信系统新定义的初始层 3消息用于传输小数据。
在实际应用中, 初始层 3 消息中包括增加的加密指示, 一种可实现的 方式是具体可以包括:
在初始层 3 消息中的安全头类型参数中增加完整性保护和部分加密参 数, 将安全头类型参数设定为完整性保护和部分加密参数。
需要说明的是, 现有的安全头类型参数(英文全称为 Security header 完整性保护参数(英文全称为 Integrity protected ), 完整性保护和加密参数 (英文全称为 Integrity protected and ciphered )。 在本发明实施例中, 在 Security header type 中增加一个完整性保护和部分加密参数(英文全称为 Integrity protected and partly ciphered ),用于指示对初始层 3消息中部分待力口 密的数据进行了加密, 增加了完整性保护和部分加密参数之后, 将安全头 类型参数设定为完整性保护和部分加密参数,以网络侧识别出所述初始层 3 消息部分被加密的数据。
在实际应用中, 初始层 3 消息中包括增加的加密指示, 另一种可实现 的方式是具体可以包括: 在初始层 3 消息中增加小数据传输指示, 将安全 头类型参数设定为完整性保护参数。
在实际应用中, 初始层 3 消息中包括增加的加密指示, 另一种可实现 的方式是具体可以包括: 在初始层 3 消息中增加小数据传输指示, 将安全 头类型参数设定为完整性保护和加密参数。
需要说明的是, 在本发明实施例中, 在初始层 3 消息中增加小数据传 输指示, 表示的是初始层 3消息携带了部分被加密的短消息小数据或者 IP 数据包小数据, 需要网络侧在接收到初始层 3 消息后对部分被加密数据进 行解密。
在本发明实施例中, 生成用于对初始层 3 消息中部分待加密的数据进 行加密的密钥流, 本发明实施例中初始层 3 消息中部分待加密的数据包括 小数据, 但并不局限于小数据, 在实际应用中由于小数据是封装在短消息 或者网络之间互连的协议 ( Internet Protocol, IP )数据包中, 而加密是对整 个短消息或 IP数据包进行加密,部分待加密的数据通常包括短消息或 IP数 据包, 但是还包括有短消息报头或 IP报头, 在实际应用中部分待加密的数 据其包括内容由具体的实现场景决定, 此处不做限定。
在本发明实施例中, 生成密钥流具体可以通过演进分组系统加密算法 (英文简称为 EEA, 全称为 EPS Encryption Algorithm, EPS的英文全称为 Evolved Packet System )。 图 2为本发明实施例提供的一种加密方法的另一 个实施例示意图, 例如如图 2 所示, 为数据加密机制, 首先由发送端将明 文和通过 EEA生成的密钥流进行异或实现对明文的加密, 然后接收端接收 到密文后, 通过 EEA生成密钥流, 将密文和生成的密钥流进行异或实现对 密文的解密, 在图 2中:
KEY为加密的密钥参数, 可以为不同用户生成不同的密钥流。
BEARER为无线承载标识参数, 可以为同一用户的不同承载生成不同 的密钥流, 对于 NAS信令来说 BEARER为常量 0x00。
DIRECTION指的是传输方向参数,可以为同一用户的同一承载上不同 传输方向生成不同的密钥流。 对于上行消息, DIRECTION值为 0; 对于下 行消息, DIRECTION值为 1。
COUNT为计数器值参数,可以为同一用户的同一承载上的同一传输方 向上的相同消息生成不同的密钥流。
LENGTH为长度参数, 可以生成与明文长度相同的密钥流, LENGTH 值只会影响密钥流的长度, 不会影响密钥流中的比特。
KEY STREAM BLOCK为生成的密钥流。
PLAIN TEXT BLOCK为部分待加密的数据(即明文)。
CIPHER TEXT BLOCK为生成的密文。
在实际应用中, 生成密钥流, 一种可实现的方式是具体可以包括: 将需要生成的密钥流的长度参数(即 LENGTH ) 的值设定为初始层 3 消息中部分待加密的数据的长度值, 长度参数是演进分组系统加密算法的 输入参数, 将所述长度参数作为输入参数通过所述演进分组系统加密算法 生成密钥流。
需要说明的是, 将密钥流的 LENGTH值设定为初始层 3消息中部分待 加密的数据的长度值, 然后按照 EPS加密算法生成密钥流, 例如初始层 3 消息中部分待加密的数据的长度值为 3比特, 则生成的密钥流中 LENGTH 值就为 3比特。
将所述密钥流与所述初始层 3消息中的部分待加密数据进行异或运算 , 生成部分数据被加密后的初始层 3消息。 例如, 初始层 3消息中的部分待 加密数据的长度值为 3 , 则输入参数 LENGTH值设为 3 , 假设生成的密钥 流是 101 , 初始层 3消息中的部分待加密数据是 110, 那么最终密钥流与初 始层 3消息中的部分待加密数据进行异或后生成的部分被加密数据是 011。
在实际应用中, 生成密钥流, 另一种可实现的方式是具体可以包括: 将需要生成的密钥流的长度参数的值设定为初始层 3 消息中变量长度 值或初始层 3 消息的长度值, 长度参数是演进分组系统加密算法的输入参 数; 将所述长度参数作为输入参数通过所述演进分组系统加密算法生成密 钥流; 根据所述部分待加密数据的长度截短所述生成的密钥流, 所述截短 的密钥流的长度与所述初始层 3消息中部分待加密的数据的长度值相同。
生成部分数据被加密后的初始层 3 消息的一种实现方式为: 将所述密 钥流与所述初始层 3 消息中的部分待加密数据进行异或运算, 生成部分数 据被加密后的初始层 3消息。
需要说明的是, 将密钥流的输入参数 LENGTH值设定为初始层 3消息 的长度值或者初始层 3消息的变量长度值(但初始层 3消息的变量长度要 大于部分待加密的数据的长度, 初始层 3 消息的长度值也大于部分待加密 的数据的长度), 然后按照 EPS加密算法生成密钥流, 由于只需要对初始层 3消息中部分待加密的数据进行加密,故生成密钥流之后对该密钥流进行截 短, 截短后的密钥流长度与初始层 3 消息中部分待加密的数据长度相同, 在对密钥流进行截短时既可以从最高位开始至最低位的方式进行截短, 也 可以从最低位开始至最高位的方式进行截短, 或者根据其他截短规则, 在 实际应用中可以根据具体的实现场景而决定, 此处不作限定。 例如, 初始 层 3消息的长度值或者初始层 3消息的变量长度值为 9, 则将 LENGTH值 设为 9, 假设生成的密钥流是 111010100, 初始层 3消息中的部分待加密数 据的长度是 5 ,那么根据从最高位开始至最低位的方式对生成的密钥流进行 截短, 截短后的密钥流是 11101 , 假设初始层 3 消息中部分待加密数据是 00110, 那么最终截短后的密钥流与初始层 3消息中的部分待加密数据进行 异或后生成的部分被加密数据是 11011。
需要说明的是, 若初始层 3消息的变量长度值等于待加密部分的长度, 请参照前述 "将需要生成的密钥流的长度参数(即 LENGTH ) 的值设定为 初始层 3消息中部分待加密的数据的长度值" 的描述, 此处不再赘述。
在实际应用中, 生成密钥流, 另一种可实现的方式是具体可以包括: 将需要生成的密钥流的 LENGTH 的值设定为初始层 3 消息的长度值 (初始层 3消息的长度值大于部分待加密的数据的长度), 将所述长度参数 作为输入参数通过所述演进分组系统加密算法生成密钥流, 根据初始层 3 消息的格式与部分待加密的数据的长度获取初始层 3 消息中部分待加密的 数据的起始比特位和终止比特位, 保留密钥流中与起始比特位至终止比特 位相对应的比特位, 将所述密钥流中的除所述起始比特位至终止比特位之 外的其它比特位置换为零。
需要说明的是, 将密钥流的 LENGTH的值设定为初始层 3消息的长度 值, 然后按照 EPS加密算法生成密钥流, 由于只对初始层 3消息中部分待 加密的数据进行加密, 故生成密钥流之后可以获取初始层 3 消息中部分待 加密的数据的起始比特位和终止比特位, 然后保留密钥流中与起始比特位 至终止比特位相对应的比特位, 将密钥流中除所述起始比特位至终止比特 位之外的的其它比特位置换为零, 相当于只对初始层 3 消息中部分待加密 的数据进行加密。 例如, 初始层 3消息的长度值是 17, 那么 LENGTH参数 设为 17,假设生成的密钥流为 01011010100111001 ,在初始层 3消息中部分 待加密的数据其起始比特位为第 4位, 部分待加密的数据其终止比特位为 第 8位, 则对于密钥流而言, 需要保留生成的密钥流中从第 4位开始至第 8 位的比特位 (即将比特位 11010保留 ), 而将密钥流中的其它比特位置换为 零, 则最终与初始层 3消息进行异或运算的密钥流为 00011010000000000。 殳设初始层 3消息为 11111010000000111 , 那么生成的部分数据被加密后的 初始层 3消息为 11100000000000111。
在实际应用中, 生成密钥流, 另一种可实现的方式是具体可以包括: 将需要生成的密钥流的 LENGTH 的值设定为初始层 3 消息的变量长度值 (但变量部分长度要大于部分待加密的数据的长度 ), 将所述长度参数作为 输入参数通过所述演进分组系统加密算法生成密钥流, 才艮据初始层 3 消息 的格式与部分待加密的数据的长度获取初始层 3 消息中部分待加密的数据 的起始比特位和终止比特位, 保留密钥流中与起始比特位至终止比特位相 对应的比特位, 将所述密钥流中的除所述起始比特位至终止比特位之外的 其它比特位置换为零。 生成部分数据被加密后的初始层 3 消息的一种实现 方式为: 所述将所述密钥流与所述初始层 3 消息中的变量进行异或运算, 生成部分数据被加密后的初始层 3消息。
需要说明的是, 将密钥流的 LENGTH的值设定为初始层 3消息的变量 长度值, 然后按照 EPS加密算法生成密钥流, 由于只对初始层 3消息中部 分待加密的数据进行加密, 故生成密钥流之后可以获取初始层 3 消息中部 分待加密的数据的起始比特位和终止比特位, 然后保留密钥流中与起始比 特位至终止比特位相对应的比特位, 将密钥流中的其它比特位置换为零, 相当于只对初始层 3 消息中部分待加密的数据进行加密。 例如, 4叚设生成 的密钥流为 01011010100111001 ,在初始层 3消息中部分待加密的数据其起 始比特位为第 4位, 部分待加密的数据其终止比特位为第 8位, 则对于密 钥流而言, 需要保留生成的密钥流中从第 4位开始至第 8位的比特位(即 将比特位 11010保留), 而将密钥流中的其它比特位置换为零, 则最终与初 始层 3消息的变量部分进行异或运算的密钥流为 00011010000000000。假设 初始层 3消息的变量部分为 11111010000000111 , 那么加密后的变量部分为 11100000000000111。
在本发明实施例中, 通过步骤 101 生成密钥流之后, 将该密钥流与初 始层 3消息或初始层 3消息的变量或者初始层 3消息的部分待加密的数据 进行异或运算, 就可以得到部分数据被加密后的初始层 3 消息。 例如, 如 图 1所示, 在发送端, 将 PLAIN TEXT BLOCK与 KEY STREAM BLOCK进行异 或运算, 就可以得到 CIPHER TEXT BL0CK。 同样, 对于接收端, 在接收到 CIPHER TEXT BLOCK之后, 将 CIPHER TEXT BLOCK与 KEY STREAM BLOCK进 行异或运算之后, 就可以解密出 PLAIN TEXT BL0CK。
在本发明实施例中, 初始层 3 消息中包括增加的加密指示, 以使网络 侧在接收到初始层 3消息后获知该初始层 3消息部分数据被加密, 然后生 成用于对初始层 3 消息中部分待加密的数据进行加密的密钥流, 最后通过 异或运算得到部分数据被加密后的初始层 3消息, 实现了对初始层 3消息 中部分待加密的数据提供机密性保护。
以上实施例介绍了本发明实施例提供的加密的方法, 接下来介绍本发 明实施例提供的解密的方法, 图 3 为本发明实施例提供的一种解密方法的 一个实施例示意图, 请参阅图 3所示, 包括:
301、 接收部分数据被加密后的初始层 3消息, 所述初始层 3消息中包 括增加的加密指示, 所述加密指示用于标识所述初始层 3 消息中部分待加 密数据被加密;
302、 才艮据所述初始层 3消息中的所述增加的加密指示, 生成密钥流, 所述密钥流用于对所述初始层 3 消息中部分被加密数据进行解密, 所述部 分被加密数据包括小数据;
303、 将所述密钥流与所述初始层 3消息进行异或运算, 生成部分数据 被解密后的初始层 3消息。
本发明实施例通过接收部分数据被加密后的初始层 3 消息, 所述初始 层 3消息中包括增加的加密指示, 所述加密指示用于标识所述初始层 3消 息中部分待加密数据被加密, 根据所述初始层 3 消息中的所述增加的加密 指示, 生成密钥流, 所述密钥流用于对所述初始层 3 消息中部分被加密的 数据进行解密, 所述部分被加密数据包括小数据, 将所述密钥流与所述初 始层 3消息进行异或运算, 生成解密后的初始层 3消息。 从而能够对初始 层 3消息进行部分数据解密, 避免现有技术中不能对初始层 3消息进行机 密性保护的问题, 从而保证了小数据的安全传输。
在本发明实施例中, 对于 MTC通信系统的接收端, 在接收到 MTC通 信系统中的发送端发送的部分数据被加密的初始层 3 消息后, 接收端根据 初始层 3消息中的增加的加密指示, 获取到初始层 3消息部分数据已经被 加密。
在实际应用中, 才艮据初始层 3 消息中的增加的加密指示获取初始层 3 消息部分数据已经被加密, 一种可实现的方式是:
根据初始层 3消息中的完整性保护和部分加密参数, 获取初始层 3消 息部分数据已经被加密。
需要说明的是, 如果初始层 3 消息中的安全头类型参数被设置为完整 性保护和部分加密参数, 则可以获知该初始层 3 消息部分数据已经被加密 了。
在实际应用中, 才艮据初始层 3 消息中的增加的加密指示获取初始层 3 消息部分数据已经被加密, 另一种可实现的方式是:
根据初始层 3 消息中的小数据传输指示和完整性保护参数, 获取初始 层 3消息部分数据已经被加密。
或, 根据初始层 3消息中的小数据传输指示和完整性保护和加密参数, 获取初始层 3消息部分数据已经被加密。
即, 若在初始层 3消息中存在小数据传输指示, 则无论初始层 3消息 中的安全头类型参数被设定为完整性保护参数, 还是被设定为完整性保护 和加密参数, 都可以获知该初始层 3消息部分数据已经被加密。
在本发明实施例中, 在获取到初始层 3 消息中部分数据已经被加密之 后, 生成用于对初始层 3 消息中部分被加密的数据进行解密的密钥流, 本 发明实施例中初始层 3 消息中部分被加密的数据包括小数据, 但并不局限 于小数据, 在实际应用中由于小数据是封装在短消息或者 IP数据包中, 而 加密是对整个短消息或 IP数据包进行加密, 加密的部分通常包括短消息或 IP数据包, 但是还包括有短消息报头或 IP报头。
在实际应用中, 生成密钥流, 一种可实现的方式是具体可以包括: 将需要生成的密钥流的长度参数(即 LENGTH ) 的值设定为初始层 3 消息中部分被加密的数据的长度值, 长度参数是演进分组系统加密算法的 输入参数; 将所述长度参数作为输入参数通过所述演进分组系统加密算法 生成密钥流。
需要说明的是, 将密钥流的 LENGTH的值设定为初始层 3消息中部分 被加密的数据长度值, 然后按照 EPS加密算法生成密钥流, 例如初始层 3 消息中加密的部分的长度值为 3比特, 则生成的密钥流中 LENGTH的值就 为 3比特。
生成部分数据被解密后的初始层 3 消息一种实现方式可以包括: 将所 述密钥流与所述初始层 3 消息中的部分被加密数据进行异或运算, 生成部 分数据被解密后的初始层 3消息。 例如, 初始层 3消息中的部分被加密数 据的长度值为 3 , 则将 LENGTH值设为 3 , 假设生成的密钥流是 101 , 初始 层 3消息中的部分被加密数据是 011 ,那么最终密钥流与初始层 3消息中的 部分被加密数据进行异或后生成的解密后数据是 110。
在实际应用中, 生成密钥流, 另一种可实现的方式是具体可以包括: 将长度参数的值设定为初始层 3消息中变量长度值或初始层 3消息的长度 值, 长度参数是演进分组系统加密算法的输入参数; 将所述长度参数作为 输入参数通过所述演进分组系统加密算法生成密钥流; 根据所述部分被加 密数据的长度截短所述生成的密钥流, 所述截短的密钥流的长度与所述初 始层 3消息中被加密的部分的长度值相同。
生成部分数据被解密后的初始层 3 消息一种实现方式可以包括: 将所 述密钥流与所述初始层 3 消息中的部分被加密数据进行异或运算, 生成部 分数据被解密后的初始层 3消息。
需要说明的是, 将密钥流的 LENGTH值设定为初始层 3消息的长度值 或者初始层 3 消息的变量长度值(但变量部分长度要大于部分待加密的数 据的长度, 初始层 3消息的长度值也大于部分待加密的数据的长度), 然后 按照 EPS加密算法生成密钥流, 由于只需要对初始层 3消息中加密的部分 进行解密, 故生成密钥流之后对该密钥流的长度进行截短, 与初始层 3 消 息中部分被加密的数据长度相同, 在对密钥流进行截短时既可以从最高位 开始至最低位的方式进行截短, 也可以从最低位开始至最高位的方式进行 截短, 或者根据其他截短规则, 在实际应用中可以根据具体的实现场景而 决定, 此处不作限定。 例如, 初始层 3消息的长度值或者初始层 3消息的 变量长度值为 9,则将 LENGTH值设为 9,假设生成的密钥流是 111010100 , 初始层 3消息中的部分被加密数据的长度是 5 ,那么根据从最高位开始至最 低位的方式对生成的密钥流进行截短, 截短后的密钥流是 11101 , 假设初始 层 3消息中部分被加密数据是 11011 , 那么最终截短后的密钥流与初始层 3 消息中的部分被加密数据进行异或后生成的解密数据是 00110。
在实际应用中, 生成密钥流, 另一种可实现的方式是具体可以包括: 将长度参数的值设定为初始层 3消息的长度值(初始层 3消息的长度 值大于部分被加密的数据的长度 ), 将所述长度参数作为输入参数通过所述 演进分组系统加密算法生成密钥流, 根据所述初始层 3 消息的格式与所述 部分被加密数据的长度获取所述初始层 3 消息中被加密数据的起始比特位 和终止比特位, 保留所述密钥流中与所述起始比特位至所述终止比特位相 对应的比特位, 将所述密钥流中的除所述起始比特位至终止比特位之外的 其它比特位置换为零。
需要说明的是, 将密钥流的 LENGTH的值设定为初始层 3消息的长度 值, 然后按照 EPS加密算法生成密钥流, 由于只对初始层 3消息中部分被 加密的数据进行解密, 故生成密钥流之后可以获取初始层 3 消息中部分被 加密的数据的起始比特位和终止比特位, 然后保留密钥流中与起始比特位 至终止比特位相对应的比特位, 将密钥流中的其它比特位置换为零, 相当 于只对初始层 3消息中部分被加密的数据进行解密。 例如, 初始层 3消息 的长度值是 17 , 那么 LENGTH 参数设为 17 , 假设生成的密钥流为 01011010100111001 , 在初始层 3消息中部分被加密的数据其起始比特位为 第 4位, 部分被加密的数据其终止比特位为第 8位, 则对于密钥流而言, 需要保留生成的密钥流中从第 4 位开始至第 8 位的比特位(即将比特位 11010保留), 而将密钥流中的其它比特位置换为零, 则最终与部分数据被 加密的初始层 3消息进行异或运算的密钥流为 00011010000000000。假设部 分数据被加密的初始层 3消息为 11100000000000111 ,那么解密后的初始层 3消息为 11111010000000111。 在实际应用中, 生成密钥流, 另一种可实现 的方式是具体可以包括:
将长度参数的值设定为初始层 3消息的变量长度值(初始层 3消息的 变量长度值大于部分被加密的数据的长度 ), 所述长度参数是演进分组系统 加密算法的输入参数, 将所述长度参数作为输入参数通过所述演进分组系 统加密算法生成密钥流, 根据所述初始层 3 消息的格式与所述部分被加密 数据的长度获取所述初始层 3 消息中被加密数据的起始比特位和终止比特 位, 保留所述密钥流中与所述起始比特位至所述终止比特位相对应的比特 位, 将所述密钥流中的除所述起始比特位至终止比特位之外的其它比特位 置换为零。
生成部分数据被解密后的初始层 3 消息一种实现方式可以为, 所述将 所述密钥流与所述初始层 3 消息中的变量进行异或运算, 生成部分数据被 解密后的初始层 3消息。
需要说明的是, 将密钥流的 LENGTH的值设定为初始层 3消息的变量长 度值, 然后按照 EPS加密算法生成密钥流, 由于只对初始层 3消息中部分 被加密的数据进行解密, 故生成密钥流之后可以获取初始层 3 消息中部分 被加密的数据的起始比特位和终止比特位, 然后保留密钥流中与起始比特 位至终止比特位相对应的比特位, 将密钥流中的其它比特位置换为零, 相 当于只对初始层 3消息中部分被加密的数据进行解密。 例如, 初始层 3消 息的变量长度值是 17 , 那么 LENGTH 参数设为 17 , 假设生成的密钥流为 010110101 00111001 , 在初始层 3消息中部分被加密的数据其起始比特位为 第 4位, 部分被加密的数据其终止比特位为第 8位, 则对于密钥流而言, 需要保留生成的密钥流中从第 4 位开始至第 8 位的比特位(即将比特位 11010保留), 而将密钥流中的其它比特位置换为零, 则最终与部分数据被 加密的初始层 3消息的变量进行异或运算的密钥流为 00011010000000000。 假设初始层 3 消息的变量为 1110000000000011 1 , 那么解密后的变量为 111110100000001 11。 在本发明实施例中, 将该密钥流与初始层 3消息或初 始层 3消息的变量部分或者初始层 3消息的加密的部分进行异或运算, 就 可以得到解密的初始层 3消息。例如,如图 1所示,在接收端,将 C IPHER TEXT BLOCK与 KEY STREAM BLOCK进行异或运算, 就可以得到 PLAIN TEXT BL0CK。
在本发明实施例中, 根据初始层 3 消息中的增加的加密指示获取该初 始层 3消息部分数据已经被加密, 故需要对初始层 3消息中部分被加密的 数据进行解密, 然后生成用于对初始层 3 消息中部分被加密的数据进行解 密的密钥流, 最后通过异或运算得到解密的初始层 3 消息, 实现了对初始 层 3消息中加密的部分提供机密性保护。
以上实施例介绍了本发明实施例提供的加密方法和解密方法, 接下来 介绍本发明实施例提供的加密装置和解密装置, 本发明实施例提供的加密 装置和解密装置具体可以应用在 MTC通信系统中。 MTC通信系统的应用种类 丰富, 包括但不限于以下五大应用: 自动仪表(例如水电气表)、远程监控、 工业安全与家庭自动化、 支付系统(自动拒员机、 支持终端和停车计时收费 表等) 以及车辆远程控制 (如车队管理、 过路费收费、 车辆恢复以及根据 驾驶情况支付保费等), 而车载应用则包括免提、远程通信系统、 内置导航、 紧急呼叫、 远程诊断和内置报警等。
本发明实施例提供的加密的装置, 图 4 为本发明实施例提供的一种加 密装置的一个实施例示意图, 如图 4所示, 加密装置 400, 包括:
生成单元 401 , 用于生成密钥流, 所述密钥流用于对初始层 3消息中部 分待加密数据进行加密, 所述部分待加密数据包括小数据。
处理单元 402 , 用于将所述密钥流与所述初始层 3消息进行异或运算, 生成部分数据被加密后的初始层 3消息。
传输单元 403 ,用于发送所述处理单元处理后的部分数据被加密后的初 始层 3消息, 所述初始层 3消息中包括增加的加密指示, 所述加密指示用 于标识所述初始层 3消息中部分待加密数据被加密。
图 4a为本发明的一个装置实施例, 该实施例是图 4所示的实施例进一 步细化, 所述装置 400还包括:
第一设置单元 404 ,用于将长度参数的值设定为所述初始层 3消息中所 述部分待加密数据的长度值, 所述长度参数为演进分组系统加密算法的输 入参数。
其中, 所述生成单元 401具体用于将所述第一设置单元 404设置的长 度参数作为输入参数通过所述演进分组系统加密算法生成密钥流。
其中, 所述处理单元 402具体用于将所述生成单元 401生成的密钥流 与所述初始层 3 消息中的部分待加密数据进行异或运算, 生成部分数据被 加密后的初始层 3消息。
图 4b为本发明实施例提供的一种加密装置的另一个实施例示意图, 所 述加密装置 400还包括:
第二设置单元 405 ,用于将长度参数的值设定为所述初始层 3消息中变 量长度值, 所述长度参数是演进分组系统加密算法的输入参数;
其中, 所述生成单 401具体用于将所述第二设置单元 405设置的长度 参数作为输入参数通过所述演进分组系统加密算法生成密钥流;
所述加密装置 400还包括:
第一格式处理单元 406,用于根据所述初始层 3消息的格式与所述部分 待加密数据的长度获取所述初始层 3 消息中待加密数据的起始比特位和终 止比特位, 保留所述密钥流中与所述起始比特位至所述终止比特位相对应 的比特位, 将所述密钥流中的除所述起始比特位至终止比特位之外的其它 比特位置换为零。
其中, 所述处理单元 402具体用于将所述第一格式处理单元 406处理 后的密钥流与所述初始层 3 消息中的变量进行异或运算, 生成部分数据被 加密后的初始层 3消息。
图 4c为本发明实施例提供的一种加密装置的另一个实施例示意图, 所 述加密装置 400还包括:
第三设置单元 407 ,用于将长度参数的值设定为所述初始层 3消息的长 度值, 所述长度参数是演进分组系统加密算法的输入参数。
其中, 所述生成单元 401具体用于将所述第三设置单元 407设置的长 度参数作为输入参数通过所述演进分组系统加密算法生成密钥流。
所述加密装置 400还包括:
第二格式处理单元 408,用于根据所述初始层 3消息的格式与所述部分 待加密数据的长度获取所述初始层 3 消息中待加密数据的起始比特位和终 止比特位, 保留所述密钥流中与所述起始比特位至所述终止比特位相对应 的比特位, 将所述密钥流中的除所述起始比特位至终止比特位之外的其它 比特位置换为零。
图 4d为本发明实施例提供的一种加密装置的另一个实施例示意图, 所 述加密装置 400还包括:
第四设置单元 409 ,用于将长度参数的值设定为所述初始层 3消息中变 量长度值或所述初始层 3 消息的长度值, 所述长度参数是演进分组系统加 密算法的输入参数。
其中, 所述生成单元 401 具体用于将所述设置单元设置的长度参数作 为输入参数通过所述演进分组系统加密算法生成密钥流。
所述加密装置 400还包括:
第三格式处理单元 410,用于根据所述部分待加密数据的长度截短所述 生成的密钥流, 所述截短的密钥流的长度与所述初始层 3 消息中部分待加 密的数据的长度值相同。
其中, 所述处理单元 402具体用于将所述格式处理单元处理后的密钥 流与所述初始层 3 消息中的部分待加密数据进行异或运算, 生成部分数据 被加密后的初始层 3消息。
需要说明的是, 所述初始层 3 消息为跟踪区域更新请求消息 TAU request , 或新的初始层 3消息。
釆用本发明的装置, 通过生成密钥流, 所述密钥流用于对初始层 3 消 息中部分待加密数据进行加密, 所述部分待加密数据包括小数据, 将所述 密钥流与所述初始层 3 消息进行异或运算, 生成部分数据被加密后的初始 层 3消息, 发送所述部分数据被加密后的初始层 3消息, 所述初始层 3消 息中包括增加的加密指示, 所述加密指示用于标识所述初始层 3 消息中部 分待加密数据被加密。 从而能够对初始层 3 消息进行部分数据加密, 避免 现有技术中不能对初始层 3 消息进行机密性保护的问题, 从而保证了小数 据的安全传输。
图 5 为本发明实施例提供的一种解密装置的一个实施例示意图, 解密 装置 500 , 包括:
传输单元 501 , 用于接收部分数据被加密后的初始层 3消息, 所述初始 层 3消息中包括增加的加密指示, 所述加密指示用于标识所述初始层 3消 息中部分待加密数据被加密。
生成单元 502 , 用于才艮据所述初始层 3消息中的所述增加的加密指示, 生成密钥流, 所述密钥流用于对所述初始层 3 消息中部分被加密数据进行 解密, 所述部分被加密数据包括小数据。
处理单元 503 , 将所述密钥流与所述初始层 3消息进行异或运算, 生成 部分数据被解密后的初始层 3消息。
图 5a为本发明实施例提供的一种解密装置的另一个实施例示意图, 图 5a所示的实施例为图 5所示实施例的进一步细化, 解密装置 500包括: 第一设置单元 504 ,用于将长度参数的值设定为所述初始层 3消息中所 述部分被加密数据的长度值, 所述长度参数为演进分组系统加密算法的输 入参数。
其中, 所述生成单元 502具体用于将所述第一设置单元 504设置的长 度参数作为输入参数通过所述演进分组系统加密算法生成密钥流。
所述处理单元 503具体用于将所述生成单元生 502成的密钥流与所述 初始层 3 消息中的部分被加密数据进行异或运算, 生成部分数据被解密后 的初始层 3消息。
图 5b为本发明实施例提供的一种解密装置的另一个实施例示意图, 图 5b所示的实施例与图 5所示的实施例进一步细化, 解密装置 500还包括: 第二设置单元 505 ,用于将长度参数的值设定为所述初始层 3消息中变 量长度值, 所述长度参数是演进分组系统加密算法的输入参数。
所述生成单元 502具体用于将所述第二设置单元 505设置的长度参数 作为输入参数通过所述演进分组系统加密算法生成密钥流。
所述解密装置 500还包括:
第一格式处理单元 506 ,用于根据所述初始层 3消息的格式与所述部分 被加密数据的长度获取所述初始层 3 消息中被加密数据的起始比特位和终 止比特位, 保留所述密钥流中与所述起始比特位至所述终止比特位相对应 的比特位, 将所述密钥流中的除所述起始比特位至终止比特位之外的其它 比特位置换为零。
所述处理单元 503具体用于将所述第一格式处理单元 506处理后的密 钥流与所述初始层 3 消息中的变量进行异或运算, 生成部分数据被解密后 的初始层 3消息。
图 5c为本发明实施例提供的一种解密装置的另一个实施例示意图, 图 5c所示的实施例与图 5所示的实施例进一步细化, 解密装置 500还包括: 第三设置单元 507 ,用于将长度参数的值设定为所述初始层 3消息的长 度值, 所述长度参数是演进分组系统加密算法的输入参数。
所述生成单元 502具体用于将所述第三设置单元 507设置的长度参数 作为输入参数通过所述演进分组系统加密算法生成密钥流。
解密装置 500还包括:
第二格式处理单元 508 ,用于根据所述初始层 3消息的格式与所述部分 被加密数据的长度获取所述初始层 3 消息中被加密数据的起始比特位和终 止比特位, 保留所述密钥流中与所述起始比特位至所述终止比特位相对应 的比特位, 将所述密钥流中的除所述起始比特位至终止比特位之外的其它 比特位置换为零。
图 5d为本发明实施例提供的一种解密装置的另一个实施例示意图, 图 5d所示的实施例与图 5所示的实施例进一步细化, 解密装置 500还包括: 第四设置单元 509 ,用于将长度参数的值设定为所述初始层 3消息中变 量长度值或所述初始层 3 消息的长度值, 所述长度参数是演进分组系统加 密算法的输入参数。
所述生成单元 502具体用于将所述第四设置单元 509设置的长度参数 作为输入参数通过所述演进分组系统加密算法生成密钥流。
解密装置 500还包括:
第三格式处理单元 510 ,用于根据所述部分被加密数据的长度截短所述 生成的密钥流, 所述截短的密钥流的长度与所述初始层 3 消息中被加密的 部分的长度值相同。
所述处理单元 503具体用于将所述第三格式处理单元 510处理后的密 钥流与所述初始层 3 消息中的部分被加密数据进行异或运算, 生成部分数 据被解密后的初始层 3消息。
釆用本发明提供的装置, 通过接收部分数据被加密后的初始层 3消息, 所述初始层 3 消息中包括增加的加密指示, 所述加密指示用于标识所述初 始层 3消息中部分待加密数据被加密, 根据所述初始层 3消息中的所述增 加的加密指示, 生成密钥流, 所述密钥流用于对所述初始层 3 消息中部分 被加密的数据进行解密, 所述部分被加密数据包括小数据, 将所述密钥流 与所述初始层 3消息进行异或运算, 生成解密后的初始层 3消息。 从而能 够对初始层 3消息进行部分数据解密, 避免现有技术中不能对初始层 3消 息进行机密性保护的问题, 从而保证了小数据的安全传输。
需要说明的是, 上述装置各模块 /单元之间的信息交互、 执行过程等内 容, 由于与本发明方法实施例基于同一构思, 其带来的技术效果与本发明 方法实施例相同, 具体内容可参见本发明如图 3 所示的方法实施例中的叙 述, 此处不再赘述。
在本发明实施例中, 根据初始层 3 消息中的增加的加密指示获取该初 始层 3消息部分数据已经被加密, 故需要对初始层 3消息进行解密, 然后 生成用于对初始层 3 消息中部分加密数据进行解密的密钥流, 最后通过异 或运算得到解密的初始层 3消息, 实现了对初始层 3消息中部分待加密数 据提供机密性保护。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分步 骤是可以通过程序来指令相关的硬件完成, 所述的程序可以存储于一种计 算机可读存储介质中, 上述提到的存储介质可以是只读存储器, 磁盘或光 盘等。
以上对本发明所提供的一种加密方法、 解密方法和相关装置进行了详 细介绍, 对于本领域的一般技术人员, 依据本发明实施例的思想, 在具体 实施方式及应用范围上均会有改变之处, 综上所述, 本说明书内容不应理 解为对本发明的限制。

Claims

权利要求
1、 一种加密的方法, 其特征在于, 包括:
生成密钥流, 所述密钥流用于对初始层 3 消息中部分待加密数据进行 加密, 所述部分待加密数据包括小数据;
将所述密钥流与所述初始层 3 消息进行异或运算, 生成部分数据被加 密后的初始层 3消息;
发送所述部分数据被加密后的初始层 3消息, 所述初始层 3消息中包 括增加的加密指示, 所述加密指示用于标识所述初始层 3 消息中部分待加 密数据被加密, 以使得网络侧根据所述增加的加密指示生成密钥流, 再根 据生成的密钥流对部分数据被加密后的初始层 3消息进行解密。
2、 根据权利要求 1所述的方法, 其特征在于,
所述生成密钥流包括:
将长度参数的值设定为所述初始层 3 消息中所述部分待加密数据的长 度值, 所述长度参数为演进分组系统加密算法的输入参数;
将所述长度参数作为输入参数通过所述演进分组系统加密算法生成密 钥流;
所述将所述密钥流与所述初始层 3 消息进行异或运算, 生成部分数据 被加密后的初始层 3消息包括:
将所述密钥流与所述初始层 3消息中的部分待加密数据进行异或运算 , 生成部分数据被加密后的初始层 3消息。
3、 根据权利要求 1所述的方法, 其特征在于,
所述生成密钥流包括:
将长度参数的值设定为所述初始层 3 消息中变量长度值, 所述长度参 数是演进分组系统加密算法的输入参数;
将所述长度参数作为输入参数通过所述演进分组系统加密算法生成密 钥流;
根据所述初始层 3 消息的格式与所述部分待加密数据的长度获取所述 初始层 3消息中待加密数据的起始比特位和终止比特位;
保留所述生成密钥流中与所述起始比特位至所述终止比特位相对应的 比特位, 将所述密钥流中的除所述起始比特位至终止比特位之外的其它比 特位置换为零;
所述将所述密钥流与所述初始层 3 消息进行异或运算, 生成部分数据 被加密后的初始层 3消息包括:
将所述密钥流与所述初始层 3 消息中的变量进行异或运算, 生成部分 数据被加密后的初始层 3消息。
4、 根据权利要求 1所述的方法, 其特征在于,
所述生成密钥流包括:
将长度参数的值设定为所述初始层 3 消息的长度值, 所述长度参数是 演进分组系统加密算法的输入参数;
将所述长度参数作为输入参数通过所述演进分组系统加密算法生成密 钥流;
根据所述初始层 3 消息的格式与所述部分待加密数据的长度获取所述 初始层 3消息中待加密数据的起始比特位和终止比特位;
保留所述生成密钥流中与所述起始比特位至所述终止比特位相对应的 比特位, 将所述密钥流中的除所述起始比特位至终止比特位之外的其它比 特位置换为零。
5、 根据权利要求 1所述的方法, 其特征在于,
所述生成密钥流包括:
将长度参数的值设定为所述初始层 3消息中变量长度值或所述初始层 3 消息的长度值, 所述长度参数是演进分组系统加密算法的输入参数;
将所述长度参数作为输入参数通过所述演进分组系统加密算法生成密 钥流;
根据所述部分待加密数据的长度截短所述生成的密钥流, 所述截短的 密钥流的长度与所述初始层 3消息中部分待加密的数据的长度值相同; 所述将所述密钥流与所述初始层 3 消息进行异或运算, 生成部分数据 被加密后的初始层 3消息包括:
将所述密钥流与所述初始层 3消息中的部分待加密数据进行异或运算 , 生成部分数据被加密后的初始层 3消息。
6、 根据权利要求 1至 5中任一项所述的方法, 其特征在于, 所述增加 的加密指示包括: 安全头类型参数中增加的完整性保护和部分加密参数; 或者
增加的小数据传输指示。
7、 根据权利要求 1至 6中任一项所述的方法, 其特征在于, 所述初始 层 3消息为跟踪区域更新请求消息 TAU request, 或新的初始层 3消息。
8、 一种解密的方法, 其特征在于, 包括:
接收部分数据被加密后的初始层 3消息, 所述所述初始层 3消息中包 括增加的加密指示, 所述加密指示用于标识所述初始层 3 消息中部分待加 密数据被加密;
才艮据所述初始层 3 消息中的所述增加的加密指示, 生成密钥流, 所述 密钥流用于对所述初始层 3 消息中部分被加密数据进行解密, 所述部分被 加密数据包括小数据;
将所述密钥流与所述初始层 3 消息进行异或运算, 生成部分数据被解 密后的初始层 3消息。
9、 根据权利要求 8所述的方法, 其特征在于,
所述生成密钥流包括:
将长度参数的值设定为所述初始层 3 消息中所述部分被加密数据的长 度值, 所述长度参数为演进分组系统加密算法的输入参数;
将所述长度参数作为输入参数通过所述演进分组系统加密算法生成密 钥流;
所述将所述密钥流与所述初始层 3 消息进行异或运算, 生成部分数据 被解密后的初始层 3消息包括:
将所述密钥流与所述初始层 3消息中的部分被加密数据进行异或运算, 生成部分数据被解密后的初始层 3消息。
10、 根据权利要求 8所述的方法, 其特征在于,
所述生成密钥流包括:
将长度参数的值设定为所述初始层 3 消息中变量长度值, 所述长度参 数是演进分组系统加密算法的输入参数;
将所述长度参数作为输入参数通过所述演进分组系统加密算法生成密 钥流;
根据所述初始层 3 消息的格式与所述部分被加密数据的长度获取所述 初始层 3消息中被加密数据的起始比特位和终止比特位; 保留所述生成密钥流中与所述起始比特位至所述终止比特位相对应的 比特位, 将所述密钥流中的除所述起始比特位至终止比特位之外的其它比 特位置换为零;
所述将所述密钥流与所述初始层 3 消息进行异或运算, 生成部分数据 被解密后的初始层 3消息包括:
将所述密钥流与所述初始层 3 消息中的变量进行异或运算, 生成部分 数据被解密后的初始层 3消息。
11、 根据权利要求 8所述的方法, 其特征在于,
所述生成密钥流包括:
将长度参数的值设定为所述初始层 3 消息的长度值, 所述长度参数是 演进分组系统加密算法的输入参数;
将所述长度参数作为输入参数通过所述演进分组系统加密算法生成密 钥流;
根据所述初始层 3 消息的格式与所述部分被加密数据的长度获取所述 初始层 3消息中被加密数据的起始比特位和终止比特位;
保留所述生成密钥流中与所述起始比特位至所述终止比特位相对应的 比特位, 将所述密钥流中的除所述起始比特位至终止比特位之外的其它比 特位置换为零。
12、 根据权利要求 8所述的方法, 其特征在于,
所述生成密钥流包括:
将长度参数的值设定为所述初始层 3消息中变量长度值或所述初始层 3 消息的长度值, 所述长度参数是演进分组系统加密算法的输入参数;
将所述长度参数作为输入参数通过所述演进分组系统加密算法生成密 钥流;
根据所述部分被加密数据的长度截短所述生成的密钥流, 所述截短的 密钥流的长度与所述初始层 3消息中被加密的部分的长度值相同;
所述将所述密钥流与所述初始层 3 消息进行异或运算, 生成部分数据 被解密后的初始层 3消息包括:
将所述密钥流与所述初始层 3消息中的部分被加密数据进行异或运算, 生成部分数据被解密后的初始层 3消息。
13、 根据权利要求 8至 12中任一项所述的方法, 其特征在于, 所述增 加的加密指示包括:
安全头类型参数中增加的完整性保护和部分加密参数; 或者
增加的小数据传输指示。
14、 根据权利要求 8至 13中任一项所述的方法, 其特征在于, 所述初 始层 3消息为跟踪区域更新请求消息 TAU request或新的初始层 3消息。
15、 一种加密装置, 其特征在于, 包括:
生成单元, 用于生成密钥流, 所述密钥流用于对初始层 3 消息中部分 待加密数据进行加密, 所述部分待加密数据包括小数据;
处理单元, 用于将所述生成单元生成的密钥流与所述初始层 3 消息进 行异或运算, 生成部分数据被加密后的初始层 3消息;
传输单元, 用于发送所述处理单元处理后的部分数据被加密后的初始 层 3消息, 所述初始层 3消息中包括增加的加密指示, 所述加密指示用于 标识所述初始层 3消息中部分待加密数据被加密。
16、 根据权利要求 15所述的装置, 其特征在于, 所述装置还包括: 第一设置单元, 用于将长度参数的值设定为所述初始层 3 消息中所述 部分待加密数据的长度值, 所述长度参数为演进分组系统加密算法的输入 参数;
所述生成单元具体用于将所述第一设置单元设置的长度参数作为输入 参数通过所述演进分组系统加密算法生成密钥流;
所述处理单元具体用于将所述生成单元生成的密钥流与所述初始层 3 消息中的部分待加密数据进行异或运算,生成部分数据被加密后的初始层 3 消息。
17、 根据权利要求 15所述的装置, 其特征在于, 所述装置还包括: 第二设置单元, 用于将长度参数的值设定为所述初始层 3 消息中变量 长度值, 所述长度参数是演进分组系统加密算法的输入参数;
所述生成单元具体用于将所述第二设置单元设置的长度参数作为输入 参数通过所述演进分组系统加密算法生成密钥流;
所述装置还包括:
第一格式处理单元, 用于根据所述初始层 3 消息的格式与所述部分待 加密数据的长度获取所述初始层 3 消息中待加密数据的起始比特位和终止 比特位; 保留所述生成密钥流中与所述起始比特位至所述终止比特位相对 应的比特位, 将所述密钥流中的除所述起始比特位至终止比特位之外的其 它比特位置换为零;
所述处理单元具体用于将所述第一格式处理单元处理后的密钥流与所 述初始层 3消息中的变量进行异或运算,生成部分数据被加密后的初始层 3 消息。
18、 根据权利要求 15所述的装置, 其特征在于, 所述装置还包括: 第三设置单元, 用于将长度参数的值设定为所述初始层 3 消息的长度 值, 所述长度参数是演进分组系统加密算法的输入参数;
所述生成单元具体用于将所述第三设置单元设置的长度参数作为输入 参数通过所述演进分组系统加密算法生成密钥流;
所述装置还包括:
第二格式处理单元, 用于根据所述初始层 3 消息的格式与所述部分待 加密数据的长度获取所述初始层 3 消息中待加密数据的起始比特位和终止 比特位; 保留所述生成密钥流中与所述起始比特位至所述终止比特位相对 应的比特位, 将所述密钥流中的除所述起始比特位至终止比特位之外的其 它比特位置换为零。
19、 根据权利要求 15所述的装置, 其特征在于, 所述装置还包括: 第四设置单元, 用于将长度参数的值设定为所述初始层 3 消息中变量 长度值或所述初始层 3 消息的长度值, 所述长度参数是演进分组系统加密 算法的输入参数;
所述生成单元具体用于将所述长度参数作为输入参数通过所述演进分 组系统加密算法生成密钥流;
所述装置还包括:
第三格式处理单元, 用于根据所述部分待加密数据的长度截短所述生 成的密钥流, 所述截短的密钥流的长度与所述初始层 3 消息中部分待加密 的数据的长度值相同;
所述处理单元具体用于将所述第三格式处理单元处理后的密钥流与所 述初始层 3 消息中的部分待加密数据进行异或运算, 生成部分数据被加密 后的初始层 3消息。
20、 根据权利要求 15至 19中任一项所述的方法, 其特征在于, 所述 初始层 3消息为跟踪区域更新请求消息 TAU request,或新的初始层 3消息。
21、 一种解密装置, 其特征在于, 包括:
传输单元, 用于接收部分数据被加密后的初始层 3消息, 所述初始层 3 消息中包括增加的加密指示, 所述加密指示用于标识所述初始层 3 消息中 部分待加密数据被加密;
生成单元, 用于才艮据所述初始层 3 消息中的所述增加的加密指示, 生 成密钥流, 所述密钥流用于对所述初始层 3 消息中部分被加密数据进行解 密, 所述部分被加密数据包括小数据;
处理单元, 将所述密钥流与所述初始层 3 消息进行异或运算, 生成部 分数据被解密后的初始层 3消息。
22、 根据权利要求 21所述的装置, 其特征在于, 所述装置还包括: 第一设置单元, 用于将长度参数的值设定为所述初始层 3 消息中所述 部分被加密数据的长度值, 所述长度参数为演进分组系统加密算法的输入 参数;
所述生成单元具体用于将所述第一设置单元设置的长度参数作为输入 参数通过所述演进分组系统加密算法生成密钥流;
所述处理单元具体用于将所述生成单元生成的密钥流与所述初始层 3 消息中的部分被加密数据进行异或运算,生成部分数据被解密后的初始层 3 消息。
23、 根据权利要求 21所述的装置, 其特征在于, 所述装置还包括: 第二设置单元, 用于将长度参数的值设定为所述初始层 3 消息中变量 长度值, 所述长度参数是演进分组系统加密算法的输入参数;
所述生成单元具体用于将所述第二设置单元设置的长度参数作为输入 参数通过所述演进分组系统加密算法生成密钥流;
所述装置还包括:
第一格式处理单元, 用于根据所述初始层 3 消息的格式与所述部分被 加密数据的长度获取所述初始层 3 消息中被加密数据的起始比特位和终止 比特位, 保留所述密钥流中与所述起始比特位至所述终止比特位相对应的 比特位, 将所述密钥流中的除所述起始比特位至终止比特位之外的其它比 特位置换为零;
所述处理单元具体用于将所述第一格式处理单元处理后的密钥流与所 述初始层 3消息中的变量进行异或运算,生成部分数据被解密后的初始层 3 消息。
24、 根据权利要求 21所述的装置, 其特征在于, 所述装置还包括: 第三设置单元, 用于将长度参数的值设定为所述初始层 3 消息的长度 值, 所述长度参数是演进分组系统加密算法的输入参数;
所述生成单元具体用于将所述第三设置单元设置的长度参数作为输入 参数通过所述演进分组系统加密算法生成密钥流;
所述装置还包括:
第二格式处理单元, 用于根据所述初始层 3 消息的格式与所述部分被 加密数据的长度获取所述初始层 3 消息中被加密数据的起始比特位和终止 比特位, 保留所述生成密钥流中与所述起始比特位至所述终止比特位相对 应的比特位, 将所述密钥流中的除所述起始比特位至终止比特位之外的其 它比特位置换为零。
25、 根据权利要求 21所述的装置, 其特征在于, 所述装置还包括: 第四设置单元, 用于将长度参数的值设定为所述初始层 3 消息中变量 长度值或所述初始层 3 消息的长度值, 所述长度参数是演进分组系统加密 算法的输入参数;
所述生成单元具体用于将所述第四设置单元设置的长度参数作为输入 参数通过所述演进分组系统加密算法生成密钥流;
所述装置还包括:
第三格式处理单元, 用于根据所述部分被加密数据的长度截短所述生 成的密钥流, 所述截短的密钥流的长度与所述初始层 3 消息中被加密的部 分的长度值相同;
所述处理单元具体用于将所述第三格式处理单元处理后的密钥流与所 述初始层 3 消息中的部分被加密数据进行异或运算, 生成部分数据被解密 后的初始层 3消息。
26、 根据权利要求 21至 25中任一项所述的方法, 其特征在于, 所述 初始层 3消息为跟踪区域更新请求消息 TAU request,或新的初始层 3消息。
PCT/CN2012/083661 2011-10-27 2012-10-29 一种加密方法,解密方法和相关装置 WO2013060302A1 (zh)

Priority Applications (5)

Application Number Priority Date Filing Date Title
EP12844330.6A EP2765734A4 (en) 2011-10-27 2012-10-29 ENCRYPTION METHOD, DECOMPOSITION METHOD AND ASSOCIATED DEVICE
US14/263,253 US9992669B2 (en) 2011-10-27 2014-04-28 Encryption method, decryption method, and related apparatus
US15/965,854 US10771966B2 (en) 2011-10-27 2018-04-28 Encryption method, decryption method, and related apparatus
US17/013,643 US11757623B2 (en) 2011-10-27 2020-09-06 Encryption method, decryption method, and related apparatus
US18/453,662 US20240064003A1 (en) 2011-10-27 2023-08-22 Encryption Method, Decryption Method, and Related Apparatus

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201110331957.0A CN103096302B (zh) 2011-10-27 2011-10-27 一种加密方法、解密方法和相关装置
CN201110331957.0 2011-10-27

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US14/263,253 Continuation US9992669B2 (en) 2011-10-27 2014-04-28 Encryption method, decryption method, and related apparatus

Publications (1)

Publication Number Publication Date
WO2013060302A1 true WO2013060302A1 (zh) 2013-05-02

Family

ID=48167134

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2012/083661 WO2013060302A1 (zh) 2011-10-27 2012-10-29 一种加密方法,解密方法和相关装置

Country Status (4)

Country Link
US (4) US9992669B2 (zh)
EP (1) EP2765734A4 (zh)
CN (2) CN103096302B (zh)
WO (1) WO2013060302A1 (zh)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2015036776A1 (en) * 2013-09-13 2015-03-19 Vodafone Ip Licensing Limited Methods and systems for communicating with an m2m device
CN104507083A (zh) * 2014-12-25 2015-04-08 宇龙计算机通信科技(深圳)有限公司 信息加密方法、服务器和终端
CN111739190A (zh) * 2020-05-27 2020-10-02 深圳市元征科技股份有限公司 车辆诊断文件加密方法、装置、设备及存储介质

Families Citing this family (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103746962B (zh) * 2013-12-12 2017-01-25 华南理工大学 一种goose电力实时报文加解密方法
EP3308557B1 (en) * 2015-06-11 2023-06-07 Intel Corporation Cellular iot network architecture
CN105162588B (zh) * 2015-09-14 2018-06-15 杭州朗和科技有限公司 一种媒体文件加解密方法和装置
CN105897669A (zh) * 2015-11-11 2016-08-24 乐卡汽车智能科技(北京)有限公司 数据发送、接收方法、发送端、接收端和can总线网络
CN105376261B (zh) * 2015-12-21 2020-01-14 Tcl集团股份有限公司 一种用于即时通讯消息的加密方法及系统
CN108605225B (zh) * 2016-02-06 2021-02-12 华为技术有限公司 一种安全处理方法及相关设备
US10360820B2 (en) * 2016-09-04 2019-07-23 Shahriar Pourazin Instrumentation privacy apparatus and method
CN108023724B (zh) * 2016-11-04 2020-10-20 北京紫光展锐通信技术有限公司 数据传输方法及装置
US10470042B2 (en) 2017-07-27 2019-11-05 Nokia Technologies Oy Secure short message service over non-access stratum
CN109788474A (zh) * 2017-11-14 2019-05-21 华为技术有限公司 一种消息保护的方法及装置
CN109951268B (zh) 2019-02-18 2020-12-22 吉林大学珠海学院 基于位置换和位变换的加密解密方法和装置
US11093638B2 (en) 2019-04-05 2021-08-17 Online Media Holdings Ltd Distributed management of user privacy information
US11140170B2 (en) 2019-04-05 2021-10-05 Online Media Holdings Ltd Network-based partial and full user identification techniques
CN112714070B (zh) * 2019-10-24 2024-01-09 北京华为数字技术有限公司 通信方法、装置、系统及存储介质
CN111310222B (zh) * 2019-11-20 2023-08-15 金现代信息产业股份有限公司 文件加密方法

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070286415A1 (en) * 2006-06-07 2007-12-13 Stmicroelectronics S.R.L. AES encryption circuitry with CCM
CN101237461A (zh) * 2008-03-10 2008-08-06 杭州华三通信技术有限公司 流加密及解密方法及装置
CN101453708A (zh) * 2007-09-04 2009-06-10 捷讯研究有限公司 用于处理发送到移动设备的消息附件的系统和方法
CN102215077A (zh) * 2011-06-13 2011-10-12 四川大学 一种ads-b目标精确位置加密的方法

Family Cites Families (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2003036857A1 (en) * 2001-10-24 2003-05-01 Nokia Corporation Ciphering as a part of the multicast cencept
US7623656B2 (en) * 2004-02-17 2009-11-24 Qualcomm Incorporated Stream cipher encryption and message authentication
US7627115B2 (en) * 2004-08-23 2009-12-01 Broadcom Corporation Method and system for implementing the GEA3 encryption algorithm for GPRS compliant handsets
MX2008016258A (es) * 2006-06-19 2009-02-03 Interdigital Tech Corp Metodo y aparato para proteccion de seguridad de la identidad de un usuario original en un mensaje de señalizacion inicial.
GB2439613B (en) * 2006-06-30 2008-08-27 Motorola Inc Processor, method and terminal for use in communications
CN101155026B (zh) * 2006-09-29 2010-12-08 华为技术有限公司 通信安全性保护方法和装置
US8345713B2 (en) * 2006-10-25 2013-01-01 Verizon Patent And Licensing Inc. Methods and apparatus for content scrambling in a communications system
US8532614B2 (en) * 2007-10-25 2013-09-10 Interdigital Patent Holdings, Inc. Non-access stratum architecture and protocol enhancements for long term evolution mobile units
JP2010028747A (ja) * 2008-07-24 2010-02-04 Fujitsu Ltd 秘匿処理を行う送信装置及び受信装置
KR101475349B1 (ko) * 2008-11-03 2014-12-23 삼성전자주식회사 이동 통신 시스템에서 단말 보안 능력 관련 보안 관리 방안및 장치
FR2941584B1 (fr) * 2009-01-27 2011-04-01 St Nxp Wireless France Procede de traitement de flux de donnees recues par un appareil de communication sans fil et necessitant au moins en partie des traitements cryptographiques et appareil correspondant
US8862900B2 (en) * 2010-01-08 2014-10-14 The Research Foundation For The State University Of New York Secure distributed storage system and method
US8379855B2 (en) * 2010-06-03 2013-02-19 Nokia Corporation Ciphering in a packet-switched telecommunications system
EP2509345A1 (en) * 2011-04-05 2012-10-10 Panasonic Corporation Improved small data transmissions for machine-type-communication (MTC) devices
KR101929307B1 (ko) * 2011-04-11 2018-12-17 삼성전자 주식회사 Csg 셀에서 단말이 셀 재선택 우선 순위를 효율적으로 제어하는 방법 및 장치
US8989089B2 (en) * 2011-08-18 2015-03-24 Ofinno Technologies, Llc Automobile data transmission
US8971268B2 (en) * 2011-08-24 2015-03-03 Lg Electronics Inc. Method and apparatus for transmitting uplink data associated with MTC device trigger function
US10306596B2 (en) * 2012-05-10 2019-05-28 Samsung Electronics Co., Ltd Method and system for connectionless transmission during uplink and downlink of data packets

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070286415A1 (en) * 2006-06-07 2007-12-13 Stmicroelectronics S.R.L. AES encryption circuitry with CCM
CN101453708A (zh) * 2007-09-04 2009-06-10 捷讯研究有限公司 用于处理发送到移动设备的消息附件的系统和方法
CN101237461A (zh) * 2008-03-10 2008-08-06 杭州华三通信技术有限公司 流加密及解密方法及装置
CN102215077A (zh) * 2011-06-13 2011-10-12 四川大学 一种ads-b目标精确位置加密的方法

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2015036776A1 (en) * 2013-09-13 2015-03-19 Vodafone Ip Licensing Limited Methods and systems for communicating with an m2m device
US10313307B2 (en) 2013-09-13 2019-06-04 Vodafone Ip Licensing Limited Communicating with a machine to machine device
US10412052B2 (en) 2013-09-13 2019-09-10 Vodafone Ip Licensing Limited Managing machine to machine devices
US10439991B2 (en) 2013-09-13 2019-10-08 Vodafone Ip Licensing Limited Communicating with a machine to machine device
US10630646B2 (en) 2013-09-13 2020-04-21 Vodafone Ip Licensing Limited Methods and systems for communicating with an M2M device
US10673820B2 (en) 2013-09-13 2020-06-02 Vodafone Ip Licensing Limited Communicating with a machine to machine device
US11063912B2 (en) 2013-09-13 2021-07-13 Vodafone Ip Licensing Limited Methods and systems for communicating with an M2M device
CN104507083A (zh) * 2014-12-25 2015-04-08 宇龙计算机通信科技(深圳)有限公司 信息加密方法、服务器和终端
CN104507083B (zh) * 2014-12-25 2019-05-14 宇龙计算机通信科技(深圳)有限公司 信息加密方法、服务器和终端
CN111739190A (zh) * 2020-05-27 2020-10-02 深圳市元征科技股份有限公司 车辆诊断文件加密方法、装置、设备及存储介质

Also Published As

Publication number Publication date
US11757623B2 (en) 2023-09-12
CN103096302B (zh) 2016-03-02
CN105577364A (zh) 2016-05-11
CN103096302A (zh) 2013-05-08
US10771966B2 (en) 2020-09-08
US20180249330A1 (en) 2018-08-30
US20200412527A1 (en) 2020-12-31
US20240064003A1 (en) 2024-02-22
US9992669B2 (en) 2018-06-05
EP2765734A4 (en) 2014-10-22
CN105577364B (zh) 2019-11-05
EP2765734A1 (en) 2014-08-13
US20140233735A1 (en) 2014-08-21

Similar Documents

Publication Publication Date Title
US20240064003A1 (en) Encryption Method, Decryption Method, and Related Apparatus
CN113630773B (zh) 安全实现方法、设备以及系统
US20200228977A1 (en) Parameter Protection Method And Device, And System
EP3512291B1 (en) Data transmission method, relevant device and system
CN101562813B (zh) 实时数据业务的实现方法、实时数据业务系统和移动终端
CN101583083B (zh) 一种实时数据业务的实现方法和实时数据业务系统
US9264404B1 (en) Encrypting data using time stamps
JP5855127B2 (ja) 無線通信システムにおける短文データの暗号化方法及び装置
KR20110119785A (ko) 비-암호화 망 동작 해결책
CN101707767B (zh) 一种数据传输方法及设备
JP2017085559A (ja) 制限帯域幅を有するチャネルにおける効率的かつ強秘匿性の対称暗号化のためのシステムおよび方法
WO2017133021A1 (zh) 一种安全处理方法及相关设备
WO2012083828A1 (zh) 本地路由业务的实现方法、基站及系统
CN102223631B (zh) M2m中数据加密传输的方法、设备及系统
CN113228720A (zh) 用于确保大小受约束的认证协议中的安全附接的方法和装置
Mundt et al. General security considerations of LoRaWAN version 1.1 infrastructures
Fazzat et al. A comparative performance study of cryptographic algorithms for connected vehicles
CN102083062A (zh) 业务流加密处理方法及系统
CN101087188B (zh) 无线网络中mbs授权密钥的管理方法及系统
CN115885496B (zh) 一种通信方法及相关装置
CN117880805A (zh) 智能设备的配网方法、装置和电子设备

Legal Events

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

Ref document number: 12844330

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

WWE Wipo information: entry into national phase

Ref document number: 2012844330

Country of ref document: EP