A Difference-Equation-Based Robust Image Encryption Scheme with Chaotic Permutations and Logic Gates