We perform a numerical analysis of the double random phase encryption-decryption technique to determine how, in the case of both amplitude and phase encoding, the two decryption keys (the image- and Fourier-plane keys) affect the output gray-scale image when they are in error. We perform perfect encryption and imperfect decryption. We introduce errors into the decrypting keys that correspond to the use of random distributions of incorrect pixel values. We quantify the effects that increasing amounts of error in the image-plane key, the Fourier-plane key, and both keys simultaneously have on the decrypted image. Quantization effects are also examined. (C) 2008 Optical Society of America.