Method for computer-aided obfuscation of program code, wherein a multiplicity of computing steps are implemented in the program code, wherein predetermined computing steps of the multiplicity of computing steps are called in a predetermined order when the program code is executed, and at least some of the predetermined computing steps are prescribed computing steps (ST i), in each of which a first table saved in the program code and comprising a multiplicity of digital first table values (T1 i) is accessed in order to read from the first table a first table value (T1 i) needed for the respective prescribed computing step (ST i), wherein the following steps are carried out to alter the program code: - a dynamic mask comprising a multiplicity of digital mask values (M i) is generated, wherein the mask values (M i) of at least part of the mask differ from one another and a respective mask value (M i) is valid for a respective prescribed computing step (ST i); - each first table value (T1 i) of the first table is converted into a digital second table value (T2 i) by means of the mask value (M i) that is valid in the respective prescribed computing step (ST i) when the respective first table value (T1 i) is read in, as a result of which a second table comprising second table values (T2 i) is obtained that is saved in the program code instead of the first table; - an additional computing step (f i,M -1) is implemented in the program code for each prescribed computing step (ST i), which additional computing step converts a read second table value (T2 i) back into that first table value (T1 i) that is needed for the respective prescribed computing step (ST i), characterized in that an initial mask value and update steps are stipulated to generate the dynamic mask, wherein the mask value (M i) that is valid for the next prescribed computing step (ST i) is calculated by applying one or more successive update steps to a currently valid mask value (M i), wherein the update steps are also implemented in the program code, so that the currently valid mask value (M i) is present in the respective prescribed computing step (ST i), wherein the additional computing step (f i,M -1) in the respective prescribed computing step is dependent on the currently valid mask value (M i), wherein the update steps for at least some of the mask values (M i) to which they are applied are stipulated differently. - a dynamic mask comprising a multiplicity of digital mask values (M i) is generated, wherein the mask values (M i) of at least part of the mask differ from one another and a respective mask value (M i) is valid for a respective prescribed computing step (ST i); - each first table value (T1 i) of the first table is converted into a digital second table value (T2 i) by means of the mask value (M i) that is valid in the respective prescribed computing step (ST i) when the respective first table value (T1 i) is read in, as a result of which a second table comprising second table values (T2 i) is obtained that is saved in the program code instead of the first table; - an additional computing step (f i,M -1) is implemented in the program code for each prescribed computing step (ST i), which additional computing step converts a read second table value (T2 i) back into that first table value (T1 i) that is needed for the respective prescribed computing step (ST i), characterized in that an initial mask value and update steps are stipulated to generate the dynamic mask, wherein the mask value (M i) that is valid for the next prescribed computing step (ST i) is calculated by applying one or more successive update steps to a currently valid mask value (M i), wherein the update steps are also implemented in the program code, so that the currently valid mask value (M i) is present in the respective prescribed computing step (ST i), wherein the additional computing step (f i,M -1) in the respective prescribed computing step is dependent on the currently valid mask value (M i), wherein the update steps for at least some of the mask values (M i) to which they are applied are stipulated differently.