摘要 |
Embodiments of the present invention provide an encryption method, a decryption method, and a related apparatus. According to the present invention, secure transmission of small data can be ensured. The encryption method includes: generating a keystream, where the keystream is used to encrypt a part of data to be encrypted in an initial layer-3 message, and the part of data to be encrypted includes small data; generating, by performing an exclusive OR operation on the keystream and the initial layer-3 message, an initial layer-3 message in which the part of data is encrypted; and sending the initial layer-3 message in which the part of data is encrypted, where the initial layer-3 message includes an added encryption indication, and the encryption indication is used to indicate that the part of data to be encrypted in the initial layer-3 message is encrypted, so that a network side generates a keystream according to the added encryption indication, and then decrypts, according to the generated keystream, the initial layer-3 message in which the part of data is encrypted. |