1. A data processing method comprising: applying a mask to input data to generate masked input data; transforming said masked input data into transformed data using byte substitution implemented using a lookup table (LUT); and for mask correction of said transformed data, using said masked input data and said mask in combination to locate an entry in said LUT, said entry corresponding to a transformed and unmasked version of said input data.