Text this: Security against differential and linear cryptanalysis for general SPT models