Method for securing against side channel attack an execution of a Keccak cryptographic algorithm computation on a state matrix of 5*5 64-bit words, said method comprising the steps of: - generating a maximum of 5*4 random values of the size of the words of the state matrix for the masking of the data; - constructing a mask matrix M whose elements are all distinct as M = r 0 r 0 ⊕ t 1 r 0 ⊕ t 2 r 0 ⊕ t 3 r 0 ⊕ t 4 r 1 r 1 ⊕ t 1 r 1 ⊕ t 2 r 1 ⊕ t 3 r 1 ⊕ t 4 r 2 r 2 ⊕ t 1 r 2 ⊕ t 2 r 2 ⊕ t 3 r 2 ⊕ t 4 r 3 r 3 ⊕ t 1 r 3 ⊕ t 2 r 3 ⊕ t 3 r 3 ⊕ t 4 r 4 r 4 ⊕ t 1 r 4 ⊕ t 2 r 4 ⊕ t 3 r 4 ⊕ t 4 r 0,..., r 4 and t 1,..., t 4 being said random values, or as M = r 0 rol r 1 i 1 rol r 2 i 2 rol r 3 i 3 rol r 4 i 4 r 1 rol r 2 i 1 rol r 3 i 2 rol r 4 i 3 rol r 0 i 4 r 2 rol r 3 i 1 rol r 4 i 2 rol r 0 i 3 rol r 1 i 4 r 3 rol r 4 i 1 rol r 0 i 2 rol r 1 i 3 rol r 2 i 4 r 4 rol r 0 i 1 rol r 1 i 2 rol r 2 i 3 rol r 3 i 4 r 0,..., r 4 being said random values and i 1,..., i 4 indexes between 0 and 63, all different; - masking the state matrix by applying a XOR operation with said constructed mask matrix thereby obtaining a masked state matrix (A+M); - for each function (F∈{θ, ρ, π, χ,}) in a round of the Keccak cryptographic algorithm or for the Keccak cryptographic algorithm round function: • applying the function to the masked state matrix (A+M) to obtain an intermediate calculated matrix (F(A+M)); • constructing from the function a set of degraded operations (F') to be applied on values in the mask matrix • applying the set of degraded operations (F') to the mask matrix to obtain correction values (F'); • recovering as the new masked state matrix, the result (F +M) of applying the function to the state matrix masked by the mask matrix using the correction values (F') and the intermediate calculated matrix (F(A+M)). - generating a maximum of 5*4 random values of the size of the words of the state matrix for the masking of the data; - constructing a mask matrix M whose elements are all distinct as M = r 0 r 0 ⊕ t 1 r 0 ⊕ t 2 r 0 ⊕ t 3 r 0 ⊕ t 4 r 1 r 1 ⊕ t 1 r 1 ⊕ t 2 r 1 ⊕ t 3 r 1 ⊕ t 4 r 2 r 2 ⊕ t 1 r 2 ⊕ t 2 r 2 ⊕ t 3 r 2 ⊕ t 4 r 3 r 3 ⊕ t 1 r 3 ⊕ t 2 r 3 ⊕ t 3 r 3 ⊕ t 4 r 4 r 4 ⊕ t 1 r 4 ⊕ t 2 r 4 ⊕ t 3 r 4 ⊕ t 4 r 0,..., r 4 and t 1,..., t 4 being said random values, or as M = r 0 rol r 1 i 1 rol r 2 i 2 rol r 3 i 3 rol r 4 i 4 r 1 rol r 2 i 1 rol r 3 i 2 rol r 4 i 3 rol r 0 i 4 r 2 rol r 3 i 1 rol r 4 i 2 rol r 0 i 3 rol r 1 i 4 r 3 rol r 4 i 1 rol r 0 i 2 rol r 1 i 3 rol r 2 i 4 r 4 rol r 0 i 1 rol r 1 i 2 rol r 2 i 3 rol r 3 i 4 r 0,..., r 4 being said random values and i 1,..., i 4 indexes between 0 and 63, all different; - masking the state matrix by applying a XOR operation with said constructed mask matrix thereby obtaining a masked state matrix (A+M); - for each function (F∈{θ, ρ, π, χ,}) in a round of the Keccak cryptographic algorithm or for the Keccak cryptographic algorithm round function: • applying the function to the masked state matrix (A+M) to obtain an intermediate calculated matrix (F(A+M)); • constructing from the function a set of degraded operations (F') to be applied on values in the mask matrix • applying the set of degraded operations (F') to the mask matrix to obtain correction values (F'); • recovering as the new masked state matrix, the result (F +M) of applying the function to the state matrix masked by the mask matrix using the correction values (F') and the intermediate calculated matrix (F(A+M)). • applying the function to the masked state matrix (A+M) to obtain an intermediate calculated matrix (F(A+M)); • constructing from the function a set of degraded operations (F') to be applied on values in the mask matrix • applying the set of degraded operations (F') to the mask matrix to obtain correction values (F'); • recovering as the new masked state matrix, the result (F +M) of applying the function to the state matrix masked by the mask matrix using the correction values (F') and the intermediate calculated matrix (F(A+M)).