The present invention is a method to counter a secondary or higher order DCA attack applied to a block cipher coded table base (TCabi, j) implementation of a cryptographic algorithm to be applied to a message (m). Translating the cryptographic algorithm block cipher to be applied to the message (m) into a series of look-up tables (Tabi, j) and applying secret lossless encoding to form a series of look-up tables (TCi, j) and a message-dependent masking value comprising calculating an assignment of at least two masking values (mmmask1, mmmask2) to the input of the table network based on at least two different message derivation functions (F1, F2) And the steps that depend on the calculated message Apply to message (m) based on re-randomizing table (TCi, j) using king values (mmmask1, mmmask2) and network of randomized table (TCi, j) And calculating a round to be different.
展开▼