Abstract:The Hill cipher is resistant to brute-force and statistical attacks, but it can be broken with a known plaintext-ciphertext attack (KPCA). In this paper, we propose a modification of the Hill cipher, HCM-PRE, which is still resistant to brute-force and statistical attacks, and is resistant also to KPCA due to dynamic encryption key matrix generating. With the modification, the new HCM-PRE can be applied widely in the systems which need high security (e.g., image encryption). Experimental results show that the proposed modification is significantly more effective in the encryption quality of images than original Hill cipher and its known modifications (HCM-PT, HCM-H, HCM-HMAC, and HCM-EE) in the case of images with large single colour areas, and slightly more effective otherwise. HCM-PRE is about two times faster than HCM-EE and HCM-HMAC and four times faster than HCM-H in the frame of our experiments.