The security of a recently proposed technique for encryption images by Sinha and Singh [A. Sinha, K. Singh, Opt. Commun. 218 (2003) 229], based on the use of digital signatures and error correcting codes, is analyzed. The proposed cryptosystem is shown to have some weakness. In fact, the secret key and the original image can be recovered efficiently by a brute force attack.