Code to produce look-up tables for the MDI-like algorithm