Nonlinear functions and their application to cryptography