A cryptographic device arranged to compute a target block cipher ( B t) on an input message, the device comprising - a first block cipher unit arranged to - compute the target block cipher ( B t) on the input message obtaining a first block cipher result ( C 1), - a second block cipher unit arranged to - compute the target block cipher ( B t) on the input message obtaining a second block cipher result ( C 2), - a first control unit arranged to take the first block cipher result and the second block cipher result as input, wherein a control unit takes as input a first value and a second value and produces the first value only if the first value and the second value are equal, the control unit being arranged to - combine the first value and the second value by applying a first combination function to the first value and the second value obtaining a comparison value (comb ( C 1, C 2)), said combination function being equal to a predetermined value ( δ) only if the first value and second value are equal, and - compute an ancillary block cipher (142, B 1) on the comparison value, obtaining a computed control value (Δ comp), and - combine the first value, the computed control value (Δ comp), and a stored control value (Δ store) by applying a second combination function, said second combination function producing the first value only if the computed control value (Δ comp) equals the stored control value (Δ store). - a first block cipher unit arranged to - compute the target block cipher ( B t) on the input message obtaining a first block cipher result ( C 1), - compute the target block cipher ( B t) on the input message obtaining a first block cipher result ( C 1), - a second block cipher unit arranged to - compute the target block cipher ( B t) on the input message obtaining a second block cipher result ( C 2), - compute the target block cipher ( B t) on the input message obtaining a second block cipher result ( C 2), - a first control unit arranged to take the first block cipher result and the second block cipher result as input, wherein a control unit takes as input a first value and a second value and produces the first value only if the first value and the second value are equal, the control unit being arranged to - combine the first value and the second value by applying a first combination function to the first value and the second value obtaining a comparison value (comb ( C 1, C 2)), said combination function being equal to a predetermined value ( δ) only if the first value and second value are equal, and - compute an ancillary block cipher (142, B 1) on the comparison value, obtaining a computed control value (Δ comp), and - combine the first value, the computed control value (Δ comp), and a stored control value (Δ store) by applying a second combination function, said second combination function producing the first value only if the computed control value (Δ comp) equals the stored control value (Δ store). - combine the first value and the second value by applying a first combination function to the first value and the second value obtaining a comparison value (comb ( C 1, C 2)), said combination function being equal to a predetermined value ( δ) only if the first value and second value are equal, and - compute an ancillary block cipher (142, B 1) on the comparison value, obtaining a computed control value (Δ comp), and - combine the first value, the computed control value (Δ comp), and a stored control value (Δ store) by applying a second combination function, said second combination function producing the first value only if the computed control value (Δ comp) equals the stored control value (Δ store).