EncDecRes tested correctly with random permutation