Method for protecting a Boolean circuit associated with a structural description of the circuit comprising elementary Boolean variables, each represented by one bit, the method comprising the steps consisting in: - selecting a set of k elementary Boolean variables of the circuit as a function of predefined selection criteria, - constructing a variable x represented by k bits by concatenation of the k selected variables in accordance with a chosen order, - determining a supplementary code D as a function of a condition related to the target value of the dual distance of said supplementary code D, - determining a binary code C comprising a set of code words and belonging to a given vector space, from a supplementary code D and a set of candidate binary codes, said binary code C having a length n and a size 2 k, where k designates the number of bits representing said variable x; - substituting the variable x in the structural description of the Boolean circuit with a protected variable z represented by n bits so that: - any operation of writing on the variable x in the circuit is substituted with an operation of writing on the variable z, the variable z being generated by adding the variable x encoded by said code C to a random bit vector y encoded by the supplementary code D, and - any operation of reading the variable x in the circuit is substituted with an operation of reading the value of the protected variable z and an operation of decoding said read value of the protected variable z using a decoding matrix J of size n × k determined from the binary code C and the supplementary code D of the binary code C. - selecting a set of k elementary Boolean variables of the circuit as a function of predefined selection criteria, - constructing a variable x represented by k bits by concatenation of the k selected variables in accordance with a chosen order, - determining a supplementary code D as a function of a condition related to the target value of the dual distance of said supplementary code D, - determining a binary code C comprising a set of code words and belonging to a given vector space, from a supplementary code D and a set of candidate binary codes, said binary code C having a length n and a size 2 k, where k designates the number of bits representing said variable x; - substituting the variable x in the structural description of the Boolean circuit with a protected variable z represented by n bits so that: - any operation of writing on the variable x in the circuit is substituted with an operation of writing on the variable z, the variable z being generated by adding the variable x encoded by said code C to a random bit vector y encoded by the supplementary code D, and - any operation of reading the variable x in the circuit is substituted with an operation of reading the value of the protected variable z and an operation of decoding said read value of the protected variable z using a decoding matrix J of size n × k determined from the binary code C and the supplementary code D of the binary code C. - any operation of writing on the variable x in the circuit is substituted with an operation of writing on the variable z, the variable z being generated by adding the variable x encoded by said code C to a random bit vector y encoded by the supplementary code D, and - any operation of reading the variable x in the circuit is substituted with an operation of reading the value of the protected variable z and an operation of decoding said read value of the protected variable z using a decoding matrix J of size n × k determined from the binary code C and the supplementary code D of the binary code C.