Data encryption technology is a key method to secure sensitive data. The privacy and confidentiality of data is protected by encrypting the data, i.e., transforming the original data into a form that cannot be understood without authorization. However, the security of traditional encryption algorithms is gradually challenged with the increase in computing power. Therefore, studying how to apply more advanced encryption techniques has become a current research hotspot. This study aims to analyze the application of data encryption techniques and explore the advantages and applicability of emerging encryption algorithms. This paper presents a variety of methods for preventing users' privacy breaches, with a primary focus on the principles of homomorphic encryption and how data can be accessed by users without decryption. Additionally, the working principles of secure multiparty computation are discussed, allowing multiple users to perform calculations on shared data while preserving data privacy. Furthermore, the paper explores data encryption techniques that employ specific algorithms to convert plaintext into ciphertext, ensuring both data consistency and privacy. Finally, a summary and future prospects are provided.