As the structure of existing anti-power attack circuits has certain security problems, this paper proposes a new mask-based control constant power logic circuit based on the existing masking technology. By integrating OR/NOR and AND/NAND circuits into a dual-rail circuit, different circuit logic functions can be controlled by inputting different masks. By introducing two parameters, Normalised Energy Deviation (NED) and Normalised Standard Deviation (NSD), the structure proposed in this paper improves the level of resistance of the circuit to power attacks to a certain extent, as well as reduces the cost of the circuit compared to other power attack resistant circuits.