Bit operations with elements of the RSA algorithm in encryption-decryption of color images



Journal Title

Journal ISSN

Volume Title


Видавництво Львівської політехніки
Lviv Politechnic Publishing House


An image as a stochastic signal is one of the most common forms of information. Protecting images from unauthorized access and applying is a correspondingly urgent task. This causes the use of well-known classical encryption methods in the case of image encryption. But the image is a signal that possesses, in addition to typical informativeness, also visual informativeness. Informativeness for modern image processing methods makes it possible to ensure unauthorized access. Creating an attack on an encrypted image is possible in two ways: by traditional hacking of encryption methods, or by classical methods of visual image processing (filtering, highlighting contours, etc.). In this regard, one more requirement is put forward to encryption methods in the case of their application concerning images – this is the complete noise of the encrypted image. This is necessary so that the use of visual image processing methods becomes impossible. The RSA algorithm is one of the most widely known industrial standards for encrypting signals. Unlike symmetric encryption, in an open-key encryption scheme, it is impossible to calculate the decryption procedure, knowing the encryption procedure. Namely, the working time of the algorithm for calculating the decryption procedure is so great that it cannot be implemented on any modern computers, as well as on computers of the future. Such coding schemes are called asymmetric. Therefore, the urgent task is to implement the application of the RSA algorithm so that when encrypting an image: – the cryptographic stability of the RSA algorithm has not become worse; – the full image noise was achieved to prevent the use of visual image processing techniques. The algorithm of elements of the RSA algorithm, as the most resistant to unauthorized decryption of signals, and bitwise operations for a compatible combination during encryption and decryption of images is proposed by the authors. Encryption – decryption is performed without additional noise. The proposed algorithm is applied to images in which there are strictly extracted contours. Elements of the RSA algorithm are assigned to perform bitwise operations on the intensity values of pixels of a color image. The developed algorithm has higher cryptographic stability compared to the traditional RSA algorithm. The authors described the possibilities of using elements of the RSA algorithm in bitwise transformations when encrypting and decrypting images. The results of encryption simulation for cryptographic transformations of color images of a given dimension are presented. Modified models and algorithmic procedures of key formation processes of direct and inverse cryptographic transformations have been developed. They are reduced to elemental mathematical operations.



Encryption, Color image, Bitwise operations, Contour, Pixel intensity, Decryption, Matrix of pixel intensities


Kovalchuk A. Bit operations with elements of the RSA algorithm in encryption-decryption of color images / Anatoliy Kovalchuk, Yuriy Peleckh, Tetiana Bubela // Measuring equipment and metrology. — Lviv : Lviv Politechnic Publishing House, 2022. — Vol 83. — No 3. — P. 5–10.