As an important issue in modern society, information security is addressed in this paper by designing a cryptographic algorithm based on finite fields in symmetric cryptographic algorithms. The SM4 algorithm is selected for design, and byte substitution is performed using finite field methods to propose a masking defense scheme for the SM4 algorithm. After analyzing the masking protection and related power consumption of the cryptographic algorithm designed in this paper, its resistance to attacks is compared with that of the standard SM4 algorithm and the ordinary SM4 multiplication masking algorithm. After adding the mask, the guessed values of each byte in each round of the key show no significant peaks, making it impossible for CPA attacks to obtain the true information of the master key, thereby achieving protection of the master key. Under the same frequency, the mask area of this algorithm is the largest (40,000 gates), but it has the highest information security.