On security of image ciphers based on logic circuits and chaotic permutations