A proposed algorithm for digital image encryption is presented in this paper. It combines permutation and substitution techniques. Logistic map which is a chaos function is used in both techniques. Before encrypting, the keystream is generated first from the logistics map. Then, the plain image’s pixel positions are shuffled with perfect shuffle permutation based on ascending keystream order, thereby executing the permutation process. Next, the pixel values are substituted using the XOR operation with a keystream which is also generated from the logistic map. Pixels are operated in cipher block chain mode. This research aim is to develop an image encryption algorithm, especially in the permutation process, that has high resistance to attacks by crackers. The attack types observed in this research include statistical attacks, permutation matrix attacks, differential attacks, as well as brute force attacks. From the experimental results and analysis of the proposed algorithm indicate that it has high resistance from all those attacks.