An apparatus and method for preventing information leakage attacks on a
microelectronic assembly is described for performing a cryptographic
algorithm by transforming a first function, used by the cryptographic
algorithm, into a second function. The method includes receiving (1102) a
masked input data having n number of bits that is masked with an input
mask, wherein n is a first predetermined integer. The method also includes
processing (1104) the masked input data using a second function based on a
predetermined masking scheme, and producing (1106) a masked output data
having m number of bits that is masked with an output mask, wherein m is a
second predetermined integer.